* [PATCH] arm-tdep.c: Change type of insn parameters
@ 2016-02-10 23:15 Simon Marchi
2016-02-11 10:58 ` Yao Qi
0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2016-02-10 23:15 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
Almost obvious... change the type of some insn parameters, so that it
matches the rest of the code.
gdb/ChangeLog:
* arm-tdep.c (thumb_copy_unmodified_16bit): Change type of insn.
(thumb_copy_b): Likewise.
(arm_decode_b_bl_ldmstm): Likewise.
(thumb_copy_16bit_ldr_literal): Likewise.
(thumb_copy_pop_pc_16bit): Likewise.
---
gdb/arm-tdep.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 6ac05f0..f1ed9fe 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -4569,7 +4569,7 @@ thumb_copy_unmodified_32bit (struct gdbarch *gdbarch, uint16_t insn1,
/* Copy 16-bit Thumb(Thumb and 16-bit Thumb-2) instruction without any
modification. */
static int
-thumb_copy_unmodified_16bit (struct gdbarch *gdbarch, unsigned int insn,
+thumb_copy_unmodified_16bit (struct gdbarch *gdbarch, uint32_t insn,
const char *iname,
struct displaced_step_closure *dsc)
{
@@ -4967,7 +4967,7 @@ thumb2_copy_b_bl_blx (struct gdbarch *gdbarch, uint16_t insn1,
/* Copy B Thumb instructions. */
static int
-thumb_copy_b (struct gdbarch *gdbarch, unsigned short insn,
+thumb_copy_b (struct gdbarch *gdbarch, uint16_t insn,
struct displaced_step_closure *dsc)
{
unsigned int cond = 0;
@@ -6653,7 +6653,7 @@ arm_decode_media (struct gdbarch *gdbarch, uint32_t insn,
}
static int
-arm_decode_b_bl_ldmstm (struct gdbarch *gdbarch, int32_t insn,
+arm_decode_b_bl_ldmstm (struct gdbarch *gdbarch, uint32_t insn,
struct regcache *regs,
struct displaced_step_closure *dsc)
{
@@ -6928,7 +6928,7 @@ thumb_copy_pc_relative_32bit (struct gdbarch *gdbarch, uint16_t insn1,
}
static int
-thumb_copy_16bit_ldr_literal (struct gdbarch *gdbarch, unsigned short insn1,
+thumb_copy_16bit_ldr_literal (struct gdbarch *gdbarch, uint16_t insn1,
struct regcache *regs,
struct displaced_step_closure *dsc)
{
@@ -7078,7 +7078,7 @@ cleanup_pop_pc_16bit_all (struct gdbarch *gdbarch, struct regcache *regs,
}
static int
-thumb_copy_pop_pc_16bit (struct gdbarch *gdbarch, unsigned short insn1,
+thumb_copy_pop_pc_16bit (struct gdbarch *gdbarch, uint16_t insn1,
struct regcache *regs,
struct displaced_step_closure *dsc)
{
--
2.5.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm-tdep.c: Change type of insn parameters
2016-02-10 23:15 [PATCH] arm-tdep.c: Change type of insn parameters Simon Marchi
@ 2016-02-11 10:58 ` Yao Qi
2016-02-11 18:22 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Yao Qi @ 2016-02-11 10:58 UTC (permalink / raw)
To: Simon Marchi; +Cc: gdb-patches
Simon Marchi <simon.marchi@ericsson.com> writes:
> /* Copy 16-bit Thumb(Thumb and 16-bit Thumb-2) instruction without any
> modification. */
> static int
> -thumb_copy_unmodified_16bit (struct gdbarch *gdbarch, unsigned int insn,
> +thumb_copy_unmodified_16bit (struct gdbarch *gdbarch, uint32_t insn,
> const char *iname,
> struct displaced_step_closure *dsc)
The instruction here is 16-bit, so we should use "uint16_t".
OK with the change.
--
Yao (齐尧)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm-tdep.c: Change type of insn parameters
2016-02-11 10:58 ` Yao Qi
@ 2016-02-11 18:22 ` Simon Marchi
0 siblings, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2016-02-11 18:22 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
On 16-02-11 05:58 AM, Yao Qi wrote:
> Simon Marchi <simon.marchi@ericsson.com> writes:
>
>> /* Copy 16-bit Thumb(Thumb and 16-bit Thumb-2) instruction without any
>> modification. */
>> static int
>> -thumb_copy_unmodified_16bit (struct gdbarch *gdbarch, unsigned int insn,
>> +thumb_copy_unmodified_16bit (struct gdbarch *gdbarch, uint32_t insn,
>> const char *iname,
>> struct displaced_step_closure *dsc)
>
> The instruction here is 16-bit, so we should use "uint16_t".
>
> OK with the change.
>
Thanks, pushed with that changed.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-11 18:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-10 23:15 [PATCH] arm-tdep.c: Change type of insn parameters Simon Marchi
2016-02-11 10:58 ` Yao Qi
2016-02-11 18:22 ` Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox