This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Make arm_record_test work on big-endian machines


Simon Marchi <simon.marchi@ericsson.com> writes:

> What do you think about the patch below?  Functionally, it should be identical
> to what you suggested, but I think it's clear to fix extract_arm_insn instead.
>

Patch looks good to me.  Thanks.

> +
> +  insn_record->arm_insn
> +    = (uint32_t) extract_unsigned_integer (&buf[0], 2, endian);
> +
> +  if (insn_size == 4)
> +    {
> +      insn_record->arm_insn <<= 16;
> +      insn_record->arm_insn
> +	|= (uint32_t) extract_unsigned_integer (&buf[2], 2, endian);

Better to add some comments here.

-- 
Yao (齐尧)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]