[patch/rfc] Rewrite "structs" testcase

Andrew Cagney ac131313@redhat.com
Thu Nov 6 18:49:00 GMT 2003

> I'm concerned about the use of "long long" in a test program.
> What if someone uses a non-gcc Ansi C compiler?
> But this doesn't look any worse than other tests, so okay.
> In structs.exp, line 22:
>   # This file was written by Jeff Law. (law@cygnus.com)
> Add something like:
>   # And rewritten by Andrew Cagney  (cagney@redhat.com)

I'll just drop that.

> I got a lot of FAILS with the new tests.
> native i686-pc-linux-gnu, gdb HEAD, binutils 2.14.
>                         PASS  FAIL
>   gcc 2.95.3 -gdwarf-2  1086   138
>   gcc 2.95.3 -gstabs+   1122   102
>   gcc 3.3.2  -gdwarf-2  1122   102
>   gcc 3.3.2  -gstabs+   1122   102
> I have put up a tarball:
>   ftp://ftp.shout.net/pub/users/mec/gdb/2003-11-06-2.tar.gz
> There are a lot of duplicate test names too.  It would be good
> to uniquify them.

Yes, working on it.  I can't see a way to fix things like "run_to_main" 

> Not proofread yet because of so many FAIL results.

Looks like two problems:

(gdb) ptype foo1.a
type = tld
(gdb) FAIL: gdb.base/structs.exp: ptype foo1.a for 1tld

Some debug info prints "long double", some prints "tld".  I've changed 
whats printed to hopefully be something more robust ...

(gdb) FAIL: gdb.base/structs.exp: ptype foo1.a for 1tld
p/c fun1()
$1 = {a = 0x08044004c400000000000000}

Seems GDB and GCC disagree over how the i386 returns floating-point 
values.  My "this will always work" test has found a bug in GDB - cool. 
  Note that the tests do all pass for PPC.

I've also trimmed back the number of tests so that they are more focused.

I'll post a revision later today.


More information about the Gdb-patches mailing list