From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: <tromey@redhat.com>
Cc: "'Joel Brobecker'" <brobecker@adacore.com>,
<gdb-patches@sourceware.org>,
"'FPC Core Developer List'" <core@freepascal.org>
Subject: [RFA-v2] dwarf debug format: Support DW_AT_variable_parameter attribute
Date: Wed, 19 May 2010 23:34:00 -0000 [thread overview]
Message-ID: <001501caf7a3$6571fee0$3055fca0$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <m31vd78rxr.fsf@fleche.redhat.com>
So, here is a new version of this patch.
I will try to improve reference type handling inside the
pascal specific sources later.
Does that look OK?
Pierre
2010-05-20 Pierre Muller <muller@ics.u-strasbg.fr>
* dwarf2read.c (new_symbol): Handle DW_AT_variable_parameter
attribute.
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.386
diff -u -p -r1.386 dwarf2read.c
--- dwarf2read.c 17 May 2010 15:55:01 -0000 1.386
+++ dwarf2read.c 19 May 2010 22:29:04 -0000
@@ -8662,6 +8662,15 @@ new_symbol (struct die_info *die, struct
{
dwarf2_const_value (attr, sym, cu);
}
+ attr = dwarf2_attr (die, DW_AT_variable_parameter, cu);
+ if (attr && DW_UNSND (attr))
+ {
+ struct type *ref_type;
+
+ ref_type = lookup_reference_type (SYMBOL_TYPE (sym));
+ SYMBOL_TYPE (sym) = ref_type;
+ }
+
add_symbol_to_list (sym, cu->list_in_scope);
break;
case DW_TAG_unspecified_parameters:
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Tom Tromey
> Envoyé : Thursday, May 20, 2010 12:09 AM
> À : Pierre Muller
> Cc : 'Joel Brobecker'; gdb-patches@sourceware.org; 'FPC Core Developer
> List'
> Objet : Re: [RFA] dwarf debug format: Support DW_AT_variable_parameter
> attribute
>
> >>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
> writes:
>
> Pierre> That is what is done for now on Free Pascal,
> Pierre> i.e. the debug information generates a reference_type for
> Pierre> parameters passed by var.
> Pierre> It's not ideal yet, but this is just a matter of
> Pierre> twicks inside p-* files...
>
> I suppose it is less than ideal in that the type is exposed to the
> user.
>
> Another idea would be to augment the DWARF expression evaluator to do
> an
> additional indirection when this bit is set. Though then one must
> wonder why the compiler does not simply emit an expression to that
> effect.
>
> Pierre> I am unsure about the type allocation procedure,
> Pierre> could you just tell me if this looks OK
> Pierre> before I resubmit an RFA.
>
> Pierre> + struct type *ref_type;
> Pierre> +
> Pierre> + ref_type = TYPE_REFERENCE_TYPE (SYMBOL_TYPE
> (sym));
> Pierre> + if (!ref_type)
> Pierre> + {
> Pierre> + ref_type = alloc_type (objfile);
> Pierre> + ref_type = make_reference_type (SYMBOL_TYPE
> (sym),
> Pierre> &ref_type);
> Pierre> + }
>
> Just use 'lookup_reference_type (SYMBOL_TYPE (sym))'.
> That will handle the details for you.
>
> Tom
next prev parent reply other threads:[~2010-05-19 22:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <8830.7035308846$1273670829@news.gmane.org>
2010-05-13 17:51 ` [RFA] " Tom Tromey
2010-05-17 17:34 ` Joel Brobecker
2010-05-17 17:34 ` Pierre Muller
2010-05-17 18:54 ` Joel Brobecker
2010-05-17 21:48 ` Pierre Muller
[not found] ` <44296.7587885962$1274132782@news.gmane.org>
2010-05-19 19:43 ` Tom Tromey
2010-05-19 21:45 ` Pierre Muller
[not found] ` <28559.2589797036$1274302480@news.gmane.org>
2010-05-19 22:34 ` Tom Tromey
2010-05-19 23:34 ` Pierre Muller [this message]
[not found] ` <27418.1569614031$1274308493@news.gmane.org>
2010-05-21 17:44 ` [RFA-v2] " Tom Tromey
2010-05-21 20:50 ` Pierre Muller
2010-11-04 5:32 ` [new testcase] Regression 7.1->7.2 for iFort [Re: [RFA-v2] dwarf debug format: Support DW_AT_variable_parameter attribute] Jan Kratochvil
2010-11-04 8:47 ` [Core] " Pierre Free Pascal
2010-11-04 18:01 ` Joel Brobecker
2010-11-05 8:04 ` Pierre Free Pascal
2011-09-01 7:20 ` Jan Kratochvil
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='001501caf7a3$6571fee0$3055fca0$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=brobecker@adacore.com \
--cc=core@freepascal.org \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.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