Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Fix frame-args.exp failure
@ 2008-05-22 21:26 Andreas Schwab
  2008-05-22 21:51 ` Daniel Jacobowitz
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2008-05-22 21:26 UTC (permalink / raw)
  To: gdb-patches

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."


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-05-29 15:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-22 21:26 Fix frame-args.exp failure Andreas Schwab
2008-05-22 21:51 ` Daniel Jacobowitz
2008-05-23  3:05   ` Andreas Schwab
2008-05-27 18:37   ` Andreas Schwab
2008-05-27 19:11     ` Ulrich Weigand
2008-05-27 20:06       ` Daniel Jacobowitz
2008-05-29 20:45         ` Ulrich Weigand
2008-05-29 21:33           ` Daniel Jacobowitz
2008-05-28 14:09       ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox