This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa/testsuite] check sizeof
- To: Stan Shebs <shebs at apple dot com>
- Subject: Re: [rfa/testsuite] check sizeof
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 13 Jul 2000 14:20:05 +1000
- CC: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- References: <396D27FF.745CA680@cygnus.com> <396D2AAC.A61ECFA8@apple.com>
Stan Shebs wrote:
>
> Andrew Cagney wrote:
> >
> > Hello,
> >
> > The attatched checks that GDB and the running program agree over how
> > large a few basic C types are. As a convenience, it also dumps out the
> > gdbarch so that tracking down failures is easier.
>
> Geez, I must have missed something along the way - normally GDB gets
> its size info from debug bits in the executable, which means that it
> should be impossible for these tests to fail? But assuming that
> something changed to make it more likely, the tests themselves look
> satisfactory as the way to discover the discrepancy.
The problem I'm seeing is comming from the fact that GDB likes to
hardwire the various gdbtypes.h:builtin_type_*s. At present the
architecture gets to specify the value at runtime (originally it was
compiled in using #define ....). Sounds like there is also the
possability of setting these types from the debug info.
Thanks.
BTW, I also wonder if a few other tests could be simplified with this
technique. Have the gdb.*/*.exp file ask GDB what the type system is
like and then test things based on that.
Andrew