aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 5eb092b8..d84c591 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -1359,7 +1359,9 @@ until_next_command (int from_tty)
error (_("Execution is not within a known function."));
tp->control.step_range_start = BMSYMBOL_VALUE_ADDRESS (msymbol);
- tp->control.step_range_end = pc;
+ /* The upper-bound of step_range is exclusive. In order to make PC
+ within the range, set the step_range_end with PC + 1. */
+ tp->control.step_range_end = pc + 1;
}
else
{