Improved the "ls" command:
* It can now also lookup userland symbols. * By respecting the currently debugged thread it smoothly cooperates with the "in_context" command. IOW it can lookup symbols in any team. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27167 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -156,9 +156,19 @@ dump_address_info(int argc, char **argv)
|
||||
|
||||
address = strtoul(argv[1], NULL, 16);
|
||||
|
||||
if (elf_debug_lookup_symbol_address(address, &baseAddress, &symbol,
|
||||
&imageName, &exactMatch) == B_OK) {
|
||||
kprintf("%p = %s + 0x%lx (%s)%s\n", (void *)address, symbol,
|
||||
status_t error;
|
||||
|
||||
if (IS_KERNEL_ADDRESS(address)) {
|
||||
error = elf_debug_lookup_symbol_address(address, &baseAddress, &symbol,
|
||||
&imageName, &exactMatch);
|
||||
} else {
|
||||
error = elf_debug_lookup_user_symbol_address(
|
||||
debug_get_debugged_thread()->team, address, &baseAddress, &symbol,
|
||||
&imageName, &exactMatch);
|
||||
}
|
||||
|
||||
if (error == B_OK) {
|
||||
kprintf("%p = %s + 0x%lx (%s)%s\n", (void*)address, symbol,
|
||||
address - baseAddress, imageName, exactMatch ? "" : " (nearest)");
|
||||
} else
|
||||
kprintf("There is no image loaded at this address!\n");
|
||||
|
||||
Reference in New Issue
Block a user