Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] handle DW_AT_byte_size for set types
@ 2010-05-17 15:47 Pierre Muller
  2010-05-17 15:47 ` Joel Brobecker
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre Muller @ 2010-05-17 15:47 UTC (permalink / raw)
  To: gdb-patches

  According to Dwarf 2.0.0 page 46,
DW_TAG_set_type
supports DW_AT_byte_size attribute,
but this is not implemented yet inside GDB.

  The patch below implements this,
it will allow to correctly give the value of 
constant pascal sets (at least for Free Pascal compiler).

  The patch is rather obvious...
Is this OK?

Pierre Muller
Pascal language support maintainer for GDB


 
2010-05-17  Pierre Muller  <muller@ics.u-strasbg.fr>

	* dwarf2read.c (read_set_type): Set type length if
	DW_AT_byte_size attribute is present.

Index: src/gdb/dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.385
diff -u -p -r1.385 dwarf2read.c
--- src/gdb/dwarf2read.c	14 May 2010 17:53:16 -0000	1.385
+++ src/gdb/dwarf2read.c	17 May 2010 15:33:17 -0000
@@ -5547,7 +5556,10 @@ static struct type *
 read_set_type (struct die_info *die, struct dwarf2_cu *cu)
 {
   struct type *set_type = create_set_type (NULL, die_type (die, cu));
+  struct attribute *attr = dwarf2_attr (die, DW_AT_byte_size, cu);
 
+  if (attr)
+    TYPE_LENGTH(set_type) = DW_UNSND (attr);
   return set_die_type (die, set_type, cu);
 }
 



^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <41574.4677339264$1274111006@news.gmane.org>]

end of thread, other threads:[~2010-05-17 15:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-17 15:47 [RFA] handle DW_AT_byte_size for set types Pierre Muller
2010-05-17 15:47 ` Joel Brobecker
2010-05-17 16:07   ` Pierre Muller
     [not found] <41574.4677339264$1274111006@news.gmane.org>
2010-05-17 15:57 ` Tom Tromey

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