Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@ges.redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfc] Query Red Boot's i386 CPU id
Date: Fri, 30 Aug 2002 13:08:00 -0000	[thread overview]
Message-ID: <3D6FCE2C.6050607@ges.redhat.com> (raw)
In-Reply-To: <20020829234544.GB29966@nevyn.them.org>

> On Wed, Aug 28, 2002 at 05:31:46PM -0400, Andrew Cagney wrote:
> 
>> Comments on how this was implemented, and what, if anything, could be 
>> integrated into GDB, welcome.
> 
> 
> 
>> +/* NOTE: cagney/2001-11-17:
>> +
>> +   This module uses the [remote protocol] target_query ("qCPUID")
>> +   method to extract the i386 CPU information.  It then takes that
>> +   information and uses it to do a lookup on a local file
>> +   ``cpuid-i386''.
>> +
>> +   Thanks to a botched initial thread query mechanism, using anything
>> +   starting with ``qC'' is dangerous.  Since qCPUID does this, it
>> +   won't interact well with targets that recognize the exiting ``qC''
>> +   query.  Sigh.
>> +
>> +   One possible alternative to this qCPUID mechanis would be to plant
>> +   a CPUID instruction in the target memory, execute it, and then
>> +   examine the result.  This probably isn't pratical since it depends
>> +   in being able to execute code in the target.
>> +
>> +   This file adds the command ``info cpu''.  Beware of the existing
>> +   commands ``{set,show} {processor,architecture}''.
>> +
>> +   This file uses a target_post_open_hook() mechanism to hook into the
>> +   target open (and report the CPUID on an initial connect).  Per the
>> +   comment in the file "target.h", what really should be happening is
>> +   a core_gdb_open() function should be calling the hook.  */
> 
> 
> That comment is pretty thorough about my concerns :)  Gdbserver doesn't
> support qC yet (just realized a moment ago that it probably should). 
> But qCPUID really doesn't work with that.  I bet there's deployed
> RedBoot stubs that have this problem?

The comment comes from looking at old stub code:
	if (b[0] == 'q' && b[1] == 'C')
	  handle_crc ();
It really depends on how [badly] the stub is written.

RedBoot stubs (from memory) check qCPUID first --- actually they must as 
the patch works with RedBoot.

Andrew



      reply	other threads:[~2002-08-30 19:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-28 15:20 Andrew Cagney
2002-08-29  0:08 ` Eli Zaretskii
2002-08-29 16:01   ` Mark Kettenis
2002-08-29 16:44     ` Daniel Jacobowitz
2002-08-30 12:10     ` Eli Zaretskii
2002-08-30  6:52   ` Michal Ludvig
2002-08-29 17:30 ` Daniel Jacobowitz
2002-08-30 13:08   ` Andrew Cagney [this message]

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=3D6FCE2C.6050607@ges.redhat.com \
    --to=ac131313@ges.redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.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