From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92904 invoked by alias); 9 Feb 2016 23:02:48 -0000 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 Received: (qmail 92886 invoked by uid 89); 9 Feb 2016 23:02:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=follexecexp, UD:foll-exec.exp, foll-exec.exp, H*f:sk:1455045 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 09 Feb 2016 23:02:46 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 93ADA8F296 for ; Tue, 9 Feb 2016 23:02:45 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u19N2iSl028128; Tue, 9 Feb 2016 18:02:44 -0500 Message-ID: <56BA7014.9070805@redhat.com> Date: Tue, 09 Feb 2016 23:02:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Keith Seitz , gdb-patches@sourceware.org Subject: Re: [PATCH] breakpoints/19546: Fix crash after updating breakpoints References: <1455045145-6101-1-git-send-email-keiths@redhat.com> In-Reply-To: <1455045145-6101-1-git-send-email-keiths@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-02/txt/msg00249.txt.bz2 Thanks much Keith. LGTM, with a couple nits addressed. On 02/09/2016 07:12 PM, Keith Seitz wrote: > gdb/ChangeLog > > PR breakpoints/19546 > * breakpoint.c (breakpoint_event_location_empty_p): New function. > (update_breakpoints_after_exec, bkpt_re_set): Use this new function > instead of event_location_empty_p. > > gdb/testsuite/ChangeLog > > PR breakpoints/19546 > * gdb.base/inf-exec.c: New file. > * gdb.base/inf-exec2.c: New file. > * gdb.base/inf-exec.exp: New file. Please rename these new files to infcall-*. We have several other infcall-specific tests named that way, which allows conveniently doing: make check TESTS="gdb.*/*infcall*.exp" > +# Test an inferior function call which execs a new program. > +# This is a test for breakpoints/19546. > + > +standard_testfile inf-exec.c "standard_testfile" without a file name should work. > + > +set testfile2 "inf-exec2" > +set srcfile2 "${testfile2}.c" > +set binfile2 [standard_output_file $testfile2] > + > +# Build the two executables for the test. > +if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable debug] != ""} { > + untested "could not build $binfile" > + return -1 > +} > +if {[gdb_compile $srcdir/$subdir/$srcfile2 $binfile2 executable debug] != ""} { > + untested "could not build $binfile2" > + return -1 > +} > + > +gdb_exit Not needed, clean_restart does that for you. (guess you copied these from foll-exec.exp.) > +clean_restart $binfile > + > +if {![runto_main]} { > + untested "could not run to main" > + return -1 > +} > + > +set expected_result "process \[0-9\]+ is executing new program: $binfile2" > +append expected_result "\[\r\n\]+" > +append expected_result "Breakpoint 1, main.*at .*/$srcfile2:\[0-9\]+" No / before $srcfile2, for remote host testing (see e.g., 0e7a53fca6e4). While at it, I'd add space after "main" ("main .*") and use $decimal. Thanks, Pedro Alves