This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Fix frame-args.exp failure
- From: Andreas Schwab <schwab at suse dot de>
- To: gdb-patches at sourceware dot org
- Date: Thu, 22 May 2008 17:34:10 +0200
- Subject: Fix frame-args.exp failure
This fixes a testsuite failure on powerpc. print_frame_args didn't
handle arguments that are optimized out (that can happen even in
unoptimized code).
Andreas.
2008-05-22 Andreas Schwab <schwab@suse.de>
* stack.c (print_frame_args): Handle LOC_OPTIMIZED_OUT.
testsuite/:
* gdb.base/frame-args.exp: Handle arguments that are optimized
out.
Index: gdb/stack.c
===================================================================
RCS file: /cvs/src/src/gdb/stack.c,v
retrieving revision 1.168
diff -u -a -p -r1.168 stack.c
--- gdb/stack.c 19 May 2008 15:50:10 -0000 1.168
+++ gdb/stack.c 22 May 2008 15:15:05 -0000
@@ -267,6 +267,7 @@ print_frame_args (struct symbol *func, s
case LOC_LOCAL_ARG:
case LOC_BASEREG_ARG:
case LOC_COMPUTED_ARG:
+ case LOC_OPTIMIZED_OUT:
break;
/* Other types of symbols we just skip over. */
Index: gdb/testsuite/gdb.base/frame-args.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/frame-args.exp,v
retrieving revision 1.2
diff -u -a -p -r1.2 frame-args.exp
--- gdb/testsuite/gdb.base/frame-args.exp 1 Jan 2008 22:53:19 -0000 1.2
+++ gdb/testsuite/gdb.base/frame-args.exp 22 May 2008 15:15:08 -0000
@@ -41,7 +41,7 @@ gdb_test "set print frame-arguments all"
"" \
"set print frame-arguments all"
gdb_test "frame 1" \
- ".*in call_me \\(i=3, f=5, s={a = 3, b = 5}, ss=0x\[0-9a-f\]\+, u={.*}, e=green\\) at .*frame-args\\.c:.*" \
+ ".*in call_me \\(i=3, f=5, s=({a = 3, b = 5}|<value optimized out>), ss=0x\[0-9a-f\]\+, u=({.*}|<value optimized out>), e=green\\) at .*frame-args\\.c:.*" \
"frame 1 with print frame-arguments set to all"
# Test with "print frame-arguments" set to "scalars"
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."