diff options
Diffstat (limited to 'gdb/addrmap.c')
-rw-r--r-- | gdb/addrmap.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/gdb/addrmap.c b/gdb/addrmap.c index b9a0f77..696a7dc 100644 --- a/gdb/addrmap.c +++ b/gdb/addrmap.c @@ -354,7 +354,9 @@ addrmap_mutable::~addrmap_mutable () /* See addrmap.h. */ void -addrmap_dump (struct addrmap *map, struct ui_file *outfile, void *payload) +addrmap_dump (struct addrmap *map, struct ui_file *outfile, void *payload, + gdb::function_view<void (struct ui_file *outfile, + const void *value)> annotate_value) { /* True if the previously printed addrmap entry was for PAYLOAD. If so, we want to print the next one as well (since the next @@ -373,10 +375,16 @@ addrmap_dump (struct addrmap *map, struct ui_file *outfile, void *payload) addr_str = "<ends here>"; if (matches || previous_matched) - gdb_printf (outfile, " %s%s %s\n", - payload != nullptr ? " " : "", - core_addr_to_string (start_addr), - addr_str); + { + gdb_printf (outfile, " %s%s %s", + payload != nullptr ? " " : "", + core_addr_to_string (start_addr), + addr_str); + if (annotate_value != nullptr) + annotate_value (outfile, obj); + + gdb_printf (outfile, "\n"); + } previous_matched = matches; |