Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Jonathan Larmour <jifl@eCosCentric.com>
Cc: Yao Qi <yao@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: Fwd: Re: [patch] Add support for ARMv7M devices.
Date: Fri, 09 Mar 2012 16:29:00 -0000	[thread overview]
Message-ID: <4F5A2FBE.2070201@redhat.com> (raw)
In-Reply-To: <4F5A2C12.6000300@eCosCentric.com>

On 03/09/2012 04:13 PM, Jonathan Larmour wrote:

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


I think that's always true, irrespective of a g packet guess being
installed.  See target_find_description: it's always "file > target xml > g-guesses",

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


so if we unconditionally register the guesses, then even "set tdesc foo;
file foo; unset tdesc filename; tar rem ..." works correctly.

-- 
Pedro Alves


  reply	other threads:[~2012-03-09 16:29 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
2012-03-09 16:29     ` Pedro Alves [this message]
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=4F5A2FBE.2070201@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jifl@eCosCentric.com \
    --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