From: "Wiederhake, Tim" <tim.wiederhake@intel.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH 4/6] Dwarf: Fortran, support DW_TAG_entry_point.
Date: Tue, 08 Aug 2017 14:36:00 -0000 [thread overview]
Message-ID: <9676A094AF46E14E8265E7A3F4CCE9AF5CD85FE0@IRSMSX106.ger.corp.intel.com> (raw)
In-Reply-To: <86a83b1urh.fsf@gmail.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 3585 bytes --]
Hi Yao!
> -----Original Message-----
> From: Yao Qi [mailto:qiyaoltc@gmail.com]
> Sent: Monday, August 7, 2017 1:29 PM
> To: Wiederhake, Tim <tim.wiederhake@intel.com>
> Cc: gdb-patches@sourceware.org
> Subject: Re: [PATCH 4/6] Dwarf: Fortran, support DW_TAG_entry_point.
>
> "Wiederhake, Tim" <tim.wiederhake@intel.com> writes:
>
> >> Why return PC_BOUNDS_HIGH_LOW, which means both DW_AT_low_pc and
> >> DW_AT_high_pc are found. However, DW_TAG_entry_point doesn't have
> >> DW_AT_high_pc. The question is why do we call dwarf2_get_pc_bounds for
> >> DW_TAG_entry_point. Is it because we call read_func_scope for
> >> DW_TAG_entry_point?
> >
> > I may be misunderstanding you here. Yes, DW_TAG_entry_point doesn't
> > have DW_AT_high_pc but we know that value implicitly from the
> surrounding
> > subprogram, as explained in the comment above.
> >
>
> Yes, the comments above are clear to me. My question is why do we need
> to know the bounds or scope for DW_TAG_entry_point? Is there anything
> wrong if we don't get bounds or scope for DW_TAG_entry_point?
We need the bounds for disassembly.
> >> > + }
> >> > +
> >> > attr_high = dwarf2_attr (die, DW_AT_high_pc, cu);
> >> > if (attr_high)
> >> > {
> >> > @@ -16029,6 +16103,7 @@ load_partial_dies (const struct
> die_reader_specs
> >> *reader,
> >> > && abbrev->tag != DW_TAG_constant
> >> > && abbrev->tag != DW_TAG_enumerator
> >> > && abbrev->tag != DW_TAG_subprogram
> >> > + && abbrev->tag != DW_TAG_entry_point
> >> > && abbrev->tag != DW_TAG_lexical_block
> >> > && abbrev->tag != DW_TAG_variable
> >> > && abbrev->tag != DW_TAG_namespace
> >> > @@ -16155,6 +16230,7 @@ load_partial_dies (const struct
> die_reader_specs
> >> *reader,
> >> > if (load_all
> >> > || abbrev->tag == DW_TAG_constant
> >> > || abbrev->tag == DW_TAG_subprogram
> >> > + || abbrev->tag == DW_TAG_entry_point
> >>
> >> Could you update the comments above this block?
> >
> >
> > Sorry, which comments specifically?
> > The comment directly above the last block states:
> > DW_AT_abstract_origin refers to functions (and many things under the
> > function DIE [...])"
>
> Ah, the comments I mentioned are,
>
> /* For some DIEs we want to follow their children (if any). For C
> we have no reason to follow the children of structures; for other
> languages we have to, so that we can get at method physnames
> to infer fully qualified class names, for DW_AT_specification,
> and for C++ template arguments. For C++, we also look one level
> inside functions to find template arguments (if the name of the
> function does not already contain the template arguments).
>
> For Ada, we need to scan the children of subprograms and lexical
> blocks as well because Ada allows the definition of nested
> entities that could be interesting for the debugger, such as
> nested subprograms for instance. */
>
> we need add comments for Fortran and entry_point after them.
I extended the comment to mention Fortran, see
https://sourceware.org/ml/gdb-patches/2017-08/msg00108.html
Regards,
Tim
>
> --
> Yao (é½å°§)
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
\x16º&Öéj×!zÊÞ¶êç×<ßYb²Ö«r\x18\x1dnr\x17¬
next prev parent reply other threads:[~2017-08-08 14:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-21 9:25 [PATCH 0/6] Some Fortran patches Tim Wiederhake
2017-07-21 9:25 ` [PATCH 6/6] Fortran: Nested functions, add scope parameter Tim Wiederhake
2017-07-21 9:25 ` [PATCH 4/6] Dwarf: Fortran, support DW_TAG_entry_point Tim Wiederhake
2017-07-31 22:20 ` Yao Qi
2017-08-02 13:14 ` Yao Qi
[not found] ` <9676A094AF46E14E8265E7A3F4CCE9AF5AC20F28@irsmsx105.ger.corp.intel.com>
2017-08-07 8:46 ` Wiederhake, Tim
2017-08-07 11:29 ` Yao Qi
2017-08-08 14:36 ` Wiederhake, Tim [this message]
2017-07-21 9:25 ` [PATCH 3/6] Fortran: Ptype, print type extension Tim Wiederhake
2017-08-07 12:08 ` Yao Qi
2017-07-21 9:25 ` [PATCH 5/6] Fortran: Enable setting breakpoint on nested functions Tim Wiederhake
2017-07-21 9:25 ` [PATCH 1/6] DWARF: Don't add nameless modules to partial symbol table Tim Wiederhake
2017-07-31 22:09 ` Yao Qi
2017-08-01 12:47 ` Wiederhake, Tim
2017-08-02 11:16 ` Yao Qi
2017-08-04 11:03 ` Wiederhake, Tim
2017-07-21 9:25 ` [PATCH 2/6] Fortran: Accessing fields of inherited types via fully qualified name Tim Wiederhake
2017-07-28 8:19 ` [PATCH 0/6] Some Fortran patches Wiederhake, Tim
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=9676A094AF46E14E8265E7A3F4CCE9AF5CD85FE0@IRSMSX106.ger.corp.intel.com \
--to=tim.wiederhake@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.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