Re: Improve end check on rs6000 prologue analyzer

Mark Kettenis
2007-03-11T19:13:26Z

> Date: Fri, 9 Mar 2007 10:05:04 -0500
> From: Daniel Jacobowitz <drow@false.org>
>
> Mark told me that OpenBSD is using gcc 3.3.5. I tried to get qemu to
> run an OpenBSD image, but it ended poorly. I did find a powerpc-linux
> system using GCC 3.3.3, though.
>
> Short version: I reproduced one failure and fixed it, and I expect
> that to fix the second failure too, but I'm not sure about the
> selftest.exp problems.
>
> Mark, could you try the patch at the bottom of this message? If it
> still causes selftest.exp "odd location" failures, I would appreciate
> a copy of the GDB binary.

Here's a diff of gdb.sum without and with your diff (testsuite with
your diff). The gdb.base/attach.exp failure is "normal"; the result
of that test flips between PASS and FAIL. As you can see, there are
still "odd location failures". Here is an excerpt from gdb.log for one:

(gdb) list
134 char *ttyarg = NULL;
(gdb) step
120 {
(gdb) PASS: gdb.gdb/selftest.exp: step over ttyarg initialization
list
120 {
(gdb) FAIL: gdb.gdb/selftest.exp: step over ttyarg initialization ended up at odd location
step
133 char *cdarg = NULL;
(gdb) PASS: gdb.gdb/selftest.exp: step over ttyarg initialization

This looks as pretty acceptable behaviour. The initializations have
been moved into the prologue so while stepping over the
initializations, we hop back and forth. I'm willing to accept this as
a testsuite problem ;-).

But just in case you want to check things out for yourself, you can
find the gdb binarie at:

http://www.xs4all.nl/~sibelius/gdb.macppc.gz

Mark

--- gdb.sum.2 Sun Mar 11 17:52:11 2007
+++ gdb.sum Sun Mar 11 18:44:45 2007
@@ -1,4 +1,4 @@
-Test Run By kettenis on Sun Mar 11 17:31:35 2007
+Test Run By kettenis on Sun Mar 11 18:24:00 2007
Native configuration is powerpc-unknown-openbsd3.9

=== gdb tests ===
@@ -52,8 +52,8 @@
UNTESTED: gdb.arch/altivec-regs.exp: altivec-regs.exp
Running ../../../../src/gdb/gdb/testsuite/gdb.arch/e500-abi.exp ...
Running ../../../../src/gdb/gdb/testsuite/gdb.arch/e500-prologue.exp ...
-gdb compile failed, /tmp//ccxyb831.s: Assembler messages:
-/tmp//ccxyb831.s:31: Error: Unrecognized opcode: `evstdd'
+gdb compile failed, /tmp//cca22559.s: Assembler messages:
+/tmp//cca22559.s:31: Error: Unrecognized opcode: `evstdd'
UNSUPPORTED: gdb.arch/e500-prologue.exp: Testcase compile failed.
Running ../../../../src/gdb/gdb/testsuite/gdb.arch/e500-regs.exp ...
Running ../../../../src/gdb/gdb/testsuite/gdb.arch/gdb1291.exp ...
@@ -76,10 +76,10 @@
PASS: gdb.arch/powerpc-prologue.exp: backtrace in PIC
PASS: gdb.arch/powerpc-prologue.exp: saved registers in PIC
PASS: gdb.arch/powerpc-prologue.exp: continue to optimized
-FAIL: gdb.arch/powerpc-prologue.exp: backtrace in optimized marker
+PASS: gdb.arch/powerpc-prologue.exp: backtrace in optimized marker
PASS: gdb.arch/powerpc-prologue.exp: finish from optimized
-FAIL: gdb.arch/powerpc-prologue.exp: backtrace in optimized
-FAIL: gdb.arch/powerpc-prologue.exp: saved registers in optimized
+PASS: gdb.arch/powerpc-prologue.exp: backtrace in optimized
+PASS: gdb.arch/powerpc-prologue.exp: saved registers in optimized
Running ../../../../src/gdb/gdb/testsuite/gdb.arch/thumb-prologue.exp ...
Running ../../../../src/gdb/gdb/testsuite/gdb.asm/asm-source.exp ...
PASS: gdb.asm/asm-source.exp: f at main
@@ -344,7 +344,7 @@
FAIL: gdb.base/attach.exp: after attach2, set tbreak postloop
FAIL: gdb.base/attach.exp: (timeout) after attach2, reach tbreak postloop
FAIL: gdb.base/attach.exp: after attach2, exit (timeout)
-PASS: gdb.base/attach.exp: set source path
+FAIL: gdb.base/attach.exp: set source path
PASS: gdb.base/attach.exp: cd away from process working directory
PASS: gdb.base/attach.exp: before attach3, flush symbols
PASS: gdb.base/attach.exp: before attach3, flush exec
@@ -9458,6 +9458,21 @@
PASS: gdb.gdb/selftest.exp: set listsize to 1
PASS: gdb.gdb/selftest.exp: run until breakpoint at captured_main
PASS: gdb.gdb/selftest.exp: printed version as string
+PASS: gdb.gdb/selftest.exp: step over ttyarg initialization
+FAIL: gdb.gdb/selftest.exp: step over ttyarg initialization ended up at odd location
+PASS: gdb.gdb/selftest.exp: step over ttyarg initialization
+PASS: gdb.gdb/selftest.exp: step over cdarg initialization
+FAIL: gdb.gdb/selftest.exp: step over cdarg initialization ended up at odd location
+PASS: gdb.gdb/selftest.exp: step over cdarg initialization
+PASS: gdb.gdb/selftest.exp: step over corearg initialization
+FAIL: gdb.gdb/selftest.exp: step over corearg initialization ended up at odd location
+PASS: gdb.gdb/selftest.exp: step over corearg initialization
+PASS: gdb.gdb/selftest.exp: step over execarg initialization
+FAIL: gdb.gdb/selftest.exp: step over execarg initialization ended up at odd location
+PASS: gdb.gdb/selftest.exp: step over execarg initialization
+PASS: gdb.gdb/selftest.exp: step over symarg initialization
+FAIL: gdb.gdb/selftest.exp: step over symarg initialization ended up at odd location
+PASS: gdb.gdb/selftest.exp: step over symarg initialization
PASS: gdb.gdb/selftest.exp: step over argc initialization
PASS: gdb.gdb/selftest.exp: step over argv initialization
PASS: gdb.gdb/selftest.exp: next over get_run_time and everything it calls
@@ -11461,8 +11476,8 @@

=== gdb Summary ===

-# of expected passes 10807
-# of unexpected failures 108
+# of expected passes 10819
+# of unexpected failures 111
# of expected failures 42
# of known failures 60
# of unresolved testcases 1