From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3388 invoked by alias); 29 Aug 2002 05:27:04 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 3381 invoked from network); 29 Aug 2002 05:27:03 -0000 Received: from unknown (HELO is.elta.co.il) (199.203.121.2) by sources.redhat.com with SMTP; 29 Aug 2002 05:27:03 -0000 Received: from is (is [199.203.121.2]) by is.elta.co.il (8.9.3/8.8.8) with SMTP id IAA26396; Thu, 29 Aug 2002 08:24:20 +0300 (IDT) Date: Thu, 29 Aug 2002 00:08:00 -0000 From: Eli Zaretskii X-Sender: eliz@is To: Andrew Cagney cc: gdb-patches@sources.redhat.com Subject: Re: [rfc] Query Red Boot's i386 CPU id In-Reply-To: <3D6D4142.2070007@ges.redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-08/txt/msg00970.txt.bz2 On Wed, 28 Aug 2002, Andrew Cagney wrote: > Red Boot (Red Hat's boot monitor) includes a remote protocol extension > that allows the i386 processor's CPU id to be queried. > > The attached, written by Fernando Nasser, makes two things possible: > > - auto display of the cpu on a connect vis: > > (gdb) target remote /dev/ttyS0 > Remote debugging using /dev/ttyS0 > Genuine Intel Pentium(R) III processor [Coppermine] > Processor Family: 6 Model: 8 Stepping: 0 > > - a command to query the cpuid (info cpu). > > The actual CPU information is determined using a small file database > (installed in ..../share/gdb/i386-cpuid). > > Comments on how this was implemented, and what, if anything, could be > integrated into GDB, welcome. A few comments: (1) Why is this feature implemented for remote targets only? Why is the database of CPU ids installed only for embedded builds? (2) The GDB_EXEC_PREFIX variable is new, right? If so, we should probably discuss whether we should introduce it or use ${prefix}/share/gdb instead (or maybe use GDB_EXEC_PREFIX to override the share/gdb place). I cannot quite figure out from the code how is this variable used, since the code calls getenv but doesn't do anything with the result IIRC. In any case, GDB_EXEC_PREFIX, if used, should be documented. (3) We should add code/data for identification of AMD CPUs, I think. They also support CPUID.