Change valid_command_p to return bool
[deliverable/binutils-gdb.git] / gdb / thread.c
index a86f26947c766bb4a7e277869e04499c1d3d656b..b6c9b9583e0e1c5f0e3d0295381e189a7af8f87b 100644 (file)
@@ -540,12 +540,12 @@ find_thread_ptid (inferior *inf, ptid_t ptid)
 /* See gdbthread.h.  */
 
 struct thread_info *
-find_thread_by_handle (struct value *thread_handle, struct inferior *inf)
+find_thread_by_handle (gdb::array_view<const gdb_byte> handle,
+                      struct inferior *inf)
 {
-  return target_thread_handle_to_thread_info
-          (value_contents_all (thread_handle),
-           TYPE_LENGTH (value_type (thread_handle)),
-           inf);
+  return target_thread_handle_to_thread_info (handle.data (),
+                                             handle.size (),
+                                             inf);
 }
 
 /*
@@ -1459,9 +1459,10 @@ thr_try_catch_cmd (thread_info *thr, const char *cmd, int from_tty,
                   const qcs_flags &flags)
 {
   switch_to_thread (thr);
-  TRY
+  try
     {
-      std::string cmd_result = execute_command_to_string (cmd, from_tty);
+      std::string cmd_result = execute_command_to_string
+       (cmd, from_tty, gdb_stdout->term_out ());
       if (!flags.silent || cmd_result.length () > 0)
        {
          if (!flags.quiet)
@@ -1471,7 +1472,7 @@ thr_try_catch_cmd (thread_info *thr, const char *cmd, int from_tty,
          printf_filtered ("%s", cmd_result.c_str ());
        }
     }
-  CATCH (ex, RETURN_MASK_ERROR)
+  catch (const gdb_exception_error &ex)
     {
       if (!flags.silent)
        {
@@ -1482,10 +1483,9 @@ thr_try_catch_cmd (thread_info *thr, const char *cmd, int from_tty,
          if (flags.cont)
            printf_filtered ("%s\n", ex.what ());
          else
-           throw_exception (ex);
+           throw;
        }
     }
-  END_CATCH;
 }
 
 /* Apply a GDB command to a list of threads.  List syntax is a whitespace
This page took 0.025327 seconds and 4 git commands to generate.