* 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.
This commit is contained in:
Tom Tromey 2011-01-31 15:16:59 +00:00
parent 09d682a4f3
commit 45a4356715
5 changed files with 65 additions and 14 deletions

View File

@ -1,3 +1,18 @@
2011-01-31 Tom Tromey <tromey@redhat.com>
* 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.
2011-01-31 Tom Tromey <tromey@redhat.com>
* breakpoint.h (user_breakpoint_p): Declare.

View File

@ -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

View File

@ -1063,6 +1063,12 @@ extern void enable_breakpoint (struct breakpoint *);
extern void breakpoint_set_commands (struct breakpoint *b,
struct command_line *commands);
extern void breakpoint_set_silent (struct breakpoint *b, int silent);
extern void breakpoint_set_thread (struct breakpoint *b, int thread);
extern void breakpoint_set_task (struct breakpoint *b, int task);
/* Clear the "inserted" flag in all breakpoints. */
extern void mark_breakpoints_out (void);
@ -1140,9 +1146,6 @@ extern int catch_syscall_enabled (void);
Returns 0 if not, greater than 0 if we are. */
extern int catching_syscall_number (int syscall_number);
/* Tell a breakpoint to be quiet. */
extern void make_breakpoint_silent (struct breakpoint *);
/* Return a tracepoint with the given number if found. */
extern struct breakpoint *get_tracepoint (int num);

View File

@ -1545,7 +1545,7 @@ finish_backward (struct symbol *function)
bp_breakpoint);
/* Tell the breakpoint to keep quiet. We won't be done
until we've done another reverse single-step. */
make_breakpoint_silent (breakpoint);
breakpoint_set_silent (breakpoint, 1);
old_chain = make_cleanup_delete_breakpoint (breakpoint);
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
/* We will be stopped when proceed returns. */

View File

@ -201,7 +201,7 @@ bppy_set_silent (PyObject *self, PyObject *newvalue, void *closure)
if (cmp < 0)
return -1;
else
self_bp->bp->silent = cmp;
breakpoint_set_silent (self_bp->bp, cmp);
return 0;
}
@ -242,7 +242,7 @@ bppy_set_thread (PyObject *self, PyObject *newvalue, void *closure)
return -1;
}
self_bp->bp->thread = id;
breakpoint_set_thread (self_bp->bp, id);
return 0;
}
@ -283,7 +283,7 @@ bppy_set_task (PyObject *self, PyObject *newvalue, void *closure)
return -1;
}
self_bp->bp->task = id;
breakpoint_set_task (self_bp->bp, id);
return 0;
}