Add Progspace.objfile_for_address
authorTom Tromey <tromey@adacore.com>
Mon, 22 May 2023 17:40:10 +0000 (11:40 -0600)
committerTom Tromey <tromey@adacore.com>
Fri, 21 Jul 2023 18:05:30 +0000 (12:05 -0600)
commit27b2eff1b82f518254bec231650f1b67ee160200
treef832c1d5c7b9628815f6a95a60df9c4a1b4356ab
parent672c55ddcf17d322dbc868d8465f0027d8210e73
Add Progspace.objfile_for_address

This adds a new objfile_for_address method to gdb.Progspace.  This
makes it easy to find the objfile for a given address.

There's a related PR; and while this change would have been sufficient
for my original need, it's not clear to me whether I should close the
bug.  Nevertheless I think it makes sense to at least mention it here.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=19288
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
gdb/NEWS
gdb/doc/python.texi
gdb/progspace.c
gdb/progspace.h
gdb/python/py-progspace.c
gdb/testsuite/gdb.python/py-progspace.exp