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] FT32: support for FT32B processor - part 2/2


James Bowman <james.bowman@ftdichip.com> writes:

Hi James,
gdb change is good to me, sim change still needs review.

> +static ULONGEST
> +ft32_fetch_instruction (CORE_ADDR a, int *isize,
> +		        enum bfd_endian byte_order)

Comments to this function is needed.

> +{
> +  unsigned int sc[2];
> +  ULONGEST inst;
> +
> +  CORE_ADDR a4 = a & ~3;
> +  inst = read_memory_unsigned_integer (a4, 4, byte_order);

Use read_code_unsigned_integer, and you'll get some speed up, especially
in remote debugging.

> +  *isize = ft32_decode_shortcode (a4, inst, sc) ? 2 : 4;
> +  if (*isize == 2)
> +    return sc[1 & (a >> 1)];
> +  else
> +    return inst;
> +}

-- 
Yao (齐尧)


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