GNU Binutils with patches for OS216
修訂 | 941319d15194580a047484a53f232d374dc2d712 (tree) |
---|---|
時間 | 2016-03-18 23:39:09 |
作者 | Yao Qi <yao.qi@lina...> |
Commiter | Yao Qi |
[spu] throw error when target_read_memory fails
I happen to see that 1 is returned in spu_software_single_step when
target_read_memory returns 1. It must be wrong. That patch changes
it to throwing an error. Note that I choose to throw error because I
find the code in the end of spu_software_single_step throws errors.
gdb:
2016-03-18 Yao Qi <yao.qi@linaro.org>
* spu-tdep.c (spu_software_single_step): Throw error when
target_read_memory fails.
@@ -1,3 +1,8 @@ | ||
1 | +2016-03-18 Yao Qi <yao.qi@linaro.org> | |
2 | + | |
3 | + * spu-tdep.c (spu_software_single_step): Throw error when | |
4 | + target_read_memory fails. | |
5 | + | |
1 | 6 | 2016-03-17 Jan Kratochvil <jan.kratochvil@redhat.com> |
2 | 7 | |
3 | 8 | * linux-thread-db.c (check_pid_namespace_match): Extend the message. |
@@ -1632,7 +1632,9 @@ spu_software_single_step (struct frame_info *frame) | ||
1632 | 1632 | pc = get_frame_pc (frame); |
1633 | 1633 | |
1634 | 1634 | if (target_read_memory (pc, buf, 4)) |
1635 | - return 1; | |
1635 | + throw_error (MEMORY_ERROR, _("Could not read instruction at %s."), | |
1636 | + paddress (gdbarch, pc)); | |
1637 | + | |
1636 | 1638 | insn = extract_unsigned_integer (buf, 4, byte_order); |
1637 | 1639 | |
1638 | 1640 | /* Get local store limit. */ |