From: Phil Muldoon <pmuldoon@redhat.com>
To: gdb-patches ml <gdb-patches@sourceware.org>
Subject: [python][obv] Make result in testsuite/gdb.python/py-breakpoints.c global
Date: Mon, 12 Apr 2010 09:58:00 -0000 [thread overview]
Message-ID: <4BC2EEBE.8090404@redhat.com> (raw)
Pedro Alves noticed and brought to my attention on irc that one of the Python breakpoints test fails locally for him. When I tested it locally, it worked ok for me. So we investigated. Subsequently it was found (by Pedro, (thanks!) that the test was bogus. The test was running to main and setting the watchpoint on 'result'. But 'result' was not initialized in the (main) code at this point. So if 'result' happened to 0 the test would work (as it did for me); however as the inferior is at the main () line, equally 'result' could be any uninitialized value, and the test would fail. I fixed this by making 'result' global in the testcase. This ensures that 'result' is always at the expected value '0' at main.
I'm checking this in under the obvious rule.
Cheers,
Phil
--
2010-04-12 Phil Muldoon <pmuldoon@redhat.com>
* gdb.python/py-breakpoint.c: Make result global.
--
Index: testsuite/gdb.python/py-breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.python/py-breakpoint.c,v
retrieving revision 1.1
diff -r1.1 py-breakpoint.c
19a20
+ int result = 0;
36d36
- int result = 0;
next reply other threads:[~2010-04-12 9:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-12 9:58 Phil Muldoon [this message]
2010-04-12 10:14 ` Phil Muldoon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BC2EEBE.8090404@redhat.com \
--to=pmuldoon@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox