Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] dwarf debug format: Support DW_AT_variable_parameter attribute
@ 2010-05-12 13:27 Pierre Muller
  0 siblings, 0 replies; 17+ messages in thread
From: Pierre Muller @ 2010-05-12 13:27 UTC (permalink / raw)
  To: gdb-patches

  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:


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2011-09-01  7:20 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <8830.7035308846$1273670829@news.gmane.org>
2010-05-13 17:51 ` [RFA] dwarf debug format: Support DW_AT_variable_parameter attribute 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                 ` [RFA-v2] " Pierre Muller
     [not found]                 ` <27418.1569614031$1274308493@news.gmane.org>
2010-05-21 17:44                   ` 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
2010-05-12 13:27 [RFA] dwarf debug format: Support DW_AT_variable_parameter attribute Pierre Muller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox