summaryrefslogtreecommitdiff
path: root/gdb/m68k-tdep.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-04-29 19:44:22 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-04-29 19:44:22 +0000
commit42cb1d0452f09d694067619445d324e12ca96572 (patch)
tree3ce99618e657fefc97654cb8004b29350a701a59 /gdb/m68k-tdep.c
parent7d972887ae2c1a476eaebfb41d4779280515b6a0 (diff)
downloadgdb-42cb1d0452f09d694067619445d324e12ca96572.tar.gz
* m68klinux-nat.c: Remove #ifndef USE_PROC_FS check.
* m68k-tdep.c: Remove code within #ifdef USE_PROC_FS. * mips-linux-nat.c: Include "gregset.h". (supply_gregset, fill_gregset, supply_fpregset, fill_fpregset): Move from mips-linux-tdep.c. Change parameter type to gdb_gregset_t. * mips-linux-tdep.c (supply_gregset, fill_gregset, supply_fpregset, fill_fpregset): Move to mips-linux-nat.c. * Makefile.in (m68k-tdep.o, mips-linux-nat.o): Update dependencies.
Diffstat (limited to 'gdb/m68k-tdep.c')
-rw-r--r--gdb/m68k-tdep.c133
1 files changed, 0 insertions, 133 deletions
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 3e9ad8df1cb..d928d74a98d 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -953,139 +953,6 @@ m68k_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
return frame_id_build (fp + 8, frame_pc_unwind (next_frame));
}
-#ifdef USE_PROC_FS /* Target dependent support for /proc */
-
-#include <sys/procfs.h>
-
-/* Prototypes for supply_gregset etc. */
-#include "gregset.h"
-
-/* The /proc interface divides the target machine's register set up into
- two different sets, the general register set (gregset) and the floating
- point register set (fpregset). For each set, there is an ioctl to get
- the current register set and another ioctl to set the current values.
-
- The actual structure passed through the ioctl interface is, of course,
- naturally machine dependent, and is different for each set of registers.
- For the m68k for example, the general register set is typically defined
- by:
-
- typedef int gregset_t[18];
-
- #define R_D0 0
- ...
- #define R_PS 17
-
- and the floating point set by:
-
- typedef struct fpregset {
- int f_pcr;
- int f_psr;
- int f_fpiaddr;
- int f_fpregs[8][3]; (8 regs, 96 bits each)
- } fpregset_t;
-
- These routines provide the packing and unpacking of gregset_t and
- fpregset_t formatted data.
-
- */
-
-/* Atari SVR4 has R_SR but not R_PS */
-
-#if !defined (R_PS) && defined (R_SR)
-#define R_PS R_SR
-#endif
-
-/* Given a pointer to a general register set in /proc format (gregset_t *),
- unpack the register contents and supply them as gdb's idea of the current
- register values. */
-
-void
-supply_gregset (gregset_t *gregsetp)
-{
- int regi;
- greg_t *regp = (greg_t *) gregsetp;
-
- for (regi = 0; regi < R_PC; regi++)
- {
- regcache_raw_supply (current_regcache, regi, (char *) (regp + regi));
- }
- regcache_raw_supply (current_regcache, PS_REGNUM, (char *) (regp + R_PS));
- regcache_raw_supply (current_regcache, PC_REGNUM, (char *) (regp + R_PC));
-}
-
-void
-fill_gregset (gregset_t *gregsetp, int regno)
-{
- int regi;
- greg_t *regp = (greg_t *) gregsetp;
-
- for (regi = 0; regi < R_PC; regi++)
- {
- if (regno == -1 || regno == regi)
- regcache_raw_collect (current_regcache, regi, regp + regi);
- }
- if (regno == -1 || regno == PS_REGNUM)
- regcache_raw_collect (current_regcache, PS_REGNUM, regp + R_PS);
- if (regno == -1 || regno == PC_REGNUM)
- regcache_raw_collect (current_regcache, PC_REGNUM, regp + R_PC);
-}
-
-#if defined (FP0_REGNUM)
-
-/* Given a pointer to a floating point register set in /proc format
- (fpregset_t *), unpack the register contents and supply them as gdb's
- idea of the current floating point register values. */
-
-void
-supply_fpregset (fpregset_t *fpregsetp)
-{
- int regi;
- char *from;
-
- for (regi = FP0_REGNUM; regi < M68K_FPC_REGNUM; regi++)
- {
- from = (char *) &(fpregsetp->f_fpregs[regi - FP0_REGNUM][0]);
- regcache_raw_supply (current_regcache, regi, from);
- }
- regcache_raw_supply (current_regcache, M68K_FPC_REGNUM,
- (char *) &(fpregsetp->f_pcr));
- regcache_raw_supply (current_regcache, M68K_FPS_REGNUM,
- (char *) &(fpregsetp->f_psr));
- regcache_raw_supply (current_regcache, M68K_FPI_REGNUM,
- (char *) &(fpregsetp->f_fpiaddr));
-}
-
-/* Given a pointer to a floating point register set in /proc format
- (fpregset_t *), update the register specified by REGNO from gdb's idea
- of the current floating point register set. If REGNO is -1, update
- them all. */
-
-void
-fill_fpregset (fpregset_t *fpregsetp, int regno)
-{
- int regi;
-
- for (regi = FP0_REGNUM; regi < M68K_FPC_REGNUM; regi++)
- {
- if (regno == -1 || regno == regi)
- regcache_raw_collect (current_regcache, regi,
- &fpregsetp->f_fpregs[regi - FP0_REGNUM][0]);
- }
- if (regno == -1 || regno == M68K_FPC_REGNUM)
- regcache_raw_collect (current_regcache, M68K_FPC_REGNUM,
- &fpregsetp->f_pcr);
- if (regno == -1 || regno == M68K_FPS_REGNUM)
- regcache_raw_collect (current_regcache, M68K_FPS_REGNUM,
- &fpregsetp->f_psr);
- if (regno == -1 || regno == M68K_FPI_REGNUM)
- regcache_raw_collect (current_regcache, M68K_FPI_REGNUM,
- &fpregsetp->f_fpiaddr);
-}
-
-#endif /* defined (FP0_REGNUM) */
-
-#endif /* USE_PROC_FS */
/* Figure out where the longjmp will land. Slurp the args out of the stack.
We expect the first arg to be a pointer to the jmp_buf structure from which