aboutsummaryrefslogtreecommitdiff
path: root/gdb/sparc64-linux-tdep.c
diff options
context:
space:
mode:
authornobody <>2004-01-26 12:52:12 +0000
committernobody <>2004-01-26 12:52:12 +0000
commitaa0e88e3d758559942e192f3075a3edc0b2f222d (patch)
tree71afb6fbfb9d80e4b7b8ee31e758ebc905cf6c48 /gdb/sparc64-linux-tdep.c
parent5f2fbaa631ada809193f3619152ecdcd956cc63d (diff)
downloadgdb-aa0e88e3d758559942e192f3075a3edc0b2f222d.zip
gdb-aa0e88e3d758559942e192f3075a3edc0b2f222d.tar.gz
gdb-aa0e88e3d758559942e192f3075a3edc0b2f222d.tar.bz2
This commit was manufactured by cvs2svn to create branch
'carlton_dictionary-branch'. Cherrypick from master 2004-01-26 12:52:10 UTC DJ Delorie <dj@redhat.com> 'merge from gcc': bfd/ChangeLog-0203 bfd/doc/ChangeLog-9103 gdb/ChangeLog-2003 gdb/config/sparc/linux64.mh gdb/config/sparc/linux64.mt gdb/config/sparc/nm-sol2.h gdb/config/sparc/obsd.mt gdb/config/sparc/obsd64.mt gdb/config/sparc/sol2-64.mt gdb/config/sparc/sol2.mh gdb/config/sparc/sol2.mt gdb/config/sparc/sparc.mt gdb/config/sparc/sparc64.mt gdb/config/sparc/tm-sol2.h gdb/config/sparc/tm-vxworks.h gdb/config/sparc/vxworks.mt gdb/mi/ChangeLog-1999-2003 gdb/sparc-linux-tdep.c gdb/sparc-nat.h gdb/sparc-sol2-nat.c gdb/sparc-sol2-tdep.c gdb/sparc64-linux-nat.c gdb/sparc64-linux-tdep.c gdb/sparc64-nat.c gdb/sparc64-sol2-tdep.c gdb/sparc64nbsd-tdep.c gdb/sparc64obsd-tdep.c gdb/sparcobsd-tdep.c gdb/testsuite/gdb.base/gdb1476.c gdb/testsuite/gdb.base/gdb1476.exp gdb/testsuite/gdb.base/sepdebug.c gdb/testsuite/gdb.base/sepdebug.exp gdb/testsuite/gdb.cp/bs15503.cc gdb/testsuite/gdb.cp/bs15503.exp gdb/testsuite/gdb.cp/exception.cc gdb/testsuite/gdb.cp/exception.exp gdb/testsuite/gdb.mi/ChangeLog-1999-2003 gdb/tui/ChangeLog-1998-2003 gdb/tui/tui-command.c gdb/tui/tui-command.h gdb/tui/tui-data.c gdb/tui/tui-data.h gdb/tui/tui-disasm.c gdb/tui/tui-disasm.h gdb/tui/tui-io.c gdb/tui/tui-io.h gdb/tui/tui-layout.c gdb/tui/tui-layout.h gdb/tui/tui-regs.c gdb/tui/tui-regs.h gdb/tui/tui-source.c gdb/tui/tui-source.h gdb/tui/tui-stack.c gdb/tui/tui-stack.h gdb/tui/tui-win.c gdb/tui/tui-win.h gdb/tui/tui-windata.c gdb/tui/tui-windata.h gdb/tui/tui-wingeneral.c gdb/tui/tui-wingeneral.h gdb/tui/tui-winsource.c gdb/tui/tui-winsource.h include/ChangeLog-9103 include/coff/ChangeLog-9103 include/elf/ChangeLog-9103 include/opcode/ChangeLog-9103 libiberty/configure.ac libiberty/cp-demangle.h libiberty/cp-demint.c opcodes/ChangeLog-0001 opcodes/ChangeLog-0203 sim/m32r/syscall.h sim/m32r/traps-linux.c
Diffstat (limited to 'gdb/sparc64-linux-tdep.c')
-rw-r--r--gdb/sparc64-linux-tdep.c82
1 files changed, 82 insertions, 0 deletions
diff --git a/gdb/sparc64-linux-tdep.c b/gdb/sparc64-linux-tdep.c
new file mode 100644
index 0000000..cd78557
--- /dev/null
+++ b/gdb/sparc64-linux-tdep.c
@@ -0,0 +1,82 @@
+/* Target-dependent code for GNU/Linux UltraSPARC.
+
+ Copyright 2003 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. */
+
+#include "defs.h"
+#include "gdbarch.h"
+#include "osabi.h"
+#include "solib-svr4.h"
+
+#include "sparc64-tdep.h"
+
+static struct link_map_offsets *
+sparc64_linux_svr4_fetch_link_map_offsets (void)
+{
+ static struct link_map_offsets lmo;
+ static struct link_map_offsets *lmp = NULL;
+
+ if (lmp == NULL)
+ {
+ lmp = &lmo;
+
+ /* Everything we need is in the first 16 bytes. */
+ lmo.r_debug_size = 16;
+ lmo.r_map_offset = 8;
+ lmo.r_map_size = 8;
+
+ /* Everything we need is in the first 40 bytes. */
+ lmo.link_map_size = 40;
+ lmo.l_addr_offset = 0;
+ lmo.l_addr_size = 8;
+ lmo.l_name_offset = 8;
+ lmo.l_name_size = 8;
+ lmo.l_next_offset = 24;
+ lmo.l_next_size = 8;
+ lmo.l_prev_offset = 32;
+ lmo.l_prev_size = 8;
+ }
+
+ return lmp;
+}
+
+static void
+sparc64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ /* GNU/Linux is very similar to Solaris ... */
+ sparc64_sol2_init_abi (info, gdbarch);
+
+ /* ... but doesn't have kernel-assisted single-stepping support. */
+ set_gdbarch_software_single_step (gdbarch, sparc_software_single_step);
+
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, sparc64_linux_svr4_fetch_link_map_offsets);
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern void _initialize_sparc64_linux_tdep (void);
+
+void
+_initialize_sparc64_linux_tdep (void)
+{
+ gdbarch_register_osabi (bfd_arch_sparc, bfd_mach_sparc_v9,
+ GDB_OSABI_LINUX, sparc64_linux_init_abi);
+}