This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Handle DW_TAG_subrange_type


> When trying to debug Ada code you often get a DW_TAG_subrange_type, which
> gdb can't handle yet.

Hmmm, I don't remember having submitted the patch to emit these subrange
types. Maybe somebody else managed to add this capability already?
Do you confirm these types are emitted for modular types (for instance
"type Mod_Type is mod 4")?

> 2003-11-22  Andreas Schwab  <schwab@suse.de>
> 
> 	* dwarf2read.c (dwarf2_non_const_array_bound_ignored_complaint):
> 	New function.
> 	(read_subrange_type): New function.
> 	(process_die): Handle DW_TAG_subrange_type.
> 	(read_type_die): Likewise.

Also, FYI, we made a very similar change in GDB to support these types.
We did factor out a bit the code that extracts constant bound values
into a function. And we also sprinkled a bit more of the handlers for
DW_TAG_subrange_type cases. I am attaching the patch (against GDB 6.0,
but shouldn't be too hard to adapt).

Cheers,
-- 
Joel

Attachment: dwarf2read.c.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]