summaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2008-04-24 11:43:14 +0000
committerVladimir Prus <vladimir@codesourcery.com>2008-04-24 11:43:14 +0000
commit2e3348e108cbe846492bfc82ebade8ba3ac682c2 (patch)
tree23285bc943bb10df589bebe5544c0b095bdc9f53 /gdb/infcmd.c
parent352a134dbc95cd3ee0b0a1f0dc38321718354eb7 (diff)
downloadgdb-2e3348e108cbe846492bfc82ebade8ba3ac682c2.tar.gz
* infcmd.c (step_1_continuation): Always disable longjmp
breakpoint if we're not going to do another step.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 867dadf5cce..bdbb9bf0e06 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -804,24 +804,25 @@ which has no line number information.\n"), name);
static void
step_1_continuation (struct continuation_arg *arg, int error_p)
{
- if (error_p)
- disable_longjmp_breakpoint ();
- else
- {
- int count;
- int skip_subroutines;
- int single_inst;
+ int count;
+ int skip_subroutines;
+ int single_inst;
- skip_subroutines = arg->data.integer;
- single_inst = arg->next->data.integer;
- count = arg->next->next->data.integer;
-
- if (stop_step)
- step_once (skip_subroutines, single_inst, count - 1);
- else
- if (!single_inst || skip_subroutines)
- disable_longjmp_breakpoint ();
+ skip_subroutines = arg->data.integer;
+ single_inst = arg->next->data.integer;
+ count = arg->next->next->data.integer;
+
+ if (error_p || !step_multi || !stop_step)
+ {
+ /* We either hit an error, or stopped for some reason
+ that is not stepping, or there are no further steps
+ to make. Cleanup. */
+ if (!single_inst || skip_subroutines)
+ disable_longjmp_breakpoint ();
+ step_multi = 0;
}
+ else
+ step_once (skip_subroutines, single_inst, count - 1);
}
/* Do just one step operation. If count >1 we will have to set up a