From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17697 invoked by alias); 4 Jun 2010 17:24:27 -0000 Received: (qmail 17685 invoked by uid 22791); 4 Jun 2010 17:24:24 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Fri, 04 Jun 2010 17:24:09 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o54HO6o6026455 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 4 Jun 2010 13:24:06 -0400 Received: from qcore.mollernet.net (vpn-242-147.phx2.redhat.com [10.3.242.147]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o54HO65S003037 for ; Fri, 4 Jun 2010 13:24:06 -0400 Message-ID: <4C0936B5.9080002@redhat.com> Date: Fri, 04 Jun 2010 17:24:00 -0000 From: Chris Moller User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2 MIME-Version: 1.0 To: "gdb-patches@sourceware.org" Subject: [patch] pr11371 conditional watchpoints with a function in the condition. Content-Type: multipart/mixed; boundary="------------030305000205000600060402" 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: 2010-06/txt/msg00122.txt.bz2 This is a multi-part message in MIME format. --------------030305000205000600060402 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 217 The description in this PR doesn't describe thing well--what's really happening is that if the condition associated with a watchpoint contained a function call, it resulted in a segfault. This patch fixes that. --------------030305000205000600060402 Content-Type: text/x-patch; name="pr11371.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr11371.patch" Content-length: 697 Index: breakpoint.c =================================================================== RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.486 diff -u -r1.486 breakpoint.c --- breakpoint.c 13 May 2010 22:44:02 -0000 1.486 +++ breakpoint.c 2 Jun 2010 19:39:12 -0000 @@ -1355,7 +1355,10 @@ /* We don't free locations. They are stored in bp_location array and update_global_locations will eventually delete them and remove breakpoints if needed. */ - b->loc = NULL; + + if (b->type != bp_watchpoint && b->type != bp_hardware_watchpoint && + b->enable_state != bp_call_disabled) + b->loc = NULL; if (b->disposition == disp_del_at_next_stop) return; --------------030305000205000600060402 Content-Type: text/x-patch; name="pr11371-sum.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr11371-sum.diff" Content-length: 3329 --- virgin.sum 2010-06-04 12:39:10.180908008 -0400 +++ patched.sum 2010-06-04 13:13:18.561033412 -0400 @@ -1,4 +1,4 @@ -Test Run By moller on Fri Jun 4 12:24:14 2010 +Test Run By moller on Fri Jun 4 13:05:22 2010 Native configuration is i686-pc-linux-gnu === gdb tests === @@ -6047,6 +6047,11 @@ PASS: gdb.base/pr11022.exp: breakpoint hit 2 PASS: gdb.base/pr11022.exp: set var x = 1 PASS: gdb.base/pr11022.exp: watchpoint hit 2 +Running ../../../src/gdb/testsuite/gdb.base/pr11371.exp ... +PASS: gdb.base/pr11371.exp: watch aa if cond(aa) +PASS: gdb.base/pr11371.exp: run to conditional watchpoint +PASS: gdb.base/pr11371.exp: run to conditional watchpoint +PASS: gdb.base/pr11371.exp: run to conditional watchpoint Running ../../../src/gdb/testsuite/gdb.base/prelink.exp ... PASS: gdb.base/prelink.exp: set verbose on PASS: gdb.base/prelink.exp: prelink @@ -14384,7 +14389,7 @@ Running ../../../src/gdb/testsuite/gdb.mi/mi2-console.exp ... PASS: gdb.mi/mi2-console.exp: breakpoint at main PASS: gdb.mi/mi2-console.exp: mi runto main -FAIL: gdb.mi/mi2-console.exp: Started step over hello +PASS: gdb.mi/mi2-console.exp: Started step over hello KFAIL: gdb.mi/mi2-console.exp: Hello message (PRMS: gdb/623) PASS: gdb.mi/mi2-console.exp: finished step over hello Running ../../../src/gdb/testsuite/gdb.mi/mi2-disassemble.exp ... @@ -16222,8 +16227,8 @@ PASS: gdb.threads/attachstop-mt.exp: attach4 to stopped switch thread PASS: gdb.threads/attachstop-mt.exp: attach4 to stopped bt PASS: gdb.threads/attachstop-mt.exp: continue (attach4 continue) -PASS: gdb.threads/attachstop-mt.exp: attach4 stop by interrupt -PASS: gdb.threads/attachstop-mt.exp: attach4, exit leaves process sleeping +FAIL: gdb.threads/attachstop-mt.exp: attach4 stop by interrupt (timeout) +FAIL: gdb.threads/attachstop-mt.exp: attach4, exit leaves process sleeping Running ../../../src/gdb/testsuite/gdb.threads/bp_in_thread.exp ... PASS: gdb.threads/bp_in_thread.exp: successfully compiled posix threads test case PASS: gdb.threads/bp_in_thread.exp: breakpoint on noreturn @@ -16542,7 +16547,7 @@ PASS: gdb.threads/schedlock.exp: step without lock does not change thread PASS: gdb.threads/schedlock.exp: listed args (3) PASS: gdb.threads/schedlock.exp: current thread stepped -FAIL: gdb.threads/schedlock.exp: other threads ran - unlocked +PASS: gdb.threads/schedlock.exp: other threads ran - unlocked PASS: gdb.threads/schedlock.exp: set scheduler-locking on PASS: gdb.threads/schedlock.exp: continue (with lock) PASS: gdb.threads/schedlock.exp: stop all threads (with lock) @@ -16753,7 +16758,7 @@ PASS: gdb.threads/watchthreads2.exp: all threads started PASS: gdb.threads/watchthreads2.exp: watch x PASS: gdb.threads/watchthreads2.exp: set var test_ready = 1 -KFAIL: gdb.threads/watchthreads2.exp: gdb can drop watchpoints in multithreaded app (PRMS: gdb/10116) +PASS: gdb.threads/watchthreads2.exp: all threads incremented x Running ../../../src/gdb/testsuite/gdb.trace/actions.exp ... PASS: gdb.trace/actions.exp: 5.1a: set three tracepoints, no actions PASS: gdb.trace/actions.exp: 5.1b: set actions for first tracepoint @@ -17019,7 +17024,7 @@ === gdb Summary === -# of expected passes 16154 +# of expected passes 16159 # of unexpected failures 31 # of expected failures 47 # of untested testcases 7 --------------030305000205000600060402--