diff -c -r -N gdb-6.0.orig/gdb/Makefile.in gdb-6.0/gdb/Makefile.in
*** gdb-6.0.orig/gdb/Makefile.in	2003-08-18 11:10:52.000000000 -0700
--- gdb-6.0/gdb/Makefile.in	2004-02-27 18:37:37.000000000 -0800
***************
*** 1269,1274 ****
--- 1269,1275 ----
  	lynx-nat.c m3-nat.c \
  	m68hc11-tdep.c \
  	m68k-tdep.c \
+ 	m68k-rtemscore.c \
  	mcore-tdep.c \
  	mips-linux-nat.c mips-linux-tdep.c \
  	mips-nat.c \
***************
*** 1279,1284 ****
--- 1280,1286 ----
  	ns32k-tdep.c solib-osf.c \
  	somread.c somsolib.c $(HPREAD_SOURCE) \
  	ppc-sysv-tdep.o ppc-linux-nat.c ppc-linux-tdep.c \
+ 	ppc32-rtemscore.c \
  	ppcnbsd-nat.o ppcnbsd-tdep.o \
  	procfs.c \
  	remote-e7000.c \
***************
*** 1962,1967 ****
--- 1964,1970 ----
  m68knbsd-nat.o: m68knbsd-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
  	$(regcache_h)
  m68knbsd-tdep.o: m68knbsd-tdep.c $(defs_h) $(gdbtypes_h) $(regcache_h)
+ m68k-rtemscore.o: m68k-rtemscore.c $(defs_h) $(regcache_h) $(m68k_tdep_h) $(gregset_h)
  m68k-stub.o: m68k-stub.c
  m68k-tdep.o: m68k-tdep.c $(defs_h) $(frame_h) $(frame_base_h) \
  	$(frame_unwind_h) $(symtab_h) $(gdbcore_h) $(value_h) \
***************
*** 2085,2090 ****
--- 2088,2094 ----
  	$(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \
  	$(objfiles_h) $(regcache_h) $(value_h) $(osabi_h) $(solib_svr4_h) \
  	$(ppc_tdep_h)
+ ppc32-rtemscore.o: ppc32-rtemscore.c $(defs_h) $(regcache_h) $(ppc_tdep_h) $(gregset_h)
  ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(ppc_tdep_h) \
  	$(ppcnbsd_tdep_h)
  ppcnbsd-tdep.o: ppcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
diff -c -r -N gdb-6.0.orig/gdb/config/powerpc/ppc-eabi.mt gdb-6.0/gdb/config/powerpc/ppc-eabi.mt
*** gdb-6.0.orig/gdb/config/powerpc/ppc-eabi.mt	2002-05-29 18:21:53.000000000 -0700
--- gdb-6.0/gdb/config/powerpc/ppc-eabi.mt	2004-03-01 15:58:28.000000000 -0800
***************
*** 1,3 ****
  # Target: PowerPC running eabi
! TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-sysv-tdep.o solib.o solib-svr4.o
  TM_FILE= tm-ppc-eabi.h
--- 1,3 ----
  # Target: PowerPC running eabi
! TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-sysv-tdep.o solib.o solib-svr4.o corelow.o core-regset.o ppc32-rtemscore.o
  TM_FILE= tm-ppc-eabi.h
diff -c -r -N gdb-6.0.orig/gdb/config/powerpc/tm-ppc-eabi.h gdb-6.0/gdb/config/powerpc/tm-ppc-eabi.h
*** gdb-6.0.orig/gdb/config/powerpc/tm-ppc-eabi.h	2002-04-12 12:48:37.000000000 -0700
--- gdb-6.0/gdb/config/powerpc/tm-ppc-eabi.h	2004-03-01 16:04:02.000000000 -0800
***************
*** 40,43 ****
--- 40,57 ----
  /* Use generic shared library machinery.  */
  #include "solib.h"
  
+ #ifdef HAVE_STDINT_H
+ #include <stdint.h>
+ typedef uint32_t     rtemscore_uint32_t;
+ #else
+ typedef unsigned int rtemscore_uint32_t;
+ #endif
+ 
+ typedef rtemscore_uint32_t rtemscore_ppc32_gregset_t[32+8]; /* we add 3 extensions: msr, dar and the vector */
+ typedef unsigned rtemscore_ppc32_fpregset_t[0];
+  
+ #define GDB_GREGSET_T rtemscore_ppc32_gregset_t
+ #define GDB_FPREGSET_T rtemscore_ppc32_fpregset_t
+ 
+ 
  #endif /* TM_PPC_EABI_H */
diff -c -r -N gdb-6.0.orig/gdb/ppc32-rtemscore.c gdb-6.0/gdb/ppc32-rtemscore.c
*** gdb-6.0.orig/gdb/ppc32-rtemscore.c	1969-12-31 16:00:00.000000000 -0800
--- gdb-6.0/gdb/ppc32-rtemscore.c	2004-02-27 18:35:57.000000000 -0800
***************
*** 0 ****
--- 1,33 ----
+ /* Prototypes for supply_gregset etc. */
+  
+ #include "defs.h"
+ #include "gregset.h"
+ #include "ppc-tdep.h"
+ #include "regcache.h"
+ 
+ void
+ supply_gregset (gdb_gregset_t *gregsetp)
+ {
+ unsigned *regs = (unsigned *)gregsetp;
+ int		 regi;
+ struct   gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
+ 
+   for (regi = 0; regi < 32; regi++)
+     supply_register (regi, regs + regi);
+ 
+   supply_register (tdep->ppc_lr_regnum,  regs + 32 );
+   supply_register (tdep->ppc_cr_regnum,  regs + 33 );
+   supply_register (tdep->ppc_xer_regnum, regs + 34 );
+   supply_register (tdep->ppc_ctr_regnum, regs + 35 );
+   supply_register (PC_REGNUM,            regs + 36 );
+ 
+   /* Netbsd doesn't define this; the SVGM bsp puts it there
+    * and 'gencore' writes our extensions :-)
+    */
+   supply_register (tdep->ppc_ps_regnum,  regs + 37 );
+ }
+ 
+ void
+ supply_fpregset (gdb_fpregset_t *gregsetp)
+ {
+ }
diff -cNr gdb-6.0.orig/gdb/config/m68k/monitor.mt gdb-6.0/gdb/config/m68k/monitor.mt
*** gdb-6.0.orig/gdb/config/m68k/monitor.mt	1999-04-15 18:34:21.000000000 -0700
--- gdb-6.0/gdb/config/m68k/monitor.mt	2004-02-23 12:30:04.000000000 -0800
***************
*** 1,3 ****
  # Target: Motorola m68k embedded (EST emulator, rom68k and bug monitors)
! TDEPFILES= m68k-tdep.o monitor.o remote-est.o cpu32bug-rom.o rom68k-rom.o abug-rom.o dbug-rom.o dsrec.o
  TM_FILE= tm-monitor.h
--- 1,3 ----
  # Target: Motorola m68k embedded (EST emulator, rom68k and bug monitors)
! TDEPFILES= m68k-tdep.o monitor.o remote-est.o cpu32bug-rom.o rom68k-rom.o abug-rom.o dbug-rom.o dsrec.o corelow.o core-regset.o m68k-rtemscore.o
  TM_FILE= tm-monitor.h
diff -cNr gdb-6.0.orig/gdb/config/m68k/tm-monitor.h gdb-6.0/gdb/config/m68k/tm-monitor.h
*** gdb-6.0.orig/gdb/config/m68k/tm-monitor.h	2003-01-04 17:39:55.000000000 -0800
--- gdb-6.0/gdb/config/m68k/tm-monitor.h	2004-02-23 17:40:31.000000000 -0800
***************
*** 38,41 ****
--- 38,54 ----
  
  #include "m68k/tm-m68k.h"
  
+ #ifdef HAVE_STDINT_H
+ #include <stdint.h>
+ typedef uint32_t     rtemscore_uint32_t;
+ #else
+ typedef unsigned int rtemscore_uint32_t;
+ #endif
+ 
+ typedef rtemscore_uint32_t rtemscore_m68k_gregset_t[2*8+2];
+ typedef unsigned rtemscore_m68k_fpregset_t[0];
+ 
+ #define GDB_GREGSET_T rtemscore_m68k_gregset_t
+ #define GDB_FPREGSET_T rtemscore_m68k_fpregset_t
+ 
  /* FIXME, should do GET_LONGJMP_TARGET for newlib.  */
diff -cNr gdb-6.0.orig/gdb/m68k-rtemscore.c gdb-6.0/gdb/m68k-rtemscore.c
*** gdb-6.0.orig/gdb/m68k-rtemscore.c	1969-12-31 16:00:00.000000000 -0800
--- gdb-6.0/gdb/m68k-rtemscore.c	2004-02-23 18:19:52.000000000 -0800
***************
*** 0 ****
--- 1,30 ----
+ /* Prototypes for supply_gregset etc. */
+ 
+ #include "defs.h"
+ #include "gregset.h"
+ #include "m68k-tdep.h"
+ #include "regcache.h"
+ 
+ void
+ supply_gregset (gdb_gregset_t *gregsetp)
+ {
+ unsigned *regs = (unsigned *)gregsetp;
+ int i;
+ 
+ 	for ( i=0; i<8; i++, regs++ )
+   		supply_register (M68K_D0_REGNUM + i, (char*)regs);
+ 
+ 	for ( i=0; i<6; i++, regs++ )
+   		supply_register (M68K_A0_REGNUM + i, (char*)regs);
+ 
+ 	supply_register (M68K_FP_REGNUM, (char*)regs); regs++;
+ 	supply_register (M68K_SP_REGNUM, (char*)regs); regs++;
+ 
+ 	supply_register (M68K_PS_REGNUM, (char*)regs); regs++;
+ 	supply_register (M68K_PC_REGNUM, (char*)regs); regs++;
+ }
+ 
+ void
+ supply_fpregset (gdb_fpregset_t *gregsetp)
+ {
+ }
