aboutsummaryrefslogtreecommitdiff
path: root/gdb/config
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2001-07-10 20:41:54 +0000
committerDaniel Jacobowitz <drow@false.org>2001-07-10 20:41:54 +0000
commit2aa830e4a6c1e6f378b87ed37a5a239325a59982 (patch)
tree94e558716793b22c1353cbf5883157f7fb71cbe3 /gdb/config
parent15dcfbc30f219563b3e24c443ee6a8332ea40b0d (diff)
downloadgdb-2aa830e4a6c1e6f378b87ed37a5a239325a59982.zip
gdb-2aa830e4a6c1e6f378b87ed37a5a239325a59982.tar.gz
gdb-2aa830e4a6c1e6f378b87ed37a5a239325a59982.tar.bz2
MIPS/Linux support
Diffstat (limited to 'gdb/config')
-rw-r--r--gdb/config/mips/linux.mh8
-rw-r--r--gdb/config/mips/linux.mt9
-rw-r--r--gdb/config/mips/nm-linux.h66
-rw-r--r--gdb/config/mips/tm-linux.h90
-rw-r--r--gdb/config/mips/xm-linux.h36
5 files changed, 209 insertions, 0 deletions
diff --git a/gdb/config/mips/linux.mh b/gdb/config/mips/linux.mh
new file mode 100644
index 0000000..1a4b45f
--- /dev/null
+++ b/gdb/config/mips/linux.mh
@@ -0,0 +1,8 @@
+# Host: Linux/MIPS
+XDEPFILES=
+XM_FILE= xm-linux.h
+NAT_FILE= nm-linux.h
+NATDEPFILES= infptrace.o inftarg.o fork-child.o mips-linux-nat.o \
+ thread-db.o lin-lwp.o proc-service.o
+
+LOADLIBES = -ldl -rdynamic
diff --git a/gdb/config/mips/linux.mt b/gdb/config/mips/linux.mt
new file mode 100644
index 0000000..16f8e32
--- /dev/null
+++ b/gdb/config/mips/linux.mt
@@ -0,0 +1,9 @@
+# Target: Linux/MIPS
+TDEPFILES= mips-tdep.o mips-linux-tdep.o corelow.o \
+ solib.o solib-svr4.o
+TM_FILE= tm-linux.h
+
+GDBSERVER_DEPFILES= low-linux.o
+
+SIM_OBS = remote-sim.o
+SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/nm-linux.h b/gdb/config/mips/nm-linux.h
new file mode 100644
index 0000000..27fb1b1
--- /dev/null
+++ b/gdb/config/mips/nm-linux.h
@@ -0,0 +1,66 @@
+/* Native-dependent definitions for Linux/MIPS.
+ Copyright 1996, 2001 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef NM_MIPSLINUX_H
+#define NM_MIPSLINUX_H
+
+#define MIPS_GNULINUX_TARGET
+
+#include "nm-linux.h"
+
+/* Return sizeof user struct to callers in less machine dependent
+ routines. Hard coded for cross-compilation friendliness. */
+
+#define KERNEL_U_SIZE 504
+
+/* ptrace register ``addresses'' are absolute. */
+
+#define U_REGS_OFFSET 0
+
+/* ptrace transfers longs, and expects addresses as longs. */
+
+#define PTRACE_ARG3_TYPE long
+#define PTRACE_XFER_TYPE long
+
+#define REGISTER_U_ADDR(addr, blockend, regno) \
+ (addr) = mips_register_addr ((regno),(blockend))
+
+int mips_linux_cannot_fetch_register (int regno);
+int mips_linux_cannot_store_register (int regno);
+#define CANNOT_FETCH_REGISTER(regno) mips_linux_cannot_fetch_register (regno)
+#define CANNOT_STORE_REGISTER(regno) mips_linux_cannot_store_register (regno)
+
+/* FIXME: This should be moved to ../nm-linux.h once we have converted all
+ Linux targets to use the new threads stuff (without the #undef of
+ course). */
+
+extern int lin_lwp_prepare_to_proceed (void);
+#undef PREPARE_TO_PROCEED
+#define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed ()
+
+extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose);
+#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose))
+
+#include <signal.h>
+
+extern void lin_thread_get_thread_signals (sigset_t *mask);
+#define GET_THREAD_SIGNALS(mask) lin_thread_get_thread_signals (mask)
+
+#endif /* NM_MIPSLINUX_H */
diff --git a/gdb/config/mips/tm-linux.h b/gdb/config/mips/tm-linux.h
new file mode 100644
index 0000000..54725fd
--- /dev/null
+++ b/gdb/config/mips/tm-linux.h
@@ -0,0 +1,90 @@
+/* Target-dependent definitions for Linux/MIPS.
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef TM_MIPSLINUX_H
+#define TM_MIPSLINUX_H
+
+#include "mips/tm-mips.h"
+
+/* We don't want to inherit tm-mips.h's shared library trampoline code. */
+
+#undef IN_SOLIB_CALL_TRAMPOLINE
+#undef IN_SOLIB_RETURN_TRAMPOLINE
+#undef SKIP_TRAMPOLINE_CODE
+#undef IGNORE_HELPER_CALL
+
+/* FIXME: Do not include "tm-linux.h", because we do not want the host's
+ <signal.h>. Instead, copy the non-signal bits for now. */
+
+/* We need this file for the SOLIB_TRAMPOLINE stuff. */
+
+#include "tm-sysv4.h"
+
+/* We define SVR4_SHARED_LIBS unconditionally, on the assumption that
+ link.h is available on all linux platforms. For I386 and SH3/4,
+ we hard-code the information rather than use link.h anyway (for
+ the benefit of cross-debugging). We may move to doing that for
+ other architectures as well. */
+
+#define SVR4_SHARED_LIBS
+#include "solib.h" /* Support for shared libraries. */
+
+/* End from "tm-linux.h". */
+
+/* There's an E_MIPS_ABI_O32 flag in e_flags, but we don't use it - in
+ fact, using it may violate the o32 ABI. */
+
+#define MIPS_DEFAULT_ABI MIPS_ABI_O32
+
+/* Linux/MIPS has __SIGRTMAX == 127. */
+
+#define REALTIME_LO 32
+#define REALTIME_HI 128
+
+/* Use target_specific function to define link map offsets. */
+
+extern struct link_map_offsets *mips_linux_svr4_fetch_link_map_offsets (void);
+#define SVR4_FETCH_LINK_MAP_OFFSETS() \
+ mips_linux_svr4_fetch_link_map_offsets ()
+
+/* Details about jmp_buf. */
+
+#define JB_ELEMENT_SIZE 4
+#define JB_PC 0
+
+/* Figure out where the longjmp will land. Slurp the arguments out of the
+ stack. We expect the first arg to be a pointer to the jmp_buf structure
+ from which we extract the pc (JB_PC) that we will land at. The pc is
+ copied into ADDR. This routine returns 1 on success. */
+
+#define GET_LONGJMP_TARGET(ADDR) mips_linux_get_longjmp_target(ADDR)
+extern int mips_linux_get_longjmp_target (CORE_ADDR *);
+
+/* We do single stepping in software. */
+
+#define SOFTWARE_SINGLE_STEP_P() 1
+#define SOFTWARE_SINGLE_STEP(sig,bp_p) mips_software_single_step (sig, bp_p)
+
+/* FIXME: This still needs to be implemented. */
+
+#undef IN_SIGTRAMP
+#define IN_SIGTRAMP(pc, name) (0)
+
+#endif /* TM_MIPSLINUX_H */
diff --git a/gdb/config/mips/xm-linux.h b/gdb/config/mips/xm-linux.h
new file mode 100644
index 0000000..d28578b
--- /dev/null
+++ b/gdb/config/mips/xm-linux.h
@@ -0,0 +1,36 @@
+/* Host definitions for Linux/MIPS.
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef XM_MIPSLINUX_H
+#define XM_MIPSLINUX_H
+
+#ifndef HOST_BYTE_ORDER
+#include <endian.h>
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define HOST_BYTE_ORDER BIG_ENDIAN
+#else
+#define HOST_BYTE_ORDER LITTLE_ENDIAN
+#endif
+#endif
+
+/* Need R_OK etc, but USG isn't defined. */
+#include <unistd.h>
+
+#endif /* XM_MIPSLINUX_H */