/* 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);
}
/*
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)
printf_filtered ("%s", cmd_result.c_str ());
}
}
- CATCH (ex, RETURN_MASK_ERROR)
+ catch (const gdb_exception_error &ex)
{
if (!flags.silent)
{
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