svn commit: r203664 - in projects/ppc64: contrib/gdb/gdb
gnu/usr.bin/binutils/libbfd
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Mon Feb 8 15:39:49 UTC 2010
Author: nwhitehorn
Date: Mon Feb 8 15:39:48 2010
New Revision: 203664
URL: http://svn.freebsd.org/changeset/base/203664
Log:
Add the rs6000 architecture to binutils and fiddle some target definitions
in the GDB tdep. GDB can now successfully debug core files on ppc64, but
cannot yet attach to running processes, with this error:
warning: Unable to find dynamic linker breakpoint function.
Next up is fixing this and making ld believe that our CRT files can handle
multiple TOCs, required for linking some large executables like LLVM.
Modified:
projects/ppc64/contrib/gdb/gdb/ppcfbsd-tdep.c
projects/ppc64/gnu/usr.bin/binutils/libbfd/Makefile
projects/ppc64/gnu/usr.bin/binutils/libbfd/Makefile.powerpc64
Modified: projects/ppc64/contrib/gdb/gdb/ppcfbsd-tdep.c
==============================================================================
--- projects/ppc64/contrib/gdb/gdb/ppcfbsd-tdep.c Mon Feb 8 14:09:07 2010 (r203663)
+++ projects/ppc64/contrib/gdb/gdb/ppcfbsd-tdep.c Mon Feb 8 15:39:48 2010 (r203664)
@@ -35,13 +35,13 @@
#include "gdb_assert.h"
#include "solib-svr4.h"
-#define REG_FIXREG_OFFSET(x) ((x) * 4)
-#define REG_LR_OFFSET (32 * 4)
-#define REG_CR_OFFSET (33 * 4)
-#define REG_XER_OFFSET (34 * 4)
-#define REG_CTR_OFFSET (35 * 4)
-#define REG_PC_OFFSET (36 * 4)
-#define SIZEOF_STRUCT_REG (37 * 4)
+#define REG_FIXREG_OFFSET(x) ((x) * sizeof(register_t))
+#define REG_LR_OFFSET (32 * sizeof(register_t))
+#define REG_CR_OFFSET (33 * sizeof(register_t))
+#define REG_XER_OFFSET (34 * sizeof(register_t))
+#define REG_CTR_OFFSET (35 * sizeof(register_t))
+#define REG_PC_OFFSET (36 * sizeof(register_t))
+#define SIZEOF_STRUCT_REG (37 * sizeof(register_t))
#define FPREG_FPR_OFFSET(x) ((x) * 8)
#define FPREG_FPSCR_OFFSET (32 * 8)
@@ -274,8 +274,13 @@ ppcfbsd_init_abi (struct gdbarch_info in
/* For NetBSD, this is an on again, off again thing. Some systems
do use the broken struct convention, and some don't. */
set_gdbarch_return_value (gdbarch, ppcfbsd_return_value);
+#ifdef __powerpc64__
+ set_solib_svr4_fetch_link_map_offsets (gdbarch,
+ svr4_lp64_fetch_link_map_offsets);
+#else
set_solib_svr4_fetch_link_map_offsets (gdbarch,
svr4_ilp32_fetch_link_map_offsets);
+#endif
}
void
Modified: projects/ppc64/gnu/usr.bin/binutils/libbfd/Makefile
==============================================================================
--- projects/ppc64/gnu/usr.bin/binutils/libbfd/Makefile Mon Feb 8 14:09:07 2010 (r203663)
+++ projects/ppc64/gnu/usr.bin/binutils/libbfd/Makefile Mon Feb 8 15:39:48 2010 (r203664)
@@ -26,7 +26,7 @@ SELARCH= &bfd_i386_arch
.elif ${TARGET_ARCH} == "sparc64"
SELARCH= &bfd_sparc_arch
.elif ${TARGET_ARCH} == "powerpc64"
-SELARCH= &bfd_powerpc_arch
+SELARCH= &bfd_powerpc_arch,&bfd_rs6000_arch
.else
.for _a in ${ARCHS}
.if ${SELARCH} == ""
Modified: projects/ppc64/gnu/usr.bin/binutils/libbfd/Makefile.powerpc64
==============================================================================
--- projects/ppc64/gnu/usr.bin/binutils/libbfd/Makefile.powerpc64 Mon Feb 8 14:09:07 2010 (r203663)
+++ projects/ppc64/gnu/usr.bin/binutils/libbfd/Makefile.powerpc64 Mon Feb 8 15:39:48 2010 (r203664)
@@ -22,4 +22,6 @@ SRCS+= cpu-powerpc.c \
VECS+= ${DEFAULT_VECTOR} \
bfd_elf64_powerpcle_vec \
bfd_elf32_powerpc_vec \
- bfd_elf32_powerpcle_vec
+ bfd_elf32_powerpcle_vec \
+ ppcboot_vec
+
More information about the svn-src-projects
mailing list