aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2012-07-18 20:20:51 +0000
committerKeith Seitz <keiths@redhat.com>2012-07-18 20:20:51 +0000
commitaf4908ba3674e4090518070df564c158ac07ae99 (patch)
tree01e50c8d90033b5428f4ffa9c332377a8347ed29 /gdb/breakpoint.c
parent7c32896367817d17492a933c48a97c75a0912e3b (diff)
downloadgdb-af4908ba3674e4090518070df564c158ac07ae99.zip
gdb-af4908ba3674e4090518070df564c158ac07ae99.tar.gz
gdb-af4908ba3674e4090518070df564c158ac07ae99.tar.bz2
* breakpoint.c (invalid_thread_id_error): New function.
(find_condition_and_thread): Use invalid_thread_id_error. (watch_command_1): Likewise.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 665a18d..63cd8de 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -9231,6 +9231,14 @@ check_fast_tracepoint_sals (struct gdbarch *gdbarch,
}
}
+/* Issue an invalid thread ID error. */
+
+static void ATTRIBUTE_NORETURN
+invalid_thread_id_error (int id)
+{
+ error (_("Unknown thread %d."), id);
+}
+
/* Given TOK, a string specification of condition and thread, as
accepted by the 'break' command, extract the condition
string and thread number and set *COND_STRING and *THREAD.
@@ -9287,7 +9295,7 @@ find_condition_and_thread (char *tok, CORE_ADDR pc,
if (tok == tmptok)
error (_("Junk after thread keyword."));
if (!valid_thread_id (*thread))
- error (_("Unknown thread %d."), *thread);
+ invalid_thread_id_error (*thread);
}
else if (toklen >= 1 && strncmp (tok, "task", toklen) == 0)
{
@@ -10764,7 +10772,7 @@ watch_command_1 (char *arg, int accessflag, int from_tty,
/* Check if the thread actually exists. */
if (!valid_thread_id (thread))
- error (_("Unknown thread %d."), thread);
+ invalid_thread_id_error (thread);
}
else if (toklen == 4 && !strncmp (tok, "mask", 4))
{