This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: Fwd: Re: [patch] Add support for ARMv7M devices.
- From: "Terry Guo" <terry dot guo at arm dot com>
- To: "'Jonathan Larmour'" <jifl at ecoscentric dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Tue, 17 Apr 2012 09:57:02 +0800
- Subject: RE: Fwd: Re: [patch] Add support for ARMv7M devices.
- References: <4F59ED15.1030109@redhat.com> <001c01cd1ba6$44a2bf50$cde83df0$@guo@arm.com> <4F8C2C53.8070306@eCosCentric.com>
> -----Original Message-----
> From: Jonathan Larmour [mailto:jifl@ecoscentric.com]
> Sent: Monday, April 16, 2012 10:28 PM
> To: Terry Guo
> Cc: gdb-patches@sourceware.org; Joey Ye; Matthew Gretton-Dann
> Subject: Re: Fwd: Re: [patch] Add support for ARMv7M devices.
>
> On 16/04/12 08:55, Terry Guo wrote:
> >
> > Can somebody please tell me how the "guess" mechanism works? How can
> the
> > buf_len in function process_g_packet become correct with "guess"?
>
> Have a look at remote_read_description(), which is called early on when
> connecting to the target. Once the target description (tdesc) is set
> from
> there, subsequent calls to process_g_packet() will have an appropriate
> value for sizeof_g_packet.
>
That's exact how the "guess" works! I get it. Thanks.
> > Can we just make the arm-with-m.xml always include unnamed FPA
> registers? So
> > that it can cope with the case with or without FPA registers.
>
> I think that it might have been possible to arrange this if the FPA
> registers happened to be sent at the very end of the "normal" register
> set
> (courtesy of some handling in process_g_packet() of smaller 'g'
> packets).
> But i don't think that's possible here given the FPA regs come after
> the
> PC but before the XPSR at the end; at least not without adding much
> more
> machinery somewhere, including extending the target description syntax.
> I
> might be wrong though, as I don't know the ins-and-outs of this code as
> well as others here.
>
> Jifl
I get your point and think you are correct. If we always assume faked FPA
registers, we will mess things up when the stub only returns core register +
xpsr.
BR,
Terry