PERFORCE change 80110 for review
Olivier Houchard
cognet at FreeBSD.org
Wed Jul 13 22:47:13 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=80110
Change 80110 by cognet at cognet on 2005/07/13 22:46:26
Make it so we can build an arm cross-debugger.
Affected files ...
.. //depot/projects/arm/gnu-arm.diff#4 edit
Differences ...
==== //depot/projects/arm/gnu-arm.diff#4 (text+ko) ====
@@ -4,7 +4,7 @@
retrieving revision 1.54
diff -u -p -r1.54 Makefile
--- gnu/lib/libgcc/Makefile 21 Dec 2004 09:33:45 -0000 1.54
-+++ gnu/lib/libgcc/Makefile 27 Feb 2005 21:18:24 -0000
++++ gnu/lib/libgcc/Makefile 29 Jun 2005 12:06:56 -0000
@@ -97,8 +97,11 @@ LIB2FUNCS_EXTRA = qrnnd.asm
# from config/arm/t-strongarm-elf
CFLAGS+= -Dinhibit_libc -fno-inline
@@ -15,7 +15,7 @@
+# _truncdfsf2 _fixdfsi _extendsfdf2 _fixsfsi _cmpdf2 _cmpsf2 \
+# _muldivdf3 _muldivsf3
+#XXX
-+LIB1ASMFUNCS = _dvmd_tls _bb_init_func
++LIB1ASMFUNCS = _dvmd_tls _bb_init_func
# We want fine grained libraries, so use the new code to build the
# floating point emulation libraries.
XXX fix this: NEED_FP_EMULATION set to "yes" with different rules per platform
@@ -31,10 +31,10 @@
Index: gnu/lib/libstdc++/Makefile
===================================================================
RCS file: /home/ncvs/src/gnu/lib/libstdc++/Makefile,v
-retrieving revision 1.54
-diff -u -p -r1.54 Makefile
---- gnu/lib/libstdc++/Makefile 26 Jan 2005 13:56:27 -0000 1.54
-+++ gnu/lib/libstdc++/Makefile 27 Feb 2005 21:18:25 -0000
+retrieving revision 1.55
+diff -u -p -r1.55 Makefile
+--- gnu/lib/libstdc++/Makefile 22 Apr 2005 18:57:32 -0000 1.55
++++ gnu/lib/libstdc++/Makefile 3 May 2005 00:45:54 -0000
@@ -174,6 +174,10 @@ TARGETHDRSNAME_c_locale.h= c++locale.h
TARGETHDRSNAME_new_allocator_base.h= c++allocator.h
TARGETHDRSDIR= ${CXXINCLUDEDIR}/bits
@@ -49,12 +49,12 @@
Index: gnu/usr.bin/Makefile
===================================================================
RCS file: /home/ncvs/src/gnu/usr.bin/Makefile,v
-retrieving revision 1.83
-diff -u -p -r1.83 Makefile
---- gnu/usr.bin/Makefile 24 Oct 2004 15:32:25 -0000 1.83
-+++ gnu/usr.bin/Makefile 27 Feb 2005 20:53:55 -0000
-@@ -23,7 +23,7 @@ SUBDIR= bc \
- tar \
+retrieving revision 1.84
+diff -u -p -r1.84 Makefile
+--- gnu/usr.bin/Makefile 21 Mar 2005 05:30:58 -0000 1.84
++++ gnu/usr.bin/Makefile 5 Apr 2005 18:34:42 -0000
+@@ -22,7 +22,7 @@ SUBDIR= bc \
+ sort \
texinfo
-.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "powerpc"
@@ -67,7 +67,7 @@
RCS file: gnu/usr.bin/binutils/as/arm-freebsd/targ-cpu.h
diff -N gnu/usr.bin/binutils/as/arm-freebsd/targ-cpu.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ gnu/usr.bin/binutils/as/arm-freebsd/targ-cpu.h 21 Oct 2004 21:30:12 -0000
++++ gnu/usr.bin/binutils/as/arm-freebsd/targ-cpu.h 5 Apr 2005 18:34:42 -0000
@@ -0,0 +1,3 @@
+/* $FreeBSD$ */
+
@@ -77,7 +77,7 @@
RCS file: gnu/usr.bin/binutils/ld/Makefile.arm
diff -N gnu/usr.bin/binutils/ld/Makefile.arm
--- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ gnu/usr.bin/binutils/ld/Makefile.arm 21 Oct 2004 21:30:12 -0000
++++ gnu/usr.bin/binutils/ld/Makefile.arm 5 Apr 2005 18:34:42 -0000
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
@@ -96,8 +96,8 @@
RCS file: gnu/usr.bin/binutils/libbfd/Makefile.arm
diff -N gnu/usr.bin/binutils/libbfd/Makefile.arm
--- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ gnu/usr.bin/binutils/libbfd/Makefile.arm 18 Jan 2005 12:04:26 -0000
-@@ -0,0 +1,20 @@
++++ gnu/usr.bin/binutils/libbfd/Makefile.arm 11 May 2005 22:50:52 -0000
+@@ -0,0 +1,24 @@
+# $FreeBSD$
+
+DEFAULT_VECTOR= bfd_elf32_littlearm_vec
@@ -109,6 +109,7 @@
+ elflink.c \
+ elfarm-nabi.c \
+ elfarm-oabi.c \
++ elf32-arm-fbsd.c \
+ elf32-target.h
+VECS+= ${DEFAULT_VECTOR} \
+ bfd_elf32_bigarm_vec
@@ -117,13 +118,16 @@
+CFLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR}
+.endif
+
-+CLEANFILES+= elf32-target.h
++CLEANFILES+= elf32-arm-fbsd.c
++
++elf32-arm-fbsd.c: elfarm-nabi.c
++ cat ${.ALLSRC} | sed s/ELFOSABI_ARM/ELFOSABI_FREEBSD/g >${.TARGET}
Index: gnu/usr.bin/binutils/libopcodes/Makefile.arm
===================================================================
RCS file: gnu/usr.bin/binutils/libopcodes/Makefile.arm
diff -N gnu/usr.bin/binutils/libopcodes/Makefile.arm
--- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ gnu/usr.bin/binutils/libopcodes/Makefile.arm 21 Oct 2004 21:30:12 -0000
++++ gnu/usr.bin/binutils/libopcodes/Makefile.arm 5 Apr 2005 18:34:42 -0000
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
@@ -132,10 +136,10 @@
Index: gnu/usr.bin/cc/cc_tools/Makefile
===================================================================
RCS file: /home/ncvs/src/gnu/usr.bin/cc/cc_tools/Makefile,v
-retrieving revision 1.80
-diff -u -p -r1.80 Makefile
---- gnu/usr.bin/cc/cc_tools/Makefile 18 Aug 2004 13:21:40 -0000 1.80
-+++ gnu/usr.bin/cc/cc_tools/Makefile 21 Oct 2004 21:30:12 -0000
+retrieving revision 1.81
+diff -u -p -r1.81 Makefile
+--- gnu/usr.bin/cc/cc_tools/Makefile 3 Jun 2005 04:21:04 -0000 1.81
++++ gnu/usr.bin/cc/cc_tools/Makefile 7 Jun 2005 20:16:03 -0000
@@ -214,7 +214,9 @@ CLEANFILES+= fini
.if ${TARGET_ARCH} == "amd64"
TARGET_INC= i386/biarch64.h
@@ -164,7 +168,7 @@
retrieving revision 1.18
diff -u -p -r1.18 auto-host.h
--- gnu/usr.bin/cc/cc_tools/auto-host.h 28 Jul 2004 05:27:20 -0000 1.18
-+++ gnu/usr.bin/cc/cc_tools/auto-host.h 21 Oct 2004 21:30:12 -0000
++++ gnu/usr.bin/cc/cc_tools/auto-host.h 5 Apr 2005 18:34:42 -0000
@@ -523,7 +523,7 @@
/* The number of bytes in type int */
#define SIZEOF_INT 4
@@ -179,12 +183,15 @@
RCS file: gnu/usr.bin/gdb/arch/arm/Makefile
diff -N gnu/usr.bin/gdb/arch/arm/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ gnu/usr.bin/gdb/arch/arm/Makefile 10 Jan 2005 21:40:04 -0000
-@@ -0,0 +1,13 @@
++++ gnu/usr.bin/gdb/arch/arm/Makefile 13 Jul 2005 22:33:32 -0000
+@@ -0,0 +1,16 @@
+# $FreeBSD$
+
+GENSRCS+= xm.h
-+LIBSRCS+= arm-tdep.c armfbsd-nat.c armfbsd-tdep.c solib.c solib-svr4.c
++.if !defined(GDB_CROSS_DEBUGGER)
++LIBSRCS+= armfbsd-nat.c
++.endif
++LIBSRCS+= arm-tdep.c armfbsd-tdep.c solib.c solib-svr4.c
+
+nm.h:
+ echo '#include "arm/nm-fbsd.h"' > ${.TARGET}
@@ -199,7 +206,7 @@
RCS file: gnu/usr.bin/gdb/arch/arm/config.h
diff -N gnu/usr.bin/gdb/arch/arm/config.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ gnu/usr.bin/gdb/arch/arm/config.h 15 Jan 2005 15:50:12 -0000
++++ gnu/usr.bin/gdb/arch/arm/config.h 5 Apr 2005 18:34:42 -0000
@@ -0,0 +1,553 @@
+/* $FreeBSD$ */
+
@@ -759,8 +766,8 @@
RCS file: gnu/usr.bin/gdb/arch/arm/init.c
diff -N gnu/usr.bin/gdb/arch/arm/init.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ gnu/usr.bin/gdb/arch/arm/init.c 28 Nov 2004 14:53:48 -0000
-@@ -0,0 +1,222 @@
++++ gnu/usr.bin/gdb/arch/arm/init.c 13 Jul 2005 22:42:31 -0000
+@@ -0,0 +1,226 @@
+/* $FreeBSD$ */
+
+/* Do not modify this file. */
@@ -776,10 +783,12 @@
+extern initialize_file_ftype _initialize_ser_hardwire;
+extern initialize_file_ftype _initialize_ser_pipe;
+extern initialize_file_ftype _initialize_ser_tcp;
++#ifndef CROSS_DEBUGGER
+extern initialize_file_ftype _initialize_kernel_u_addr;
+extern initialize_file_ftype _initialize_infptrace;
+extern initialize_file_ftype _initialize_inftarg;
+extern initialize_file_ftype _initialize_arm_fbsdnat;
++#endif
+extern initialize_file_ftype _initialize_remote;
+extern initialize_file_ftype _initialize_dcache;
+extern initialize_file_ftype _initialize_sr_support;
@@ -885,10 +894,12 @@
+ _initialize_ser_hardwire ();
+ _initialize_ser_pipe ();
+ _initialize_ser_tcp ();
++#ifndef CROSS_DEBUGGER
+ _initialize_kernel_u_addr ();
+ _initialize_infptrace ();
+ _initialize_inftarg ();
+ _initialize_arm_fbsdnat ();
++#endif
+ _initialize_remote ();
+ _initialize_dcache ();
+ _initialize_sr_support ();
@@ -988,8 +999,8 @@
RCS file: gnu/usr.bin/gdb/kgdb/trgt_arm.c
diff -N gnu/usr.bin/gdb/kgdb/trgt_arm.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ gnu/usr.bin/gdb/kgdb/trgt_arm.c 28 Nov 2004 14:36:26 -0000
-@@ -0,0 +1,54 @@
++++ gnu/usr.bin/gdb/kgdb/trgt_arm.c 13 Jul 2005 22:44:44 -0000
+@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2004 Marcel Moolenaar
+ * All rights reserved.
@@ -1032,11 +1043,24 @@
+#include <gdbthread.h>
+#include <inferior.h>
+#include <regcache.h>
++#include <arm-tdep.h>
+
+void
+kgdb_trgt_fetch_registers(int regno __unused)
+{
-+ fprintf_unfiltered(gdb_stderr, "XXX: %s\n", __func__);
++ struct kthr *kt;
++ struct pcb pcb;
++ int i;
++
++ kt = kgdb_thr_lookup_tid(ptid_get_tid(inferior_ptid));
++ if (kt == NULL)
++ return;
++ if (kvm_read(kvm, kt->pcb, &pcb, sizeof(pcb)) != sizeof(pcb)) {
++ warnx("kvm_read: %s", kvm_geterr(kvm));
++ memset(&pcb, 0, sizeof(pcb));
++ }
++ for (i = ARM_A1_REGNUM + 9; i <= ARM_PC_REGNUM; i++)
++ supply_register(i, (char *)&pcb + i * 4);
+}
+
+void
More information about the p4-projects
mailing list