summaryrefslogtreecommitdiff
path: root/gdb/config/i386
diff options
context:
space:
mode:
authorJason Molenda <jsm@bugshack.cygnus.com>1999-12-07 03:56:43 +0000
committerJason Molenda <jsm@bugshack.cygnus.com>1999-12-07 03:56:43 +0000
commitecd8390290ac2bf41f22122ea01924dcd108af34 (patch)
treefc8310b6f500d05013970d228f2993a81dd6b14b /gdb/config/i386
parentc13f725cbfef435a3cbc607745a9b917a756c101 (diff)
downloadgdb-ecd8390290ac2bf41f22122ea01924dcd108af34.tar.gz
import gdb-1999-12-06 snapshot
Diffstat (limited to 'gdb/config/i386')
-rw-r--r--gdb/config/i386/nm-linux.h14
-rw-r--r--gdb/config/i386/tm-cygwin.h102
-rw-r--r--gdb/config/i386/tm-i386v.h67
-rw-r--r--gdb/config/i386/tm-linux.h17
4 files changed, 6 insertions, 194 deletions
diff --git a/gdb/config/i386/nm-linux.h b/gdb/config/i386/nm-linux.h
index 1ce0a3082ff..93dfe46bbd7 100644
--- a/gdb/config/i386/nm-linux.h
+++ b/gdb/config/i386/nm-linux.h
@@ -23,15 +23,13 @@
#define NM_LINUX_H
#include "i386/nm-i386v.h"
+#include "nm-linux.h"
/* Return sizeof user struct to callers in less machine dependent routines */
#define KERNEL_U_SIZE kernel_u_size()
extern int kernel_u_size PARAMS ((void));
-/* Tell gdb that we can attach and detach other processes */
-#define ATTACH_DETACH
-
#define U_REGS_OFFSET 0
/* GNU/Linux supports the 386 hardware debugging registers. */
@@ -74,14 +72,4 @@ i386_insert_watchpoint PARAMS ((int pid, CORE_ADDR addr, int len, int rw));
extern int
i386_remove_watchpoint PARAMS ((int pid, CORE_ADDR addr, int len));
-/* Support for the glibc linuxthreads package. */
-
-extern char *
-linuxthreads_pid_to_str PARAMS ((int pid));
-#define target_pid_to_str(PID) linuxthreads_pid_to_str (PID)
-
-extern int
-linuxthreads_prepare_to_proceed PARAMS ((int step));
-#define PREPARE_TO_PROCEED(select_it) linuxthreads_prepare_to_proceed (1)
-
#endif /* #ifndef NM_LINUX_H */
diff --git a/gdb/config/i386/tm-cygwin.h b/gdb/config/i386/tm-cygwin.h
index 309e1ff8df9..2faa4bf2003 100644
--- a/gdb/config/i386/tm-cygwin.h
+++ b/gdb/config/i386/tm-cygwin.h
@@ -1,5 +1,5 @@
/* Macro definitions for i386 running under the win32 API Unix.
- Copyright 1995, 1996 Free Software Foundation, Inc.
+ Copyright 1995 - 1999 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,104 +19,10 @@
Boston, MA 02111-1307, USA. */
-#include "i386/tm-i386v.h"
-
-#undef MAX_REGISTER_RAW_SIZE
-#undef MAX_REGISTER_VIRTUAL_SIZE
-#undef NUM_REGS
-#undef REGISTER_BYTE
-#undef REGISTER_BYTES
-#undef REGISTER_CONVERTIBLE
-#undef REGISTER_CONVERT_TO_RAW
-#undef REGISTER_CONVERT_TO_VIRTUAL
-#undef REGISTER_NAMES
-#undef REGISTER_RAW_SIZE
-#undef REGISTER_VIRTUAL_SIZE
-#undef REGISTER_VIRTUAL_TYPE
-
-/* Number of machine registers */
-
-#define NUM_REGS 24
-
-/* Initializer for an array of names of registers.
- There should be NUM_REGS strings in this initializer. */
-
-/* the order of the first 8 registers must match the compiler's
- * numbering scheme (which is the same as the 386 scheme)
- * also, this table must match regmap in i386-pinsn.c.
- */
-
-#define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \
- "esp", "ebp", "esi", "edi", \
- "eip", "ps", "cs", "ss", \
- "ds", "es", "fs", "gs", \
- "st", "st(1)","st(2)","st(3)",\
- "st(4)","st(5)","st(6)","st(7)",}
-
-#define FP0_REGNUM 16
-
-/* Total amount of space needed to store our copies of the machine's
- register state, the array `registers'. */
-
-#define REGISTER_BYTES (16 * 4 + 8 * 10)
-
-/* Index within `registers' of the first byte of the space for
- register N. */
-
-#define REGISTER_BYTE(N) (((N) < 16) ? (N) * 4 : (((N) - 16) * 10) + (16 * 4))
-
-/* Number of bytes of storage in the actual machine representation
- for register N. */
-
-#define REGISTER_RAW_SIZE(N) (((N) < 16) ? 4 : 10)
-
-/* Number of bytes of storage in the program's representation
- for register N. */
+#undef HAVE_SSE_REGS /* FIXME! win32-nat.c needs to support XMMi registers */
+#define HAVE_I387_REGS
-#define REGISTER_VIRTUAL_SIZE(N) (((N) < 16) ? 4 : 10)
-
-/* Largest value REGISTER_RAW_SIZE can have. */
-
-#define MAX_REGISTER_RAW_SIZE 10
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have. */
-
-#define MAX_REGISTER_VIRTUAL_SIZE 10
-
-/* Nonzero if register N requires conversion
- from raw format to virtual format. */
-
-#define REGISTER_CONVERTIBLE(N) \
- ((N < FP0_REGNUM) ? 0 : 1)
-
-/* Convert data from raw format for register REGNUM in buffer FROM
- to virtual format with type TYPE in buffer TO. */
-extern void
-i387_to_double PARAMS ((char *, char *));
-
-
-#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
-{ \
- double val; \
- i387_to_double ((FROM), (char *)&val); \
- store_floating ((TO), TYPE_LENGTH (TYPE), val); \
-}
-
-extern void
-double_to_i387 PARAMS ((char *, char *));
-
-#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
-{ \
- double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
- double_to_i387((char *)&val, (TO)); \
-}
-
-/* Return the GDB type object for the "standard" data type
- of data in register N. */
-
-#define REGISTER_VIRTUAL_TYPE(N) \
- ((N < FP0_REGNUM) ? builtin_type_int : \
- builtin_type_double)
+#include "i386/tm-i386v.h"
#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) skip_trampoline_code (pc, name)
#define SKIP_TRAMPOLINE_CODE(pc) skip_trampoline_code (pc, 0)
diff --git a/gdb/config/i386/tm-i386v.h b/gdb/config/i386/tm-i386v.h
index 308da1fa2e3..5e7826d231b 100644
--- a/gdb/config/i386/tm-i386v.h
+++ b/gdb/config/i386/tm-i386v.h
@@ -32,73 +32,6 @@
#undef START_INFERIOR_TRAPS_EXPECTED
#define START_INFERIOR_TRAPS_EXPECTED 4
-/* Number of machine registers */
-
-#undef NUM_REGS
-#define NUM_REGS 16
-
-/* Initializer for an array of names of registers.
- There should be NUM_REGS strings in this initializer. */
-
-/* the order of the first 8 registers must match the compiler's
- * numbering scheme (which is the same as the 386 scheme)
- * also, this table must match regmap in i386-pinsn.c.
- */
-
-#undef REGISTER_NAMES
-#define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \
- "esp", "ebp", "esi", "edi", \
- "eip", "ps", "cs", "ss", \
- "ds", "es", "fs", "gs", \
- }
-
-/* Total amount of space needed to store our copies of the machine's
- register state, the array `registers'. */
-
-#undef REGISTER_BYTES
-#define REGISTER_BYTES (NUM_REGS * 4)
-
-/* Index within `registers' of the first byte of the space for
- register N. */
-
-#undef REGISTER_BYTE
-#define REGISTER_BYTE(N) ((N)*4)
-
-/* Number of bytes of storage in the actual machine representation
- for register N. */
-
-#undef REGISTER_RAW_SIZE
-#define REGISTER_RAW_SIZE(N) (4)
-
-/* Number of bytes of storage in the program's representation
- for register N. */
-
-#undef REGISTER_VIRTUAL_SIZE
-#define REGISTER_VIRTUAL_SIZE(N) (4)
-
-/* Largest value REGISTER_RAW_SIZE can have. */
-
-#undef MAX_REGISTER_RAW_SIZE
-#define MAX_REGISTER_RAW_SIZE 4
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have. */
-
-#undef MAX_REGISTER_VIRTUAL_SIZE
-#define MAX_REGISTER_VIRTUAL_SIZE 4
-
-/* Return the GDB type object for the "standard" data type
- of data in register N. */
-/* Perhaps si and di should go here, but potentially they could be
- used for things other than address. */
-
-#undef REGISTER_VIRTUAL_TYPE
-#define REGISTER_VIRTUAL_TYPE(N) \
- ((N) == PC_REGNUM || (N) == FP_REGNUM || (N) == SP_REGNUM ? \
- lookup_pointer_type (builtin_type_void) : builtin_type_int)
-
-/* Store the address of the place in which to copy the structure the
- subroutine will return. This is called from call_function. */
-
#undef STORE_STRUCT_RETURN
#define STORE_STRUCT_RETURN(ADDR, SP) \
{ char buf[REGISTER_SIZE]; \
diff --git a/gdb/config/i386/tm-linux.h b/gdb/config/i386/tm-linux.h
index 42daaeae5bf..a04348910bc 100644
--- a/gdb/config/i386/tm-linux.h
+++ b/gdb/config/i386/tm-linux.h
@@ -28,6 +28,7 @@
#endif
#include "i386/tm-i386.h"
+#include "tm-linux.h"
/* Size of sigcontext, from <asm/sigcontext.h>. */
#define LINUX_SIGCONTEXT_SIZE (88)
@@ -38,10 +39,6 @@
/* Offset to saved SP in sigcontext, from <asm/sigcontext.h>. */
#define LINUX_SIGCONTEXT_SP_OFFSET (28)
-/* We need this file for the SOLIB_TRAMPOLINE stuff. */
-
-#include "tm-sysv4.h"
-
#define LOW_RETURN_REGNUM 0 /* holds low four bytes of result */
#define HIGH_RETURN_REGNUM 2 /* holds high four bytes of result */
@@ -167,18 +164,6 @@ extern CORE_ADDR i386_linux_sigtramp_saved_pc PARAMS ((struct frame_info *));
extern CORE_ADDR i386_linux_sigtramp_saved_sp PARAMS ((struct frame_info *));
-/* Some versions of Linux have real-time signal support in the C library, and
- some don't. We have to include this file to find out. */
-#include <signal.h>
-
-#ifdef __SIGRTMIN
-#define REALTIME_LO __SIGRTMIN
-#define REALTIME_HI (__SIGRTMAX + 1)
-#else
-#define REALTIME_LO 32
-#define REALTIME_HI 64
-#endif
-
/* When we call a function in a shared library, and the PLT sends us
into the dynamic linker to find the function's real address, we
need to skip over the dynamic linker call. This function decides