aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index b1eae3a..acf3881 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -10557,6 +10557,7 @@ watch_command_1 (const char *arg, int accessflag, int from_tty,
the hardware watchpoint. */
bool use_mask = false;
CORE_ADDR mask = 0;
+ int task = 0;
/* Make sure that we actually have parameters to parse. */
if (arg != NULL && arg[0] != '\0')
@@ -10612,6 +10613,16 @@ watch_command_1 (const char *arg, int accessflag, int from_tty,
thread = thr->global_num;
}
+ else if (toklen == 4 && startswith (tok, "task"))
+ {
+ char *tmp;
+
+ task = strtol (value_start, &tmp, 0);
+ if (tmp == value_start)
+ error (_("Junk after task keyword."));
+ if (!valid_task_id (task))
+ error (_("Unknown task %d."), task);
+ }
else if (toklen == 4 && startswith (tok, "mask"))
{
/* We've found a "mask" token, which means the user wants to
@@ -10785,6 +10796,7 @@ watch_command_1 (const char *arg, int accessflag, int from_tty,
init_raw_breakpoint_without_location (w.get (), NULL, bp_type,
&watchpoint_breakpoint_ops);
w->thread = thread;
+ w->task = task;
w->disposition = disp_donttouch;
w->pspace = current_program_space;
w->exp = std::move (exp);