Hi,
I am trying to lookup symbols for certain addresses, but the only symbols I am getting are either __memmove_avx_unaligned_erms
from libc both for addresses that actually match this symbol and for addresses that do not match it and are in a different module. I also sometimes get symbol unavailable
for addresses that should match __memmove_avx_unaligned_erms
. Can you please help me? Attached the code that does not work. I want to at least get a symbol from the correct module.
Thanks.
Marina
module_data_t *data;
data = dr_lookup_module(pc);
DR_ASSERT(data != NULL);
this->filename = std::string(data->full_path);
drsym_error_t symres;
drsym_info_t sym;
static char name[STR_MAX_LEN]; // I made it static to use less stack
sym.struct_size = sizeof(sym);
sym.name = name;
sym.name_size = STR_MAX_LEN;
static char file[STR_MAX_LEN]; // I made it static to use less stack
sym.file = file; // can also be NULL
sym.file_size = STR_MAX_LEN;
symres = drsym_lookup_address(data->full_path, pc - data->start, &sym,
DRSYM_DEFAULT_FLAGS);
DR_ASSERT(symres);
if(symres != DRSYM_ERROR_LINE_NOT_AVAILABLE) {
this->func_name = std::string(sym.name);
this->func_offset = pc - data->start - sym.start_offs;
} else {
this->func_name = "Symbol unavailable";
}
dr_free_module_data(data);
--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/dcef2032-b539-461b-8ea6-8c0588330d73n%40googlegroups.com.
Thanks! Looks like drsym_lookup_address
ALWAYS fails
Thanks! Looks like
drsym_lookup_address
ALWAYS fails
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/e917c1e4-fde6-4997-bb0e-6d382adce2c5n%40googlegroups.com.
Thanks for the help! I get either `DRSYM_ERROR_SYMBOL_NOT_FOUND` or `DRSYM_ERROR_LINE_NOT_AVAILABLE` (errors 5 and 6)
* When returning DRSYM_ERROR_LINE_NOT_AVAILABLE, the symbol information* start_offs, end_offs, and name will still be valid.
If I get `DRSYM_ERROR_LINE_NOT_AVAILABLE` (6) from `drsym_lookup_address()`, then `drsym_module_has_symbols()` returns ` DRSYM_SUCCESS` (0) and `drsym_get_module_debug_kind()` returns 257 (not sure what this is).
If I get `DRSYM_ERROR_SYMBOL_NOT_FOUND` (5) from `drsym_lookup_address()`, then `drsym_module_has_symbols()` returns `DRSYM_ERROR` (1) and `drsym_get_module_debug_kind()` returns `DRSYM_SYMBOLS` (0).
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/a2d4b557-b189-401b-bc6c-691ca0c64e25n%40googlegroups.com.