From: Chris Moller <cmoller@redhat.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [patch] pr11371 conditional watchpoints with a function in the condition.
Date: Fri, 04 Jun 2010 17:24:00 -0000 [thread overview]
Message-ID: <4C0936B5.9080002@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 217 bytes --]
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.
[-- Attachment #2: pr11371.patch --]
[-- Type: text/x-patch, Size: 697 bytes --]
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;
[-- Attachment #3: pr11371-sum.diff --]
[-- Type: text/x-patch, Size: 3329 bytes --]
--- 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
next reply other threads:[~2010-06-04 17:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-04 17:24 Chris Moller [this message]
2010-06-04 20:55 ` Jan Kratochvil
2010-06-04 20:34 ` Chris Moller
2010-06-04 22:54 ` Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C0936B5.9080002@redhat.com \
--to=cmoller@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox