[committed][PATCH][gdb/symtab] Implement addrmap_mutable_find

Tom de Vries tdevries@suse.de
Wed Aug 4 10:57:50 GMT 2021


On 8/3/21 4:46 PM, Tom de Vries wrote:
> Hi,
> 
> Currently addrmap_mutable_find is not implemented:
> ...
> static void *
> addrmap_mutable_find (struct addrmap *self, CORE_ADDR addr)
> {
>   /* Not needed yet.  */
>   internal_error (__FILE__, __LINE__,
>                   _("addrmap_find is not implemented yet "
>                     "for mutable addrmaps"));
> }
> ...
> 
> I implemented this because I needed this during debugging, to be able to do:
> ...
> (gdb) p ((dwarf2_psymtab *)addrmap_find (map, addr))->filename
> ...
> before and after a call to addrmap_set_empty.
> 
> Rebuild on x86_64-linux, tested by using it during debugging session.

Which doesn't prevent bitrot, so I've added unit tests.

Committed.

Thanks,
- Tom

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gdb-symtab-Implement-addrmap_mutable_find.patch
Type: text/x-patch
Size: 5591 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/gdb-patches/attachments/20210804/71c88d92/attachment.bin>


More information about the Gdb-patches mailing list