Re: [PATCH] gdb/python: Introduce gdb.lookup_all_static_symbols

Andrew Burgess
2019-10-23T19:15:35Z

* Eli Zaretskii <eliz@gnu.org> [2019-10-15 20:07:41 +0300]:

> > From: Andrew Burgess <andrew.burgess@embecosm.com>
> > Cc: Christian Biesinger <cbiesinger@google.com>, Andrew Burgess <andrew.burgess@embecosm.com>
> > Date: Tue, 15 Oct 2019 17:46:47 +0100
> >
> > gdb/ChangeLog:
> >
> > * python/py-symbol.c (gdbpy_lookup_all_static_symbols): New
> > function.
> > * python/python-internal.h (gdbpy_lookup_all_static_symbols):
> > Declare new function.
> > * python/python.c (python_GdbMethods): Add
> > gdb.lookup_all_static_symbols method.
> >
> > gdb/testsuite/ChangeLog:
> >
> > * gdb.python/py-symbol.exp: Add test for
> > gdb.lookup_all_static_symbols.
> >
> > gdb/doc/ChangeLog:
> >
> > * python.texi (Symbols In Python): Add documentation for
> > gdb.lookup_all_static_symbols.
>
> The python.texi part is OK, but I think this change also needs a NEWS
> entry.

Thanks for the review, I'll include the NEWS entry below when I merge
this patch.

Thanks,
Andrew

--

diff --git a/gdb/NEWS b/gdb/NEWS
index 25e67e43c88..465f96aed18 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -65,6 +65,9 @@
** The new function gdb.lookup_static_symbol can be used to look up
symbols with static linkage.

+ ** The new function gdb.lookup_static_symbols can be used to look up
+ all static symbols with static linkage.
+
** gdb.Objfile has new methods 'lookup_global_symbol' and
'lookup_static_symbol' to lookup a symbol from this objfile only.