This is the mail archive of the gdb-patches@sourceware.org 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: [RFA] dwarf2read.c: Avoid complaint for char array of unspecified size



> -----Message d'origine-----
> De?: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Tom Tromey
> Envoyé?: Friday, May 21, 2010 11:43 PM
> À?: Pierre Muller
> Cc?: gdb-patches@sourceware.org
> Objet?: Re: [RFA] dwarf2read.c: Avoid complaint for char array of
> unspecified size
> 
> >>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
> writes:
> 
> Pierre>   This code:
> Pierre> external char gdbint [];
> Pierre> generated a DW_TAG_subrange_type with zero attributes
> Pierre> to describe the `[]' part.
> Pierre>  (compiled with  gcc (Debian 4.3.2-1.1) 4.3.2.).
> 
> I think this kind of DIE is explicitly ok, according to DWARF.
> See the paragraph toward the end of section 5.11 that describes what to
> do when a DW_TAG_subrange_type has no basis type.
 For dwarf2, in it on 5.10, page number 47 (49 of pdf file).
  If I understand this correctly, without anything it should be
a subrange of type "singed integer" having the same size as an address
for that target machine. This is not exactly what is done in the Irix
code I modified...
  But I still don't get the bounds that we should use:
  lower bound is 0, or 1 for fortran (default value),
but should upper bound be equal to lower bound or lower bound -1?

> So, I think this complaint is incorrect.  It would be better to simply
> remove it.
  This would mean that we should fix the code inside read_subrange_type, no?

  Do you think that this would be the correct approach?

Pierre


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