From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9771 invoked by alias); 24 Dec 2011 13:56:36 -0000 Received: (qmail 9762 invoked by uid 22791); 24 Dec 2011 13:56:34 -0000 X-SWARE-Spam-Status: No, hits=-7.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_GJ X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 24 Dec 2011 13:56:17 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pBODuGcs030989 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 24 Dec 2011 08:56:16 -0500 Received: from host2.jankratochvil.net (ovpn-116-60.ams2.redhat.com [10.36.116.60]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pBODuB7w023719 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 24 Dec 2011 08:56:14 -0500 Date: Sat, 24 Dec 2011 23:56:00 -0000 From: Jan Kratochvil To: Kevin Pouget Cc: Tom Tromey , gdb-patches@sourceware.org Subject: [patch] Fix gdb.python/py-finish-breakpoint.exp new FAIL on x86_64-m32 [Re: [RFC] Python Finish Breakpoints] Message-ID: <20111224135611.GA6131@host2.jankratochvil.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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-12/txt/msg00820.txt.bz2 On Tue, 20 Dec 2011 21:54:47 +0100, Kevin Pouget wrote: > Great! I'll fix this last bits and commit it in the next few days +Continuing. +process 23029 is executing new program: /bin/echo +warning: Selected architecture i386:x86-64 is not compatible with reported target architecture i386 +Architecture of file not recognized. +(gdb) FAIL: gdb.python/py-finish-breakpoint.exp: catch out of scope after exec On x86_64 with -m32 testcases compilation. OK to check in this patch? Thanks, Jan gdb/testsuite/ 2011-12-24 Jan Kratochvil * gdb.python/py-finish-breakpoint.c (test_exec_exit): Change the parameter to self_exec, adjust the function. (main): Check for argv[1] "exit". Use argv[0] for test_exec_exit. * gdb.python/py-finish-breakpoint.exp (set var self_exec = 0): New test. (set var do_exit = 0): Remove test. (newline at end of file): Add one. --- a/gdb/testsuite/gdb.python/py-finish-breakpoint.c +++ b/gdb/testsuite/gdb.python/py-finish-breakpoint.c @@ -59,12 +59,12 @@ call_longjmp (jmp_buf *buf) } void -test_exec_exit (int do_exit) +test_exec_exit (const char *self_exec) { - if (do_exit) + if (self_exec == NULL) exit (0); else - execl ("/bin/echo", "echo", "-1", (char *)0); + execl (self_exec, self_exec, "exit", (char *)0); } int main (int argc, char *argv[]) @@ -74,6 +74,9 @@ int main (int argc, char *argv[]) int bar = 42; int i, j; + if (argc == 2 && strcmp (argv[1], "exit") == 0) + return 0; + do_nothing (); i = 0; @@ -94,7 +97,7 @@ int main (int argc, char *argv[]) else j += 1; /* after longjmp. */ - test_exec_exit (1); + test_exec_exit (argv[0]); return j; /* Break at end. */ } --- a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp +++ b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp @@ -247,6 +247,7 @@ if ![runto "test_exec_exit"] then { return 0 } +gdb_test_no_output "set var self_exec = 0" "switch to exit() test" gdb_test "python SimpleFinishBreakpoint(gdb.newest_frame())" "SimpleFinishBreakpoint init" "set FinishBP after the exit()" gdb_test "continue" "SimpleFinishBreakpoint out of scope.*" "catch out of scope after exit" @@ -259,7 +260,6 @@ if ![runto "test_exec_exit"] then { return 0 } -gdb_test_no_output "set var do_exit = 0" "switch to execve() test" gdb_test "python SimpleFinishBreakpoint(gdb.newest_frame())" "SimpleFinishBreakpoint init" "set FinishBP after the exec" gdb_test "catch exec" "Catchpoint.*\(exec\).*" "catch exec" -gdb_test "continue" "SimpleFinishBreakpoint out of scope.*" "catch out of scope after exec" \ No newline at end of file +gdb_test "continue" "SimpleFinishBreakpoint out of scope.*" "catch out of scope after exec"