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-v3] dwarf2read.c: Avoid complaint for char array of unspecified size


>>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr> writes:

Pierre>   OK, I tried to follow that route,
Pierre> the tricky part was that we don't really know which objfile type
Pierre> is the same size as an address, but the patch is a bit lengthy...

Yeah, I don't know this either.  Your approach seems reasonable.

Pierre>   At the same time, I discovered that DW_AT_count was not supported,
Pierre> (maybe no compiler uses that, but it can't hurt to add
Pierre> support for this).

Thanks for doing this.

Pierre> +      /* Test "long long int", "long int", and "int" objfile types,
Pierre> +	 and select the last one having a size above or equal to the
Pierre> +	 architecture address size.  */

I think you should test these in the reverse order: int, then long, then
long long.  This assures you will find the smallest type that matches.

This patch is ok with that change.

Tom


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