#include "value.h"
#include "target.h"
#include "gdbthread.h"
+#include "exceptions.h"
#include "command.h"
#include "gdbcmd.h"
#include "regcache.h"
/* Official gdblib interface function to get a list of thread ids and
the total number. */
enum gdb_rc
-gdb_list_thread_ids (struct ui_out *uiout)
+gdb_list_thread_ids (struct ui_out *uiout, char **error_message)
{
- return catch_exceptions (uiout, do_captured_list_thread_ids, NULL,
- NULL, RETURN_MASK_ALL);
+ return catch_exceptions_with_msg (uiout, do_captured_list_thread_ids, NULL,
+ error_message, RETURN_MASK_ALL);
}
/* Load infrun state for the thread PID. */
int *another_trap,
int *stepping_through_solib_after_catch,
bpstat *stepping_through_solib_catchpoints,
- int *stepping_through_sigtramp,
int *current_line,
struct symtab **current_symtab)
{
tp->stepping_through_solib_after_catch;
*stepping_through_solib_catchpoints =
tp->stepping_through_solib_catchpoints;
- *stepping_through_sigtramp = tp->stepping_through_sigtramp;
*current_line = tp->current_line;
*current_symtab = tp->current_symtab;
}
int another_trap,
int stepping_through_solib_after_catch,
bpstat stepping_through_solib_catchpoints,
- int stepping_through_sigtramp,
int current_line,
struct symtab *current_symtab)
{
tp->another_trap = another_trap;
tp->stepping_through_solib_after_catch = stepping_through_solib_after_catch;
tp->stepping_through_solib_catchpoints = stepping_through_solib_catchpoints;
- tp->stepping_through_sigtramp = stepping_through_sigtramp;
tp->current_line = current_line;
tp->current_symtab = current_symtab;
}
struct thread_info *tp;
ptid_t current_ptid;
struct frame_info *cur_frame;
- struct frame_id saved_frame_id = get_frame_id (get_selected_frame ());
+ struct frame_id saved_frame_id = get_frame_id (get_selected_frame (NULL));
char *extra_info;
prune_threads ();
puts_filtered (" ");
switch_to_thread (tp->ptid);
- print_stack_frame (get_selected_frame (), 0, LOCATION);
+ print_stack_frame (get_selected_frame (NULL), 0, LOCATION);
}
switch_to_thread (current_ptid);
{
/* Ooops, can't restore, tell user where we are. */
warning ("Couldn't restore frame in current thread, at frame 0");
- print_stack_frame (get_selected_frame (), 0, LOCATION);
+ print_stack_frame (get_selected_frame (NULL), 0, LOCATION);
}
else
{
return;
}
- gdb_thread_select (uiout, tidstr);
+ gdb_thread_select (uiout, tidstr, NULL);
}
static int
ui_out_text (uiout, target_tid_to_str (inferior_ptid));
ui_out_text (uiout, ")]");
- print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC);
+ print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC);
return GDB_RC_OK;
}
enum gdb_rc
-gdb_thread_select (struct ui_out *uiout, char *tidstr)
+gdb_thread_select (struct ui_out *uiout, char *tidstr, char **error_message)
{
- return catch_exceptions (uiout, do_captured_thread_select, tidstr,
- NULL, RETURN_MASK_ALL);
+ return catch_exceptions_with_msg (uiout, do_captured_thread_select, tidstr,
+ error_message, RETURN_MASK_ALL);
}
/* Commands with a prefix of `thread'. */