* [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* Re: [RFA] handle DW_AT_byte_size for set types
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
0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2010-05-17 15:47 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
> 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.
Looks good to me too.
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [RFA] handle DW_AT_byte_size for set types
2010-05-17 15:47 ` Joel Brobecker
@ 2010-05-17 16:07 ` Pierre Muller
0 siblings, 0 replies; 4+ messages in thread
From: Pierre Muller @ 2010-05-17 16:07 UTC (permalink / raw)
To: 'Joel Brobecker', tromey; +Cc: gdb-patches
> -----Message d'origine-----
> De : Joel Brobecker [mailto:brobecker@adacore.com]
> Envoyé : Monday, May 17, 2010 5:47 PM
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: [RFA] handle DW_AT_byte_size for set types
>
> > 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.
>
> Looks good to me too.
Thanks, applied... after modification
according to Tom's email about the missing space.
Pierre
^ 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