aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-09-08 21:55:16 +0000
committerPedro Alves <palves@redhat.com>2008-09-08 21:55:16 +0000
commit414c69f7a7e241fd4a4cb85535d864d48ddbee1f (patch)
tree5ba98c354ad39cfaee0db4d17b53296db378b5ec /gdb/infcmd.c
parentaf679fd00340269efb8474ee49a343dccaea9700 (diff)
downloadgdb-414c69f7a7e241fd4a4cb85535d864d48ddbee1f.zip
gdb-414c69f7a7e241fd4a4cb85535d864d48ddbee1f.tar.gz
gdb-414c69f7a7e241fd4a4cb85535d864d48ddbee1f.tar.bz2
Remove the global stop_step in favour of a per-thread
stop_step. * inferior.h (stop_step): Delete. * gdbthread.h (struct thread_info): Add comments to stop_step. (save_infrun_state, load_infrun_state): Remove stop_step argument. * thread.c (load_infrun_state, save_infrun_state): Remove stop_step argument, and references to it. * infrun.c (clear_proceed_status): Clear stop_step. (fetch_inferior_event): Adjust. (context_switch): Don't context-switch stop_step. (handle_inferior_event): Adjust. (normal_stop): Adjust. (save_inferior_status, restore_inferior_status): Adjust. * infcmd.c (stop_step): Delete. (step_1, step_1_continuation, step_once, until_next_command): Adjust.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index afe6d55..a4c6c94 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -156,10 +156,6 @@ CORE_ADDR stop_pc;
int breakpoint_proceeded;
-/* Nonzero if stopped due to a step command. */
-
-int stop_step;
-
/* Nonzero if stopped due to completion of a stack dummy routine. */
int stop_stack_dummy;
@@ -826,7 +822,8 @@ which has no line number information.\n"), name);
tp->step_multi = (count > 1);
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1);
- if (!stop_step)
+ if (!target_has_execution
+ || !inferior_thread ()->stop_step)
break;
}
@@ -869,7 +866,7 @@ step_1_continuation (void *args)
struct thread_info *tp;
tp = inferior_thread ();
- if (tp->step_multi && stop_step)
+ if (tp->step_multi && tp->stop_step)
{
/* There are more steps to make, and we did stop due to
ending a stepping range. Do another step. */
@@ -1486,7 +1483,7 @@ program_info (char *args, int from_tty)
target_files_info ();
printf_filtered (_("Program stopped at %s.\n"),
hex_string ((unsigned long) stop_pc));
- if (stop_step)
+ if (tp->stop_step)
printf_filtered (_("It stopped after being stepped.\n"));
else if (stat != 0)
{