[patch] Cleanup redundant statements in arm-tdep.c:copy_ldr_str_ldrb_strb

Yao Qi
2011-03-11T06:28:31Z

[-- Attachment #1: Type: text/plain, Size: 701 bytes --]

On 02/26/2011 09:53 PM, Yao Qi wrote:
>>> >> + RECORD_ARM_MODE_INSN (6, 0x00); /* breakpoint location. */
>>> >> + RECORD_ARM_MODE_INSN (7, 0x00); /* scratch space. */
>> >
>> > This reminds me: after your latest patch in that area, we do not
>> > actually use any scratch space in the instruction stream any more,
>> > so this could be removed ...
>> >
> Oh, Yes. I'll remove it by another patch.
>

As my recent patch "[patch] Fix PR tdep/12352: Handle str pc, [Rd, #imm]
in displaced stepping"[1] applied, scratch space is not used, and two
statements are redundant. This patch is to remove them.

[1] http://sourceware.org/ml/gdb-patches/2011-02/msg00315.html
--
Yao (é½å°§)

[-- Attachment #2: cleanup-arm-0311.patch --]
[-- Type: text/x-patch, Size: 492 bytes --]

gdb/
* arm-tdep.c (copy_ldr_str_ldrb_strb): Remove redundant statements.

diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 7796176..6e5f2ab 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -6003,9 +6003,6 @@ copy_ldr_str_ldrb_strb (struct gdbarch *gdbarch, uint32_t insn,
else
dsc->modinsn[5] = (insn & 0xfff00ff0) | 0x20003;

- dsc->modinsn[6] = 0x0; /* breakpoint location. */
- dsc->modinsn[7] = 0x0; /* scratch space. */
-
dsc->numinsns = 6;
}