From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 551 invoked by alias); 16 Nov 2007 21:44:24 -0000 Received: (qmail 540 invoked by uid 22791); 16 Nov 2007 21:44:24 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 16 Nov 2007 21:44:20 +0000 Received: from kahikatea.snap.net.nz (57.61.255.123.dynamic.snap.net.nz [123.255.61.57]) by viper.snap.net.nz (Postfix) with ESMTP id F401B3DA186; Sat, 17 Nov 2007 10:44:12 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id C3D658FC6D; Sat, 17 Nov 2007 10:42:37 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18238.3787.459206.333769@kahikatea.snap.net.nz> Date: Fri, 16 Nov 2007 21:44:00 -0000 To: Eli Zaretskii Cc: Daniel Jacobowitz , vladimir@codesourcery.com, gdb-patches@sources.redhat.com Subject: Re: delete_breakpoint: don't try to insert other breakpoints In-Reply-To: References: <200711142324.11319.vladimir@codesourcery.com> <200711161334.40641.vladimir@codesourcery.com> <20071116130250.GA31441@caradoc.them.org> X-Mailer: VM 7.19 under Emaqcs 23.0.50.47 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: 2007-11/txt/msg00343.txt.bz2 > > Eli, how is code which will never be reached a feature? > > The code is never reached only as long as breakpoints are deleted > synchronously (because we remove the breakpoint instruction as soon as > the inferior stops). I've run the testsuite using my asynchronous version of GDB, with and without Vladimir's change and, in fact, there was one less failure and seven more passes with it. Notably, the extra passes with print-threads.exp involved breakpoints. Of course, this doesn't prove anything, and there may be a test that shows the contrary, but it might provide some context. -- Nick http://www.inet.net.nz/~nickrob diff -cp /extra/src-async/build/gdb/testsuite/gdb1.sum /extra/src-async/build/gdb/testsuite/gdb.sum *** /extra/src-async/build/gdb/testsuite/gdb1.sum 2007-11-17 01:22:14.000000000 +1300 --- /extra/src-async/build/gdb/testsuite/gdb.sum 2007-11-17 10:32:41.000000000 +1300 *************** *** 1,4 **** ! Test Run By nickrob on Sat Nov 17 00:48:47 2007 Native configuration is i686-pc-linux-gnu === gdb tests === --- 1,4 ---- ! Test Run By nickrob on Sat Nov 17 09:59:26 2007 Native configuration is i686-pc-linux-gnu === gdb tests === *************** PASS: gdb.mi/mi2-simplerun.exp: next at *** 10993,10999 **** PASS: gdb.mi/mi2-simplerun.exp: step at main PASS: gdb.mi/mi2-simplerun.exp: step to callee4 PASS: gdb.mi/mi2-simplerun.exp: exec-finish ! FAIL: gdb.mi/mi2-simplerun.exp: continue to end (1) Running ../../../gdb/testsuite/gdb.mi/mi2-stack.exp ... PASS: gdb.mi/mi2-stack.exp: breakpoint at callee4 PASS: gdb.mi/mi2-stack.exp: mi runto callee4 --- 10993,10999 ---- PASS: gdb.mi/mi2-simplerun.exp: step at main PASS: gdb.mi/mi2-simplerun.exp: step to callee4 PASS: gdb.mi/mi2-simplerun.exp: exec-finish ! PASS: gdb.mi/mi2-simplerun.exp: continue to end Running ../../../gdb/testsuite/gdb.mi/mi2-stack.exp ... PASS: gdb.mi/mi2-stack.exp: breakpoint at callee4 PASS: gdb.mi/mi2-stack.exp: mi runto callee4 *************** PASS: gdb.threads/print-threads.exp: pro *** 11835,11841 **** PASS: gdb.threads/print-threads.exp: all threads ran once (slow) PASS: gdb.threads/print-threads.exp: break thread_function (3) PASS: gdb.threads/print-threads.exp: set var slow = 1 (2) ! FAIL: gdb.threads/print-threads.exp: Running threads (slow with kill breakpoint) (timeout) Running ../../../gdb/testsuite/gdb.threads/pthread_cond_wait.exp ... PASS: gdb.threads/pthread_cond_wait.exp: successfully compiled posix threads test case PASS: gdb.threads/pthread_cond_wait.exp: breakpoint on break_me --- 11835,11847 ---- PASS: gdb.threads/print-threads.exp: all threads ran once (slow) PASS: gdb.threads/print-threads.exp: break thread_function (3) PASS: gdb.threads/print-threads.exp: set var slow = 1 (2) ! PASS: gdb.threads/print-threads.exp: Hit thread_function breakpoint, 1 (slow with kill breakpoint) ! PASS: gdb.threads/print-threads.exp: Hit thread_function breakpoint, 2 (slow with kill breakpoint) ! PASS: gdb.threads/print-threads.exp: Hit thread_function breakpoint, 3 (slow with kill breakpoint) ! PASS: gdb.threads/print-threads.exp: Hit thread_function breakpoint, 4 (slow with kill breakpoint) ! PASS: gdb.threads/print-threads.exp: Hit thread_function breakpoint, 5 (slow with kill breakpoint) ! PASS: gdb.threads/print-threads.exp: program exited normally ! PASS: gdb.threads/print-threads.exp: all threads ran once (slow with kill breakpoint) Running ../../../gdb/testsuite/gdb.threads/pthread_cond_wait.exp ... PASS: gdb.threads/pthread_cond_wait.exp: successfully compiled posix threads test case PASS: gdb.threads/pthread_cond_wait.exp: breakpoint on break_me *************** PASS: gdb.threads/pthreads.exp: disable *** 11873,11879 **** PASS: gdb.threads/pthreads.exp: tbreak common_routine if hits >= 15 PASS: gdb.threads/pthreads.exp: stopped before calling common_routine 15 times PASS: gdb.threads/pthreads.exp: All threads running after continuing from ^C stop ! PASS: gdb.threads/pthreads.exp: check backtrace from main thread PASS: gdb.threads/pthreads.exp: check backtrace from thread 1 PASS: gdb.threads/pthreads.exp: check backtrace from thread 2 PASS: gdb.threads/pthreads.exp: apply backtrace command to all three threads --- 11879,11885 ---- PASS: gdb.threads/pthreads.exp: tbreak common_routine if hits >= 15 PASS: gdb.threads/pthreads.exp: stopped before calling common_routine 15 times PASS: gdb.threads/pthreads.exp: All threads running after continuing from ^C stop ! FAIL: gdb.threads/pthreads.exp: check backtrace from main thread PASS: gdb.threads/pthreads.exp: check backtrace from thread 1 PASS: gdb.threads/pthreads.exp: check backtrace from thread 2 PASS: gdb.threads/pthreads.exp: apply backtrace command to all three threads *************** PASS: gdb.xml/tdesc-xinclude.exp: set td *** 12226,12233 **** === gdb Summary === ! # of expected passes 11639 ! # of unexpected failures 52 # of unexpected successes 3 # of expected failures 41 # of unknown successes 6 --- 12232,12239 ---- === gdb Summary === ! # of expected passes 11646 ! # of unexpected failures 51 # of unexpected successes 3 # of expected failures 41 # of unknown successes 6 Diff finished. Sat Nov 17 10:35:47 2007