This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] FT32: support for FT32B processor - part 2/2
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: James Bowman <james dot bowman at ftdichip dot com>
- Cc: "gdb-patches\@sourceware.org" <gdb-patches at sourceware dot org>
- Date: Mon, 30 Oct 2017 11:48:26 +0000
- Subject: Re: [PATCH] FT32: support for FT32B processor - part 2/2
- Authentication-results: sourceware.org; auth=none
- References: <2BB0A51F073B384698CACFD1D5A30FCC0DED3E34@glaexch1>
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 (齐尧)