diff options
author | Yao Qi <yao@codesourcery.com> | 2014-07-28 13:44:57 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2014-07-29 11:59:32 +0800 |
commit | 7e09a22367934a6d53f79d8b01135832b80ab246 (patch) | |
tree | 69608ec2190cb614f36c724384710b5576b40242 /bfd/elf64-mips.c | |
parent | 7ebdbe9292e4b696740b021938369adb1484da27 (diff) | |
download | gdb-7e09a22367934a6d53f79d8b01135832b80ab246.zip gdb-7e09a22367934a6d53f79d8b01135832b80ab246.tar.gz gdb-7e09a22367934a6d53f79d8b01135832b80ab246.tar.bz2 |
Fix PR 17206
As reported in PR 17206, an internal error is triggered when command
until is executed. In infcmd.c:until_next_command, step_range_end is
set to 'pc',
if (!func)
{
struct bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (pc);
if (msymbol.minsym == NULL)
error (_("Execution is not within a known function."));
tp->control.step_range_start = BMSYMBOL_VALUE_ADDRESS (msymbol);
tp->control.step_range_end = pc;
}
and later in infrun.c:resume, the assert below is triggered in PR
17206.
if (tp->control.may_range_step)
{
/* If we're resuming a thread with the PC out of the step
range, then we're doing some nested/finer run control
operation, like stepping the thread out of the dynamic
linker or the displaced stepping scratch pad. We
shouldn't have allowed a range step then. */
gdb_assert (pc_in_thread_step_range (pc, tp));
}
In until_next_command, we set step range to [XXX, pc), so pc isn't
within the range. pc_in_thread_step_range returns false and the
assert is triggered. AFAICS, the range we want in until_next_command
is [XXX, pc] instead of [XXX, pc), because we want to program step
until greater than pc. This patch is to set step_range_end to
'pc + 1'. Running until-nodebug.exp with unpatched GDB will get the
following fail,
FAIL: gdb.base/until-nodebug.exp: until 2 (GDB internal error)
and the fail goes away when the fix is applied.
gdb:
2014-07-29 Yao Qi <yao@codesourcery.com>
PR gdb/17206
* infcmd.c (until_next_command): Set step_range_end to PC + 1.
gdb/testsuite:
2014-07-29 Yao Qi <yao@codesourcery.com>
PR gdb/17206
* gdb.base/until-nodebug.exp: New.
Diffstat (limited to 'bfd/elf64-mips.c')
0 files changed, 0 insertions, 0 deletions