Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Patch for GDB rs6000-tdep.c
@ 2006-05-17 18:13 Greg Page
  2006-05-17 19:03 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Page @ 2006-05-17 18:13 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

The attached is a patch for the file gdb-6.4/gdb/rs6000-tdep.c.

The problem: The register definitions for the e500 assume only 4 bytes 
per floating-point register but the gdbserver assumes 8 bytes per 
floating-point register.

Changelog
rs6000-tdep.c (registers_e500[]): Use COMMON_UISA_REGS to define general 
purpose, floating-point, pc, and ps registers.


[-- Attachment #2: e500.patch --]
[-- Type: text/x-patch, Size: 802 bytes --]

*** rs6000-tdep.c	2005-11-01 12:32:36.000000000 -0700
--- rs6000-tdep.c.new	2006-05-17 11:28:45.526751000 -0600
*************** static const struct reg registers_7400[]
*** 2629,2637 ****
  /* Motorola e500.  */
  static const struct reg registers_e500[] =
  {
!   /*   0 ..  31 */ PPC_SPE_GP_REGS,
!   /*  32 ..  63 */ PPC_SPE_UPPER_GP_REGS,
!   /*  64 ..  65 */ R(pc), R(ps),
    /*  66 ..  70 */ PPC_UISA_NOFP_SPRS,
    /*  71 ..  72 */ R8(acc), S4(spefscr),
    /* NOTE: Add new registers here the end of the raw register
--- 2629,2635 ----
  /* Motorola e500.  */
  static const struct reg registers_e500[] =
  {
!   /* 0 .. 65 */ COMMON_UISA_REGS,
    /*  66 ..  70 */ PPC_UISA_NOFP_SPRS,
    /*  71 ..  72 */ R8(acc), S4(spefscr),
    /* NOTE: Add new registers here the end of the raw register

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Patch for GDB rs6000-tdep.c
  2006-05-17 18:13 Patch for GDB rs6000-tdep.c Greg Page
@ 2006-05-17 19:03 ` Daniel Jacobowitz
       [not found]   ` <446B72FE.1070505@ind.alcatel.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2006-05-17 19:03 UTC (permalink / raw)
  To: Greg Page; +Cc: gdb-patches

On Wed, May 17, 2006 at 12:00:26PM -0600, Greg Page wrote:
> The attached is a patch for the file gdb-6.4/gdb/rs6000-tdep.c.
> 
> The problem: The register definitions for the e500 assume only 4 bytes 
> per floating-point register but the gdbserver assumes 8 bytes per 
> floating-point register.

Gdbserver in the FSF tree doesn't have any concept of the e500
registers.  This isn't the only thing that isn't going to work.

The right solution is to make GDB detect when it is talking to a
gdbserver that supports e500, and have the two negotiate how big
registers actually are.  We're working on this, but it's complex.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Patch for GDB rs6000-tdep.c
       [not found]   ` <446B72FE.1070505@ind.alcatel.com>
@ 2006-05-17 19:07     ` Daniel Jacobowitz
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2006-05-17 19:07 UTC (permalink / raw)
  To: Greg Page; +Cc: gdb-patches

On Wed, May 17, 2006 at 01:01:18PM -0600, Greg Page wrote:
> gdbserver seems to use a file generated from 
> gdb-6.4/gdb/./regformats/reg-ppc.dat to define its notion of the PPC's 
> registers.  I was referring to that file.  I was assuming this came from 
> the FSF tree since I got the tar ball from http://www.gnu.org/.
> 
> With the patch, it seems to work okay.  Are there other known issues?

You won't be able to access any of the SPE registers!  Presumably, if
you're debugging an e500 target, you'll want to do that.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-05-17 19:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-17 18:13 Patch for GDB rs6000-tdep.c Greg Page
2006-05-17 19:03 ` Daniel Jacobowitz
     [not found]   ` <446B72FE.1070505@ind.alcatel.com>
2006-05-17 19:07     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox