From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1538 invoked by alias); 4 Oct 2011 15:20:03 -0000 Received: (qmail 1481 invoked by uid 22791); 4 Oct 2011 15:20:02 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,TW_RG,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from qmta04.westchester.pa.mail.comcast.net (HELO qmta04.westchester.pa.mail.comcast.net) (76.96.62.40) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 04 Oct 2011 15:19:39 +0000 Received: from omta21.westchester.pa.mail.comcast.net ([76.96.62.72]) by qmta04.westchester.pa.mail.comcast.net with comcast id gdcB1h0061ZXKqc54fKf9R; Tue, 04 Oct 2011 15:19:39 +0000 Received: from [10.127.238.91] ([65.206.2.68]) by omta21.westchester.pa.mail.comcast.net with comcast id gfKW1h00V1U2a2h3hfKZpu; Tue, 04 Oct 2011 15:19:37 +0000 From: Paul Koning Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: [RFA] testsuite: fix py-value tests Date: Tue, 04 Oct 2011 15:20:00 -0000 Message-Id: To: gdb-patches@sourceware.org Mime-Version: 1.0 (Apple Message framework v1084) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00081.txt.bz2 In my test runs, the py-value.exp tests produced 10 failures apparently bec= ause of values going dead by the time the breakpoint (at the "return" in ma= in()) is hit. For example, I see argv=3D=3D0x19 at that point, which is no= t 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 pas= s instead of 10 failures. I'm not sure how to describe the change for the ChangeLog. paul ChangeLog: 2011-10-04 Paul Koning * gdb.python/py-value.c (main): Break before return. Index: testsuite/gdb.python/py-value.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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; } =20 +char **save_argv; + int main (int argc, char *argv[]) { @@ -94,5 +96,6 @@ ptr_ref(ptr_i); #endif =20 - return 0; /* break to inspect struct and union */ + save_argv =3D argv; /* break to inspect struct and union */ + return 0; }