* [RFA] testsuite: fix py-value tests
@ 2011-10-04 15:20 Paul Koning
2011-10-04 17:28 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Paul Koning @ 2011-10-04 15:20 UTC (permalink / raw)
To: gdb-patches
In my test runs, the py-value.exp tests produced 10 failures apparently because of values going dead by the time the breakpoint (at the "return" in main()) is hit. For example, I see argv==0x19 at that point, which is not a good value.
The attached patch fixes this; the breakpoint now happens at the assignment and gcc doesn't optimize away things yet at that point. Result is all pass instead of 10 failures.
I'm not sure how to describe the change for the ChangeLog.
paul
ChangeLog:
2011-10-04 Paul Koning <paul_koning@dell.com>
* gdb.python/py-value.c (main): Break before return.
Index: testsuite/gdb.python/py-value.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.python/py-value.c,v
retrieving revision 1.8
diff -u -r1.8 py-value.c
--- testsuite/gdb.python/py-value.c 1 Jan 2011 15:33:49 -0000 1.8
+++ testsuite/gdb.python/py-value.c 4 Oct 2011 15:12:25 -0000
@@ -66,6 +66,8 @@
return arg1 + arg2;
}
+char **save_argv;
+
int
main (int argc, char *argv[])
{
@@ -94,5 +96,6 @@
ptr_ref(ptr_i);
#endif
- return 0; /* break to inspect struct and union */
+ save_argv = argv; /* break to inspect struct and union */
+ return 0;
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [RFA] testsuite: fix py-value tests
2011-10-04 15:20 [RFA] testsuite: fix py-value tests Paul Koning
@ 2011-10-04 17:28 ` Tom Tromey
2011-10-04 17:43 ` Paul Koning
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2011-10-04 17:28 UTC (permalink / raw)
To: Paul Koning; +Cc: gdb-patches
>>>>> "Paul" == Paul Koning <paulkoning@comcast.net> writes:
Paul> I'm not sure how to describe the change for the ChangeLog.
What you wrote seems ok to me.
Paul> 2011-10-04 Paul Koning <paul_koning@dell.com>
Paul> * gdb.python/py-value.c (main): Break before return.
Patch is ok. Thanks.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] testsuite: fix py-value tests
2011-10-04 17:28 ` Tom Tromey
@ 2011-10-04 17:43 ` Paul Koning
0 siblings, 0 replies; 3+ messages in thread
From: Paul Koning @ 2011-10-04 17:43 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
On Oct 4, 2011, at 1:28 PM, Tom Tromey wrote:
>>>>>> "Paul" == Paul Koning <paulkoning@comcast.net> writes:
>
> Paul> I'm not sure how to describe the change for the ChangeLog.
>
> What you wrote seems ok to me.
>
> Paul> 2011-10-04 Paul Koning <paul_koning@dell.com>
> Paul> * gdb.python/py-value.c (main): Break before return.
>
> Patch is ok. Thanks.
>
> Tom
Thank you. Committed.
paul
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-04 17:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-04 15:20 [RFA] testsuite: fix py-value tests Paul Koning
2011-10-04 17:28 ` Tom Tromey
2011-10-04 17:43 ` Paul Koning
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox