* breakpoint.c (invalid_thread_id_error): New function.
authorKeith Seitz <keiths@redhat.com>
Wed, 18 Jul 2012 20:20:51 +0000 (20:20 +0000)
committerKeith Seitz <keiths@redhat.com>
Wed, 18 Jul 2012 20:20:51 +0000 (20:20 +0000)
(find_condition_and_thread): Use invalid_thread_id_error.
(watch_command_1): Likewise.

gdb/ChangeLog
gdb/breakpoint.c

index a0f421e66406693a290c152ee266e864b77dd6fb..6a809ecb809642a50cedfef24e68fbacd4259de3 100644 (file)
@@ -1,3 +1,9 @@
+2012-07-18  Keith Seitz  <keiths@redhat.com>
+
+       * breakpoint.c (invalid_thread_id_error): New function.
+       (find_condition_and_thread): Use invalid_thread_id_error.
+       (watch_command_1): Likewise.
+
 2012-07-18  Tom Tromey  <tromey@redhat.com>
 
        * cc-with-index.sh, cc-with-dwz.sh: Remove.
index 665a18de78719bc5cdd2ffffe8fdd83d72787bb4..63cd8de45dee5f5acae3f87de7cd8ba868afc2c1 100644 (file)
@@ -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))
            {
This page took 0.043927 seconds and 4 git commands to generate.