Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/commit/dwarf] Create partial symbols for nested 	subprograms
Date: Thu, 11 Sep 2008 22:15:00 -0000	[thread overview]
Message-ID: <m3k5di2uwr.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20080911050018.GR12222@adacore.com> (Joel Brobecker's message of "Wed\, 10 Sep 2008 22\:00\:18 -0700")

>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

Daniel> Not that I see any useful way around it, if subprograms really
Daniel> can be children of lexical blocks.

Tom> Can we do it only for languages where we know this can occur?
Tom> IOW, Ada?

Joel> That's what I was going to propose, but I wanted to do some measurement
Joel> too (tomorrow). Nested subprograms are possible in C, and aren't they
Joel> also available in C++? I don't mind supporting this only in Ada, though.

GNU C has nested functions.  Standard C does not.  I wrote a simple
test case and compiled it with GCC.  The resulting DWARF (I appended a
snippet) does not nest functions here .. but perhaps this is a bug in
GCC, I couldn't say.

I don't know the situation with C++.

Tom


 <0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
  < c>     DW_AT_stmt_list   : 0	
  <10>     DW_AT_high_pc     : 0x17	
  <14>     DW_AT_low_pc      : 0	
  <18>     DW_AT_producer    : GNU C 4.1.2 20070925 (Red Hat 4.1.2-33)	
  <40>     DW_AT_language    : 1	(ANSI C)
  <41>     DW_AT_name        : q.c	
  <45>     DW_AT_comp_dir    : /tmp	
 <1><4a>: Abbrev Number: 2 (DW_TAG_subprogram)
  <4b>     DW_AT_sibling     : <84>	
  <4f>     DW_AT_external    : 1	
  <50>     DW_AT_name        : outer	
  <56>     DW_AT_decl_file   : 1	
  <57>     DW_AT_decl_line   : 2	
  <58>     DW_AT_prototyped  : 1	
  <59>     DW_AT_type        : <84>	
  <5d>     DW_AT_low_pc      : 0	
  <61>     DW_AT_high_pc     : 0xd	
  <65>     DW_AT_frame_base  : 0	(location list)
 <2><69>: Abbrev Number: 3 (DW_TAG_subprogram)
  <6a>     DW_AT_name        : inner	
  <70>     DW_AT_decl_file   : 1	
  <71>     DW_AT_decl_line   : 3	
  <72>     DW_AT_prototyped  : 1	
  <73>     DW_AT_type        : <84>	
  <77>     DW_AT_low_pc      : 0xd	
  <7b>     DW_AT_high_pc     : 0x17	
  <7f>     DW_AT_frame_base  : 0x2c	(location list)


  reply	other threads:[~2008-09-11 22:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-10 20:20 Joel Brobecker
2008-09-10 20:35 ` Daniel Jacobowitz
2008-09-10 21:38   ` Tom Tromey
2008-09-11  5:01     ` Joel Brobecker
2008-09-11 22:15       ` Tom Tromey [this message]
2008-09-11 22:28         ` Daniel Jacobowitz
2008-09-11 22:33           ` Tom Tromey
2008-09-12  4:19           ` Joel Brobecker
2008-09-11 17:55   ` Joel Brobecker
2008-09-11 18:38     ` Daniel Jacobowitz
2008-09-11 21:53       ` Joel Brobecker
2008-09-13 15:14         ` Daniel Jacobowitz
2008-09-13 22:21           ` Joel Brobecker
2008-09-11 22:44       ` Tom Tromey
2008-09-12  4:18         ` Joel Brobecker
2008-09-12 16:51           ` Tom Tromey
2008-09-12 16:56             ` Joel Brobecker
2008-09-12 17:19               ` Tom Tromey
2008-09-12 17:43                 ` Joel Brobecker
2008-09-12 18:08                   ` Tom Tromey
2008-09-12 18:43                   ` Frank Ch. Eigler
2008-09-12 20:31                     ` Tom Tromey

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=m3k5di2uwr.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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