From: "Kempke, Nils-Christian" <nils-christian.kempke@intel.com>
To: Tom Tromey <tom@tromey.com>,
"Kempke,
Nils-Christian via Gdb-patches" <gdb-patches@sourceware.org>
Cc: "jinisusan.george@amd.com" <jinisusan.george@amd.com>,
Bernhard Heckel <bernhard.heckel@intel.com>,
Tim Wiederhake <tim.wiederhake@intel.com>
Subject: RE: [PATCH v2 1/1] dwarf, fortran: add support for DW_TAG_entry_point
Date: Wed, 6 Jul 2022 15:30:37 +0000 [thread overview]
Message-ID: <CY4PR1101MB20716E1830CC560CDF4458AFB8809@CY4PR1101MB2071.namprd11.prod.outlook.com> (raw)
In-Reply-To: <87r14g6vus.fsf@tromey.com>
> -----Original Message-----
> From: Tom Tromey <tom@tromey.com>
> Sent: Thursday, May 26, 2022 7:35 PM
> To: Kempke, Nils-Christian via Gdb-patches <gdb-patches@sourceware.org>
> Cc: Tom Tromey <tom@tromey.com>; Kempke, Nils-Christian <nils-
> christian.kempke@intel.com>; jinisusan.george@amd.com; Bernhard Heckel
> <bernhard.heckel@intel.com>; Tim Wiederhake
> <tim.wiederhake@intel.com>
> Subject: Re: [PATCH v2 1/1] dwarf, fortran: add support for
> DW_TAG_entry_point
>
> >>>>> 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
Hi Tom,
It took me a while but now: yes, you are right - when compiling (with ifort) e.g.
a static library containing an entry point, linking it and trying to break on the
entry point the symbol lookup fails as the symtab is not created.
I added the entry_point to the FUNCTIONS_DOMAIN now and also found another
place where I probably had missed to add DW_TAG_entry_point. In
write_cooked_index I added it to the GDB_INDEX_SYMBOL_KIND_FUNCTION.
I adapted the testcase and added a second cu to the DWARF testing the lookup of
the entry_point.
I'll send a v3 soon with these changes.
Thanks,
Nils
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
next prev parent reply other threads:[~2022-07-06 15:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-14 9:41 [PATCH v2 0/1] Fortran entry and DW_TAG_entry_point Nils-Christian Kempke
2022-04-14 9:41 ` [PATCH v2 1/1] dwarf, fortran: add support for DW_TAG_entry_point Nils-Christian Kempke
2022-04-14 22:05 ` Kevin Buettner
2022-04-15 15:27 ` Tom Tromey
2022-05-12 10:38 ` Kempke, Nils-Christian
2022-05-26 17:34 ` Tom Tromey
2022-07-06 15:30 ` Kempke, Nils-Christian [this message]
2022-04-19 11:53 ` [PATCH v2 0/1] Fortran entry and DW_TAG_entry_point George, Jini Susan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CY4PR1101MB20716E1830CC560CDF4458AFB8809@CY4PR1101MB2071.namprd11.prod.outlook.com \
--to=nils-christian.kempke@intel.com \
--cc=bernhard.heckel@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=jinisusan.george@amd.com \
--cc=tim.wiederhake@intel.com \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).