This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On 2019-11-04 12:12 p.m., Andrew Burgess wrote:
> How about I merged patches #1 and #2, but drop #3 for now?  This would
> give:
> 
>   lookup_static_symbol - returns the global static symbol for the
>       current compilation unit, or whatever else GDB can find if
>       there's nothing in the current CU.  This is basically inline
>       with what we get from 'print symbol_name' at the CLI (if we
>       limit symbol_name to just global static things).
> 
> AND,
> 
>   lookup_static_symbols - returns the list of all global static
>       symbols.
> 
> We no longer have a block parameter passed to 'lookup_static_symbol',
> so hopefully and confusion can be avoided.  If/when we later add a
> Python wrapper for CU we can _extend_ the API for lookup_static_symbol
> to also take a CU and so provide the "look over there" type behaviour
> in a clearer way.
> 
> Would everyone be happy with this?

I certainly would, I think that brings us back to the same place we were before
it was suggested to add the block parameter, doesn't it?

But it's Christian who initially wanted to add these functions, he probably had
a particular use case in mind.  It would be up to him to say if that covers that
use case or not.

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]