This is the mail archive of the
gdb-patches@sourceware.org
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: <38685.0063725889$1274473713@news.gmane.org> <m3pr0px76l.fsf@fleche.redhat.com> <002201caf93d$e6ea8190$b4bf84b0$@muller@ics-cnrs.unistra.fr> <m34ohxuxkn.fsf@fleche.redhat.com> <34200.8848595016$1274864816@news.gmane.org> <m3ljb5f6qt.fsf@fleche.redhat.com> <000f01cafe4e$17eccea0$47c66be0$@muller@ics-cnrs.unistra.fr>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "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