Index: gdb/aarch64-newlib-tdep.c |
diff --git a/gdb/i386gnu-tdep.c b/gdb/aarch64-newlib-tdep.c |
similarity index 57% |
copy from gdb/i386gnu-tdep.c |
copy to gdb/aarch64-newlib-tdep.c |
index 8d7f68aba5ac941d2b080993b742045eb55a4122..47ce68704e1e2ecba6362605c7bae770c755951d 100644 |
--- a/gdb/i386gnu-tdep.c |
+++ b/gdb/aarch64-newlib-tdep.c |
@@ -1,5 +1,7 @@ |
-/* Target-dependent code for the GNU Hurd. |
- Copyright (C) 2002-2003, 2007-2012 Free Software Foundation, Inc. |
+/* Target-dependent code for Newlib AArch64. |
+ |
+ Copyright (C) 2011-2013 Free Software Foundation, Inc. |
+ Contributed by ARM Ltd. |
This file is part of GDB. |
@@ -17,30 +19,29 @@ |
along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
#include "defs.h" |
+ |
+#include "gdbarch.h" |
+#include "aarch64-tdep.h" |
#include "osabi.h" |
-#include "solib-svr4.h" |
-#include "i386-tdep.h" |
+/* Implement the 'init_osabi' method of struct gdb_osabi_handler. */ |
static void |
-i386gnu_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) |
+aarch64_newlib_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) |
{ |
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); |
- /* GNU uses ELF. */ |
- i386_elf_init_abi (info, gdbarch); |
- |
- set_solib_svr4_fetch_link_map_offsets |
- (gdbarch, svr4_ilp32_fetch_link_map_offsets); |
- |
- tdep->jb_pc_offset = 20; /* From <bits/setjmp.h>. */ |
+ /* Jump buffer - support for longjmp. |
+ Offset of original PC in jump buffer (in registers). */ |
+ tdep->jb_pc = 11; |
} |
/* Provide a prototype to silence -Wmissing-prototypes. */ |
-extern void _initialize_i386gnu_tdep (void); |
+extern initialize_file_ftype _initialize_aarch64_newlib_tdep; |
void |
-_initialize_i386gnu_tdep (void) |
+_initialize_aarch64_newlib_tdep (void) |
{ |
- gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_HURD, i386gnu_init_abi); |
+ gdbarch_register_osabi (bfd_arch_aarch64, 0, GDB_OSABI_NEWLIB, |
+ aarch64_newlib_init_abi); |
} |