This is the mail archive of the
mailing list for the GDB project.
Re: [RFA-v3] dwarf2read.c: Avoid complaint for char array of unspecified size
- From: Tom Tromey <tromey at redhat dot com>
- To: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: <gdb-patches at sourceware dot org>
- Date: Tue, 01 Jun 2010 13:07:28 -0600
- Subject: Re: [RFA-v3] dwarf2read.c: Avoid complaint for char array of unspecified size
- References: <email@example.com> <firstname.lastname@example.org> <002201caf93d$e6ea8190$b4bf84b0$@email@example.com> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <000f01cafe4e$17eccea0$47c66be0$@email@example.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Pierre" == Pierre Muller <firstname.lastname@example.org> 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.