diff options
author | Yao Qi <yao.qi@linaro.org> | 2016-11-11 16:50:42 +0000 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2016-11-11 16:50:42 +0000 |
commit | 7d15592e06e4abccc97cb8c5670f564327f747e9 (patch) | |
tree | 6ff0384f367d400a4d4400dab4fa28ea486bb38d /gdb | |
parent | 1f8db343049c3e06483a278e14b7e140ec55c8b3 (diff) | |
download | gdb-7d15592e06e4abccc97cb8c5670f564327f747e9.zip gdb-7d15592e06e4abccc97cb8c5670f564327f747e9.tar.gz gdb-7d15592e06e4abccc97cb8c5670f564327f747e9.tar.bz2 |
Don't handle unavailable/optimized-out in spu_software_single_step
When we do software single step, frame is always the innermost one,
so it is impossible to get unavailable/optimized-out errors.
gdb:
2016-11-11 Yao Qi <yao.qi@linaro.org>
* spu-tdep.c (spu_software_single_step): Don't call
get_frame_register_bytes, call get_frame_register_unsigned
instead.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/spu-tdep.c | 19 |
2 files changed, 7 insertions, 18 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7fc2b4a..99edafc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2016-11-11 Yao Qi <yao.qi@linaro.org> + * spu-tdep.c (spu_software_single_step): Don't call + get_frame_register_bytes, call get_frame_register_unsigned + instead. + +2016-11-11 Yao Qi <yao.qi@linaro.org> + * cp-valprint.c (cp_print_value): Remove local base_valaddr. * extension-priv.h (struct extension_language_ops) <apply_val_pretty_printer>: Remove the second parameter. diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c index 5494a93..073be2d 100644 --- a/gdb/spu-tdep.c +++ b/gdb/spu-tdep.c @@ -1652,24 +1652,7 @@ spu_software_single_step (struct frame_info *frame) if (reg == SPU_PC_REGNUM) target += SPUADDR_ADDR (pc); else if (reg != -1) - { - int optim, unavail; - - if (get_frame_register_bytes (frame, reg, 0, 4, buf, - &optim, &unavail)) - target += extract_unsigned_integer (buf, 4, byte_order) & -4; - else - { - if (optim) - throw_error (OPTIMIZED_OUT_ERROR, - _("Could not determine address of " - "single-step breakpoint.")); - if (unavail) - throw_error (NOT_AVAILABLE_ERROR, - _("Could not determine address of " - "single-step breakpoint.")); - } - } + target += get_frame_register_unsigned (frame, reg) & -4; target = target & lslr; if (target != next_pc) |