/* It is invalid to set the thread field to anything other than -1 (which
means no thread restriction) if a task restriction is already in
place. */
- gdb_assert (thread == -1 || b->task == 0);
+ gdb_assert (thread == -1 || b->task == -1);
int old_thread = b->thread;
void
breakpoint_set_task (struct breakpoint *b, int task)
{
- /* It is invalid to set the task field to anything other than 0 (which
+ /* It is invalid to set the task field to anything other than -1 (which
means no task restriction) if a thread restriction is already in
place. */
- gdb_assert (task == 0 || b->thread == -1);
+ gdb_assert (task == -1 || b->thread == -1);
int old_task = b->task;
evaluating the condition if this isn't the specified
thread/task. */
if ((b->thread != -1 && b->thread != thread->global_num)
- || (b->task != 0 && b->task != ada_get_task_number (thread)))
+ || (b->task != -1 && b->task != ada_get_task_number (thread)))
{
infrun_debug_printf ("incorrect thread or task, not stopping");
bs->stop = false;
{
if (b->thread != -1)
uiout->field_signed ("thread", b->thread);
- else if (b->task != 0)
+ else if (b->task != -1)
uiout->field_signed ("task", b->task);
}
uiout->text ("\n");
}
- if (!part_of_multiple && b->task != 0)
+ if (!part_of_multiple && b->task != -1)
{
uiout->text ("\tstop only in task ");
uiout->field_signed ("task", b->task);
gdb_assert (!sals.empty ());
/* At most one of thread or task can be set on any breakpoint. */
- gdb_assert (thread == -1 || task == 0);
+ gdb_assert (thread == -1 || task == -1);
thread = thread_;
task = task_;
{
cond_string->reset ();
*thread = -1;
- *task = 0;
+ *task = -1;
rest->reset ();
bool force = false;
if (*thread != -1)
error(_("You can specify only one thread."));
- if (*task != 0)
+ if (*task != -1)
error (_("You can specify only one of thread or task."));
tok = end_tok + 1;
{
char *tmptok;
- if (*task != 0)
+ if (*task != -1)
error(_("You can specify only one task."));
if (*thread != -1)
{
gdb::unique_xmalloc_ptr<char> cond;
int thread_id = -1;
- int task_id = 0;
+ int task_id = -1;
gdb::unique_xmalloc_ptr<char> remaining;
/* Here we want to parse 'arg' to separate condition from thread
&task_id, &remaining);
*cond_string = std::move (cond);
/* At most one of thread or task can be set. */
- gdb_assert (thread_id == -1 || task_id == 0);
+ gdb_assert (thread_id == -1 || task_id == -1);
*thread = thread_id;
*task = task_id;
*rest = std::move (remaining);
{
struct linespec_result canonical;
bool pending = false;
- int task = 0;
+ int task = -1;
int prev_bkpt_count = breakpoint_count;
gdb_assert (ops != NULL);
the hardware watchpoint. */
bool use_mask = false;
CORE_ADDR mask = 0;
- int task = 0;
+ int task = -1;
/* Make sure that we actually have parameters to parse. */
if (arg != NULL && arg[0] != '\0')
if (thread != -1)
error(_("You can specify only one thread."));
- if (task != 0)
+ if (task != -1)
error (_("You can specify only one of thread or task."));
/* Extract the thread ID from the next token. */
{
char *tmp;
- if (task != 0)
+ if (task != -1)
error(_("You can specify only one task."));
if (thread != -1)
w.reset (new watchpoint (nullptr, bp_type));
/* At most one of thread or task can be set on a watchpoint. */
- gdb_assert (thread == -1 || task == 0);
+ gdb_assert (thread == -1 || task == -1);
w->thread = thread;
w->task = task;
w->disposition = disp_donttouch;
if (thread != -1)
gdb_printf (fp, " thread %d", thread);
- if (task != 0)
+ if (task != -1)
gdb_printf (fp, " task %d", task);
gdb_printf (fp, "\n");
care. */
int thread = -1;
- /* Ada task number for task-specific breakpoint, or 0 if don't
+ /* Ada task number for task-specific breakpoint, or -1 if don't
care. */
- int task = 0;
+ int task = -1;
/* Count of the number of times this breakpoint was taken, dumped
with the info, but not used for anything else. Useful for seeing
extern void breakpoint_set_thread (struct breakpoint *b, int thread);
-/* Set the task for this breakpoint. If TASK is 0, make the breakpoint
- work for any task. Passing a value other than 0 for TASK should only be
- done if b->thread is -1; it is not valid to try and set both a thread
+/* Set the task for this breakpoint. If TASK is -1, make the breakpoint
+ work for any task. Passing a value other than -1 for TASK should only
+ be done if b->thread is -1; it is not valid to try and set both a thread
and task restriction on a breakpoint. */
extern void breakpoint_set_task (struct breakpoint *b, int task);
_("invalid thread id"));
}
- if (bp_smob->bp->task != 0)
+ if (bp_smob->bp->task != -1)
scm_misc_error (FUNC_NAME,
_("cannot set both task and thread attributes"),
SCM_EOL);
breakpoint_smob *bp_smob
= bpscm_get_valid_breakpoint_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
- if (bp_smob->bp->task == 0)
+ if (bp_smob->bp->task == -1)
return SCM_BOOL_F;
return scm_from_long (bp_smob->bp->task);
SCM_EOL);
}
else if (gdbscm_is_false (newvalue))
- id = 0;
+ id = -1;
else
SCM_ASSERT_TYPE (0, newvalue, SCM_ARG2, FUNC_NAME, _("integer or #f"));