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]

[commit] Remove dead gdbserver code, 1/2


This removes two bits from GDB that were no longer needed: all code
protected by #ifdef GDBSERVER (except for the bit in signals/signals.c,
which is still used), and all settings of GDBSERVER_DEPFILES.

Committed as obvious.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2003-06-20  Daniel Jacobowitz  <drow@mvista.com>

	* config/arm/linux.mt: Remove code protected by GDBSERVER define.
	* config/arm/nm-linux.h: Likewise.
	* config/arm/tm-linux.h: Likewise.
	* config/ia64/nm-linux.h: Likewise.
	* config/ia64/tm-ia64.h: Likewise.
	* config/s390/tm-linux.h: Likewise.
	* config/s390/tm-s390.h: Likewise.
	* s390-nat.c: Likewise.
	* s390-tdep.c: Likewise.

	* config/i386/linux.mt: Don't set GDBSERVER_DEPFILES.
	* config/ia64/linux.mt: Likewise.
	* config/m68k/linux.mh: Likewise.
	* config/mips/linux.mt: Likewise.
	* config/powerpc/linux.mh: Likewise.
	* config/sh/linux.mt: Likewise.

Index: s390-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/s390-nat.c,v
retrieving revision 1.8
diff -u -p -r1.8 s390-nat.c
--- s390-nat.c	3 Jun 2003 05:36:52 -0000	1.8
+++ s390-nat.c	20 Jun 2003 13:53:56 -0000
@@ -60,20 +60,14 @@ s390_register_u_addr (int blockend, int 
     retval = PT_CR_9 + ((regnum - (S390_FIRST_CR + 9)) * S390_CR_SIZE);
   else
     {
-#ifdef GDBSERVER
-      error ("s390_register_u_addr invalid regnum %s %d regnum=%d",
-             __FILE__, (int) __LINE__, regnum);
-#else
       internal_error (__FILE__, __LINE__,
                       "s390_register_u_addr invalid regnum regnum=%d",
                       regnum);
-#endif
       retval = 0;
     }
   return retval + blockend;
 }
 
-#ifndef GDBSERVER
 /* watch_areas are required if you put 2 or more watchpoints on the same 
    address or overlapping areas gdb will call us to delete the watchpoint 
    more than once when we try to delete them.
@@ -362,4 +356,3 @@ fill_fpregset (fpregset_t * fpregsetp, i
 #error "libc files are inconsistent with linux/include/asm-s390/"
 #error "3) you didn't do a completely clean build & delete config.cache."
 #endif
-#endif /* GDBSERVER */
Index: s390-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/s390-tdep.c,v
retrieving revision 1.104
diff -u -p -r1.104 s390-tdep.c
--- s390-tdep.c	16 Jun 2003 16:47:42 -0000	1.104
+++ s390-tdep.c	20 Jun 2003 13:53:56 -0000
@@ -84,7 +84,6 @@ s390_register_byte (int reg_nr)
     return S390_FP0_OFFSET + (((reg_nr) - S390_FP0_REGNUM) * S390_FPR_SIZE);
 }
 
-#ifndef GDBSERVER
 #define S390_MAX_INSTR_SIZE (6)
 #define S390_SYSCALL_OPCODE (0x0a)
 #define S390_SYSCALL_SIZE   (2)
@@ -1915,5 +1914,3 @@ _initialize_s390_tdep (void)
   if (!deprecated_tm_print_insn)	/* Someone may have already set it */
     deprecated_tm_print_insn = gdb_print_insn_s390;
 }
-
-#endif /* GDBSERVER */
Index: config/arm/linux.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/arm/linux.mt,v
retrieving revision 1.5
diff -u -p -r1.5 linux.mt
--- config/arm/linux.mt	14 Feb 2002 05:48:32 -0000	1.5
+++ config/arm/linux.mt	20 Jun 2003 13:53:56 -0000
@@ -1,5 +1,3 @@
 # Target: ARM based machine running GNU/Linux
 TM_FILE= tm-linux.h
 TDEPFILES= arm-tdep.o arm-linux-tdep.o solib.o solib-svr4.o solib-legacy.o
-
-GDBSERVER_DEPFILES = linux-low.o linux-arm-low.o reg-arm.o
Index: config/arm/nm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/arm/nm-linux.h,v
retrieving revision 1.8
diff -u -p -r1.8 nm-linux.h
--- config/arm/nm-linux.h	5 Jun 2002 19:18:16 -0000	1.8
+++ config/arm/nm-linux.h	20 Jun 2003 13:53:56 -0000
@@ -27,11 +27,6 @@
 
 #define U_REGS_OFFSET 0
 
-#ifdef GDBSERVER
-#define REGISTER_U_ADDR(addr,blockend,regno) \
-	 (addr) = arm_register_u_addr ((blockend),(regno))
-#endif /* GDBSERVER */
-
 /* Return sizeof user struct to callers in less machine dependent routines */
 extern int kernel_u_size (void);
 #define KERNEL_U_SIZE	arm_linux_kernel_u_size()
Index: config/arm/tm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/arm/tm-linux.h,v
retrieving revision 1.18
diff -u -p -r1.18 tm-linux.h
--- config/arm/tm-linux.h	13 Jun 2003 14:13:13 -0000	1.18
+++ config/arm/tm-linux.h	20 Jun 2003 13:53:56 -0000
@@ -21,10 +21,6 @@
 #ifndef TM_ARMLINUX_H
 #define TM_ARMLINUX_H
 
-#ifdef GDBSERVER
-#define	ARM_GNULINUX_TARGET
-#endif
-
 /* Include the common ARM target definitions.  */
 #include "arm/tm-arm.h"
 
Index: config/i386/linux.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/linux.mt,v
retrieving revision 1.5
diff -u -p -r1.5 linux.mt
--- config/i386/linux.mt	14 Feb 2002 05:48:33 -0000	1.5
+++ config/i386/linux.mt	20 Jun 2003 13:53:56 -0000
@@ -2,5 +2,3 @@
 TDEPFILES= i386-tdep.o i386-linux-tdep.o i387-tdep.o \
 	solib.o solib-svr4.o solib-legacy.o
 TM_FILE= tm-linux.h
-
-GDBSERVER_DEPFILES = linux-low.o linux-i386-low.o reg-i386.o
Index: config/ia64/linux.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/ia64/linux.mt,v
retrieving revision 1.7
diff -u -p -r1.7 linux.mt
--- config/ia64/linux.mt	14 Feb 2002 05:48:34 -0000	1.7
+++ config/ia64/linux.mt	20 Jun 2003 13:53:56 -0000
@@ -2,5 +2,3 @@
 TDEPFILES= ia64-tdep.o ia64-aix-tdep.o ia64-linux-tdep.o \
 	solib.o solib-svr4.o solib-legacy.o
 TM_FILE= tm-linux.h
-
-GDBSERVER_DEPFILES = linux-low.o linux-ia64-low.o reg-ia64.o
Index: config/ia64/nm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/ia64/nm-linux.h,v
retrieving revision 1.9
diff -u -p -r1.9 nm-linux.h
--- config/ia64/nm-linux.h	5 Jun 2002 19:18:22 -0000	1.9
+++ config/ia64/nm-linux.h	20 Jun 2003 13:53:56 -0000
@@ -34,13 +34,6 @@ extern int ia64_cannot_fetch_register (i
 #define CANNOT_STORE_REGISTER(regno) ia64_cannot_store_register(regno)
 extern int ia64_cannot_store_register (int regno);
 
-#ifdef GDBSERVER
-#define REGISTER_U_ADDR(addr, blockend, regno) \
-	(addr) = ia64_register_u_addr ((blockend),(regno));
-
-extern int ia64_register_u_addr(int, int);
-#endif /* GDBSERVER */
-
 #define U_REGS_OFFSET 0
 
 #define PTRACE_ARG3_TYPE long
Index: config/ia64/tm-ia64.h
===================================================================
RCS file: /cvs/src/src/gdb/config/ia64/tm-ia64.h,v
retrieving revision 1.8
diff -u -p -r1.8 tm-ia64.h
--- config/ia64/tm-ia64.h	17 May 2003 05:59:59 -0000	1.8
+++ config/ia64/tm-ia64.h	20 Jun 2003 13:53:56 -0000
@@ -21,58 +21,7 @@
 #ifndef TM_IA64_H
 #define TM_IA64_H
 
-#if !defined(GDBSERVER)
-
 #define GDB_MULTI_ARCH 1
-
-#else /* defines needed for GDBSERVER */
-
-/* Say how long (ordinary) registers are.  This is a piece of bogosity
-   used in push_word and a few other places; REGISTER_RAW_SIZE is the
-   real way to know how big a register is.  */
-
-#define DEPRECATED_REGISTER_SIZE 8
-
-#undef  NUM_REGS
-#define NUM_REGS 590
-
-/* Some pseudo register numbers */
-
-#define PC_REGNUM	IA64_IP_REGNUM
-#define SP_REGNUM	IA64_GR12_REGNUM
-#define DEPRECATED_FP_REGNUM	IA64_VFP_REGNUM
-
-/* Total amount of space needed to store our copies of the machine's
-   register state, the array `registers'.  On the ia64, all registers
-   fit in 64 bits except for the floating point registers which require
-   84 bits.  But 84 isn't a nice number, so we'll just allocate 128
-   bits for each of these.  The expression below says that we
-   need 8 bytes for each register, plus an additional 8 bytes for each
-   of the 128 floating point registers. */
-
-#define DEPRECATED_REGISTER_BYTES (NUM_REGS*8+128*8)
-
-/* Index within `registers' of the first byte of the space for
-   register N.  */
-
-#define REGISTER_BYTE(N) (((N) * 8) \
-  + ((N) <= IA64_FR0_REGNUM ? 0 : 8 * (((N) > IA64_FR127_REGNUM) ? 128 : (N) - IA64_FR0_REGNUM)))
-
-/* Number of bytes of storage in the actual machine representation
-   for register N.  */
-
-#define REGISTER_RAW_SIZE(N) \
-  ((IA64_FR0_REGNUM <= (N) && (N) <= IA64_FR127_REGNUM) ? 16 : 8)
-
-/* Largest value REGISTER_RAW_SIZE can have.  */
-
-#define DEPRECATED_MAX_REGISTER_RAW_SIZE 16
-
-
-#define GDBSERVER_RESUME_REGS { IA64_IP_REGNUM, IA64_PSR_REGNUM, SP_REGNUM, IA64_BSP_REGNUM, IA64_CFM_REGNUM }
-
-#endif /* GDBSERVER */
-
 
 /* Register numbers of various important registers */
 
Index: config/m68k/linux.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/m68k/linux.mh,v
retrieving revision 1.11
diff -u -p -r1.11 linux.mh
--- config/m68k/linux.mh	15 Jun 2003 20:56:48 -0000	1.11
+++ config/m68k/linux.mh	20 Jun 2003 13:53:56 -0000
@@ -10,5 +10,3 @@ NATDEPFILES= infptrace.o inftarg.o fork-
 # The dynamically loaded libthread_db needs access to symbols in the
 # gdb executable.
 LOADLIBES = -ldl -rdynamic
-
-GDBSERVER_DEPFILES = linux-low.o linux-m68k-low.o reg-m68k.o
Index: config/mips/linux.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/linux.mt,v
retrieving revision 1.2
diff -u -p -r1.2 linux.mt
--- config/mips/linux.mt	14 Feb 2002 05:48:36 -0000	1.2
+++ config/mips/linux.mt	20 Jun 2003 13:53:56 -0000
@@ -3,7 +3,5 @@ TDEPFILES= mips-tdep.o mips-linux-tdep.o
 	solib.o solib-svr4.o
 TM_FILE= tm-linux.h
 
-GDBSERVER_DEPFILES = linux-low.o linux-mips-low.o reg-mips.o
-
 SIM_OBS = remote-sim.o
 SIM = ../sim/mips/libsim.a
Index: config/powerpc/linux.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/linux.mh,v
retrieving revision 1.13
diff -u -p -r1.13 linux.mh
--- config/powerpc/linux.mh	15 Jun 2003 20:56:48 -0000	1.13
+++ config/powerpc/linux.mh	20 Jun 2003 13:53:56 -0000
@@ -9,5 +9,3 @@ NATDEPFILES= infptrace.o inftarg.o fork-
 	gcore.o linux-nat.o
 
 LOADLIBES = -ldl -rdynamic
-
-GDBSERVER_DEPFILES = linux-low.o linux-ppc-low.o reg-ppc.o
Index: config/s390/tm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/s390/tm-linux.h,v
retrieving revision 1.3
diff -u -p -r1.3 tm-linux.h
--- config/s390/tm-linux.h	24 Feb 2002 22:56:06 -0000	1.3
+++ config/s390/tm-linux.h	20 Jun 2003 13:53:56 -0000
@@ -24,9 +24,7 @@
 
 #ifndef TM_LINUX_H
 #define TM_LINUX_H
-#ifdef GDBSERVER
-#define S390_GNULINUX_TARGET
-#endif /* GDBSERVER */
+
 #undef  TARGET_ELF64
 #define TARGET_ELF64 (gdbarch_tdep (current_gdbarch)->intreg_size==8)
 
Index: config/s390/tm-s390.h
===================================================================
RCS file: /cvs/src/src/gdb/config/s390/tm-s390.h,v
retrieving revision 1.6
diff -u -p -r1.6 tm-s390.h
--- config/s390/tm-s390.h	17 May 2003 06:00:00 -0000	1.6
+++ config/s390/tm-s390.h	20 Jun 2003 13:53:56 -0000
@@ -73,43 +73,6 @@
 #define S390X_REGISTER_BYTES ((8+8)+(8*S390_NUM_GPRS)+(4*S390_NUM_ACRS)+ \
 (8*S390_NUM_CRS)+(S390_FPC_SIZE+S390_FPC_PAD_SIZE)+(S390_FPR_SIZE*S390_NUM_FPRS))
 
-#ifdef GDBSERVER
-
-int s390_register_byte (int reg_nr);
-#define REGISTER_BYTE(reg_nr) s390_register_byte(reg_nr)
-#define PC_REGNUM S390_PC_REGNUM
-#define NUM_REGS  S390_NUM_REGS
-#define NUM_FREGS S390_NUM_FPRS
-#define DEPRECATED_FP_REGNUM S390_FP_REGNUM
-#define SP_REGNUM S390_SP_REGNUM
-/* Obviously ptrace for user program tracing cannot be allowed
-  mess with control registers (except per registers for hardware watchpoints),
-  when we add kernel debugging we may need to alter these macros. */
-int s390_cannot_fetch_register (int regno);
-#define CANNOT_FETCH_REGISTER(regno) s390_cannot_fetch_register(regno)
-#define CANNOT_STORE_REGISTER(regno) s390_cannot_fetch_register(regno)
-
-#if CONFIG_ARCH_S390X
-
-int s390x_register_raw_size (int reg_nr);
-#define REGISTER_RAW_SIZE(reg_nr) s390x_register_raw_size(reg_nr)
-#define GDB_TARGET_IS_ESAME (1)
-#define DEPRECATED_REGISTER_SIZE       (8)
-#define DEPRECATED_REGISTER_BYTES S390X_REGISTER_BYTES
-
-#else /*  CONFIG_ARCH_S390X */
-
-int s390_register_raw_size (int reg_nr);
-#define REGISTER_RAW_SIZE(reg_nr) s390_register_raw_size(reg_nr)
-#define GDB_TARGET_IS_ESAME (0)
-#define DEPRECATED_REGISTER_SIZE       (4)
-#define DEPRECATED_REGISTER_BYTES S390_REGISTER_BYTES
-
-#endif /* CONFIG_ARCH_S390X */
-
-#else /* GDBSERVER */
-
 #define GDB_TARGET_IS_ESAME (TARGET_ARCHITECTURE->mach == bfd_mach_s390_64)
 
-#endif /* GDBSERVER */
 #endif /* ifndef TM_S390_H */
Index: config/sh/linux.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/sh/linux.mt,v
retrieving revision 1.3
diff -u -p -r1.3 linux.mt
--- config/sh/linux.mt	14 Feb 2002 05:48:39 -0000	1.3
+++ config/sh/linux.mt	20 Jun 2003 13:53:56 -0000
@@ -4,5 +4,3 @@ TM_FILE= tm-linux.h
 
 SIM_OBS = remote-sim.o
 SIM = ../sim/sh/libsim.a
-
-GDBSERVER_DEPFILES = linux-low.o linux-sh-low.o reg-sh.o


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