[RFC] gdb.base/frame-args.exp

Luis Machado
2014-07-01T07:56:13Z

Hi,

It looks like this test is a bit focused on results from only a few
targets. On x86 it works correctly and displays the arguments just fine.
When set to display only scalars, then GDB proceeds to display '...' on
the fields that are not scalars.

On PowerPC 32-bit though, this is what i get:

(gdb) PASS: gdb.base/frame-args.exp: set print frame-arguments all
frame 1^M
#1 0x100006dc in call_me (i=3, f=5, s=<error reading variable: value
has been optimized out>, ss=0xbffff788, u=<error reading variable: value
has been optimized out>, e=green) at gdb.base/frame-args.c:40^M
40 break_me ();^M
(gdb) FAIL: gdb.base/frame-args.exp: frame 1 with print frame-arguments
set to all
set print frame-arguments scalars^M
(gdb) PASS: gdb.base/frame-args.exp: set print frame-arguments scalars
frame 1^M
#1 0x100006dc in call_me (i=3, f=5, s=<error reading variable: value
has been optimized out>, ss=0xbffff788, u=<error reading variable: value
has been optimized out>, e=green) at gdb.base/frame-args.c:40^M
40 break_me ();^M
(gdb) FAIL: gdb.base/frame-args.exp: frame 1 with print frame-arguments
set to scalars
set print frame-arguments none^M

So it looks like we are taking a different route and GDB ends up
catching an error before displaying the optimized out information, thus
not matching what the testcase expects.

I could add a different pattern to the testcase and that would solve the
couple failures i see, but i wonder if we should tweak the testcase to
dodge optimizations?

Thoughts?

Luis