Index: gnu/lib/libgcc/Makefile =================================================================== RCS file: /cognet/ncvs/src/gnu/lib/libgcc/Makefile,v retrieving revision 1.55 diff -u -p -r1.55 Makefile --- gnu/lib/libgcc/Makefile 18 Mar 2006 21:37:03 -0000 1.55 +++ gnu/lib/libgcc/Makefile 6 Jul 2006 23:54:06 -0000 @@ -98,8 +98,11 @@ LIB2FUNCS_EXTRA = qrnnd.asm # from config/arm/t-strongarm-elf CFLAGS+= -Dinhibit_libc -fno-inline LIB1ASMSRC = lib1funcs.asm -LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func -OBJS+= dp-bit.o fp-bit.o +#LIB1ASMFUNCS = _dvmd_tls _bb_init_func _fixunsdfsi _addsubsf3 _addsubdf3 \ +# _truncdfsf2 _fixdfsi _extendsfdf2 _fixsfsi _cmpdf2 _cmpsf2 \ +# _muldivdf3 _muldivsf3 +#XXX +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 @@ -169,7 +172,7 @@ ASM_S= ${LIB1ASMFUNCS:S/$/.So/} SYMS= ${LIB2FUNCS} \ ${LIB2_DIVMOD_FUNCS} -.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "sparc64" +.if ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "sparc64" SYMS+= ${FPBIT_FUNCS} ${DPBIT_FUNCS} .endif SYMS_ST= ${LIB2FUNCS_ST} \ Index: gnu/lib/libstdc++/Makefile =================================================================== RCS file: /cognet/ncvs/src/gnu/lib/libstdc++/Makefile,v retrieving revision 1.56 diff -u -p -r1.56 Makefile --- gnu/lib/libstdc++/Makefile 22 Jul 2005 17:18:58 -0000 1.56 +++ gnu/lib/libstdc++/Makefile 6 Jul 2006 23:54:06 -0000 @@ -174,6 +174,10 @@ TARGETHDRSNAME_c_locale.h= c++locale.h TARGETHDRSNAME_new_allocator_base.h= c++allocator.h TARGETHDRSDIR= ${CXXINCLUDEDIR}/bits +.if ${MACHINE_ARCH} == "arm" +CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1 +.endif + MARCHHDRS= atomic_word.h .for h in ${MARCHHDRS} .if exists(${SRCDIR}/config/cpu/${MARCHDIR}/${h}) Index: gnu/usr.bin/Makefile =================================================================== RCS file: /cognet/ncvs/src/gnu/usr.bin/Makefile,v retrieving revision 1.88 diff -u -p -r1.88 Makefile --- gnu/usr.bin/Makefile 17 Mar 2006 18:54:22 -0000 1.88 +++ gnu/usr.bin/Makefile 6 Jul 2006 23:54:06 -0000 @@ -24,7 +24,7 @@ SUBDIR= bc \ sort \ ${_texinfo} -.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_ARCH} == "powerpc" MK_GDB= no # not yet .endif Index: gnu/usr.bin/binutils/as/Makefile =================================================================== RCS file: /cognet/ncvs/src/gnu/usr.bin/binutils/as/Makefile,v retrieving revision 1.16 diff -u -p -r1.16 Makefile --- gnu/usr.bin/binutils/as/Makefile 21 Dec 2004 09:59:40 -0000 1.16 +++ gnu/usr.bin/binutils/as/Makefile 21 Jul 2006 11:03:28 -0000 @@ -35,6 +35,11 @@ CFLAGS+= -DDEFAULT_ARCH=\"v9-64\" .else CFLAGS+= -DDEFAULT_ARCH=\"${BINUTILS_ARCH}\" .endif + +.if ${TARGET_ARCH} == "arm" && defined(ARM_BIG_ENDIAN) +CFLAGS+= -DTARGET_BYTES_BIG_ENDIAN=1 +.endif + CFLAGS+= -DTARGET_CPU=\"${BINUTILS_ARCH}\" CFLAGS+= -DTARGET_CANONICAL=\"${TARGET_TUPLE}\" CFLAGS+= -DTARGET_ALIAS=\"${TARGET_TUPLE}\" Index: gnu/usr.bin/binutils/as/arm-freebsd/targ-cpu.h =================================================================== 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 6 Jul 2006 23:54:06 -0000 @@ -0,0 +1,3 @@ +/* $FreeBSD$ */ + +#include "tc-arm.h" Index: gnu/usr.bin/binutils/ld/Makefile.arm =================================================================== RCS file: /cognet/ncvs/src/gnu/usr.bin/binutils/ld/Makefile.arm,v retrieving revision 1.1 diff -u -p -r1.1 Makefile.arm --- gnu/usr.bin/binutils/ld/Makefile.arm 22 Jul 2006 14:36:15 -0000 1.1 +++ gnu/usr.bin/binutils/ld/Makefile.arm 26 Jul 2006 21:47:53 -0000 @@ -1,12 +1,17 @@ # $FreeBSD: src/gnu/usr.bin/binutils/ld/Makefile.arm,v 1.1 2006/07/22 14:36:15 obrien Exp $ -NATIVE_EMULATION= armelf_fbsd +.if defined(ARM_BIG_ENDIAN) +NATIVE_EMULATION= armelfb_fbsd +.else +NATIVE_EMULATION= armelf_fbsd +.endif SRCS+= e${NATIVE_EMULATION}.c CLEANFILES+= e${NATIVE_EMULATION}.c -e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \ +e${NATIVE_EMULATION}.c: ${.CURDIR}/${NATIVE_EMULATION}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ - ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} + ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} \ + ${.CURDIR}/${NATIVE_EMULATION}.sh Index: gnu/usr.bin/binutils/ld/armelf_fbsd.sh =================================================================== RCS file: gnu/usr.bin/binutils/ld/armelf_fbsd.sh diff -N gnu/usr.bin/binutils/ld/armelf_fbsd.sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/usr.bin/binutils/ld/armelf_fbsd.sh 26 Jul 2006 17:41:39 -0000 @@ -0,0 +1,7 @@ +. ${srcdir}/emulparams/armelf.sh +. ${srcdir}/emulparams/elf_fbsd.sh +MAXPAGESIZE=0x8000 +GENERATE_PIE_SCRIPT=yes + +unset STACK_ADDR +unset EMBEDDED Index: gnu/usr.bin/binutils/ld/armelfb_fbsd.sh =================================================================== RCS file: gnu/usr.bin/binutils/ld/armelfb_fbsd.sh diff -N gnu/usr.bin/binutils/ld/armelfb_fbsd.sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/usr.bin/binutils/ld/armelfb_fbsd.sh 27 Jul 2006 15:06:29 -0000 @@ -0,0 +1,12 @@ +#XXX: This should be used once those bits are merged back in the FSF repo. +#. ${srcdir}/emulparams/armelf_fbsd.sh +# +#OUTPUT_FORMAT="elf32-bigarm" +. ${srcdir}/emulparams/armelf.sh +. ${srcdir}/emulparams/elf_fbsd.sh +MAXPAGESIZE=0x8000 +GENERATE_PIE_SCRIPT=yes + +unset STACK_ADDR +unset EMBEDDED +OUTPUT_FORMAT="elf32-bigarm" Index: gnu/usr.bin/binutils/ld/genscripts.sh =================================================================== RCS file: /cognet/ncvs/src/gnu/usr.bin/binutils/ld/genscripts.sh,v retrieving revision 1.6 diff -u -p -r1.6 genscripts.sh --- gnu/usr.bin/binutils/ld/genscripts.sh 16 Jun 2004 07:09:37 -0000 1.6 +++ gnu/usr.bin/binutils/ld/genscripts.sh 26 Jul 2006 21:52:04 -0000 @@ -37,7 +37,12 @@ CUSTOMIZER_SCRIPT=$3 # FSF BU ver 2.15 which allows for a more generic emulparams processing. # To reduce the diff, I also include the ${EMULATION_NAME} parameter in uses # of 'CUSTOMIZER_SCRIPT'. + +# XXX: arm hack : until those file are merged back into the FSF repo, just +# use the version in this directory. +if !(test -f ${CUSTOMIZER_SCRIPT}"";) then CUSTOMIZER_SCRIPT="${srcdir}/emulparams/${EMULATION_NAME}.sh" +fi # Include the emulation-specific parameters: . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME} Index: gnu/usr.bin/binutils/libbfd/Makefile.arm =================================================================== RCS file: /cognet/ncvs/src/gnu/usr.bin/binutils/libbfd/Makefile.arm,v retrieving revision 1.2 diff -u -p -r1.2 Makefile.arm --- gnu/usr.bin/binutils/libbfd/Makefile.arm 22 Jul 2006 14:55:55 -0000 1.2 +++ gnu/usr.bin/binutils/libbfd/Makefile.arm 24 Jul 2006 20:55:48 -0000 @@ -1,14 +1,52 @@ # $FreeBSD: src/gnu/usr.bin/binutils/libbfd/Makefile.arm,v 1.2 2006/07/22 14:55:55 obrien Exp $ +.if defined(ARM_BIG_ENDIAN) +DEFAULT_VECTOR= bfd_elf32_bigarm_vec +ADDITIONAL_VECTOR= bfd_elf32_littlearm_vec +.else DEFAULT_VECTOR= bfd_elf32_littlearm_vec +ADDITIONAL_VECTOR= bfd_elf32_bigarm_vec +.endif -SRCS+= cpu-arm.c \ - elf32.c \ +SRCS+= \ + cpu-arm.c \ + elf32.c \ elf32-arm-fbsd.c \ - elf32-gen.c \ - elf32-target.h - elfarm-nabi.c \ - elflink.c + elf32-gen.c \ + elf32-target.h \ + elflink.c +VECS+= ${DEFAULT_VECTOR} \ + ${ADDITIONAL_VECTOR} -VECS= ${DEFAULT_VECTOR} \ - bfd_elf32_bigarm_vec +.if ${TARGET_ARCH} == "arm" +CFLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR} +.endif + +CLEANFILES+= elf32-arm-fbsd.c + +# +# XXX: We should really add the FreeBSD case in elf32_arm_nabi_grok_prstatus +# instead of defining our own elf32_fbsd_arm_grok_prstatus. +# +elf32-arm-fbsd.c: elfarm-nabi.c + cat ${.ALLSRC} | sed -e s/ELFOSABI_ARM/ELFOSABI_FREEBSD/g \ + -e "s/\(.*#define.*\)elf32_arm_nabi_grok_prstatus/\1elf32_fbsd_arm_grok_prstatus/" -e s/"#include.*elf32-arm.h.*//" >${.TARGET}; \ + echo '\ + static bfd_boolean elf32_fbsd_arm_grok_prstatus(bfd *abfd, Elf_Internal_Note *note) \ + { \ + size_t raw_size; \ + int offset; \ + if (note->descsz != 96) \ + return (FALSE); \ + offset = 28; \ + raw_size = 68; \ + if (elf_tdata(abfd)->core_signal == 0) \ + elf_tdata (abfd)->core_signal = ((int *)(note->descdata))[5]; \ + elf_tdata (abfd)->core_pid = ((int *)(note->descdata))[6]; \ + /* Make a ".reg/999" section. */ \ + return _bfd_elfcore_make_pseudosection (abfd, ".reg", \ + raw_size, note->descpos + offset); \ +}' >> ${.TARGET}; \ + echo '#include "elf32-arm.h"' >> ${.TARGET} + + Index: gnu/usr.bin/binutils/libiberty/Makefile =================================================================== RCS file: /cognet/ncvs/src/gnu/usr.bin/binutils/libiberty/Makefile,v retrieving revision 1.24 diff -u -p -r1.24 Makefile --- gnu/usr.bin/binutils/libiberty/Makefile 14 Feb 2005 12:10:13 -0000 1.24 +++ gnu/usr.bin/binutils/libiberty/Makefile 21 Jul 2006 11:10:34 -0000 @@ -18,4 +18,8 @@ WARNS?= 1 CFLAGS+= -DHAVE_CONFIG_H INTERNALLIB= +.if ${TARGET_ARCH} == "arm" && defined(ARM_BIG_ENDIAN) +CFLAGS+= -DARM_BIG_ENDIAN +.endif + .include Index: gnu/usr.bin/binutils/libiberty/config.h =================================================================== RCS file: /cognet/ncvs/src/gnu/usr.bin/binutils/libiberty/config.h,v retrieving revision 1.6 diff -u -p -r1.6 config.h --- gnu/usr.bin/binutils/libiberty/config.h 16 Jun 2004 07:09:41 -0000 1.6 +++ gnu/usr.bin/binutils/libiberty/config.h 21 Jul 2006 14:02:16 -0000 @@ -7,7 +7,7 @@ /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ -#ifdef __sparc64__ +#if defined(__sparc64__) || defined(__ARMEB__) #define BYTEORDER 4321 #else #define BYTEORDER 1234 @@ -325,7 +325,7 @@ /* Define if the host machine stores words of multi-word integers in big-endian order. */ -#ifdef __sparc64__ +#if defined(__sparc64__) || defined(__ARMEB__) #define HOST_WORDS_BIG_ENDIAN 1 #endif Index: gnu/usr.bin/cc/Makefile.inc =================================================================== RCS file: /cognet/ncvs/src/gnu/usr.bin/cc/Makefile.inc,v retrieving revision 1.63 diff -u -p -r1.63 Makefile.inc --- gnu/usr.bin/cc/Makefile.inc 4 Jun 2002 19:45:08 -0000 1.63 +++ gnu/usr.bin/cc/Makefile.inc 26 Jul 2006 21:44:41 -0000 @@ -11,7 +11,11 @@ GCCDIR= ${.CURDIR}/../../../../contrib/g .include "Makefile.tgt" # Machine description. +.if ${TARGET_ARCH} == "arm" +MD_FILE= ${.OBJDIR}/arm-diked.md +.else MD_FILE= ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md +.endif target= ${TARGET_ARCH}-undermydesk-freebsd CFLAGS+= -DIN_GCC -DHAVE_CONFIG_H @@ -47,3 +51,17 @@ LIBCC_INT= ${.CURDIR}/../cc_int/libcc_in .endif .endif # !__CC_MAKEFILE_INC__ +.if ${TARGET_ARCH} == "arm" +CLEANFILES+= arm-diked.md ${GCC_CPU}.md.orig fpa.md cirrus.md iwmmxt.md +.endif + +.if ${TARGET_ARCH} == "arm" +${.OBJDIR}/arm-diked.md: + cp ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md . +#XXX: Those are not patched but are included by arm.md + cp ${GCCDIR}/config/${GCC_CPU}/fpa.md . + cp ${GCCDIR}/config/${GCC_CPU}/cirrus.md . + cp ${GCCDIR}/config/${GCC_CPU}/iwmmxt.md . + patch ${GCC_CPU}.md ${.CURDIR}/../arm.md.diff + mv ${GCC_CPU}.md ${.TARGET} +.endif Index: gnu/usr.bin/cc/arm.md.diff =================================================================== RCS file: gnu/usr.bin/cc/arm.md.diff diff -N gnu/usr.bin/cc/arm.md.diff --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/usr.bin/cc/arm.md.diff 24 Jul 2006 21:44:46 -0000 @@ -0,0 +1,47 @@ +Index: arm.md +=================================================================== +RCS file: /cognet/ncvs/src/contrib/gcc/config/arm/arm.md,v +retrieving revision 1.1.1.7 +diff -u -p -r1.1.1.7 arm.md +--- arm.md 3 Jun 2005 03:28:42 -0000 1.1.1.7 ++++ arm.md 29 Aug 2005 12:39:39 -0000 +@@ -8836,12 +8836,12 @@ + ldm[2] = operands[4]; + } + if (GET_CODE (XEXP (operands[2], 0)) != REG) +- val1 = INTVAL (XEXP (XEXP (operands[2], 0), 1)); ++ val1 = INTVAL (XEXP (XEXP (operands[2], 0), 1)); + if (GET_CODE (XEXP (operands[3], 0)) != REG) +- val2 = INTVAL (XEXP (XEXP (operands[3], 0), 1)); ++ val2 = INTVAL (XEXP (XEXP (operands[3], 0), 1)); + arith[0] = operands[0]; + arith[3] = operands[1]; +- if (val1 < val2) ++ if (val1 <= val2) + { + arith[1] = ldm[1]; + arith[2] = ldm[2]; +@@ -8871,7 +8871,7 @@ + else + output_asm_insn (\"ldm%?ia\\t%0, {%1, %2}\", ldm); + } +- else ++ else if (val2) + { + ldm[0] = XEXP (operands[2], 0); + if (val1 < val2) +@@ -8879,6 +8879,14 @@ + else + output_asm_insn (\"ldm%?da\\t%0, {%1, %2}\", ldm); + } ++ else { ++ ldm[0] = operands[0]; ++ ldm[1] = XEXP(operands[2], 0); ++ output_asm_insn(\"ldr\\t%0, [%1]\", ldm); ++ ldm[0] = operands[4]; ++ ldm[1] = XEXP(operands[3], 0); ++ output_asm_insn(\"ldr\\t%0, [%1]\", ldm); ++ } + output_asm_insn (\"%I3%?\\t%0, %1, %2\", arith); + return \"\"; + }" Index: gnu/usr.bin/cc/cc_int/Makefile =================================================================== RCS file: /cognet/ncvs/src/gnu/usr.bin/cc/cc_int/Makefile,v retrieving revision 1.46 diff -u -p -r1.46 Makefile --- gnu/usr.bin/cc/cc_int/Makefile 14 Jan 2006 20:48:50 -0000 1.46 +++ gnu/usr.bin/cc/cc_int/Makefile 21 Jul 2006 00:30:44 -0000 @@ -80,6 +80,10 @@ insn-$F.c: ${.OBJDIR}/../cc_tools/gen$F CFLAGS+= -DHAVE_CONFIG_H CFLAGS+= -DTARGET_NAME=\"${target}\" -DIN_GCC +.if ${TARGET_ARCH} == "arm" && defined(ARM_BIG_ENDIAN) +CFLAGS += -DTARGET_ENDIAN_DEFAULT=ARM_FLAG_BIG_END +.endif + # c-pch.o needs extra defines. Replicate the rule here rather than # pollute compiler command line for all other files. c-pch.o: c-pch.c Index: gnu/usr.bin/cc/cc_tools/Makefile =================================================================== RCS file: /cognet/ncvs/src/gnu/usr.bin/cc/cc_tools/Makefile,v retrieving revision 1.82 diff -u -p -r1.82 Makefile --- gnu/usr.bin/cc/cc_tools/Makefile 17 Mar 2006 18:54:23 -0000 1.82 +++ gnu/usr.bin/cc/cc_tools/Makefile 27 Jul 2006 12:34:46 -0000 @@ -216,7 +216,9 @@ CLEANFILES+= fini .if ${TARGET_ARCH} == "amd64" TARGET_INC= i386/biarch64.h .endif +.if ${TARGET_ARCH} != "arm" TARGET_INC+= ${GCC_CPU}/${GCC_CPU}.h +.endif .if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64" TARGET_INC+= ${GCC_CPU}/unix.h TARGET_INC+= ${GCC_CPU}/att.h @@ -236,7 +238,19 @@ TARGET_INC+= ${GCC_CPU}/elf.h TARGET_INC+= ${GCC_CPU}/sysv4.h .endif .endif +.if ${TARGET_ARCH} == "arm" +TARGET_INC+= ${GCC_CPU}/elf.h +TARGET_INC+= ${GCC_CPU}/aout.h +TARGET_INC+= ${GCC_CPU}/${GCC_CPU}.h +. if defined(ARM_BIG_ENDIAN) +CFLAGS+= -DTARGET_ENDIAN_DEFAULT=ARM_FLAG_BIG_END +. endif +.endif +.if ${TARGET_ARCH} == "arm" +TARGET_INC+= freebsd-diked.h +.else TARGET_INC+= ${GCC_CPU}/freebsd.h +.endif .if ${TARGET_ARCH} == "amd64" TARGET_INC+= ${GCC_CPU}/x86-64.h TARGET_INC+= ${GCC_CPU}/freebsd64.h @@ -334,6 +348,10 @@ COMMONHDRS= bconfig.h config.h configarg gtyp-gen.h GENSRCS+= ${COMMONHDRS} +.if ${TARGET_ARCH} == "arm" +GENSRCS+= freebsd-diked.h +.endif + MFILE?= ${.CURDIR}/Makefile ${COMMONHDRS}: ${MFILE} @@ -389,7 +407,11 @@ specs.h: config.h: bconfig.h echo '#include ' > ${.TARGET} +.if ${TARGET_ARCH} == "arm" +tm.h: freebsd-diked.h +.else tm.h: +.endif echo '#ifndef GCC_TM_H' > ${.TARGET} echo '#define GCC_TM_H' >> ${.TARGET} .if defined(TARGET_CPU_DEFAULT) @@ -458,12 +480,23 @@ gtyp-gen.h: gcov-iov.h: echo "#define GCOV_VERSION ((gcov_unsigned_t)0x33303470)" >> ${.TARGET} +.if ${TARGET_ARCH} == "arm" +freebsd-diked.h: + cp ${GCCDIR}/config/arm/freebsd.h freebsd.h + patch freebsd.h ${GCCDIR}/../../gnu/usr.bin/cc/cc_tools/arm-freebsd.h.diff + mv freebsd.h ${.TARGET} +.endif + #----------------------------------------------------------------------- # General things. SRCS+= ${GENSRCS} CLEANFILES+= ${GENSRCS} +.if ${TARGET_ARCH} == "arm" +CLEANFILES+= freebsd.h.orig +.endif + all: ${SRCS} .include Index: gnu/usr.bin/cc/cc_tools/arm-freebsd.h.diff =================================================================== RCS file: gnu/usr.bin/cc/cc_tools/arm-freebsd.h.diff diff -N gnu/usr.bin/cc/cc_tools/arm-freebsd.h.diff --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/usr.bin/cc/cc_tools/arm-freebsd.h.diff 24 Jul 2006 21:33:40 -0000 @@ -0,0 +1,110 @@ +Index: freebsd.h +=================================================================== +RCS file: /cognet/ncvs/src/contrib/gcc/config/arm/freebsd.h,v +retrieving revision 1.1.1.3 +diff -u -p -r1.1.1.3 freebsd.h +--- freebsd.h 28 Jul 2004 03:11:35 -0000 1.1.1.3 ++++ freebsd.h 21 Jul 2006 00:50:25 -0000 +@@ -22,7 +22,10 @@ + + #undef SUBTARGET_EXTRA_SPECS + #define SUBTARGET_EXTRA_SPECS \ +- { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER } ++ { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER }, \ ++ { "subtarget_extra_asm_spec", SUBTARGET_EXTRA_ASM_SPEC }, \ ++ { "subtarget_asm_float_spec", SUBTARGET_ASM_FLOAT_SPEC } ++ + + #undef SUBTARGET_CPP_SPEC + #define SUBTARGET_CPP_SPEC FBSD_CPP_SPEC +@@ -39,7 +42,8 @@ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ + %{static:-Bstatic}} \ +- %{symbolic:-Bsymbolic}" ++ %{symbolic:-Bsymbolic} \ ++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" + + + /************************[ Target stuff ]***********************************/ +@@ -67,3 +71,80 @@ + + #undef TARGET_VERSION + #define TARGET_VERSION fprintf (stderr, " (FreeBSD/StrongARM ELF)"); ++ ++#ifndef TARGET_ENDIAN_DEFAULT ++#define TARGET_ENDIAN_DEFAULT 0 ++#endif ++ ++#undef TARGET_DEFAULT ++#define TARGET_DEFAULT \ ++ (ARM_FLAG_APCS_32 \ ++ | ARM_FLAG_SOFT_FLOAT \ ++ | ARM_FLAG_APCS_FRAME \ ++ | ARM_FLAG_ATPCS \ ++ | ARM_FLAG_VFP \ ++ | ARM_FLAG_MMU_TRAPS \ ++ | TARGET_ENDIAN_DEFAULT) ++ ++#undef TYPE_OPERAND_FMT ++#define TYPE_OPERAND_FMT "%%%s" ++ ++#undef SUBTARGET_EXTRA_ASM_SPEC ++#define SUBTARGET_EXTRA_ASM_SPEC \ ++ "-matpcs %{fpic|fpie:-k} %{fPIC|fPIE:-k}" ++ ++ /* Default floating point model is soft-VFP. ++ * FIXME: -mhard-float currently implies FPA. */ ++#undef SUBTARGET_ASM_FLOAT_SPEC ++#define SUBTARGET_ASM_FLOAT_SPEC \ ++ "%{mhard-float:-mfpu=fpa} \ ++ %{msoft-float:-mfpu=softvfp} \ ++ %{!mhard-float: \ ++ %{!msoft-float:-mfpu=softvfp}}" ++ ++ ++/* FreeBSD does its profiling differently to the Acorn compiler. We ++ don't need a word following the mcount call; and to skip it ++ requires either an assembly stub or use of fomit-frame-pointer when ++ compiling the profiling functions. Since we break Acorn CC ++ compatibility below a little more won't hurt. */ ++ ++#undef ARM_FUNCTION_PROFILER ++#define ARM_FUNCTION_PROFILER(STREAM,LABELNO) \ ++{ \ ++ asm_fprintf (STREAM, "\tmov\t%Rip, %Rlr\n"); \ ++ asm_fprintf (STREAM, "\tbl\t_mcount%s\n", \ ++ NEED_PLT_RELOC ? "(PLT)" : ""); \ ++} ++ ++/* Emit code to set up a trampoline and synchronize the caches. */ ++#undef INITIALIZE_TRAMPOLINE ++#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ ++do \ ++ { \ ++ emit_move_insn (gen_rtx (MEM, SImode, plus_constant ((TRAMP), 8)), \ ++ (CXT)); \ ++ emit_move_insn (gen_rtx (MEM, SImode, plus_constant ((TRAMP), 12)), \ ++ (FNADDR)); \ ++ emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \ ++ 0, VOIDmode, 2, TRAMP, Pmode, \ ++ plus_constant (TRAMP, TRAMPOLINE_SIZE), Pmode); \ ++ } \ ++while (0) ++ ++/* Clear the instruction cache from `BEG' to `END'. This makes a ++ call to the ARM_SYNC_ICACHE architecture specific syscall. */ ++#define CLEAR_INSN_CACHE(BEG, END) \ ++do \ ++ { \ ++ extern int sysarch(int number, void *args); \ ++ struct \ ++ { \ ++ unsigned int addr; \ ++ int len; \ ++ } s; \ ++ s.addr = (unsigned int)(BEG); \ ++ s.len = (END) - (BEG); \ ++ (void) sysarch (0, &s); \ ++ } \ ++while (0) Index: gnu/usr.bin/gdb/arch/arm/Makefile =================================================================== 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 26 Jul 2006 17:56:49 -0000 @@ -0,0 +1,17 @@ +# $FreeBSD$ + +GENSRCS+= xm.h +LIBSRCS+= armfbsd-nat.c +LIBSRCS+= arm-tdep.c armfbsd-tdep.c solib.c solib-svr4.c + +nm.h: +#XXX this should be arm/nm-fbsd.h but won't until it's merged into the gdb repo + echo '#include "nm-fbsd.h"' > ${.TARGET} + +tm.h: +#XXX this should be arm/tm-fbsd.h + echo '#include "tm-fbsd.h"' > ${.TARGET} + +xm.h: +#XXX this should be arm/xm-fbsd.h + echo '#include "xm-fbsd.h"' > ${.TARGET} Index: gnu/usr.bin/gdb/arch/arm/armfbsd-nat.c =================================================================== RCS file: gnu/usr.bin/gdb/arch/arm/armfbsd-nat.c diff -N gnu/usr.bin/gdb/arch/arm/armfbsd-nat.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/usr.bin/gdb/arch/arm/armfbsd-nat.c 19 Jul 2006 10:24:46 -0000 @@ -0,0 +1,516 @@ + /* Native-dependent code for BSD Unix running on ARM's, for GDB. + Copyright 1988, 1989, 1991, 1992, 1994, 1996, 1999, 2002 + 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" + +#ifndef FETCH_INFERIOR_REGISTERS +#ifndef CROSS_DEBUGGER +#error Not FETCH_INFERIOR_REGISTERS +#endif +#endif /* !FETCH_INFERIOR_REGISTERS */ + +#include "arm-tdep.h" + +#include +#include +#ifndef CROSS_DEBUGGER +#include +#include +#endif +#include "inferior.h" +#include "regcache.h" +#include "gdbcore.h" + +extern int arm_apcs_32; + +#ifdef CROSS_DEBUGGER +struct reg { + unsigned int r[13]; + unsigned int r_sp; + unsigned int r_lr; + unsigned int r_pc; + unsigned int r_cpsr; +}; + +typedef struct fp_extended_precision { + u_int32_t fp_exponent; + u_int32_t fp_mantissa_hi; + u_int32_t fp_mantissa_lo; +} fp_extended_precision_t; + +typedef struct fp_extended_precision fp_reg_t; + +struct fpreg { + unsigned int fpr_fpsr; + fp_reg_t fpr[8]; +}; +#endif + +void +supply_gregset (struct reg *gregset) +{ + int regno; + CORE_ADDR r_pc; + + /* Integer registers. */ + for (regno = ARM_A1_REGNUM; regno < ARM_SP_REGNUM; regno++) + supply_register (regno, (char *) &gregset->r[regno]); + + supply_register (ARM_SP_REGNUM, (char *) &gregset->r_sp); + supply_register (ARM_LR_REGNUM, (char *) &gregset->r_lr); + /* This is ok: we're running native... */ + r_pc = ADDR_BITS_REMOVE (gregset->r_pc); + supply_register (ARM_PC_REGNUM, (char *) &r_pc); + + if (arm_apcs_32) + supply_register (ARM_PS_REGNUM, (char *) &gregset->r_cpsr); + else + supply_register (ARM_PS_REGNUM, (char *) &gregset->r_pc); +} + +void +supply_fpregset (struct fpreg *fparegset) +{ + int regno; + + for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++) + supply_register + (regno, (char *) &fparegset->fpr[regno - ARM_F0_REGNUM]); + + supply_register (ARM_FPS_REGNUM, (char *) &fparegset->fpr_fpsr); +} + +static void +fetch_register (int regno) +{ + struct reg inferior_registers; +#ifndef CROSS_DEBUGGER + int ret; + + ret = ptrace (PT_GETREGS, PIDGET (inferior_ptid), + (PTRACE_ARG3_TYPE) &inferior_registers, 0); + + if (ret < 0) + { + warning ("unable to fetch general register"); + return; + } +#endif + + switch (regno) + { + case ARM_SP_REGNUM: + supply_register (ARM_SP_REGNUM, (char *) &inferior_registers.r_sp); + break; + + case ARM_LR_REGNUM: + supply_register (ARM_LR_REGNUM, (char *) &inferior_registers.r_lr); + break; + + case ARM_PC_REGNUM: + /* This is ok: we're running native... */ + inferior_registers.r_pc = ADDR_BITS_REMOVE (inferior_registers.r_pc); + supply_register (ARM_PC_REGNUM, (char *) &inferior_registers.r_pc); + break; + + case ARM_PS_REGNUM: + if (arm_apcs_32) + supply_register (ARM_PS_REGNUM, (char *) &inferior_registers.r_cpsr); + else + supply_register (ARM_PS_REGNUM, (char *) &inferior_registers.r_pc); + break; + + default: + supply_register (regno, (char *) &inferior_registers.r[regno]); + break; + } +} + +static void +fetch_regs (void) +{ + struct reg inferior_registers; +#ifndef CROSS_DEBUGGER + int ret; +#endif + int regno; + +#ifndef CROSS_DEBUGGER + ret = ptrace (PT_GETREGS, PIDGET (inferior_ptid), + (PTRACE_ARG3_TYPE) &inferior_registers, 0); + + if (ret < 0) + { + warning ("unable to fetch general registers"); + return; + } +#endif + + supply_gregset (&inferior_registers); +} + +static void +fetch_fp_register (int regno) +{ + struct fpreg inferior_fp_registers; +#ifndef CROSS_DEBUGGER + int ret; + + ret = ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), + (PTRACE_ARG3_TYPE) &inferior_fp_registers, 0); + + if (ret < 0) + { + warning ("unable to fetch floating-point register"); + return; + } +#endif + + switch (regno) + { + case ARM_FPS_REGNUM: + supply_register (ARM_FPS_REGNUM, + (char *) &inferior_fp_registers.fpr_fpsr); + break; + + default: + supply_register + (regno, (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]); + break; + } +} + +static void +fetch_fp_regs (void) +{ + struct fpreg inferior_fp_registers; +#ifndef CROSS_DEBUGGER + int ret; +#endif + int regno; + +#ifndef CROSS_DEBUGGER + ret = ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), + (PTRACE_ARG3_TYPE) &inferior_fp_registers, 0); + + if (ret < 0) + { + warning ("unable to fetch general registers"); + return; + } +#endif + + supply_fpregset (&inferior_fp_registers); +} + +void +fetch_inferior_registers (int regno) +{ + if (regno >= 0) + { + if (regno < ARM_F0_REGNUM || regno > ARM_FPS_REGNUM) + fetch_register (regno); + else + fetch_fp_register (regno); + } + else + { + fetch_regs (); + fetch_fp_regs (); + } +} + + +static void +store_register (int regno) +{ + struct reg inferior_registers; +#ifndef CROSS_DEBUGGER + int ret; + + ret = ptrace (PT_GETREGS, PIDGET (inferior_ptid), + (PTRACE_ARG3_TYPE) &inferior_registers, 0); + + if (ret < 0) + { + warning ("unable to fetch general registers"); + return; + } +#endif + + switch (regno) + { + case ARM_SP_REGNUM: + regcache_collect (ARM_SP_REGNUM, (char *) &inferior_registers.r_sp); + break; + + case ARM_LR_REGNUM: + regcache_collect (ARM_LR_REGNUM, (char *) &inferior_registers.r_lr); + break; + + case ARM_PC_REGNUM: + if (arm_apcs_32) + regcache_collect (ARM_PC_REGNUM, (char *) &inferior_registers.r_pc); + else + { + unsigned pc_val; + + regcache_collect (ARM_PC_REGNUM, (char *) &pc_val); + + pc_val = ADDR_BITS_REMOVE (pc_val); + inferior_registers.r_pc + ^= ADDR_BITS_REMOVE (inferior_registers.r_pc); + inferior_registers.r_pc |= pc_val; + } + break; + + case ARM_PS_REGNUM: + if (arm_apcs_32) + regcache_collect (ARM_PS_REGNUM, (char *) &inferior_registers.r_cpsr); + else + { + unsigned psr_val; + + regcache_collect (ARM_PS_REGNUM, (char *) &psr_val); + + psr_val ^= ADDR_BITS_REMOVE (psr_val); + inferior_registers.r_pc = ADDR_BITS_REMOVE (inferior_registers.r_pc); + inferior_registers.r_pc |= psr_val; + } + break; + + default: + regcache_collect (regno, (char *) &inferior_registers.r[regno]); + break; + } + +#ifndef CROSS_DEBUGGER + ret = ptrace (PT_SETREGS, PIDGET (inferior_ptid), + (PTRACE_ARG3_TYPE) &inferior_registers, 0); + + if (ret < 0) + warning ("unable to write register %d to inferior", regno); +#endif +} + +static void +store_regs (void) +{ + struct reg inferior_registers; + int ret; + int regno; + + + for (regno = ARM_A1_REGNUM; regno < ARM_SP_REGNUM; regno++) + regcache_collect (regno, (char *) &inferior_registers.r[regno]); + + regcache_collect (ARM_SP_REGNUM, (char *) &inferior_registers.r_sp); + regcache_collect (ARM_LR_REGNUM, (char *) &inferior_registers.r_lr); + + if (arm_apcs_32) + { + regcache_collect (ARM_PC_REGNUM, (char *) &inferior_registers.r_pc); + regcache_collect (ARM_PS_REGNUM, (char *) &inferior_registers.r_cpsr); + } + else + { + unsigned pc_val; + unsigned psr_val; + + regcache_collect (ARM_PC_REGNUM, (char *) &pc_val); + regcache_collect (ARM_PS_REGNUM, (char *) &psr_val); + + pc_val = ADDR_BITS_REMOVE (pc_val); + psr_val ^= ADDR_BITS_REMOVE (psr_val); + + inferior_registers.r_pc = pc_val | psr_val; + } + +#ifndef CROSS_DEBUGGER + ret = ptrace (PT_SETREGS, PIDGET (inferior_ptid), + (PTRACE_ARG3_TYPE) &inferior_registers, 0); + + if (ret < 0) + warning ("unable to store general registers"); +#endif +} + +static void +store_fp_register (int regno) +{ + struct fpreg inferior_fp_registers; +#ifndef CROSS_DEBUGGER + int ret; + + ret = ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), + (PTRACE_ARG3_TYPE) &inferior_fp_registers, 0); + + if (ret < 0) + { + warning ("unable to fetch floating-point registers"); + return; + } +#endif + + switch (regno) + { + case ARM_FPS_REGNUM: + regcache_collect (ARM_FPS_REGNUM, + (char *) &inferior_fp_registers.fpr_fpsr); + break; + + default: + regcache_collect + (regno, (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]); + break; + } + +#ifndef CROSS_DEBUGGER + ret = ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), + (PTRACE_ARG3_TYPE) &inferior_fp_registers, 0); + + if (ret < 0) + warning ("unable to write register %d to inferior", regno); +#endif +} + +static void +store_fp_regs (void) +{ + struct fpreg inferior_fp_registers; + int ret; + int regno; + + + for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++) + regcache_collect + (regno, (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]); + + regcache_collect (ARM_FPS_REGNUM, (char *) &inferior_fp_registers.fpr_fpsr); + +#ifndef CROSS_DEBUGGER + ret = ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), + (PTRACE_ARG3_TYPE) &inferior_fp_registers, 0); + + if (ret < 0) + warning ("unable to store floating-point registers"); +#endif +} + +void +store_inferior_registers (int regno) +{ + if (regno >= 0) + { + if (regno < ARM_F0_REGNUM || regno > ARM_FPS_REGNUM) + store_register (regno); + else + store_fp_register (regno); + } + else + { + store_regs (); + store_fp_regs (); + } +} + + +struct md_core +{ + struct reg intreg; + struct fpreg freg; +}; + +static void +fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, + int which, CORE_ADDR ignore) +{ + struct md_core *core_reg = (struct md_core *) core_reg_sect; + int regno; + CORE_ADDR r_pc; + + supply_gregset (&core_reg->intreg); + supply_fpregset (&core_reg->freg); +} + +static void +fetch_elfcore_registers (char *core_reg_sect, unsigned core_reg_size, + int which, CORE_ADDR ignore) +{ + struct reg gregset; + struct fpreg fparegset; + + switch (which) + { + case 0: /* Integer registers. */ + if (core_reg_size != sizeof (struct reg)) + warning ("wrong size of register set in core file"); + else + { + /* The memcpy may be unnecessary, but we can't really be sure + of the alignment of the data in the core file. */ + memcpy (&gregset, core_reg_sect, sizeof (gregset)); + supply_gregset (&gregset); + } + break; + + case 2: + if (core_reg_size != sizeof (struct fpreg)) + warning ("wrong size of FPA register set in core file"); + else + { + /* The memcpy may be unnecessary, but we can't really be sure + of the alignment of the data in the core file. */ + memcpy (&fparegset, core_reg_sect, sizeof (fparegset)); + supply_fpregset (&fparegset); + } + break; + + default: + /* Don't know what kind of register request this is; just ignore it. */ + break; + } +} + +static struct core_fns arm_freebsd_core_fns = +{ + bfd_target_unknown_flavour, /* core_flovour. */ + default_check_format, /* check_format. */ + default_core_sniffer, /* core_sniffer. */ + fetch_core_registers, /* core_read_registers. */ + NULL +}; + +static struct core_fns arm_freebsd_elfcore_fns = +{ + bfd_target_elf_flavour, /* core_flovour. */ + default_check_format, /* check_format. */ + default_core_sniffer, /* core_sniffer. */ + fetch_elfcore_registers, /* core_read_registers. */ + NULL +}; + +void +_initialize_arm_fbsdnat (void) +{ + add_core_fns (&arm_freebsd_core_fns); + add_core_fns (&arm_freebsd_elfcore_fns); +} Index: gnu/usr.bin/gdb/arch/arm/armfbsd-tdep.c =================================================================== RCS file: gnu/usr.bin/gdb/arch/arm/armfbsd-tdep.c diff -N gnu/usr.bin/gdb/arch/arm/armfbsd-tdep.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/usr.bin/gdb/arch/arm/armfbsd-tdep.c 29 Aug 2005 12:39:39 -0000 @@ -0,0 +1,67 @@ +/* Target-specific functions for ARM running under NetBSD. + Copyright 2002, 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 "osabi.h" + +#include "arch-utils.h" +#include "arm-tdep.h" +#include "solib-svr4.h" + +/* Description of the longjmp buffer. */ +#define ARM_FBSD_JB_PC 24 +#define ARM_FBSD_JB_ELEMENT_SIZE INT_REGISTER_SIZE + +static void +arm_freebsd_init_abi_common (struct gdbarch_info info, + struct gdbarch *gdbarch) +{ + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + + tdep->lowest_pc = 0x8000; + + tdep->jb_pc = ARM_FBSD_JB_PC; + tdep->jb_elt_size = ARM_FBSD_JB_ELEMENT_SIZE; +} + +static void +arm_freebsd_elf_init_abi (struct gdbarch_info info, + struct gdbarch *gdbarch) +{ + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + + arm_freebsd_init_abi_common (info, gdbarch); + + /* FreeBSD ELF uses SVR4-style shared libraries. */ + set_gdbarch_in_solib_call_trampoline + (gdbarch, generic_in_solib_call_trampoline); + set_solib_svr4_fetch_link_map_offsets + (gdbarch, svr4_ilp32_fetch_link_map_offsets); + + tdep->fp_model = ARM_FLOAT_SOFT_VFP; +} + + +void +_initialize_armfbsd_tdep (void) +{ + gdbarch_register_osabi (bfd_arch_arm, 0, GDB_OSABI_FREEBSD_ELF, + arm_freebsd_elf_init_abi); +} Index: gnu/usr.bin/gdb/arch/arm/config.h =================================================================== 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 26 Jul 2006 17:54:58 -0000 @@ -0,0 +1,565 @@ +/* $FreeBSD$ */ + +/* config.h. Generated automatically by configure. */ +/* config.in. Generated automatically from configure.in by autoheader. */ + +/* Define if on AIX 3. + System headers sometimes define this. + We just want to avoid a redefinition error message. */ +#ifndef _ALL_SOURCE +/* #undef _ALL_SOURCE */ +#endif + +/* Define if using alloca.c. */ +/* #undef C_ALLOCA */ + +/* Define to empty if the keyword does not work. */ +/* #undef const */ + +/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. + This function is required for alloca.c support on those systems. */ +/* #undef CRAY_STACKSEG_END */ + +/* Define if you have alloca, as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define if you have and it should be used (not on Ultrix). */ +/* #undef HAVE_ALLOCA_H */ + +/* Define if the `long double' type works. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define if you have . */ +/* #undef HAVE_VFORK_H */ + +/* Define as __inline if that's what the C compiler calls it. */ +/* #undef inline */ + +/* Define to `long' if doesn't define. */ +/* #undef off_t */ + +/* Define to `int' if doesn't define. */ +/* #undef pid_t */ + +/* Define if you need to in order for stat and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define as the return type of signal handlers (int or void). */ +#define RETSIGTYPE void + +/* Define if the `setpgrp' function takes no argument. */ +/* #undef SETPGRP_VOID */ + +/* Define to `unsigned' if doesn't define. */ +/* #undef size_t */ + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown + */ +/* #undef STACK_DIRECTION */ + +/* Define if the `S_IS*' macros in do not work properly. */ +/* #undef STAT_MACROS_BROKEN */ + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define vfork as fork if vfork does not work. */ +/* #undef vfork */ + +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + +/* Define if your struct reg has r_fs. */ +/* #define HAVE_STRUCT_REG_R_FS 1 */ + +/* Define if your struct stat has st_blocks. */ +#define HAVE_STRUCT_STAT_ST_BLOCKS 1 + +/* Define if your struct reg has r_gs. */ +/* #define HAVE_STRUCT_REG_R_GS 1 */ + +/* Define if exists and defines struct link_map which has + members with an ``l_'' prefix. (For Solaris, SVR4, and + SVR4-like systems.) */ +#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 + +/* Define if exists and defines struct link_map which has + members with an ``lm_'' prefix. (For SunOS.) */ +/* #undef HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS */ + +/* Define if exists and defines a struct so_map which has + members with an ``som_'' prefix. (Found on older *BSD systems.) */ +/* #undef HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS */ + +/* Define if has struct link_map32 */ +/* #undef HAVE_STRUCT_LINK_MAP32 */ + +/* Define if has link_map32 (solaris sparc-64 target) */ +/* #undef _SYSCALL32 */ + +/* Define if the prfpregset_t type is broken. */ +/* #undef PRFPREGSET_T_BROKEN */ + +/* Define if you want to use new multi-fd /proc interface + (replaces HAVE_MULTIPLE_PROC_FDS as well as other macros). */ +/* #undef NEW_PROC_API */ + +/* Define if ioctl argument PIOCSET is available. */ +/* #undef HAVE_PROCFS_PIOCSET */ + +/* Define if the `long long' type works. */ +#define CC_HAS_LONG_LONG 1 + +/* Define if the "ll" format works to print long long ints. */ +#define PRINTF_HAS_LONG_LONG 1 + +/* Define if the "%Lg" format works to print long doubles. */ +#define PRINTF_HAS_LONG_DOUBLE 1 + +/* Define if the "%Lg" format works to scan long doubles. */ +#define SCANF_HAS_LONG_DOUBLE 1 + +/* Define if using Solaris thread debugging. */ +/* #undef HAVE_THREAD_DB_LIB */ + +/* Define on a GNU/Linux system to work around problems in sys/procfs.h. */ +/* #undef START_INFERIOR_TRAPS_EXPECTED */ +/* #undef sys_quotactl */ + +/* Define if you have HPUX threads */ +/* #undef HAVE_HPUX_THREAD_SUPPORT */ + +/* Define if on solaris uses int instead of + size_t, and assorted other type changes. */ +/* #undef PROC_SERVICE_IS_OLD */ + +/* Define if the simulator is being linked in. */ +#define WITH_SIM 1 + +/* Set to true if the save_state_t structure is present */ +/* #undef HAVE_STRUCT_SAVE_STATE_T */ + +/* Set to true if the save_state_t structure has the ss_wide member */ +/* #undef HAVE_STRUCT_MEMBER_SS_WIDE */ + +/* Define if defines the PTRACE_GETREGS request. */ +/* #undef HAVE_PTRACE_GETREGS */ + +/* Define if defines the PTRACE_GETFPXREGS request. */ +/* #undef HAVE_PTRACE_GETFPXREGS */ + +/* Define if defines the PT_GETDBREGS request. */ +#define HAVE_PT_GETDBREGS 1 + +/* Define if defines the PT_GETXMMREGS request. */ +/* #undef HAVE_PT_GETXMMREGS */ + +/* Define if libunwind library is being used. */ +/* #undef HAVE_LIBUNWIND */ + +/* hostfile */ +#if 0 +#define GDB_XM_FILE config/arm/xm-fbsd.h +#else +#define GDB_XM_FILE xm-fbsd.h +#endif + +/* targetfile */ +#if 0 +#define GDB_TM_FILE config/arm/tm-fbsd.h +#else +#define GDB_TM_FILE tm-fbsd.h +#endif + +/* nativefile */ +#ifndef CROSS_DEBUGGER +#if 0 +#define GDB_NM_FILE config/arm/nm-fbsd.h +#else +#define GDB_NM_FILE nm-fbsd.h +#endif +#endif + +/* Define to 1 so gets a definition of anon_hdl. Works + around a problem on IRIX 5. */ +#ifndef _KMEMUSER +/* #undef _KMEMUSER */ +#endif + +/* Define if you have the __argz_count function. */ +/* #undef HAVE___ARGZ_COUNT */ + +/* Define if you have the __argz_next function. */ +/* #undef HAVE___ARGZ_NEXT */ + +/* Define if you have the __argz_stringify function. */ +/* #undef HAVE___ARGZ_STRINGIFY */ + +/* Define if you have the _mcleanup function. */ +#define HAVE__MCLEANUP 1 + +/* Define if you have the canonicalize_file_name function. */ +/* #undef HAVE_CANONICALIZE_FILE_NAME */ + +/* Define if you have the dcgettext function. */ +/* #undef HAVE_DCGETTEXT */ + +/* Define if you have the getcwd function. */ +#define HAVE_GETCWD 1 + +/* Define if you have the getpagesize function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define if you have the monstartup function. */ +#define HAVE_MONSTARTUP 1 + +/* Define if you have the munmap function. */ +#define HAVE_MUNMAP 1 + +/* Define if you have the poll function. */ +#define HAVE_POLL 1 + +/* Define if you have the pread64 function. */ +/* #undef HAVE_PREAD64 */ + +/* Define if you have the putenv function. */ +#define HAVE_PUTENV 1 + +/* Define if you have the realpath function. */ +#define HAVE_REALPATH 1 + +/* Define if you have the sbrk function. */ +#define HAVE_SBRK 1 + +/* Define if you have the setenv function. */ +#define HAVE_SETENV 1 + +/* Define if you have the setlocale function. */ +#define HAVE_SETLOCALE 1 + +/* Define if you have the setpgid function. */ +#define HAVE_SETPGID 1 + +/* Define if you have the setpgrp function. */ +#define HAVE_SETPGRP 1 + +/* Define if you have the sigaction function. */ +#define HAVE_SIGACTION 1 + +/* Define if you have the sigprocmask function. */ +#define HAVE_SIGPROCMASK 1 + +/* Define if you have the sigsetmask function. */ +#define HAVE_SIGSETMASK 1 + +/* Define if you have the socketpair function. */ +#define HAVE_SOCKETPAIR 1 + +/* Define if you have the stpcpy function. */ +#define HAVE_STPCPY 1 + +/* Define if you have the strcasecmp function. */ +#define HAVE_STRCASECMP 1 + +/* Define if you have the strchr function. */ +#define HAVE_STRCHR 1 + +/* Define if you have the syscall function. */ +#define HAVE_SYSCALL 1 + +/* Define if you have the header file. */ +/* #undef HAVE_ARGZ_H */ + +/* Define if you have the header file. */ +#define HAVE_CTYPE_H 1 + +/* Define if you have the header file. */ +#define HAVE_CURSES_H 1 + +/* Define if you have the header file. */ +#define HAVE_DIRENT_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_LIBUNWIND_IA64_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_LIBUNWIND_H */ + +/* Define if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if you have the header file. */ +#define HAVE_LINK_H 1 + +/* Define if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define if you have the header file. */ +#define HAVE_MACHINE_REG_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_MALLOC_H */ + +/* Define if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define if you have the header file. */ +#define HAVE_NCURSES_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_NDIR_H */ + +/* Define if you have the header file. */ +#define HAVE_NL_TYPES_H 1 + +/* Define if you have the header file. */ +#define HAVE_NLIST_H 1 + +/* Define if you have the header file. */ +#define HAVE_POLL_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_PROC_SERVICE_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_PTRACE_H */ + +/* Define if you have the header file. */ +#define HAVE_SGTTY_H 1 + +/* Define if you have the header file. */ +#define HAVE_STDDEF_H 1 + +/* Define if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_DEBUGREG_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_FAULT_H */ + +/* Define if you have the header file. */ +#define HAVE_SYS_FILE_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_FILIO_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_POLL_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_PROC_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_PROCFS_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_PTRACE_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_REG_H */ + +/* Define if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_SYSCALL_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_USER_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define if you have the header file. */ +#define HAVE_TERM_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_TERMIO_H */ + +/* Define if you have the header file. */ +#define HAVE_TERMIOS_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_THREAD_DB_H */ + +/* Define if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_VALUES_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_WAIT_H */ + +/* Define if you have the dl library (-ldl). */ +/* #undef HAVE_LIBDL */ + +/* Define if you have the m library (-lm). */ +#define HAVE_LIBM 1 + +/* Define if you have the w library (-lw). */ +/* #undef HAVE_LIBW */ + +/* Define if you have the stpcpy function */ +#define HAVE_STPCPY 1 + +/* Define if your locale.h file contains LC_MESSAGES. */ +#define HAVE_LC_MESSAGES 1 + +/* Define to 1 if NLS is requested */ +/* #undef ENABLE_NLS */ + +/* Define as 1 if you have gettext and don't want to use GNU gettext. */ +/* #undef HAVE_GETTEXT */ + +/* Name of this package. */ +#define PACKAGE "gdb" + +/* Global directory for separate debug files. */ +#define DEBUGDIR "/usr/local/lib/debug" + +/* Define to BFD's default architecture. */ +#define DEFAULT_BFD_ARCH bfd_arm_arch + +/* Define to BFD's default target vector. */ +#define DEFAULT_BFD_VEC bfd_elf32_littlearm_vec + +/* Define to 1 if your system has the _etext variable. */ +#define HAVE__ETEXT 1 + +/* Define to 1 to avoid a clash between and on + Solaris 2.[78] when using GCC. */ +/* #undef _MSE_INT_H */ + +/* Define to 1 if we found this declaration otherwise define to 0. */ +#define HAVE_DECL_GETOPT 0 + +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + +/* Define to 1 if the regex included in libiberty should be used. */ +#define USE_INCLUDED_REGEX 1 + +/* Define to 1 if your system has struct reg in . */ +#define HAVE_STRUCT_REG 1 + +/* Define if provides the uintptr_t type. */ +#define HAVE_UINTPTR_T 1 + +/* Define if malloc is not declared in system header files. */ +/* #undef NEED_DECLARATION_MALLOC */ + +/* Define if realloc is not declared in system header files. */ +/* #undef NEED_DECLARATION_REALLOC */ + +/* Define if free is not declared in system header files. */ +/* #undef NEED_DECLARATION_FREE */ + +/* Define if strerror is not declared in system header files. */ +/* #undef NEED_DECLARATION_STRERROR */ + +/* Define if strdup is not declared in system header files. */ +/* #undef NEED_DECLARATION_STRDUP */ + +/* Define if strstr is not declared in system header files. */ +/* #undef NEED_DECLARATION_STRSTR */ + +/* Define if canonicalize_file_name is not declared in system header files. */ +#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 + +/* Define if has pstatus_t. */ +/* #undef HAVE_PSTATUS_T */ + +/* Define if has prrun_t. */ +/* #undef HAVE_PRRUN_T */ + +/* Define if has gregset_t. */ +#define HAVE_GREGSET_T 1 + +/* Define if has fpregset_t. */ +#define HAVE_FPREGSET_T 1 + +/* Define if has prgregset_t. */ +#define HAVE_PRGREGSET_T 1 + +/* Define if has prfpregset_t. */ +#define HAVE_PRFPREGSET_T 1 + +/* Define if has prgregset32_t. */ +/* #undef HAVE_PRGREGSET32_T */ + +/* Define if has prfpregset32_t. */ +/* #undef HAVE_PRFPREGSET32_T */ + +/* Define if has lwpid_t. */ +#define HAVE_LWPID_T 1 + +/* Define if has psaddr_t. */ +#define HAVE_PSADDR_T 1 + +/* Define if has prsysent_t. */ +/* #undef HAVE_PRSYSENT_T */ + +/* Define if has pr_sigset_t. */ +/* #undef HAVE_PR_SIGSET_T */ + +/* Define if has pr_sigaction64_t. */ +/* #undef HAVE_PR_SIGACTION64_T */ + +/* Define if has pr_siginfo64_t. */ +/* #undef HAVE_PR_SIGINFO64_T */ + +/* Define if has the TD_NOTALLOC error code. */ +/* #undef THREAD_DB_HAS_TD_NOTALLOC */ + +/* Define if we can use the tkill syscall. */ +/* #undef HAVE_TKILL_SYSCALL */ + +/* Define to the default OS ABI for this configuration. */ +/* #undef GDB_OSABI_DEFAULT */ + +/* Define to be a string naming the default host character set. */ +#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" + +/* Define if you have the iconv() function. */ +/* #undef HAVE_ICONV */ + +/* Define as const if the declaration of iconv() needs const. */ +/* #undef ICONV_CONST */ + Index: gnu/usr.bin/gdb/arch/arm/init.c =================================================================== 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 7 Jul 2006 00:02:16 -0000 @@ -0,0 +1,226 @@ +/* $FreeBSD$ */ + +/* Do not modify this file. */ +/* It is created automatically by the Makefile. */ +#include "defs.h" /* For initialize_file_ftype. */ +#include "call-cmds.h" /* For initialize_all_files. */ +extern initialize_file_ftype _initialize_gdbtypes; +extern initialize_file_ftype _initialize_arm_tdep; +extern initialize_file_ftype _initialize_armfbsd_tdep; +extern initialize_file_ftype _initialize_corelow; +extern initialize_file_ftype _initialize_solib; +extern initialize_file_ftype _initialize_svr4_solib; +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; +#endif +extern initialize_file_ftype _initialize_arm_fbsdnat; +extern initialize_file_ftype _initialize_remote; +extern initialize_file_ftype _initialize_dcache; +extern initialize_file_ftype _initialize_sr_support; +extern initialize_file_ftype _initialize_tracepoint; +extern initialize_file_ftype _initialize_ax_gdb; +extern initialize_file_ftype _initialize_annotate; +extern initialize_file_ftype _initialize_auxv; +extern initialize_file_ftype _initialize_breakpoint; +extern initialize_file_ftype _initialize_regcache; +extern initialize_file_ftype _initialize_charset; +extern initialize_file_ftype _initialize_dummy_frame; +extern initialize_file_ftype _initialize_source; +extern initialize_file_ftype _initialize_values; +extern initialize_file_ftype _initialize_valops; +extern initialize_file_ftype _initialize_valarith; +extern initialize_file_ftype _initialize_valprint; +extern initialize_file_ftype _initialize_printcmd; +extern initialize_file_ftype _initialize_symtab; +extern initialize_file_ftype _initialize_symfile; +extern initialize_file_ftype _initialize_symmisc; +extern initialize_file_ftype _initialize_infcall; +extern initialize_file_ftype _initialize_infcmd; +extern initialize_file_ftype _initialize_infrun; +extern initialize_file_ftype _initialize_stack; +extern initialize_file_ftype _initialize_thread; +extern initialize_file_ftype _initialize_interpreter; +extern initialize_file_ftype _initialize_macrocmd; +extern initialize_file_ftype _initialize_gdbarch; +extern initialize_file_ftype _initialize_gdbarch_utils; +extern initialize_file_ftype _initialize_gdb_osabi; +extern initialize_file_ftype _initialize_copying; +extern initialize_file_ftype _initialize_mem; +extern initialize_file_ftype _initialize_parse; +extern initialize_file_ftype _initialize_language; +extern initialize_file_ftype _initialize_frame_reg; +extern initialize_file_ftype _initialize_signals; +extern initialize_file_ftype _initialize_kod; +extern initialize_file_ftype _initialize_gdb_events; +extern initialize_file_ftype _initialize_exec; +extern initialize_file_ftype _initialize_maint_cmds; +extern initialize_file_ftype _initialize_demangler; +extern initialize_file_ftype _initialize_dbxread; +extern initialize_file_ftype _initialize_coffread; +extern initialize_file_ftype _initialize_elfread; +extern initialize_file_ftype _initialize_mipsread; +extern initialize_file_ftype _initialize_stabsread; +extern initialize_file_ftype _initialize_core; +extern initialize_file_ftype _initialize_dwarf2_frame; +extern initialize_file_ftype _initialize_c_language; +extern initialize_file_ftype _initialize_f_language; +extern initialize_file_ftype _initialize_objc_language; +extern initialize_file_ftype _initialize_ui_out; +extern initialize_file_ftype _initialize_cli_out; +extern initialize_file_ftype _initialize_varobj; +extern initialize_file_ftype _initialize_java_language; +extern initialize_file_ftype _initialize_m2_language; +extern initialize_file_ftype _initialize_pascal_language; +extern initialize_file_ftype _initialize_pascal_valprint; +extern initialize_file_ftype _initialize_scheme_language; +extern initialize_file_ftype _initialize_complaints; +extern initialize_file_ftype _initialize_typeprint; +extern initialize_file_ftype _initialize_cp_valprint; +extern initialize_file_ftype _initialize_f_valprint; +extern initialize_file_ftype _initialize_nlmread; +extern initialize_file_ftype _initialize_serial; +extern initialize_file_ftype _initialize_mdebugread; +extern initialize_file_ftype _initialize_user_regs; +extern initialize_file_ftype _initialize_frame; +extern initialize_file_ftype _initialize_frame_unwind; +extern initialize_file_ftype _initialize_frame_base; +extern initialize_file_ftype _initialize_gnu_v2_abi; +extern initialize_file_ftype _initialize_gnu_v3_abi; +extern initialize_file_ftype _initialize_hpacc_abi; +extern initialize_file_ftype _initialize_cp_abi; +extern initialize_file_ftype _initialize_cp_support; +extern initialize_file_ftype _initialize_cp_namespace; +extern initialize_file_ftype _initialize_reggroup; +extern initialize_file_ftype _initialize_inflow; +extern initialize_file_ftype _initialize_cli_dump; +extern initialize_file_ftype _initialize_cli_logging; +extern initialize_file_ftype _initialize_cli_interp; +extern initialize_file_ftype _initialize_mi_out; +extern initialize_file_ftype _initialize_mi_cmds; +extern initialize_file_ftype _initialize_mi_cmd_env; +extern initialize_file_ftype _initialize_mi_interp; +extern initialize_file_ftype _initialize_mi_main; +extern initialize_file_ftype _initialize_tui_hooks; +extern initialize_file_ftype _initialize_tui_interp; +extern initialize_file_ftype _initialize_tui_layout; +extern initialize_file_ftype _initialize_tui_out; +extern initialize_file_ftype _initialize_tui_regs; +extern initialize_file_ftype _initialize_tui_stack; +extern initialize_file_ftype _initialize_tui_win; +void +initialize_all_files (void) +{ + _initialize_gdbtypes (); + _initialize_arm_tdep (); + _initialize_armfbsd_tdep (); + _initialize_corelow (); + _initialize_solib (); + _initialize_svr4_solib (); + _initialize_ser_hardwire (); + _initialize_ser_pipe (); + _initialize_ser_tcp (); +#ifndef CROSS_DEBUGGER + _initialize_kernel_u_addr (); + _initialize_infptrace (); + _initialize_inftarg (); +#endif + _initialize_arm_fbsdnat (); + _initialize_remote (); + _initialize_dcache (); + _initialize_sr_support (); + _initialize_tracepoint (); + _initialize_ax_gdb (); + _initialize_annotate (); + _initialize_auxv (); + _initialize_breakpoint (); + _initialize_regcache (); + _initialize_charset (); + _initialize_dummy_frame (); + _initialize_source (); + _initialize_values (); + _initialize_valops (); + _initialize_valarith (); + _initialize_valprint (); + _initialize_printcmd (); + _initialize_symtab (); + _initialize_symfile (); + _initialize_symmisc (); + _initialize_infcall (); + _initialize_infcmd (); + _initialize_infrun (); + _initialize_stack (); + _initialize_thread (); + _initialize_interpreter (); + _initialize_macrocmd (); + _initialize_gdbarch (); + _initialize_gdbarch_utils (); + _initialize_gdb_osabi (); + _initialize_copying (); + _initialize_mem (); + _initialize_parse (); + _initialize_language (); + _initialize_frame_reg (); + _initialize_signals (); + _initialize_kod (); + _initialize_gdb_events (); + _initialize_exec (); + _initialize_maint_cmds (); + _initialize_demangler (); + _initialize_dbxread (); + _initialize_coffread (); + _initialize_elfread (); + _initialize_mipsread (); + _initialize_stabsread (); + _initialize_core (); + _initialize_dwarf2_frame (); + _initialize_c_language (); + _initialize_f_language (); + _initialize_objc_language (); + _initialize_ui_out (); + _initialize_cli_out (); + _initialize_varobj (); + _initialize_java_language (); + _initialize_m2_language (); + _initialize_pascal_language (); + _initialize_pascal_valprint (); + _initialize_scheme_language (); + _initialize_complaints (); + _initialize_typeprint (); + _initialize_cp_valprint (); + _initialize_f_valprint (); + _initialize_nlmread (); + _initialize_serial (); + _initialize_mdebugread (); + _initialize_user_regs (); + _initialize_frame (); + _initialize_frame_unwind (); + _initialize_frame_base (); + _initialize_gnu_v2_abi (); + _initialize_gnu_v3_abi (); + _initialize_hpacc_abi (); + _initialize_cp_abi (); + _initialize_cp_support (); + _initialize_cp_namespace (); + _initialize_reggroup (); + _initialize_inflow (); + _initialize_cli_dump (); + _initialize_cli_logging (); + _initialize_cli_interp (); + _initialize_mi_out (); + _initialize_mi_cmds (); + _initialize_mi_cmd_env (); + _initialize_mi_interp (); + _initialize_mi_main (); + _initialize_tui_hooks (); + _initialize_tui_interp (); + _initialize_tui_layout (); + _initialize_tui_out (); + _initialize_tui_regs (); + _initialize_tui_stack (); + _initialize_tui_win (); +} Index: gnu/usr.bin/gdb/arch/arm/nm-fbsd.h =================================================================== RCS file: gnu/usr.bin/gdb/arch/arm/nm-fbsd.h diff -N gnu/usr.bin/gdb/arch/arm/nm-fbsd.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/usr.bin/gdb/arch/arm/nm-fbsd.h 29 Aug 2005 12:39:39 -0000 @@ -0,0 +1,30 @@ +/* Native-dependent definitions for ARM running NetBSD, for GDB. + Copyright 1986, 1987, 1989, 1992, 1994, 1999 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_FBSD_H +#define NM_FBSD_H + +/* Type of the third argument to the `ptrace' system call. */ +#define PTRACE_ARG3_TYPE caddr_t + +/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */ +#define FETCH_INFERIOR_REGISTERS + +#endif /* NM_NBSD_H */ Index: gnu/usr.bin/gdb/arch/arm/tm-fbsd.h =================================================================== RCS file: gnu/usr.bin/gdb/arch/arm/tm-fbsd.h diff -N gnu/usr.bin/gdb/arch/arm/tm-fbsd.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/usr.bin/gdb/arch/arm/tm-fbsd.h 29 Aug 2005 12:39:39 -0000 @@ -0,0 +1,26 @@ +/* Macro definitions for ARM running under NetBSD. + 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. */ + +#ifndef TM_FBSD_H +#define TM_FBSD_H + +#include "solib.h" + +#endif /* TM_FBSD_H */ Index: gnu/usr.bin/gdb/arch/arm/xm-fbsd.h =================================================================== RCS file: gnu/usr.bin/gdb/arch/arm/xm-fbsd.h diff -N gnu/usr.bin/gdb/arch/arm/xm-fbsd.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/usr.bin/gdb/arch/arm/xm-fbsd.h 29 Aug 2005 12:39:39 -0000 @@ -0,0 +1,20 @@ +/* Parameters for execution on an ARM running NetBSD, for GDB. + Copyright 1994 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. */ + Index: gnu/usr.bin/gdb/kgdb/trgt_arm.c =================================================================== RCS file: /cognet/ncvs/src/gnu/usr.bin/gdb/kgdb/trgt_arm.c,v retrieving revision 1.1 diff -u -p -r1.1 trgt_arm.c --- gnu/usr.bin/gdb/kgdb/trgt_arm.c 22 Jul 2006 15:27:18 -0000 1.1 +++ gnu/usr.bin/gdb/kgdb/trgt_arm.c 24 Jul 2006 21:02:11 -0000 @@ -28,8 +28,11 @@ __FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/trgt_arm.c,v 1.1 2006/07/22 15:27:18 obrien Exp $"); #include +#ifndef CROSS_DEBUGGER #include #include +#include +#endif #include #include #include @@ -47,6 +50,7 @@ __FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/ void kgdb_trgt_fetch_registers(int regno __unused) { +#ifndef CROSS_DEBUGGER struct kthr *kt; struct pcb pcb; int i, reg; @@ -76,6 +80,7 @@ kgdb_trgt_fetch_registers(int regno __un else supply_register(ARM_PC_REGNUM, (char *)®); } +#endif } void @@ -84,6 +89,7 @@ kgdb_trgt_store_registers(int regno __un fprintf_unfiltered(gdb_stderr, "XXX: %s\n", __func__); } +#ifndef CROSS_DEBUGGER struct kgdb_frame_cache { CORE_ADDR fp; CORE_ADDR sp; @@ -130,6 +136,8 @@ kgdb_trgt_frame_cache(struct frame_info return (cache); } +static int is_undef; + static void kgdb_trgt_trapframe_this_id(struct frame_info *next_frame, void **this_cache, struct frame_id *this_id) @@ -148,6 +156,7 @@ kgdb_trgt_trapframe_prev_register(struct char dummy_valuep[MAX_REGISTER_SIZE]; struct kgdb_frame_cache *cache; int ofs, regsz; + int is_undefined = 0; regsz = register_size(current_gdbarch, regnum); @@ -165,9 +174,24 @@ kgdb_trgt_trapframe_prev_register(struct return; cache = kgdb_trgt_frame_cache(next_frame, this_cache); + + if (is_undef && (regnum == ARM_SP_REGNUM || regnum == ARM_PC_REGNUM)) { + *addrp = cache->sp + offsetof(struct trapframe, tf_spsr); + target_read_memory(*addrp, valuep, regsz); + is_undefined = 1; + ofs = kgdb_trgt_frame_offset[ARM_SP_REGNUM]; + + } *addrp = cache->sp + ofs; *lvalp = lval_memory; target_read_memory(*addrp, valuep, regsz); + + if (is_undefined) { + *addrp = *(unsigned int *)valuep + (regnum == ARM_SP_REGNUM ? + 0 : 8); + target_read_memory(*addrp, valuep, regsz); + + } } static const struct frame_unwind kgdb_trgt_trapframe_unwind = { @@ -175,22 +199,34 @@ static const struct frame_unwind kgdb_tr &kgdb_trgt_trapframe_this_id, &kgdb_trgt_trapframe_prev_register }; +#endif const struct frame_unwind * kgdb_trgt_trapframe_sniffer(struct frame_info *next_frame) { +#ifndef CROSS_DEBUGGER char *pname; CORE_ADDR pc; pc = frame_pc_unwind(next_frame); pname = NULL; find_pc_partial_function(pc, &pname, NULL, NULL); - if (pname == NULL) + if (pname == NULL) { + is_undef = 0; return (NULL); + } + if (!strcmp(pname, "undefinedinstruction")) + is_undef = 1; if (strcmp(pname, "Laddress_exception_entry") == 0 || strcmp(pname, "undefined_entry") == 0 || strcmp(pname, "exception_exit") == 0 || + strcmp(pname, "Laddress_exception_msg") == 0 || strcmp(pname, "irq_entry") == 0) return (&kgdb_trgt_trapframe_unwind); + if (!strcmp(pname, "undefinedinstruction")) + is_undef = 1; + else + is_undef = 0; +#endif return (NULL); }