This is the mail archive of the gdb-patches@sources.redhat.com 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: [rfc] Query Red Boot's i386 CPU id


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.


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