aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi/mi-main.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-09-08 22:10:20 +0000
committerPedro Alves <palves@redhat.com>2008-09-08 22:10:20 +0000
commitdcf4fbde10e63c5cc5fa08b7280b751d01a8efaf (patch)
tree9e2e0a6deddd136c579e025c17d96828aa1f9946 /gdb/mi/mi-main.c
parentfedae5ffbcc3c8ddd072ad61334f710f940a4a4a (diff)
downloadgdb-dcf4fbde10e63c5cc5fa08b7280b751d01a8efaf.zip
gdb-dcf4fbde10e63c5cc5fa08b7280b751d01a8efaf.tar.gz
gdb-dcf4fbde10e63c5cc5fa08b7280b751d01a8efaf.tar.bz2
* inferior.h (context_switch_to): Delete.
* infrun.c (context_switch): Don't save and load infrun state. (context_switch_to): Delete. * infcmd.c (proceed_thread_callback): Replace context_switch_to calls by switch_to_thread calls. * gdbthread.h (save_infrun_state, load_infrun_state): Delete. * thread.c (main_thread_state, main_thread_executing): Delete. (inferior_thread): Delete references to them. (add_thread_silent): Fix case where we're adding a thread with the same ptid as an exited thread. Remove references to context-switching. (load_infrun_state, save_infrun_state): Delete. (thread_alive, is_thread_state, any_running, is_executing) (set_executing): Remove the special handling for targets that don't register any thread. (restore_current_thread, thread_apply_all_command) (do_captured_thread_select): Unconditionally call switch_to_thread. * mi/mi-main.c (mi_cmd_execute): Check for exited threads. Call switch_to_thread instead of context_switch_to.
Diffstat (limited to 'gdb/mi/mi-main.c')
-rw-r--r--gdb/mi/mi-main.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 332ce42..7780207 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -1094,19 +1094,19 @@ mi_cmd_execute (struct mi_parse *parse)
if (parse->frame != -1 && parse->thread == -1)
error (_("Cannot specify --frame without --thread"));
-
+
if (parse->thread != -1)
{
struct thread_info *tp = find_thread_id (parse->thread);
if (!tp)
error (_("Invalid thread id: %d"), parse->thread);
-
- if (non_stop)
- context_switch_to (tp->ptid);
- else
- switch_to_thread (tp->ptid);
+
+ if (is_exited (tp->ptid))
+ error (_("Thread id: %d has terminated"), parse->thread);
+
+ switch_to_thread (tp->ptid);
}
-
+
if (parse->frame != -1)
{
struct frame_info *fid;
@@ -1118,7 +1118,7 @@ mi_cmd_execute (struct mi_parse *parse)
else
error (_("Invalid frame id: %d"), frame);
}
-
+
if (parse->cmd->argv_func != NULL)
{
if (target_can_async_p ()