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: Fwd: Re: [patch] Add support for ARMv7M devices.


> -----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



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