From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: <gdb-patches@sourceware.org>
Subject: [RFA] dwarf debug format: Support DW_AT_variable_parameter attribute
Date: Wed, 12 May 2010 13:27:00 -0000 [thread overview]
Message-ID: <002301caf1d6$d3ee0fd0$7bca2f70$@muller@ics-cnrs.unistra.fr> (raw)
Free Pascal compiler has support for
DW_AT_variable_parameter attribute, but this is disabled because
GDB does not support it yet.
The value of the attribute must be a flag according to
DWARF specs. The only point I am unsure about is
what does a zero value of this flag mean:
Should zero be considered as FALSE and
thus the should say that this parameter is NOT a variable parameter,
or does the simple presence of this attribute condfirm
this it is a variable parameter, no matter the value of the flag.
I took the first approach here, but have the impression
that it is not always the case inside dwarf2read.c code.
The following patch adds support for this
inside dwarf2read.c source.
Tested on gcc16, no regression found.
Is this OK?
Pierre Muller
Pascal language support maintainer for GDB
2010-05-12 Pierre Muller <muller@ics.u-strasbg.fr>
* dwarf2read.c (new_symbol): Handle DW_AT_variable_parameter
attribute.
Index: src/gdb/dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.383
diff -u -p -r1.383 dwarf2read.c
--- src/gdb/dwarf2read.c 8 May 2010 04:58:45 -0000 1.383
+++ src/gdb/dwarf2read.c 12 May 2010 13:00:17 -0000
@@ -8630,6 +8630,10 @@ 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))
+ SYMBOL_CLASS (sym) = LOC_REF_ARG;
+
add_symbol_to_list (sym, cu->list_in_scope);
break;
case DW_TAG_unspecified_parameters:
next reply other threads:[~2010-05-12 13:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-12 13:27 Pierre Muller [this message]
[not found] <8830.7035308846$1273670829@news.gmane.org>
2010-05-13 17:51 ` 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
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='002301caf1d6$d3ee0fd0$7bca2f70$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--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