[PATCH v2 1/1] dwarf, fortran: add support for DW_TAG_entry_point

Tom Tromey tom@tromey.com
Thu May 26 17:34:51 GMT 2022


>>>>> Kempke, Nils-Christian via Gdb-patches <gdb-patches@sourceware.org> writes:

>> If it's needed I suppose I would expect some other changes to the
>> indexer.  Like maybe cooked_indexer::index_dies has to handle it, or
>> cooked_index_entry::matches(search_domain).

> I am honestly not quite sure about the two parts you pointed out.
> What I think I understand it this:

> In cooked_index_entry::matches(search_domain) we could add the
> DW_TAG_entry_point to the FUNCTIONS_DOMAIN (similar to
> DW_TAG_subroutine). Not sure if this would be wanted but I think
> this is quite reasonable. Entry points are virtually like separate functions
> with their own argument lists.

> I am not sure what this would actually change within GDB though - commands
> like 'info functions' and 'info module functions'

The test case in this situation is to have an entry point in some other
CU -- not the same one with the program's "main" -- and then try to
"break" on the entry point.

I think this should make gdb try to look up the function via the index,
but since the matching will fail, I suspect it won't cause CU expansion,
and so the entry point won't be found.

> The other part you mentioned is cooked_indexer::index_dies. I think here the
> change you meant is to recurse the entry if it is a DW_TAG_entry_point? In my
> understanding this would then also index possibly interesting child DIEs, right?

Yeah, I think I was mistaken about this one.

thanks,
Tom


More information about the Gdb-patches mailing list