aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2010-03-18 13:21:40 +0000
committerPedro Alves <palves@redhat.com>2010-03-18 13:21:40 +0000
commit4247603be536b5ff74624da45e486c369e995f82 (patch)
tree00b749dbe1d4cac5443dc93f811512393d30f869 /gdb/infcmd.c
parent54801c2d1a35d0176b6ee079d34cc8ae9ab89060 (diff)
downloadgdb-4247603be536b5ff74624da45e486c369e995f82.zip
gdb-4247603be536b5ff74624da45e486c369e995f82.tar.gz
gdb-4247603be536b5ff74624da45e486c369e995f82.tar.bz2
gdb/
* infcmd.c (until_command): Use ERROR_NO_INFERIOR. Ensure there's a valid selected thread, and that it is not running. (advance_command): Ditto. (finish_command): Ditto. gdb/testsuite/ * gdb.base/default.exp: Adjust.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 8cc516d..e2235db 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -1274,10 +1274,10 @@ until_command (char *arg, int from_tty)
{
int async_exec = 0;
- if (!target_has_execution)
- error (_("The program is not running."));
-
+ ERROR_NO_INFERIOR;
ensure_not_tfind_mode ();
+ ensure_valid_thread ();
+ ensure_not_running ();
/* Find out whether we must run in the background. */
if (arg != NULL)
@@ -1307,10 +1307,10 @@ advance_command (char *arg, int from_tty)
{
int async_exec = 0;
- if (!target_has_execution)
- error (_("The program is not running."));
-
+ ERROR_NO_INFERIOR;
ensure_not_tfind_mode ();
+ ensure_valid_thread ();
+ ensure_not_running ();
if (arg == NULL)
error_no_arg (_("a location"));
@@ -1565,7 +1565,10 @@ finish_command (char *arg, int from_tty)
int async_exec = 0;
+ ERROR_NO_INFERIOR;
ensure_not_tfind_mode ();
+ ensure_valid_thread ();
+ ensure_not_running ();
/* Find out whether we must run in the background. */
if (arg != NULL)
@@ -1590,8 +1593,6 @@ finish_command (char *arg, int from_tty)
if (arg)
error (_("The \"finish\" command does not take any arguments."));
- if (!target_has_execution)
- error (_("The program is not running."));
frame = get_prev_frame (get_selected_frame (_("No selected frame.")));
if (frame == 0)