Generalize addrmap dumping

While debugging another patch series, I wanted to dump an addrmap.  I
came up with this patch, which generalizes the addrmap-dumping code
from psymtab.c and moves it to addrmap.c.  psymtab.c is changed to use
the new code.
This commit is contained in:
Tom Tromey
2021-08-06 13:52:23 -06:00
parent 69eadcc9ea
commit 192786c72a
3 changed files with 46 additions and 51 deletions

View File

@@ -104,4 +104,10 @@ typedef gdb::function_view<int (CORE_ADDR start_addr, void *obj)>
returns 0. */
int addrmap_foreach (struct addrmap *map, addrmap_foreach_fn fn);
/* Dump the addrmap to OUTFILE. If PAYLOAD is non-NULL, only dump any
components that map to PAYLOAD. (If PAYLOAD is NULL, the entire
map is dumped.) */
void addrmap_dump (struct addrmap *map, struct ui_file *outfile,
void *payload);
#endif /* ADDRMAP_H */