"ls" now also prints the offset to the function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8174 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -144,7 +144,7 @@ dump_address_info(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
const char *symbol, *imageName;
|
const char *symbol, *imageName;
|
||||||
bool exactMatch;
|
bool exactMatch;
|
||||||
addr_t address;
|
addr_t address, baseAddress;
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
dprintf("not enough arguments\n");
|
dprintf("not enough arguments\n");
|
||||||
@@ -153,9 +153,10 @@ dump_address_info(int argc, char **argv)
|
|||||||
|
|
||||||
address = strtoul(argv[1], NULL, 16);
|
address = strtoul(argv[1], NULL, 16);
|
||||||
|
|
||||||
if (elf_lookup_symbol_address(address, NULL, &symbol, &imageName, &exactMatch) == B_OK)
|
if (elf_lookup_symbol_address(address, &baseAddress, &symbol, &imageName, &exactMatch) == B_OK) {
|
||||||
dprintf("%p = %s (%s)%s\n", (void *)address, symbol, imageName, exactMatch ? "" : " (nearest)");
|
dprintf("%p = %s + 0x%lx (%s)%s\n", (void *)address, symbol, address - baseAddress,
|
||||||
else
|
imageName, exactMatch ? "" : " (nearest)");
|
||||||
|
} else
|
||||||
dprintf("There is no image loaded at this address!\n");
|
dprintf("There is no image loaded at this address!\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user