From: Jonathan Larmour <jifl@eCosCentric.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Fwd: Re: [patch] Add support for ARMv7M devices.
Date: Fri, 09 Mar 2012 16:13:00 -0000 [thread overview]
Message-ID: <4F5A2C12.6000300@eCosCentric.com> (raw)
In-Reply-To: <4F5A240C.1010702@codesourcery.com>
On 09/03/12 15:38, Yao Qi wrote:
> On 03/09/2012 12:24 PM, Jonathan Larmour wrote:
>> - tdesc = tdesc_arm_with_m;
>> + is_m = 1;
>
> `tdesc' is used later in the function,
>
> /* Check any target description for validity. */
> if (tdesc_has_registers (tdesc))
>
> Is it correct to skip updating `tdesc'?
Yes we do not want that condition to match. We want the tdesc to still be
undetermined by the point of the 'if' test if this is Cortex-M. The code
prior to this change only set tdesc because it thought it knew exactly
what register set to use by that point.
But you have made me think of one improvement: we should probably not call
register_remote_g_packet_guess() if tdesc_has_registers (tdesc) - because
if someone has directly supplied a target description, we should solely
use that, and avoid any guessing. This would be true for both my and
Pedro's patch.
That's trivial to handle though, e.g. for Pedro's patch, just replace the
call with:
if (!tdesc_has_registers (tdesc))
arm_register_g_packet_guesses (gdbarch);
Jifl
--
eCosCentric Limited http://www.eCosCentric.com/ The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------ Opinions==mine
next prev parent reply other threads:[~2012-03-09 16:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-09 4:25 Jonathan Larmour
2012-03-09 11:44 ` Pedro Alves
2012-03-09 15:53 ` Jonathan Larmour
2012-03-09 16:06 ` Pedro Alves
2012-04-16 7:56 ` Terry Guo
2012-04-16 14:40 ` Jonathan Larmour
2012-04-17 4:06 ` Terry Guo
2012-03-09 15:39 ` Yao Qi
2012-03-09 16:13 ` Jonathan Larmour [this message]
2012-03-09 16:29 ` Pedro Alves
2012-03-11 3:37 ` Jonathan Larmour
2012-03-14 16:06 ` Pedro Alves
2012-03-15 6:27 ` Jonathan Larmour
2012-03-15 17:09 ` Pedro Alves
2012-03-15 18:33 ` Jonathan Larmour
2012-03-15 18:43 ` Pedro Alves
2012-03-15 18:56 ` Jonathan Larmour
2012-03-15 18:58 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F5A2C12.6000300@eCosCentric.com \
--to=jifl@ecoscentric.com \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox