From: Joel Brobecker <brobecker@adacore.com>
To: Pierre Muller <muller@ics.u-strasbg.fr>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/DWARF2] Handle nested subprograms in CU pc bound calculation
Date: Tue, 30 Sep 2008 17:07:00 -0000 [thread overview]
Message-ID: <20080930170648.GI3811@adacore.com> (raw)
In-Reply-To: <002601c92313$27d06790$777136b0$@u-strasbg.fr>
Hello Pierre,
> Could you please also allow it for pascal language?
> Nested functions/procedures are also allowed in pascal.
Up to now, I think only Pascal expressed interest in handling nested
subprograms besides Ada. The problem is that this change is not the only
piece of the whole puzzle. There are other changes, one of them
submitted recently, where we had to add some exceptions. With that
in mind, I checked my patch in as is for now.
But now that we have another language interested in spending the CPU
time in handling these subprograms, we might want to introduce a new
function that, given a CU (or a language), return true if we should
handle nested subprogram, and use that function throughout, instead
of hard-coding the language test.
static int
dwarf2_handle_nested_subprograms (enum language lang)
{
return (lang == langauge_ada || lang == language_pascal);
}
Would you like to do that? I can try to point out all the locations
where the check for Ada should be replaced by a call to this function.
Actually, now that I think of it, a slightly cleaner approach would
probably be to extend the language vector to add a flag set to non-zero
for the languages that want nested-subprogram handling. The only slight
issue is that the CU references the language enum, which means we need
to go from that enum to the language_defn to get access to the flag.
What do others think?
--
Joel
next prev parent reply other threads:[~2008-09-30 17:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-30 15:28 Joel Brobecker
2008-09-30 15:43 ` Pierre Muller
2008-09-30 17:07 ` Joel Brobecker [this message]
2008-09-30 17:39 ` Daniel Jacobowitz
2008-10-01 1:16 ` Joel Brobecker
2008-10-01 7:43 ` Pierre Muller
2008-10-01 8:33 ` [Core] " Jonas Maebe
2008-10-01 16:40 ` Joel Brobecker
2008-10-01 21:56 ` [Core] " Jonas Maebe
2008-10-02 6:45 ` Daniël Mantione
2008-10-02 9:07 ` Pierre Muller
2008-10-02 10:36 ` Daniël Mantione
2008-10-03 0:31 ` Joel Brobecker
2008-09-30 15:43 ` Daniel Jacobowitz
2008-09-30 16:56 ` Joel Brobecker
2008-09-30 17:05 ` Daniel Jacobowitz
2008-09-30 16:58 ` Joel Brobecker
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=20080930170648.GI3811@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=muller@ics.u-strasbg.fr \
/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