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:
Ingo Weinhold
2008-08-23 00:05:16 +00:00
parent 0739b87ee9
commit 982413718d
+13 -3
View File
@@ -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");