aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-01-31 15:16:59 +0000
committerTom Tromey <tromey@redhat.com>2011-01-31 15:16:59 +0000
commit45a4356715b9d5c35c581c14e17978a1cd2aed18 (patch)
treeeb0d1c4834625704801fb990bfcfa061c5ba4c32 /gdb/breakpoint.c
parent09d682a4f353e0e692e602baf229b3b5b93c0142 (diff)
downloadgdb-45a4356715b9d5c35c581c14e17978a1cd2aed18.zip
gdb-45a4356715b9d5c35c581c14e17978a1cd2aed18.tar.gz
gdb-45a4356715b9d5c35c581c14e17978a1cd2aed18.tar.bz2
* infcmd.c (finish_backward): Use breakpoint_set_silent.
* python/py-breakpoint.c (bppy_set_silent): Use breakpoint_set_silent. (bppy_set_thread): Use breakpoint_set_thread. (bppy_set_task): Use breakpoint_set_task. * breakpoint.h (breakpoint_set_silent, breakpoint_set_thread) (breakpoint_set_task): Declare. (make_breakpoint_silent): Remove. * breakpoint.c (breakpoint_set_silent): New function. (breakpoint_set_thread): Likewise. (breakpoint_set_task): Likewise. (make_breakpoint_silent): Remove.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c47
1 files changed, 40 insertions, 7 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index ff0ea18..60d91ac 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -940,6 +940,46 @@ breakpoint_set_commands (struct breakpoint *b,
observer_notify_breakpoint_modified (b->number);
}
+/* Set the internal `silent' flag on the breakpoint. Note that this
+ is not the same as the "silent" that may appear in the breakpoint's
+ commands. */
+
+void
+breakpoint_set_silent (struct breakpoint *b, int silent)
+{
+ int old_silent = b->silent;
+
+ b->silent = silent;
+ if (old_silent != silent)
+ observer_notify_breakpoint_modified (b->number);
+}
+
+/* Set the thread for this breakpoint. If THREAD is -1, make the
+ breakpoint work for any thread. */
+
+void
+breakpoint_set_thread (struct breakpoint *b, int thread)
+{
+ int old_thread = b->thread;
+
+ b->thread = thread;
+ if (old_thread != thread)
+ observer_notify_breakpoint_modified (b->number);
+}
+
+/* Set the task for this breakpoint. If TASK is 0, make the
+ breakpoint work for any task. */
+
+void
+breakpoint_set_task (struct breakpoint *b, int task)
+{
+ int old_task = b->task;
+
+ b->task = task;
+ if (old_task != task)
+ observer_notify_breakpoint_modified (b->number);
+}
+
void
check_tracepoint_command (char *line, void *closure)
{
@@ -10738,13 +10778,6 @@ set_ignore_count (int bptnum, int count, int from_tty)
error (_("No breakpoint number %d."), bptnum);
}
-void
-make_breakpoint_silent (struct breakpoint *b)
-{
- /* Silence the breakpoint. */
- b->silent = 1;
-}
-
/* Command to set ignore-count of breakpoint N to COUNT. */
static void