diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-04-29 19:44:22 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-04-29 19:44:22 +0000 |
commit | 3e00823eb4110b19fff21fe8cfc01f5c20c3b112 (patch) | |
tree | 5201c5ad3b82a2408d51950abf10ead08d84ac7e /gdb/m68k-tdep.c | |
parent | b1d53152e0cda88893253882fd974c2c4b142fe9 (diff) | |
download | gdb-3e00823eb4110b19fff21fe8cfc01f5c20c3b112.zip gdb-3e00823eb4110b19fff21fe8cfc01f5c20c3b112.tar.gz gdb-3e00823eb4110b19fff21fe8cfc01f5c20c3b112.tar.bz2 |
* 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.c | 133 |
1 files changed, 0 insertions, 133 deletions
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index 3e9ad8d..d928d74 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 |