Retire obsolete GDB 6.1.1

GDB 6.1.1 was released in June 2004 and is long obsolete. It does not
support all of the architectures that FreeBSD does, and imposes
limitations on the FreeBSD kernel build, such as the continued use of
DWARF2 debugging information.

It was kept (in /usr/libexec/) only for use by crashinfo(8), which
extracts some basic information from a kernel core dump after a crash.
Crashinfo already prefers gdb from port/package if installed.

Future work may add kernel debug support to LLDB or find another path
for crashinfo's needs, but in any case we do not want to ship the
excessively outdated GDB in FreeBSD 13.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D27610
This commit is contained in:
Ed Maste 2020-12-15 17:44:19 +00:00
parent b1f99f9cc9
commit 1c0ea326aa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=368667
101 changed files with 8 additions and 22013 deletions

View file

@ -36,6 +36,10 @@
# xargs -n1 | sort | uniq -d;
# done
# 20201215: in-tree gdb removed
OLD_FILES+=usr/libexec/gdb
OLD_FILES+=usr/libexec/kgdb
# 20201211: hme(4) removed
OLD_FILES+=usr/share/man/man4/hme.4.gz
OLD_FILES+=usr/share/man/man4/if_hme.4.gz

View file

@ -26,6 +26,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
world, or to merely disable the most expensive debugging functionality
at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
20201215:
Obsolete in-tree GDB 6.1.1 has been removed. GDB (including kgdb)
may be installed from ports or packages.
20201124:
ping6 has been merged into ping. It can now be called as "ping -6".
See ping(8) for details.

View file

@ -5,8 +5,6 @@
SUBDIR.${MK_DIALOG}+= dialog
SUBDIR.${MK_GNU_DIFF}+= diff3
SUBDIR.${MK_GNU_GREP}+= grep
SUBDIR.${MK_GDB}+= binutils gdb
SUBDIR_DEPEND_gdb= binutils
SUBDIR.${MK_TESTS}+= tests
SUBDIR_PARALLEL=

View file

@ -1,13 +0,0 @@
# $FreeBSD$
.include <src.opts.mk>
SUBDIR= libiberty \
libbfd \
libopcodes
.if !make(install)
SUBDIR_PARALLEL=
.endif
.include <bsd.subdir.mk>

View file

@ -1,6 +0,0 @@
# $FreeBSD$
WARNS?= 3
PACKAGE= binutils
.include "../Makefile.inc"

View file

@ -1,52 +0,0 @@
# $FreeBSD$
#
# This is included explicitly at the top of each sub-Makefile. We can't
# use the normal "Makefile.inc" mechanism, because we need some of these
# definitions before the sub-Makefile is processed.
VERSION= "2.17.50 [FreeBSD] 2007-07-03"
.if defined(TARGET_ARCH)
TARGET_CPUARCH=${TARGET_ARCH:${__TO_CPUARCH}}
.else
TARGET_CPUARCH=${MACHINE_CPUARCH}
.endif
TARGET_ARCH?= ${MACHINE_ARCH}
TARGET_VENDOR?= unknown
TARGET_OS?= freebsd
BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/}
TARGET_TUPLE?= ${BINUTILS_ARCH}-${TARGET_VENDOR}-${TARGET_OS}
.if ${TARGET_ARCH:Marm*eb} != "" || \
(${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips*el*} == "")
TARGET_BIG_ENDIAN=t
.endif
# GNURELTOP is the relative path to this point in the source or object
# tree, from any subdirectory of same. It gets extra "../" prefixes
# added to it as we descend into subdirectories.
GNURELTOP:= ..
RELSRC= ${GNURELTOP}/../../../contrib/binutils
SRCDIR= ${.CURDIR}/${RELSRC}
.if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \
${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "powerpcspe" || \
(${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips64*} == "")
CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32
.else
CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64
.endif
CFLAGS+= -I.
CFLAGS+= -I${.CURDIR}
CFLAGS+= -I${.CURDIR}/${GNURELTOP}/libbfd
CFLAGS+= -I${.OBJDIR}/${GNURELTOP}/libbfd
CFLAGS+= -I${SRCDIR}/include
ARCHS= ${TARGET_CPUARCH}
.if exists(${.CURDIR}/Makefile.${TARGET_ARCH})
.include "${.CURDIR}/Makefile.${TARGET_ARCH}"
.elif exists(${.CURDIR}/Makefile.${TARGET_CPUARCH})
.include "${.CURDIR}/Makefile.${TARGET_CPUARCH}"
.endif

View file

@ -1,11 +0,0 @@
# $FreeBSD$
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/gas/doc \
${SRCDIR}/ld \
${SRCDIR}/binutils/doc
MAN= ld.7 ldint.7 as.7 binutils.7
.include <bsd.prog.mk>

View file

@ -1,11 +0,0 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View file

@ -1,109 +0,0 @@
# $FreeBSD$
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/bfd ${SRCDIR}/opcodes
LIB= bfd
SRCS+= archive.c \
archive64.c \
archures.c \
bfd.c \
bfdio.c \
bfdver.h \
bfdwin.c \
binary.c \
cache.c \
coffgen.c \
config.h \
corefile.c \
dwarf1.c \
dwarf2.c \
elf-attrs.c \
elf-eh-frame.c \
elf-strtab.c \
elf-vxworks.c \
elf.c \
format.c \
hash.c \
ihex.c \
init.c \
libbfd.c \
linker.c \
merge.c \
opncls.c \
reloc.c \
section.c \
simple.c \
srec.c \
stab-syms.c \
stabs.c \
syms.c \
targets.c \
targmatch.h \
tekhex.c
.if ${TARGET_ARCH} == "sparc64"
WARNS?= 2
.endif
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -I${SRCDIR}/bfd
INTERNALLIB=
CLEANFILES+= bfdver.h config.h targmatch.h
SELARCH=
.if ${TARGET_ARCH} == "amd64"
SELARCH= &bfd_i386_arch
.elif ${TARGET_ARCH} == "sparc64"
SELARCH= &bfd_sparc_arch
.else
.for _a in ${ARCHS}
.if ${SELARCH} == ""
SELARCH+= &bfd_${_a}_arch
.else
SELARCH+= ,&bfd_${_a}_arch
.endif
.endfor
.endif
CFLAGS+= -DSELECT_ARCHITECTURES="${SELARCH}"
SELVEC=
.for _v in ${VECS}
CFLAGS+= -DHAVE_${_v}
.if ${SELVEC} == ""
SELVEC+= &${_v}
.else
SELVEC+= ,&${_v}
.endif
.endfor
CFLAGS+= -DSELECT_VECS="${SELVEC}"
CFLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR}
CFLAGS+= -DDEBUGDIR="NULL"
# XXX:DEO should grab BFD_VERSION_DATE from ${VERSION}...
bfdver.h: Makefile
echo '#define BFD_VERSION 217500000' > ${.TARGET}
echo '#define BFD_VERSION_DATE 20070703' >> ${.TARGET}
echo '#define BFD_VERSION_STRING ${VERSION}' >> ${.TARGET}
echo '#define REPORT_BUGS_TO "<http://www.freebsd.org/support.html>"' >> ${.TARGET}
targmatch.h: targmatch.sed config.bfd
sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} > ${.TARGET}
config.h: config.h.fbsd
.if ${TARGET_ARCH} == "i386"
sed -e 's,!!TRAD_HEADER!!,"hosts/i386bsd.h",g' ${.ALLSRC} > ${.TARGET}
.else
sed -e 's,!!TRAD_HEADER!!,,g' ${.ALLSRC} > ${.TARGET}
.endif
CLEANFILES+= elf32-target.h elf64-target.h
elf32-target.h: elfxx-target.h
sed -e s/NN/32/g ${.ALLSRC} > ${.TARGET}
elf64-target.h: elfxx-target.h
sed -e s/NN/64/g ${.ALLSRC} > ${.TARGET}
# avoid cicular dependency
GENDIRDEPS_FILTER+= N*/nm
.include <bsd.lib.mk>

View file

@ -1,29 +0,0 @@
# $FreeBSD$
.include "${.CURDIR}/Makefile.i386"
# Get the i386 VECS.
I386_VECS:= ${VECS}
DEFAULT_VECTOR= bfd_elf64_x86_64_freebsd_vec
SRCS+= elf64-x86-64.c \
efi-app-x86_64.c \
elf64.c \
elf64-gen.c \
elf64-target.h \
pepigen.c \
pex64igen.c
VECS= ${DEFAULT_VECTOR} \
bfd_elf64_x86_64_vec \
bfd_efi_app_x86_64_vec \
${I386_VECS}
CLEANFILES+= pepigen.c pex64igen.c
pepigen.c: peXXigen.c
sed -e s/XX/pep/g ${.ALLSRC} > ${.TARGET}
pex64igen.c: peXXigen.c
sed -e s/XX/pex64/g ${.ALLSRC} > ${.TARGET}

View file

@ -1,21 +0,0 @@
# $FreeBSD$
.if ${TARGET_ARCH:Marm*eb} != ""
DEFAULT_VECTOR= bfd_elf32_bigarm_vec
.else
DEFAULT_VECTOR= bfd_elf32_littlearm_vec
.endif
SRCS+= cpu-arm.c \
elf32.c \
elf32-arm.c \
elf32-gen.c \
elf32-target.h \
elflink.c
VECS+= ${DEFAULT_VECTOR}
.if ${TARGET_ARCH:Marm*eb} != ""
VECS+= bfd_elf32_littlearm_vec
.else
VECS+= bfd_elf32_bigarm_vec
.endif

View file

@ -1,13 +0,0 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
include/xlocale \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View file

@ -1,11 +0,0 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View file

@ -1,21 +0,0 @@
# $FreeBSD$
DEFAULT_VECTOR= bfd_elf32_i386_freebsd_vec
SRCS+= cofflink.c \
cpu-i386.c \
efi-app-ia32.c \
elf32-i386.c \
elf32-target.h \
elf32.c \
elflink.c \
peigen.c
VECS= ${DEFAULT_VECTOR} \
bfd_elf32_i386_vec \
bfd_efi_app_ia32_vec
peigen.c: peXXigen.c
sed -e s/XX/pe/g ${.ALLSRC} > ${.TARGET}
CLEANFILES+= peigen.c

View file

@ -1,38 +0,0 @@
# $FreeBSD$
.if ${TARGET_ARCH:Mmips*el*} != ""
_EMULATION_ENDIAN=little
.else
_EMULATION_ENDIAN=big
.endif
.if ${TARGET_ARCH:Mmips64*} != ""
DEFAULT_VECTOR= bfd_elf64_trad${_EMULATION_ENDIAN}mips_vec
.elif ${TARGET_ARCH:Mmipsn32*} != ""
DEFAULT_VECTOR= bfd_elf32_ntrad${_EMULATION_ENDIAN}mips_vec
.else
DEFAULT_VECTOR=bfd_elf32_trad${_EMULATION_ENDIAN}mips_vec
.endif
SRCS+= coff-mips.c \
cpu-mips.c \
ecoff.c \
ecofflink.c \
elf32.c \
elf64.c \
elfn32-mips.c \
elf32-mips.c \
elf64-mips.c \
elfxx-mips.c \
elf32-target.h \
elf64-target.h \
elflink.c
VECS= bfd_elf32_tradbigmips_vec \
bfd_elf32_tradlittlemips_vec \
bfd_elf32_ntradbigmips_vec \
bfd_elf32_ntradlittlemips_vec \
bfd_elf64_tradbigmips_vec \
bfd_elf64_tradlittlemips_vec \
ecoff_little_vec \
ecoff_big_vec

View file

@ -1,19 +0,0 @@
# $FreeBSD$
ARCHS+= rs6000
DEFAULT_VECTOR= bfd_elf32_powerpc_vec
SRCS+= cpu-powerpc.c \
cpu-rs6000.c \
elf32.c \
elf32-gen.c \
elf32-ppc.c \
elf32-target.h \
elflink.c \
ppcboot.c \
xcofflink.c
VECS+= ${DEFAULT_VECTOR} \
bfd_elf32_powerpcle_vec \
ppcboot_vec

View file

@ -1,28 +0,0 @@
# $FreeBSD$
ARCHS+= rs6000
DEFAULT_VECTOR= bfd_elf64_powerpc_vec
NO_WERROR.clang=
SRCS+= cpu-powerpc.c \
cpu-rs6000.c \
elf32.c \
elf32-gen.c \
elf32-ppc.c \
elf32-target.h \
elflink.c \
elf64.c \
elf64-gen.c \
elf64-ppc.c \
elf64-target.h \
elflink.c \
ppcboot.c \
xcofflink.c
VECS+= ${DEFAULT_VECTOR} \
bfd_elf64_powerpcle_vec \
bfd_elf32_powerpc_vec \
bfd_elf32_powerpcle_vec \
ppcboot_vec

View file

@ -1,23 +0,0 @@
# $FreeBSD$
DEFAULT_VECTOR= bfd_elf64_sparc_freebsd_vec
SRCS+= aout32.c \
cpu-sparc.c \
elf32.c \
elf32-sparc.c \
elf32-target.h \
elf64.c \
elf64-sparc.c \
elf64-target.h \
elflink.c \
elfxx-sparc.c \
elfxx-sparc.h \
sparcnetbsd.c \
sunos.c
VECS= ${DEFAULT_VECTOR} \
bfd_elf64_sparc_vec \
bfd_elf32_sparc_vec \
sparcnetbsd_vec \
sunos_big_vec

File diff suppressed because it is too large Load diff

View file

@ -1,297 +0,0 @@
/* $FreeBSD$ */
/* config.h. Generated by configure. */
/* config.in. Generated from configure.in by autoheader. */
/* Define to 1 if translation of program messages to the user's native
language is requested. */
/* #undef ENABLE_NLS */
/* Define to 1 if you have the declaration of `basename', and to 0 if you
don't. */
#define HAVE_DECL_BASENAME 0
/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */
#define HAVE_DECL_FFS 1
/* Define to 1 if you have the declaration of `free', and to 0 if you don't.
*/
#define HAVE_DECL_FREE 1
/* Define to 1 if you have the declaration of `fseeko', and to 0 if you don't.
*/
#define HAVE_DECL_FSEEKO 1
/* Define to 1 if you have the declaration of `fseeko64', and to 0 if you
don't. */
#define HAVE_DECL_FSEEKO64 0
/* Define to 1 if you have the declaration of `ftello', and to 0 if you don't.
*/
#define HAVE_DECL_FTELLO 1
/* Define to 1 if you have the declaration of `ftello64', and to 0 if you
don't. */
#define HAVE_DECL_FTELLO64 0
/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
*/
#define HAVE_DECL_GETENV 1
/* Define to 1 if you have the declaration of `malloc', and to 0 if you don't.
*/
#define HAVE_DECL_MALLOC 1
/* Define to 1 if you have the declaration of `realloc', and to 0 if you
don't. */
#define HAVE_DECL_REALLOC 1
/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
don't. */
#define HAVE_DECL_SNPRINTF 1
/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
*/
#define HAVE_DECL_STPCPY 1
/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't.
*/
#define HAVE_DECL_STRSTR 1
/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
don't. */
#define HAVE_DECL_VSNPRINTF 1
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#define HAVE_DIRENT_H 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the `fcntl' function. */
#define HAVE_FCNTL 1
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `fdopen' function. */
#define HAVE_FDOPEN 1
/* Define to 1 if you have the `fopen64' function. */
/* #undef HAVE_FOPEN64 */
/* Define to 1 if you have the `fseeko' function. */
#define HAVE_FSEEKO 1
/* Define to 1 if you have the `fseeko64' function. */
/* #undef HAVE_FSEEKO64 */
/* Define to 1 if you have the `ftello' function. */
#define HAVE_FTELLO 1
/* Define to 1 if you have the `ftello64' function. */
/* #undef HAVE_FTELLO64 */
/* Define to 1 if you have the `getgid' function. */
#define HAVE_GETGID 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getuid' function. */
#define HAVE_GETUID 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define if <sys/procfs.h> has lwpstatus_t. */
/* #undef HAVE_LWPSTATUS_T */
/* Define if <sys/procfs.h> has lwpstatus_t.pr_context. */
/* #undef HAVE_LWPSTATUS_T_PR_CONTEXT */
/* Define if <sys/procfs.h> has lwpstatus_t.pr_reg. */
/* #undef HAVE_LWPSTATUS_T_PR_REG */
/* Define if <sys/procfs.h> has lwpxstatus_t. */
/* #undef HAVE_LWPXSTATUS_T */
/* Define to 1 if you have the `madvise' function. */
#define HAVE_MADVISE 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
/* Define to 1 if you have the `mprotect' function. */
#define HAVE_MPROTECT 1
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
/* #undef HAVE_NDIR_H */
/* Define if <sys/procfs.h> has prpsinfo32_t. */
/* #undef HAVE_PRPSINFO32_T */
/* Define if <sys/procfs.h> has prpsinfo_t. */
#define HAVE_PRPSINFO_T 1
/* Define if <sys/procfs.h> has prstatus32_t. */
/* #undef HAVE_PRSTATUS32_T */
/* Define if <sys/procfs.h> has prstatus32_t.pr_who. */
/* #undef HAVE_PRSTATUS32_T_PR_WHO */
/* Define if <sys/procfs.h> has prstatus_t. */
#define HAVE_PRSTATUS_T 1
/* Define if <sys/procfs.h> has prstatus_t.pr_who. */
/* #undef HAVE_PRSTATUS_T_PR_WHO */
/* Define if <sys/procfs.h> has psinfo32_t. */
/* #undef HAVE_PSINFO32_T */
/* Define if <sys/procfs.h> has psinfo_t. */
/* #undef HAVE_PSINFO_T */
/* Define if <sys/procfs.h> has pstatus32_t. */
/* #undef HAVE_PSTATUS32_T */
/* Define if <sys/procfs.h> has pstatus_t. */
/* #undef HAVE_PSTATUS_T */
/* Define if <sys/procfs.h> has pxstatus_t. */
/* #undef HAVE_PXSTATUS_T */
/* Define to 1 if you have the `setitimer' function. */
#define HAVE_SETITIMER 1
/* Define to 1 if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strtoull' function. */
#define HAVE_STRTOULL 1
/* Define if struct core_dumpx has member c_impl */
/* #undef HAVE_ST_C_IMPL */
/* Define to 1 if you have the `sysconf' function. */
#define HAVE_SYSCONF 1
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
/* #undef HAVE_SYS_DIR_H */
/* Define to 1 if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
/* #undef HAVE_SYS_NDIR_H */
/* Define to 1 if you have the <sys/procfs.h> header file. */
#define HAVE_SYS_PROCFS_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <time.h> header file. */
#define HAVE_TIME_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if <sys/procfs.h> has win32_pstatus_t. */
/* #undef HAVE_WIN32_PSTATUS_T */
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Name of package */
#define PACKAGE "bfd"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME ""
/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
/* The size of a `char', as computed by sizeof. */
/* #undef SIZEOF_CHAR */
/* The size of a `int', as computed by sizeof. */
/* #undef SIZEOF_INT */
/* The size of a `long', as computed by sizeof. */
/* #define SIZEOF_LONG 4 */
/* The size of a `long long', as computed by sizeof. */
/* #define SIZEOF_LONG_LONG 8 */
/* The size of a `off_t', as computed by sizeof. */
/* #define SIZEOF_OFF_T 8 */
/* The size of a `short', as computed by sizeof. */
/* #undef SIZEOF_SHORT */
/* The size of a `void *', as computed by sizeof. */
/* #undef SIZEOF_VOID_P */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if you can safely include both <string.h> and <strings.h>. */
#define STRING_WITH_STRINGS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Name of host specific header file to include in trad-core.c. */
#define TRAD_HEADER !!TRAD_HEADER!!
/* Use b modifier when opening binary files? */
/* #undef USE_BINARY_FOPEN */
/* Use mmap if it's available? */
/* #undef USE_MMAP */
/* Define if we should default to creating read-only plt entries */
/* #undef USE_SECUREPLT */
/* Version number of package */
/* #define VERSION "2.17.50" */
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif

View file

@ -1,30 +0,0 @@
/*-
* Copyright (c) 2002, 2003 David E. O'Brien
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#define ELF_OSABI ELFOSABI_FREEBSD
#define elf_backend_post_process_headers _bfd_elf_set_osabi

View file

@ -1,33 +0,0 @@
# $FreeBSD$
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/binutils
LIB= binutils
SRCS+= arlex.l \
arparse.y \
arsup.c \
binemul.c \
bucomm.c \
debug.c \
dwarf.c \
emul_vanilla.c \
filemode.c \
ieee.c \
rdcoff.c \
rddbg.c \
rename.c \
stabs.c \
unwind-ia64.c \
version.c \
wrstabs.c
CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\"
CFLAGS+= -DBFD_VERSION_STRING=\"${VERSION}\"
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -DYY_NO_INPUT
CFLAGS+= -I${SRCDIR}/binutils
CFLAGS+= -I${SRCDIR}/bfd
INTERNALLIB=
.include <bsd.lib.mk>

View file

@ -1,15 +0,0 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/usr.bin/binutils/libbfd \
include \
include/xlocale \
usr.bin/yacc.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View file

@ -1,215 +0,0 @@
/* $FreeBSD$ */
/* FreeBSD isn't any form of AIX. */
#define bin_dummy_emulation bin_vanilla_emulation
/* config.h. Generated by configure. */
/* config.in. Generated from configure.in by autoheader. */
/* 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 to 1 if using `alloca.c'. */
/* #undef C_ALLOCA */
/* Define to 1 if translation of program messages to the user's native
language is requested. */
/* #undef ENABLE_NLS */
/* Suffix used for executables, if any. */
#define EXECUTABLE_SUFFIX ""
/* Define to 1 if you have `alloca', as a function or macro. */
#define HAVE_ALLOCA 1
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
/* #undef HAVE_ALLOCA_H */
/* Define to 1 if you have the declaration of `environ', and to 0 if you
don't. */
#define HAVE_DECL_ENVIRON 0
/* Define to 1 if you have the declaration of `fprintf', and to 0 if you
don't. */
#define HAVE_DECL_FPRINTF 1
/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
don't. */
#define HAVE_DECL_GETC_UNLOCKED 1
/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
*/
#define HAVE_DECL_GETENV 1
/* Is the prototype for getopt in <unistd.h> in the expected format? */
#define HAVE_DECL_GETOPT 1
/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't.
*/
#define HAVE_DECL_SBRK 1
/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
don't. */
#define HAVE_DECL_SNPRINTF 1
/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
*/
#define HAVE_DECL_STPCPY 1
/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't.
*/
#define HAVE_DECL_STRSTR 1
/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
don't. */
#define HAVE_DECL_VSNPRINTF 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Does the platform use an executable suffix? */
/* #undef HAVE_EXECUTABLE_SUFFIX */
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Is fopen64 available? */
/* #undef HAVE_FOPEN64 */
/* Define to 1 if you have the `getc_unlocked' function. */
#define HAVE_GETC_UNLOCKED 1
/* Does <utime.h> define struct utimbuf? */
#define HAVE_GOOD_UTIME_H 1
/* Define if you have the iconv() function. */
/* #undef HAVE_ICONV */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mkdtemp' function. */
#define HAVE_MKDTEMP 1
/* Define to 1 if you have the `mkstemp' function. */
#define HAVE_MKSTEMP 1
/* Define to 1 if you have the `sbrk' function. */
/* #undef HAVE_SBRK */
/* Define to 1 if you have the `setmode' function. */
#define HAVE_SETMODE 1
/* Is stat64 available? */
/* #undef HAVE_STAT64 */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strcoll' function. */
#define HAVE_STRCOLL 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#define HAVE_SYS_WAIT_H 1
/* Is the type time_t defined in <time.h>? */
#define HAVE_TIME_T_IN_TIME_H 1
/* Is the type time_t defined in <sys/types.h>? */
#define HAVE_TIME_T_IN_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `utimes' function. */
#define HAVE_UTIMES 1
/* Define as const if the declaration of iconv() needs const. */
/* #undef ICONV_CONST */
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Name of package */
#define PACKAGE "binutils"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME ""
/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
/* 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 to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Configured target name. */
/* #define TARGET "i386-unknown-freebsd9.0" */
/* Define to 1 if user symbol names have a leading underscore, 0 if not. */
#define TARGET_PREPENDS_UNDERSCORE 0
/* Use b modifier when opening binary files? */
/* #undef USE_BINARY_FOPEN */
/* Version number of package */
/* #define VERSION "2.17.50" */
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
`char[]'. */
#define YYTEXT_POINTER 1
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
/* Enable LFS */
/* #undef _LARGEFILE64_SOURCE */

View file

@ -1,42 +0,0 @@
# $FreeBSD$
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/libiberty
LIB= iberty
SRCS= argv.c \
concat.c \
choose-temp.c \
cp-demangle.c \
cp-demint.c \
cplus-dem.c \
dyn-string.c \
getpwd.c \
getruntime.c \
filename_cmp.c \
floatformat.c \
hashtab.c \
hex.c \
lbasename.c \
lrealpath.c \
make-relative-prefix.c \
make-temp-file.c \
objalloc.c \
obstack.c \
safe-ctype.c \
unlink-if-ordinary.c \
xatexit.c \
xexit.c \
xmalloc.c \
xstrdup.c \
xstrerror.c
# The following files are needed by gdb(1)
SRCS+= splay-tree.c
WARNS?= 2
CFLAGS+= -DHAVE_CONFIG_H
INTERNALLIB=
.include <bsd.lib.mk>

View file

@ -1,14 +0,0 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
include/xlocale \
lib/msun \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View file

@ -1,449 +0,0 @@
/* $FreeBSD$ */
/* config.h. Generated by configure. */
/* config.in. Generated from configure.ac by autoheader. */
/* 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 to 1 if you have the <alloca.h> header file. */
/* #undef HAVE_ALLOCA_H */
/* Define to 1 if you have the `asprintf' function. */
#define HAVE_ASPRINTF 1
/* Define to 1 if you have the `atexit' function. */
#define HAVE_ATEXIT 1
/* Define to 1 if you have the `basename' function. */
#define HAVE_BASENAME 1
/* Define to 1 if you have the `bcmp' function. */
#define HAVE_BCMP 1
/* Define to 1 if you have the `bcopy' function. */
#define HAVE_BCOPY 1
/* Define to 1 if you have the `bsearch' function. */
#define HAVE_BSEARCH 1
/* Define to 1 if you have the `bzero' function. */
#define HAVE_BZERO 1
/* Define to 1 if you have the `calloc' function. */
#define HAVE_CALLOC 1
/* Define to 1 if you have the `canonicalize_file_name' function. */
/* #undef HAVE_CANONICALIZE_FILE_NAME */
/* Define to 1 if you have the `clock' function. */
#define HAVE_CLOCK 1
/* Define to 1 if you have the declaration of `asprintf', and to 0 if you
don't. */
#define HAVE_DECL_ASPRINTF 1
/* Define to 1 if you have the declaration of `basename', and to 0 if you
don't. */
#define HAVE_DECL_BASENAME 0
/* Define to 1 if you have the declaration of `calloc', and to 0 if you don't.
*/
#define HAVE_DECL_CALLOC 1
/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */
#define HAVE_DECL_FFS 1
/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
*/
#define HAVE_DECL_GETENV 1
/* Define to 1 if you have the declaration of `getopt', and to 0 if you don't.
*/
#define HAVE_DECL_GETOPT 1
/* Define to 1 if you have the declaration of `malloc', and to 0 if you don't.
*/
#define HAVE_DECL_MALLOC 1
/* Define to 1 if you have the declaration of `realloc', and to 0 if you
don't. */
#define HAVE_DECL_REALLOC 1
/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't.
*/
#define HAVE_DECL_SBRK 1
/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
don't. */
#define HAVE_DECL_SNPRINTF 1
/* Define to 1 if you have the declaration of `strverscmp', and to 0 if you
don't. */
#define HAVE_DECL_STRVERSCMP 0
/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you
don't. */
#define HAVE_DECL_VASPRINTF 1
/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
don't. */
#define HAVE_DECL_VSNPRINTF 1
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `ffs' function. */
#define HAVE_FFS 1
/* Define to 1 if you have the `fork' function. */
#define HAVE_FORK 1
/* Define to 1 if you have the `getcwd' function. */
#define HAVE_GETCWD 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getrusage' function. */
#define HAVE_GETRUSAGE 1
/* Define to 1 if you have the `getsysinfo' function. */
/* #undef HAVE_GETSYSINFO */
/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1
/* Define to 1 if you have the `index' function. */
#define HAVE_INDEX 1
/* Define to 1 if you have the `insque' function. */
#define HAVE_INSQUE 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <machine/hal_sysinfo.h> header file. */
/* #undef HAVE_MACHINE_HAL_SYSINFO_H */
/* Define to 1 if you have the <malloc.h> header file. */
/* #undef HAVE_MALLOC_H */
/* Define to 1 if you have the `memchr' function. */
#define HAVE_MEMCHR 1
/* Define to 1 if you have the `memcmp' function. */
#define HAVE_MEMCMP 1
/* Define to 1 if you have the `memcpy' function. */
#define HAVE_MEMCPY 1
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mempcpy' function. */
/* #undef HAVE_MEMPCPY */
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
/* Define to 1 if you have the `mkstemps' function. */
#define HAVE_MKSTEMPS 1
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
/* Define to 1 if you have the `on_exit' function. */
/* #undef HAVE_ON_EXIT */
/* Define to 1 if you have the `psignal' function. */
#define HAVE_PSIGNAL 1
/* Define to 1 if you have the `pstat_getdynamic' function. */
/* #undef HAVE_PSTAT_GETDYNAMIC */
/* Define to 1 if you have the `pstat_getstatic' function. */
/* #undef HAVE_PSTAT_GETSTATIC */
/* Define to 1 if you have the `putenv' function. */
#define HAVE_PUTENV 1
/* Define to 1 if you have the `random' function. */
#define HAVE_RANDOM 1
/* Define to 1 if you have the `realpath' function. */
#define HAVE_REALPATH 1
/* Define to 1 if you have the `rename' function. */
#define HAVE_RENAME 1
/* Define to 1 if you have the `rindex' function. */
#define HAVE_RINDEX 1
/* Define to 1 if you have the `sbrk' function. */
/* #undef HAVE_SBRK */
/* Define to 1 if you have the `setenv' function. */
#define HAVE_SETENV 1
/* Define to 1 if you have the `sigsetmask' function. */
#define HAVE_SIGSETMASK 1
/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio_ext.h> header file. */
/* #undef HAVE_STDIO_EXT_H */
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `stpcpy' function. */
#define HAVE_STPCPY 1
/* Define to 1 if you have the `stpncpy' function. */
#define HAVE_STPNCPY 1
/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1
/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strncasecmp' function. */
#define HAVE_STRNCASECMP 1
/* Define to 1 if you have the `strndup' function. */
#define HAVE_STRNDUP 1
/* Define to 1 if you have the `strrchr' function. */
#define HAVE_STRRCHR 1
/* Define to 1 if you have the `strsignal' function. */
#define HAVE_STRSIGNAL 1
/* Define to 1 if you have the `strstr' function. */
#define HAVE_STRSTR 1
/* Define to 1 if you have the `strtod' function. */
#define HAVE_STRTOD 1
/* Define to 1 if you have the `strtol' function. */
#define HAVE_STRTOL 1
/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1
/* Define to 1 if you have the `strverscmp' function. */
/* #undef HAVE_STRVERSCMP */
/* Define to 1 if you have the `sysconf' function. */
#define HAVE_SYSCONF 1
/* Define to 1 if you have the `sysctl' function. */
#define HAVE_SYSCTL 1
/* Define to 1 if you have the `sysmp' function. */
/* #undef HAVE_SYSMP */
/* Define if you have the sys_errlist variable. */
#define HAVE_SYS_ERRLIST 1
/* Define to 1 if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define to 1 if you have the <sys/mman.h> header file. */
#define HAVE_SYS_MMAN_H 1
/* Define if you have the sys_nerr variable. */
#define HAVE_SYS_NERR 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/pstat.h> header file. */
/* #undef HAVE_SYS_PSTAT_H */
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define if you have the sys_siglist variable. */
#define HAVE_SYS_SIGLIST 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/sysctl.h> header file. */
#define HAVE_SYS_SYSCTL_H 1
/* Define to 1 if you have the <sys/sysinfo.h> header file. */
/* #undef HAVE_SYS_SYSINFO_H */
/* Define to 1 if you have the <sys/sysmp.h> header file. */
/* #undef HAVE_SYS_SYSMP_H */
/* Define to 1 if you have the <sys/systemcfg.h> header file. */
/* #undef HAVE_SYS_SYSTEMCFG_H */
/* Define to 1 if you have the <sys/table.h> header file. */
/* #undef HAVE_SYS_TABLE_H */
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#define HAVE_SYS_WAIT_H 1
/* Define to 1 if you have the `table' function. */
/* #undef HAVE_TABLE */
/* Define to 1 if you have the `times' function. */
#define HAVE_TIMES 1
/* Define to 1 if you have the <time.h> header file. */
#define HAVE_TIME_H 1
/* Define to 1 if you have the `tmpnam' function. */
#define HAVE_TMPNAM 1
/* Define if you have the \`uintptr_t' type. */
#define HAVE_UINTPTR_T 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `vasprintf' function. */
#define HAVE_VASPRINTF 1
/* Define to 1 if you have the `vfork' function. */
#define HAVE_VFORK 1
/* Define to 1 if you have the <vfork.h> header file. */
/* #undef HAVE_VFORK_H */
/* Define to 1 if you have the `vfprintf' function. */
#define HAVE_VFPRINTF 1
/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1
/* Define to 1 if you have the `vsnprintf' function. */
#define HAVE_VSNPRINTF 1
/* Define to 1 if you have the `vsprintf' function. */
#define HAVE_VSPRINTF 1
/* Define to 1 if you have the `wait3' function. */
#define HAVE_WAIT3 1
/* Define to 1 if you have the `wait4' function. */
#define HAVE_WAIT4 1
/* Define to 1 if you have the `waitpid' function. */
#define HAVE_WAITPID 1
/* Define to 1 if `fork' works. */
#define HAVE_WORKING_FORK 1
/* Define to 1 if `vfork' works. */
#define HAVE_WORKING_VFORK 1
/* Define to 1 if you have the `_doprnt' function. */
/* #undef HAVE__DOPRNT */
/* Define if you have the _system_configuration variable. */
/* #undef HAVE__SYSTEM_CONFIGURATION */
/* Define to 1 if you have the `__fsetlocking' function. */
/* #undef HAVE___FSETLOCKING */
/* Define if canonicalize_file_name is not declared in system header files. */
#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
/* Define if errno must be declared even when <errno.h> is included. */
/* #undef NEED_DECLARATION_ERRNO */
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME ""
/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
/* Define to the version of this package. */
/* #define PACKAGE_VERSION "" */
/* The size of a `int', as computed by sizeof. */
/* #define SIZEOF_INT 4 */
/* 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 */
#define STACK_DIRECTION -1
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Define to an unsigned 64-bit type available in the compiler. */
#define UNSIGNED_64BIT_TYPE uint64_t
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#if defined(__powerpc__) || defined(__sparc64__)
# define WORDS_BIGENDIAN 1
#endif
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to `int' if <sys/types.h> does not define. */
/* #undef pid_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef uintptr_t */
/* Define as `fork' if `vfork' does not work. */
/* #undef vfork */

View file

@ -1,22 +0,0 @@
# $FreeBSD$
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/opcodes
LIB= opcodes
SRCS+= dis-buf.c dis-init.c disassemble.c i386-opc.c
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -I${SRCDIR}/opcodes -I${SRCDIR}/bfd
INTERNALLIB=
# If set, BINUTILSDISTDIR is the path to a directory containing the full GNU
# binutils release. FreeBSD only distributes the bits that are required to
# build native architectures. BINUTILSDISTDIR is needed to build cross tools.
.if defined(BINUTILSDISTDIR) && exists(${BINUTILSDISTDIR})
.PATH: ${BINUTILSDISTDIR}/bfd ${BINUTILSDISTDIR}/opcodes
CFLAGS+= -I${BINUTILSDISTDIR}/opcodes -I${BINUTILSDISTDIR}/bfd
CFLAGS+= -I${BINUTILSDISTDIR}/include
.endif
.include <bsd.lib.mk>

View file

@ -1,4 +0,0 @@
# $FreeBSD$
SRCS+= i386-dis.c
CFLAGS+= -DARCH_i386

View file

@ -1,4 +0,0 @@
# $FreeBSD$
SRCS+= arm-dis.c
CFLAGS+= -DARCH_arm

View file

@ -1,13 +0,0 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
include/xlocale \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View file

@ -1,4 +0,0 @@
# $FreeBSD$
SRCS+= i386-dis.c
CFLAGS+= -DARCH_i386

View file

@ -1,6 +0,0 @@
#
# $FreeBSD$
#
SRCS+= m68k-dis.c m68k-opc.c
CFLAGS+= -DARCH_m68k

View file

@ -1,4 +0,0 @@
# $FreeBSD$
SRCS+= mips-dis.c mips-opc.c mips16-opc.c
CFLAGS+= -DARCH_mips

View file

@ -1,4 +0,0 @@
# $FreeBSD$
SRCS+= ppc-dis.c ppc-opc.c
CFLAGS+= -DARCH_powerpc -DARCH_rs6000

View file

@ -1,6 +0,0 @@
#
# $FreeBSD$
#
SRCS+= sparc-dis.c sparc-opc.c
CFLAGS+= -DARCH_sparc

View file

@ -1,4 +0,0 @@
# $FreeBSD$
SRCS+= sparc-dis.c sparc-opc.c
CFLAGS+= -DARCH_sparc

View file

@ -1,70 +0,0 @@
/* $FreeBSD$ */
/* config.h. Generated by configure. */
/* config.in. Generated from configure.in by autoheader. */
/* Define to 1 if translation of program messages to the user's native
language is requested. */
/* #undef ENABLE_NLS */
/* Define to 1 if you have the declaration of `basename', and to 0 if you
don't. */
#define HAVE_DECL_BASENAME 0
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Name of package */
#define PACKAGE "opcodes"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME ""
/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
/* #define VERSION "2.17.50" */

View file

@ -1,47 +0,0 @@
#! /bin/sh
#
# $FreeBSD$
#
# This script installs the main files generated by the binutils
# "configure" scripts and makefiles. It can be used for upgrading to
# a new version of binutils.
#
# Don't forget to change the VERSION definition in the top level
# "Makefile.inc0".
gnudir=$(pwd)
contribdir="${gnudir}/../../../contrib/binutils"
platform="`uname -m`"
rm -rf build
mkdir build
echo "binutils elf configuration for $platform"
(cd build
${contribdir}/configure $platform-unknown-freebsd || exit
(cd gas
echo "Updating as"
make config.h || exit
cp config.h ${gnudir}/as/$platform/config.h || exit
)
(cd ld
echo "Updating ld"
make config.h ldemul-list.h || exit
cp config.h ${gnudir}/ld || exit
cp ldemul-list.h ${gnudir}/ld/$platform || exit
)
(cd bfd
echo "Updating libbfd"
make bfd.h config.h || exit
cp bfd.h ${gnudir}/libbfd/$platform || exit
cp config.h ${gnudir}/libbfd/$platform || exit
)
(cd binutils
echo "Updating libbinutils"
make config.h || exit
cp config.h ${gnudir}/libbinutils/config.h || exit
)
)
rm -rf build

View file

@ -1,7 +0,0 @@
# $FreeBSD$
.include <src.opts.mk>
SUBDIR= libgdb gdb kgdb
.include <bsd.subdir.mk>

View file

@ -1,73 +0,0 @@
# $FreeBSD$
.include <src.opts.mk>
WARNS?= 0
VERSION= "6.1.1 [FreeBSD]"
VENDOR= marcel
PACKAGE= gdb
BMAKE_GDB= ${.CURDIR:H}
BMAKE_ROOT= ${BMAKE_GDB:H}
BMAKE_BU= ${BMAKE_ROOT}/binutils
CNTRB_BU= ${SRCTOP}/contrib/binutils
CNTRB_GDB= ${SRCTOP}/contrib/gdb
OBJ_BU= ${OBJTOP}/gnu/usr.bin/binutils
OBJ_GDB= ${OBJTOP}/gnu/usr.bin/gdb
# These assignments duplicate much of the functionality of
# MACHINE_CPUARCH, but there's no easy way to export make functions...
.if defined(TARGET_ARCH)
TARGET_CPUARCH=${TARGET_ARCH:${__TO_CPUARCH}}
.else
TARGET_CPUARCH=${MACHINE_CPUARCH}
.endif
TARGET_ARCH?= ${MACHINE_ARCH}
TARGET_SUBDIR= ${BMAKE_GDB}/arch/${TARGET_CPUARCH}
.if ${TARGET_ARCH} != ${MACHINE_ARCH}
GDB_CROSS_DEBUGGER=
.endif
.PATH: ${CNTRB_GDB}/gdb ${CNTRB_GDB}/gdb/cli ${CNTRB_GDB}/gdb/mi \
${CNTRB_GDB}/gdb/signals ${CNTRB_GDB}/gdb/tui ${TARGET_SUBDIR}
CFLAGS+= -DHAVE_CONFIG_H -DRL_NO_COMPAT -DMI_OUT=1
CFLAGS+= -DDEBUGDIR=\"${DEBUGDIR}\"
CFLAGS+= -I.
CFLAGS+= -I${TARGET_SUBDIR}
CFLAGS+= -I${BMAKE_BU}/libbfd -I${BMAKE_BU}/libbfd/${TARGET_CPUARCH}
CFLAGS+= -I${CNTRB_GDB}/gdb
CFLAGS+= -I${CNTRB_GDB}/gdb/config
CFLAGS+= -I${CNTRB_BU}/include
CFLAGS+= -I${CNTRB_GDB}/include
CFLAGS+= -I${CNTRB_BU}/bfd
CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit
# Some bits here currently rely on some of the linker-merging magic that happens
# with -fcommon. While this is the default right now, explicitly set -fcommon
# so that it continues to build when the default flips.
CFCOMMONFLAG= -fcommon
GENSRCS+= nm.h tm.h
.if defined(GDB_CROSS_DEBUGGER)
CFLAGS+= -DCROSS_DEBUGGER -I${BMAKE_ROOT:H:H}
GDB_SUFFIX= -${TARGET_ARCH}
MAN=
.else
BINDIR?= /usr/libexec
MAN=
.endif
.include "${TARGET_SUBDIR}/Makefile"
SRCS+= ${GENSRCS}
CLEANFILES+= ${GENSRCS}
.include "../Makefile.inc"

View file

@ -1,24 +0,0 @@
# $FreeBSD$
GENSRCS+= xm.h
.if !defined(GDB_CROSS_DEBUGGER)
LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c
LIBSRCS+= amd64-nat.c amd64bsd-nat.c amd64fbsd-nat.c
.endif
LIBSRCS+= solib.c solib-svr4.c
LIBSRCS+= amd64-tdep.c amd64fbsd-tdep.c i386-tdep.c i386bsd-tdep.c \
i386fbsd-tdep-fixed.c i387-tdep.c
nm.h:
echo '#include "i386/nm-fbsd64.h"' > ${.TARGET}
tm.h:
echo '#include "i386/tm-fbsd.h"' > ${.TARGET}
xm.h:
echo '#include "i386/xm-i386.h"' > ${.TARGET}
# Fix source static/extern mismatch nits that GCC 4.2 warns about.
CLEANFILES+= i386fbsd-tdep-fixed.c
i386fbsd-tdep-fixed.c: i386fbsd-tdep.c
sed -e '48s/^static //' ${.ALLSRC} > ${.TARGET}

View file

@ -1,550 +0,0 @@
/* $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 <alloca.h> 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 <vfork.h>. */
/* #undef HAVE_VFORK_H */
/* Define as __inline if that's what the C compiler calls it. */
/* #undef inline */
/* Define to `long' if <sys/types.h> doesn't define. */
/* #undef off_t */
/* Define to `int' if <sys/types.h> 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 <sys/types.h> 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 <sys/stat.h> 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. */
/* #undef HAVE_STRUCT_REG_R_FS */
/* Define if your struct stat has st_blocks. */
#define HAVE_STRUCT_STAT_ST_BLOCKS 1
/* Define if your struct reg has r_gs. */
/* #undef HAVE_STRUCT_REG_R_GS */
/* Define if <link.h> 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 <link.h> 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 <link.h> 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 <sys/link.h> has struct link_map32 */
/* #undef HAVE_STRUCT_LINK_MAP32 */
/* Define if <sys/link.h> 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 <proc_service.h> 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 <sys/ptrace.h> defines the PTRACE_GETREGS request. */
/* #undef HAVE_PTRACE_GETREGS */
/* Define if <sys/ptrace.h> defines the PTRACE_GETFPXREGS request. */
/* #undef HAVE_PTRACE_GETFPXREGS */
/* Define if <sys/ptrace.h> defines the PT_GETDBREGS request. */
#define HAVE_PT_GETDBREGS 1
/* Define if <sys/ptrace.h> defines the PT_GETXMMREGS request. */
/* #undef HAVE_PT_GETXMMREGS */
/* Define if libunwind library is being used. */
/* #undef HAVE_LIBUNWIND */
/* hostfile */
#define GDB_XM_FILE config/i386/xm-i386.h
/* targetfile */
#define GDB_TM_FILE config/i386/tm-fbsd.h
/* nativefile */
#ifndef CROSS_DEBUGGER
#define GDB_NM_FILE config/i386/nm-fbsd64.h
#endif
/* Define to 1 so <sys/proc.h> gets a definition of anon_hdl. Works
around a <sys/proc.h> 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. */
/* #undef HAVE_SBRK */
/* 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 <argz.h> header file. */
/* #undef HAVE_ARGZ_H */
/* Define if you have the <ctype.h> header file. */
#define HAVE_CTYPE_H 1
/* Define if you have the <curses.h> header file. */
#define HAVE_CURSES_H 1
/* Define if you have the <dirent.h> header file. */
#define HAVE_DIRENT_H 1
/* Define if you have the <libunwind-ia64.h> header file. */
/* #undef HAVE_LIBUNWIND_IA64_H */
/* Define if you have the <libunwind.h> header file. */
/* #undef HAVE_LIBUNWIND_H */
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define if you have the <link.h> header file. */
#define HAVE_LINK_H 1
/* Define if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if you have the <machine/reg.h> header file. */
#define HAVE_MACHINE_REG_H 1
/* Define if you have the <malloc.h> header file. */
/* #undef HAVE_MALLOC_H */
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define if you have the <ncurses.h> header file. */
#define HAVE_NCURSES_H 1
/* Define if you have the <ndir.h> header file. */
/* #undef HAVE_NDIR_H */
/* Define if you have the <nl_types.h> header file. */
#define HAVE_NL_TYPES_H 1
/* Define if you have the <nlist.h> header file. */
#define HAVE_NLIST_H 1
/* Define if you have the <poll.h> header file. */
#define HAVE_POLL_H 1
/* Define if you have the <proc_service.h> header file. */
/* #undef HAVE_PROC_SERVICE_H */
/* Define if you have the <ptrace.h> header file. */
/* #undef HAVE_PTRACE_H */
/* Define if you have the <sgtty.h> header file. */
#define HAVE_SGTTY_H 1
/* Define if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define if you have the <sys/debugreg.h> header file. */
/* #undef HAVE_SYS_DEBUGREG_H */
/* Define if you have the <sys/dir.h> header file. */
/* #undef HAVE_SYS_DIR_H */
/* Define if you have the <sys/fault.h> header file. */
/* #undef HAVE_SYS_FAULT_H */
/* Define if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define if you have the <sys/filio.h> header file. */
#define HAVE_SYS_FILIO_H 1
/* Define if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define if you have the <sys/ndir.h> header file. */
/* #undef HAVE_SYS_NDIR_H */
/* Define if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define if you have the <sys/poll.h> header file. */
#define HAVE_SYS_POLL_H 1
/* Define if you have the <sys/proc.h> header file. */
#define HAVE_SYS_PROC_H 1
/* Define if you have the <sys/procfs.h> header file. */
#define HAVE_SYS_PROCFS_H 1
/* Define if you have the <sys/ptrace.h> header file. */
#define HAVE_SYS_PTRACE_H 1
/* Define if you have the <sys/reg.h> header file. */
/* #undef HAVE_SYS_REG_H */
/* Define if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
/* Define if you have the <sys/syscall.h> header file. */
#define HAVE_SYS_SYSCALL_H 1
/* Define if you have the <sys/user.h> header file. */
#define HAVE_SYS_USER_H 1
/* Define if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define if you have the <term.h> header file. */
#define HAVE_TERM_H 1
/* Define if you have the <termio.h> header file. */
/* #undef HAVE_TERMIO_H */
/* Define if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define if you have the <thread_db.h> header file. */
/* #undef HAVE_THREAD_DB_H */
/* Define if you have the <time.h> header file. */
#define HAVE_TIME_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if you have the <values.h> header file. */
/* #undef HAVE_VALUES_H */
/* Define if you have the <wait.h> 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"
/* Define to BFD's default architecture. */
#define DEFAULT_BFD_ARCH bfd_i386_arch
/* Define to BFD's default target vector. */
#define DEFAULT_BFD_VEC bfd_elf64_x86_64_vec
/* Define to 1 if your system has the _etext variable. */
#define HAVE__ETEXT 1
/* Define to 1 to avoid a clash between <widec.h> and <wchar.h> 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 <machine/reg.h>. */
#define HAVE_STRUCT_REG 1
/* Define if <stdint.h> 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 <sys/procfs.h> has pstatus_t. */
/* #undef HAVE_PSTATUS_T */
/* Define if <sys/procfs.h> has prrun_t. */
/* #undef HAVE_PRRUN_T */
/* Define if <sys/procfs.h> has gregset_t. */
#define HAVE_GREGSET_T 1
/* Define if <sys/procfs.h> has fpregset_t. */
#define HAVE_FPREGSET_T 1
/* Define if <sys/procfs.h> has prgregset_t. */
#define HAVE_PRGREGSET_T 1
/* Define if <sys/procfs.h> has prfpregset_t. */
#define HAVE_PRFPREGSET_T 1
/* Define if <sys/procfs.h> has prgregset32_t. */
/* #undef HAVE_PRGREGSET32_T */
/* Define if <sys/procfs.h> has prfpregset32_t. */
/* #undef HAVE_PRFPREGSET32_T */
/* Define if <sys/procfs.h> has lwpid_t. */
#define HAVE_LWPID_T 1
/* Define if <sys/procfs.h> has psaddr_t. */
#define HAVE_PSADDR_T 1
/* Define if <sys/procfs.h> has prsysent_t. */
/* #undef HAVE_PRSYSENT_T */
/* Define if <sys/procfs.h> has pr_sigset_t. */
/* #undef HAVE_PR_SIGSET_T */
/* Define if <sys/procfs.h> has pr_sigaction64_t. */
/* #undef HAVE_PR_SIGACTION64_T */
/* Define if <sys/procfs.h> has pr_siginfo64_t. */
/* #undef HAVE_PR_SIGINFO64_T */
/* Define if <thread_db.h> 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 */

View file

@ -1,234 +0,0 @@
/* $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_amd64fbsd_tdep;
extern initialize_file_ftype _initialize_i386_tdep;
extern initialize_file_ftype _initialize_i386bsd_tdep;
extern initialize_file_ftype _initialize_i386fbsd_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;
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_amd64fbsd_nat;
extern initialize_file_ftype _initialize_gcore;
extern initialize_file_ftype _initialize_fbsd_proc;
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_thread_db;
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_amd64fbsd_tdep ();
_initialize_i386_tdep ();
_initialize_i386bsd_tdep ();
_initialize_i386fbsd_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 ();
_initialize_amd64fbsd_nat ();
_initialize_gcore ();
_initialize_fbsd_proc ();
_initialize_thread_db ();
#endif
_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 ();
}

View file

@ -1,20 +0,0 @@
# $FreeBSD$
GENSRCS+= xm.h
LIBSRCS+= armfbsd-nat.c
LIBSRCS+= arm-tdep.c armfbsd-tdep.c solib.c solib-svr4.c
.if !defined(GDB_CROSS_DEBUGGER)
LIBSRCS+= fbsd-threads.c
.endif
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}

View file

@ -1,552 +0,0 @@
/* $FreeBSD$ */
/* 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 <sys/types.h>
#ifndef CROSS_DEBUGGER
#include <sys/ptrace.h>
#include <machine/reg.h>
#include <machine/frame.h>
#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);
supply_register (ARM_PC_REGNUM, (char *) &gregset->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);
}
/* Fill register REGNO (if it is a general-purpose register) in
*GREGSETPS with the value in GDB's register array. If REGNO is -1,
do this for all registers. */
void
fill_gregset (struct reg *gregset, int regno)
{
int i;
for (i = ARM_A1_REGNUM; i < ARM_SP_REGNUM; i++)
if ((regno == -1 || regno == i))
regcache_collect (i, &gregset->r[i]);
if (regno == -1 || regno == ARM_SP_REGNUM)
regcache_collect (ARM_SP_REGNUM, &gregset->r_sp);
if (regno == -1 || regno == ARM_LR_REGNUM)
regcache_collect (ARM_LR_REGNUM, &gregset->r_lr);
if (regno == -1 || regno == ARM_PC_REGNUM)
regcache_collect (ARM_PC_REGNUM, &gregset->r_pc);
if (regno == -1 || regno == ARM_PS_REGNUM)
regcache_collect (ARM_PS_REGNUM, &gregset->r_cpsr);
}
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);
}
void
fill_fpregset (struct fpreg *fparegset, int regno)
{
int i;
for (i = ARM_F0_REGNUM; i <= ARM_F7_REGNUM; i++)
if (regno == -1 || regno == i)
regcache_raw_supply(current_regcache, i,
&fparegset->fpr[i - ARM_F0_REGNUM]);
if (regno == -1 || regno == ARM_FPS_REGNUM)
regcache_raw_supply(current_regcache, ARM_FPS_REGNUM,
&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);
}

View file

@ -1,68 +0,0 @@
/* $FreeBSD$ */
/* 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);
}

View file

@ -1,562 +0,0 @@
/* $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 <alloca.h> 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 <vfork.h>. */
/* #undef HAVE_VFORK_H */
/* Define as __inline if that's what the C compiler calls it. */
/* #undef inline */
/* Define to `long' if <sys/types.h> doesn't define. */
/* #undef off_t */
/* Define to `int' if <sys/types.h> 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 <sys/types.h> 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 <sys/stat.h> 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 <link.h> 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 <link.h> 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 <link.h> 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 <sys/link.h> has struct link_map32 */
/* #undef HAVE_STRUCT_LINK_MAP32 */
/* Define if <sys/link.h> 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 <proc_service.h> 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 <sys/ptrace.h> defines the PTRACE_GETREGS request. */
/* #undef HAVE_PTRACE_GETREGS */
/* Define if <sys/ptrace.h> defines the PTRACE_GETFPXREGS request. */
/* #undef HAVE_PTRACE_GETFPXREGS */
/* Define if <sys/ptrace.h> defines the PT_GETDBREGS request. */
#define HAVE_PT_GETDBREGS 1
/* Define if <sys/ptrace.h> 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 <sys/proc.h> gets a definition of anon_hdl. Works
around a <sys/proc.h> 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. */
/* #undef HAVE_SBRK */
/* 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 <argz.h> header file. */
/* #undef HAVE_ARGZ_H */
/* Define if you have the <ctype.h> header file. */
#define HAVE_CTYPE_H 1
/* Define if you have the <curses.h> header file. */
#define HAVE_CURSES_H 1
/* Define if you have the <dirent.h> header file. */
#define HAVE_DIRENT_H 1
/* Define if you have the <libunwind-ia64.h> header file. */
/* #undef HAVE_LIBUNWIND_IA64_H */
/* Define if you have the <libunwind.h> header file. */
/* #undef HAVE_LIBUNWIND_H */
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define if you have the <link.h> header file. */
#define HAVE_LINK_H 1
/* Define if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if you have the <machine/reg.h> header file. */
#define HAVE_MACHINE_REG_H 1
/* Define if you have the <malloc.h> header file. */
/* #undef HAVE_MALLOC_H */
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define if you have the <ncurses.h> header file. */
#define HAVE_NCURSES_H 1
/* Define if you have the <ndir.h> header file. */
/* #undef HAVE_NDIR_H */
/* Define if you have the <nl_types.h> header file. */
#define HAVE_NL_TYPES_H 1
/* Define if you have the <nlist.h> header file. */
#define HAVE_NLIST_H 1
/* Define if you have the <poll.h> header file. */
#define HAVE_POLL_H 1
/* Define if you have the <proc_service.h> header file. */
/* #undef HAVE_PROC_SERVICE_H */
/* Define if you have the <ptrace.h> header file. */
/* #undef HAVE_PTRACE_H */
/* Define if you have the <sgtty.h> header file. */
#define HAVE_SGTTY_H 1
/* Define if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define if you have the <sys/debugreg.h> header file. */
/* #undef HAVE_SYS_DEBUGREG_H */
/* Define if you have the <sys/dir.h> header file. */
/* #undef HAVE_SYS_DIR_H */
/* Define if you have the <sys/fault.h> header file. */
/* #undef HAVE_SYS_FAULT_H */
/* Define if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define if you have the <sys/filio.h> header file. */
#define HAVE_SYS_FILIO_H 1
/* Define if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define if you have the <sys/ndir.h> header file. */
/* #undef HAVE_SYS_NDIR_H */
/* Define if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define if you have the <sys/poll.h> header file. */
#define HAVE_SYS_POLL_H 1
/* Define if you have the <sys/proc.h> header file. */
#define HAVE_SYS_PROC_H 1
/* Define if you have the <sys/procfs.h> header file. */
#define HAVE_SYS_PROCFS_H 1
/* Define if you have the <sys/ptrace.h> header file. */
#define HAVE_SYS_PTRACE_H 1
/* Define if you have the <sys/reg.h> header file. */
/* #undef HAVE_SYS_REG_H */
/* Define if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
/* Define if you have the <sys/syscall.h> header file. */
#define HAVE_SYS_SYSCALL_H 1
/* Define if you have the <sys/user.h> header file. */
#define HAVE_SYS_USER_H 1
/* Define if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define if you have the <term.h> header file. */
#define HAVE_TERM_H 1
/* Define if you have the <termio.h> header file. */
/* #undef HAVE_TERMIO_H */
/* Define if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define if you have the <thread_db.h> header file. */
/* #undef HAVE_THREAD_DB_H */
/* Define if you have the <time.h> header file. */
#define HAVE_TIME_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if you have the <values.h> header file. */
/* #undef HAVE_VALUES_H */
/* Define if you have the <wait.h> 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"
/* 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 <widec.h> and <wchar.h> 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 <machine/reg.h>. */
#define HAVE_STRUCT_REG 1
/* Define if <stdint.h> 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 <sys/procfs.h> has pstatus_t. */
/* #undef HAVE_PSTATUS_T */
/* Define if <sys/procfs.h> has prrun_t. */
/* #undef HAVE_PRRUN_T */
/* Define if <sys/procfs.h> has gregset_t. */
#define HAVE_GREGSET_T 1
/* Define if <sys/procfs.h> has fpregset_t. */
#define HAVE_FPREGSET_T 1
/* Define if <sys/procfs.h> has prgregset_t. */
#define HAVE_PRGREGSET_T 1
/* Define if <sys/procfs.h> has prfpregset_t. */
#define HAVE_PRFPREGSET_T 1
/* Define if <sys/procfs.h> has prgregset32_t. */
/* #undef HAVE_PRGREGSET32_T */
/* Define if <sys/procfs.h> has prfpregset32_t. */
/* #undef HAVE_PRFPREGSET32_T */
/* Define if <sys/procfs.h> has lwpid_t. */
#define HAVE_LWPID_T 1
/* Define if <sys/procfs.h> has psaddr_t. */
#define HAVE_PSADDR_T 1
/* Define if <sys/procfs.h> has prsysent_t. */
/* #undef HAVE_PRSYSENT_T */
/* Define if <sys/procfs.h> has pr_sigset_t. */
/* #undef HAVE_PR_SIGSET_T */
/* Define if <sys/procfs.h> has pr_sigaction64_t. */
/* #undef HAVE_PR_SIGACTION64_T */
/* Define if <sys/procfs.h> has pr_siginfo64_t. */
/* #undef HAVE_PR_SIGINFO64_T */
/* Define if <thread_db.h> 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 */

View file

@ -1,228 +0,0 @@
/* $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_thread_db;
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 ();
_initialize_thread_db ();
#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 ();
}

View file

@ -1,35 +0,0 @@
/* $FreeBSD$ */
/* 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
/* We can attach and detach. */
#define ATTACH_DETACH
#endif /* NM_FBSD_H */

View file

@ -1,28 +0,0 @@
/* $FreeBSD$ */
/* 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 */

View file

@ -1,22 +0,0 @@
/* $FreeBSD$ */
/* 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. */

View file

@ -1,23 +0,0 @@
# $FreeBSD$
GENSRCS+= xm.h
.if !defined(GDB_CROSS_DEBUGGER)
LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c
LIBSRCS+= i386-nat.c i386bsd-nat.c i386fbsd-nat.c
.endif
LIBSRCS+= solib.c solib-svr4.c
LIBSRCS+= i386-tdep.c i386bsd-tdep.c i386fbsd-tdep-fixed.c i387-tdep.c
nm.h:
echo '#include "i386/nm-fbsd.h"' > ${.TARGET}
tm.h:
echo '#include "i386/tm-fbsd.h"' > ${.TARGET}
xm.h:
echo '#include "i386/xm-i386.h"' > ${.TARGET}
# Fix source static/extern mismatch nits that GCC 4.2 warns about.
CLEANFILES += i386fbsd-tdep-fixed.c
i386fbsd-tdep-fixed.c: i386fbsd-tdep.c
sed -e '48s/^static\ //' ${.ALLSRC} > ${.TARGET}

View file

@ -1,550 +0,0 @@
/* $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 <alloca.h> 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 <vfork.h>. */
/* #undef HAVE_VFORK_H */
/* Define as __inline if that's what the C compiler calls it. */
/* #undef inline */
/* Define to `long' if <sys/types.h> doesn't define. */
/* #undef off_t */
/* Define to `int' if <sys/types.h> 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 <sys/types.h> 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 <sys/stat.h> 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 <link.h> 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 <link.h> 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 <link.h> 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 <sys/link.h> has struct link_map32 */
/* #undef HAVE_STRUCT_LINK_MAP32 */
/* Define if <sys/link.h> 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 <proc_service.h> 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 <sys/ptrace.h> defines the PTRACE_GETREGS request. */
/* #undef HAVE_PTRACE_GETREGS */
/* Define if <sys/ptrace.h> defines the PTRACE_GETFPXREGS request. */
/* #undef HAVE_PTRACE_GETFPXREGS */
/* Define if <sys/ptrace.h> defines the PT_GETDBREGS request. */
#define HAVE_PT_GETDBREGS 1
/* Define if <sys/ptrace.h> defines the PT_GETXMMREGS request. */
#define HAVE_PT_GETXMMREGS
/* Define if libunwind library is being used. */
/* #undef HAVE_LIBUNWIND */
/* hostfile */
#define GDB_XM_FILE config/i386/xm-i386.h
/* targetfile */
#define GDB_TM_FILE config/i386/tm-fbsd.h
/* nativefile */
#ifndef CROSS_DEBUGGER
#define GDB_NM_FILE config/i386/nm-fbsd.h
#endif
/* Define to 1 so <sys/proc.h> gets a definition of anon_hdl. Works
around a <sys/proc.h> 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. */
/* #undef HAVE_SBRK */
/* 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 <argz.h> header file. */
/* #undef HAVE_ARGZ_H */
/* Define if you have the <ctype.h> header file. */
#define HAVE_CTYPE_H 1
/* Define if you have the <curses.h> header file. */
#define HAVE_CURSES_H 1
/* Define if you have the <dirent.h> header file. */
#define HAVE_DIRENT_H 1
/* Define if you have the <libunwind-ia64.h> header file. */
/* #undef HAVE_LIBUNWIND_IA64_H */
/* Define if you have the <libunwind.h> header file. */
/* #undef HAVE_LIBUNWIND_H */
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define if you have the <link.h> header file. */
#define HAVE_LINK_H 1
/* Define if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if you have the <machine/reg.h> header file. */
#define HAVE_MACHINE_REG_H 1
/* Define if you have the <malloc.h> header file. */
/* #undef HAVE_MALLOC_H */
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define if you have the <ncurses.h> header file. */
#define HAVE_NCURSES_H 1
/* Define if you have the <ndir.h> header file. */
/* #undef HAVE_NDIR_H */
/* Define if you have the <nl_types.h> header file. */
#define HAVE_NL_TYPES_H 1
/* Define if you have the <nlist.h> header file. */
#define HAVE_NLIST_H 1
/* Define if you have the <poll.h> header file. */
#define HAVE_POLL_H 1
/* Define if you have the <proc_service.h> header file. */
/* #undef HAVE_PROC_SERVICE_H */
/* Define if you have the <ptrace.h> header file. */
/* #undef HAVE_PTRACE_H */
/* Define if you have the <sgtty.h> header file. */
#define HAVE_SGTTY_H 1
/* Define if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define if you have the <sys/debugreg.h> header file. */
/* #undef HAVE_SYS_DEBUGREG_H */
/* Define if you have the <sys/dir.h> header file. */
/* #undef HAVE_SYS_DIR_H */
/* Define if you have the <sys/fault.h> header file. */
/* #undef HAVE_SYS_FAULT_H */
/* Define if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define if you have the <sys/filio.h> header file. */
#define HAVE_SYS_FILIO_H 1
/* Define if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define if you have the <sys/ndir.h> header file. */
/* #undef HAVE_SYS_NDIR_H */
/* Define if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define if you have the <sys/poll.h> header file. */
#define HAVE_SYS_POLL_H 1
/* Define if you have the <sys/proc.h> header file. */
#define HAVE_SYS_PROC_H 1
/* Define if you have the <sys/procfs.h> header file. */
#define HAVE_SYS_PROCFS_H 1
/* Define if you have the <sys/ptrace.h> header file. */
#define HAVE_SYS_PTRACE_H 1
/* Define if you have the <sys/reg.h> header file. */
/* #undef HAVE_SYS_REG_H */
/* Define if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
/* Define if you have the <sys/syscall.h> header file. */
#define HAVE_SYS_SYSCALL_H 1
/* Define if you have the <sys/user.h> header file. */
#define HAVE_SYS_USER_H 1
/* Define if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define if you have the <term.h> header file. */
#define HAVE_TERM_H 1
/* Define if you have the <termio.h> header file. */
/* #undef HAVE_TERMIO_H */
/* Define if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define if you have the <thread_db.h> header file. */
/* #undef HAVE_THREAD_DB_H */
/* Define if you have the <time.h> header file. */
#define HAVE_TIME_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if you have the <values.h> header file. */
/* #undef HAVE_VALUES_H */
/* Define if you have the <wait.h> 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"
/* Define to BFD's default architecture. */
#define DEFAULT_BFD_ARCH bfd_i386_arch
/* Define to BFD's default target vector. */
#define DEFAULT_BFD_VEC bfd_elf32_i386_freebsd_vec
/* Define to 1 if your system has the _etext variable. */
#define HAVE__ETEXT 1
/* Define to 1 to avoid a clash between <widec.h> and <wchar.h> 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 <machine/reg.h>. */
#define HAVE_STRUCT_REG 1
/* Define if <stdint.h> 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 <sys/procfs.h> has pstatus_t. */
/* #undef HAVE_PSTATUS_T */
/* Define if <sys/procfs.h> has prrun_t. */
/* #undef HAVE_PRRUN_T */
/* Define if <sys/procfs.h> has gregset_t. */
#define HAVE_GREGSET_T 1
/* Define if <sys/procfs.h> has fpregset_t. */
#define HAVE_FPREGSET_T 1
/* Define if <sys/procfs.h> has prgregset_t. */
#define HAVE_PRGREGSET_T 1
/* Define if <sys/procfs.h> has prfpregset_t. */
#define HAVE_PRFPREGSET_T 1
/* Define if <sys/procfs.h> has prgregset32_t. */
/* #undef HAVE_PRGREGSET32_T */
/* Define if <sys/procfs.h> has prfpregset32_t. */
/* #undef HAVE_PRFPREGSET32_T */
/* Define if <sys/procfs.h> has lwpid_t. */
#define HAVE_LWPID_T 1
/* Define if <sys/procfs.h> has psaddr_t. */
#define HAVE_PSADDR_T 1
/* Define if <sys/procfs.h> has prsysent_t. */
/* #undef HAVE_PRSYSENT_T */
/* Define if <sys/procfs.h> has pr_sigset_t. */
/* #undef HAVE_PR_SIGSET_T */
/* Define if <sys/procfs.h> has pr_sigaction64_t. */
/* #undef HAVE_PR_SIGACTION64_T */
/* Define if <sys/procfs.h> has pr_siginfo64_t. */
/* #undef HAVE_PR_SIGINFO64_T */
/* Define if <thread_db.h> 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 */

View file

@ -1,236 +0,0 @@
/* $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_i386_tdep;
extern initialize_file_ftype _initialize_i386bsd_tdep;
extern initialize_file_ftype _initialize_i386fbsd_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;
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_i386_nat;
extern initialize_file_ftype _initialize_i386bsd_nat;
extern initialize_file_ftype _initialize_i386fbsd_nat;
extern initialize_file_ftype _initialize_gcore;
extern initialize_file_ftype _initialize_fbsd_proc;
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_thread_db;
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_i386_tdep ();
_initialize_i386bsd_tdep ();
_initialize_i386fbsd_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 ();
_initialize_i386_nat ();
_initialize_i386bsd_nat ();
_initialize_i386fbsd_nat ();
_initialize_gcore ();
_initialize_fbsd_proc ();
_initialize_thread_db ();
#endif
_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 ();
}

View file

@ -1,16 +0,0 @@
# $FreeBSD$
#
# XXX Should set DEFAULT_BFD_VEC based on target.
#
.if !defined(GDB_CROSS_DEBUGGER)
LIBSRCS+= mipsfbsd-nat.c fbsd-threads.c
.endif
LIBSRCS+= solib.c solib-svr4.c
LIBSRCS+= mips-tdep.c mipsfbsd-tdep.c fbsd-proc.c
nm.h:
echo '#include "mips/nm-fbsd.h"' > ${.TARGET}
tm.h:
echo '#include "mips/tm-fbsd.h"' > ${.TARGET}

View file

@ -1,550 +0,0 @@
/* $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 <alloca.h> 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 <vfork.h>. */
/* #undef HAVE_VFORK_H */
/* Define as __inline if that's what the C compiler calls it. */
/* #undef inline */
/* Define to `long' if <sys/types.h> doesn't define. */
/* #undef off_t */
/* Define to `int' if <sys/types.h> 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 <sys/types.h> 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 <sys/stat.h> 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. */
/* #undef HAVE_STRUCT_REG_R_FS */
/* Define if your struct stat has st_blocks. */
#define HAVE_STRUCT_STAT_ST_BLOCKS 1
/* Define if your struct reg has r_gs. */
/* #undef HAVE_STRUCT_REG_R_GS */
/* Define if <link.h> 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 <link.h> 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 <link.h> 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 <sys/link.h> has struct link_map32 */
/* #undef HAVE_STRUCT_LINK_MAP32 */
/* Define if <sys/link.h> 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 <proc_service.h> 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 <sys/ptrace.h> defines the PTRACE_GETREGS request. */
/* #undef HAVE_PTRACE_GETREGS */
/* Define if <sys/ptrace.h> defines the PTRACE_GETFPXREGS request. */
/* #undef HAVE_PTRACE_GETFPXREGS */
/* Define if <sys/ptrace.h> defines the PT_GETDBREGS request. */
#define HAVE_PT_GETDBREGS 1
/* Define if <sys/ptrace.h> defines the PT_GETXMMREGS request. */
/* #undef HAVE_PT_GETXMMREGS */
/* Define if libunwind library is being used. */
/* #undef HAVE_LIBUNWIND */
/* hostfile */
/* #undef GDB_XM_FILE */
/* targetfile */
#define GDB_TM_FILE config/mips/tm-fbsd.h
/* nativefile */
#ifndef CROSS_DEBUGGER
#define GDB_NM_FILE config/mips/nm-fbsd.h
#endif
/* Define to 1 so <sys/proc.h> gets a definition of anon_hdl. Works
around a <sys/proc.h> 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. */
/* #undef HAVE_SBRK */
/* 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 <argz.h> header file. */
/* #undef HAVE_ARGZ_H */
/* Define if you have the <ctype.h> header file. */
#define HAVE_CTYPE_H 1
/* Define if you have the <curses.h> header file. */
#define HAVE_CURSES_H 1
/* Define if you have the <dirent.h> header file. */
#define HAVE_DIRENT_H 1
/* Define if you have the <libunwind-ia64.h> header file. */
/* #undef HAVE_LIBUNWIND_IA64_H */
/* Define if you have the <libunwind.h> header file. */
/* #undef HAVE_LIBUNWIND_H */
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define if you have the <link.h> header file. */
#define HAVE_LINK_H 1
/* Define if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if you have the <machine/reg.h> header file. */
#define HAVE_MACHINE_REG_H 1
/* Define if you have the <malloc.h> header file. */
/* #undef HAVE_MALLOC_H */
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define if you have the <ncurses.h> header file. */
#define HAVE_NCURSES_H 1
/* Define if you have the <ndir.h> header file. */
/* #undef HAVE_NDIR_H */
/* Define if you have the <nl_types.h> header file. */
#define HAVE_NL_TYPES_H 1
/* Define if you have the <nlist.h> header file. */
#define HAVE_NLIST_H 1
/* Define if you have the <poll.h> header file. */
#define HAVE_POLL_H 1
/* Define if you have the <proc_service.h> header file. */
/* #undef HAVE_PROC_SERVICE_H */
/* Define if you have the <ptrace.h> header file. */
/* #undef HAVE_PTRACE_H */
/* Define if you have the <sgtty.h> header file. */
#define HAVE_SGTTY_H 1
/* Define if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define if you have the <sys/debugreg.h> header file. */
/* #undef HAVE_SYS_DEBUGREG_H */
/* Define if you have the <sys/dir.h> header file. */
/* #undef HAVE_SYS_DIR_H */
/* Define if you have the <sys/fault.h> header file. */
/* #undef HAVE_SYS_FAULT_H */
/* Define if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define if you have the <sys/filio.h> header file. */
#define HAVE_SYS_FILIO_H 1
/* Define if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define if you have the <sys/ndir.h> header file. */
/* #undef HAVE_SYS_NDIR_H */
/* Define if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define if you have the <sys/poll.h> header file. */
#define HAVE_SYS_POLL_H 1
/* Define if you have the <sys/proc.h> header file. */
#define HAVE_SYS_PROC_H 1
/* Define if you have the <sys/procfs.h> header file. */
#define HAVE_SYS_PROCFS_H 1
/* Define if you have the <sys/ptrace.h> header file. */
#define HAVE_SYS_PTRACE_H 1
/* Define if you have the <sys/reg.h> header file. */
/* #undef HAVE_SYS_REG_H */
/* Define if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
/* Define if you have the <sys/syscall.h> header file. */
#define HAVE_SYS_SYSCALL_H 1
/* Define if you have the <sys/user.h> header file. */
#define HAVE_SYS_USER_H 1
/* Define if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define if you have the <term.h> header file. */
#define HAVE_TERM_H 1
/* Define if you have the <termio.h> header file. */
/* #undef HAVE_TERMIO_H */
/* Define if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define if you have the <thread_db.h> header file. */
/* #undef HAVE_THREAD_DB_H */
/* Define if you have the <time.h> header file. */
#define HAVE_TIME_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if you have the <values.h> header file. */
/* #undef HAVE_VALUES_H */
/* Define if you have the <wait.h> 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"
/* Define to BFD's default architecture. */
#define DEFAULT_BFD_ARCH bfd_mips_arch
/* Define to BFD's default target vector. */
#define DEFAULT_BFD_VEC bfd_elf32_littlemips_vec
/* Define to 1 if your system has the _etext variable. */
#define HAVE__ETEXT 1
/* Define to 1 to avoid a clash between <widec.h> and <wchar.h> 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 <machine/reg.h>. */
#define HAVE_STRUCT_REG 1
/* Define if <stdint.h> 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 <sys/procfs.h> has pstatus_t. */
/* #undef HAVE_PSTATUS_T */
/* Define if <sys/procfs.h> has prrun_t. */
/* #undef HAVE_PRRUN_T */
/* Define if <sys/procfs.h> has gregset_t. */
#define HAVE_GREGSET_T 1
/* Define if <sys/procfs.h> has fpregset_t. */
#define HAVE_FPREGSET_T 1
/* Define if <sys/procfs.h> has prgregset_t. */
#define HAVE_PRGREGSET_T 1
/* Define if <sys/procfs.h> has prfpregset_t. */
#define HAVE_PRFPREGSET_T 1
/* Define if <sys/procfs.h> has prgregset32_t. */
/* #undef HAVE_PRGREGSET32_T */
/* Define if <sys/procfs.h> has prfpregset32_t. */
/* #undef HAVE_PRFPREGSET32_T */
/* Define if <sys/procfs.h> has lwpid_t. */
#define HAVE_LWPID_T 1
/* Define if <sys/procfs.h> has psaddr_t. */
#define HAVE_PSADDR_T 1
/* Define if <sys/procfs.h> has prsysent_t. */
/* #undef HAVE_PRSYSENT_T */
/* Define if <sys/procfs.h> has pr_sigset_t. */
/* #undef HAVE_PR_SIGSET_T */
/* Define if <sys/procfs.h> has pr_sigaction64_t. */
/* #undef HAVE_PR_SIGACTION64_T */
/* Define if <sys/procfs.h> has pr_siginfo64_t. */
/* #undef HAVE_PR_SIGINFO64_T */
/* Define if <thread_db.h> 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 */

View file

@ -1,233 +0,0 @@
/* $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_mips_tdep;
extern initialize_file_ftype _initialize_mipsfbsd_tdep;
extern initialize_file_ftype _initialize_corelow;
extern initialize_file_ftype _initialize_ser_hardwire;
extern initialize_file_ftype _initialize_ser_pipe;
extern initialize_file_ftype _initialize_ser_tcp;
extern initialize_file_ftype _initialize_mipsfbsd_nat;
extern initialize_file_ftype _initialize_mips_nat;
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_solib;
extern initialize_file_ftype _initialize_svr4_solib;
extern initialize_file_ftype _initialize_svr4_lm;
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_mips_tdep ();
_initialize_mipsfbsd_tdep ();
_initialize_corelow ();
_initialize_solib ();
_initialize_svr4_solib ();
_initialize_ser_hardwire ();
_initialize_ser_pipe ();
_initialize_ser_tcp ();
#ifndef CROSS_DEBUGGER
#if 0
_initialize_mipsfbsd_nat ();
_initialize_mips_nat ();
#endif
_initialize_kernel_u_addr ();
_initialize_infptrace ();
_initialize_inftarg ();
_initialize_thread_db ();
#if 0
_initialize_svr4_lm ();
#endif
#endif
_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 ();
}

View file

@ -1,14 +0,0 @@
# $FreeBSD$
.if !defined(GDB_CROSS_DEBUGGER)
LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c
LIBSRCS+= ppcfbsd-nat.c
.endif
LIBSRCS+= solib.c solib-svr4.c
LIBSRCS+= ppc-sysv-tdep.c ppcfbsd-tdep.c rs6000-tdep.c
nm.h:
echo '#include "powerpc/nm-fbsd.h"' > ${.TARGET}
tm.h:
echo '#include "powerpc/tm-ppc-eabi.h"' > ${.TARGET}

View file

@ -1,550 +0,0 @@
/* $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 <alloca.h> 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 <vfork.h>. */
/* #undef HAVE_VFORK_H */
/* Define as __inline if that's what the C compiler calls it. */
/* #undef inline */
/* Define to `long' if <sys/types.h> doesn't define. */
/* #undef off_t */
/* Define to `int' if <sys/types.h> 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 <sys/types.h> 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 <sys/stat.h> 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. */
/* #undef HAVE_STRUCT_REG_R_FS */
/* Define if your struct stat has st_blocks. */
#define HAVE_STRUCT_STAT_ST_BLOCKS 1
/* Define if your struct reg has r_gs. */
/* #undef HAVE_STRUCT_REG_R_GS */
/* Define if <link.h> 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 <link.h> 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 <link.h> 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 <sys/link.h> has struct link_map32 */
/* #undef HAVE_STRUCT_LINK_MAP32 */
/* Define if <sys/link.h> 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 <proc_service.h> 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 <sys/ptrace.h> defines the PTRACE_GETREGS request. */
/* #undef HAVE_PTRACE_GETREGS */
/* Define if <sys/ptrace.h> defines the PTRACE_GETFPXREGS request. */
/* #undef HAVE_PTRACE_GETFPXREGS */
/* Define if <sys/ptrace.h> defines the PT_GETDBREGS request. */
#define HAVE_PT_GETDBREGS 1
/* Define if <sys/ptrace.h> defines the PT_GETXMMREGS request. */
/* #undef HAVE_PT_GETXMMREGS */
/* Define if libunwind library is being used. */
/* #undef HAVE_LIBUNWIND */
/* hostfile */
/* #undef GDB_XM_FILE */
/* targetfile */
#define GDB_TM_FILE config/powerpc/tm-ppc-eabi.h
/* nativefile */
#ifndef CROSS_DEBUGGER
#define GDB_NM_FILE config/powerpc/nm-fbsd.h
#endif
/* Define to 1 so <sys/proc.h> gets a definition of anon_hdl. Works
around a <sys/proc.h> 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. */
/* #undef HAVE_SBRK */
/* 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 <argz.h> header file. */
/* #undef HAVE_ARGZ_H */
/* Define if you have the <ctype.h> header file. */
#define HAVE_CTYPE_H 1
/* Define if you have the <curses.h> header file. */
#define HAVE_CURSES_H 1
/* Define if you have the <dirent.h> header file. */
#define HAVE_DIRENT_H 1
/* Define if you have the <libunwind-ia64.h> header file. */
/* #undef HAVE_LIBUNWIND_IA64_H */
/* Define if you have the <libunwind.h> header file. */
/* #undef HAVE_LIBUNWIND_H */
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define if you have the <link.h> header file. */
#define HAVE_LINK_H 1
/* Define if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if you have the <machine/reg.h> header file. */
#define HAVE_MACHINE_REG_H 1
/* Define if you have the <malloc.h> header file. */
/* #undef HAVE_MALLOC_H */
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define if you have the <ncurses.h> header file. */
#define HAVE_NCURSES_H 1
/* Define if you have the <ndir.h> header file. */
/* #undef HAVE_NDIR_H */
/* Define if you have the <nl_types.h> header file. */
#define HAVE_NL_TYPES_H 1
/* Define if you have the <nlist.h> header file. */
#define HAVE_NLIST_H 1
/* Define if you have the <poll.h> header file. */
#define HAVE_POLL_H 1
/* Define if you have the <proc_service.h> header file. */
/* #undef HAVE_PROC_SERVICE_H */
/* Define if you have the <ptrace.h> header file. */
/* #undef HAVE_PTRACE_H */
/* Define if you have the <sgtty.h> header file. */
#define HAVE_SGTTY_H 1
/* Define if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define if you have the <sys/debugreg.h> header file. */
/* #undef HAVE_SYS_DEBUGREG_H */
/* Define if you have the <sys/dir.h> header file. */
/* #undef HAVE_SYS_DIR_H */
/* Define if you have the <sys/fault.h> header file. */
/* #undef HAVE_SYS_FAULT_H */
/* Define if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define if you have the <sys/filio.h> header file. */
#define HAVE_SYS_FILIO_H 1
/* Define if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define if you have the <sys/ndir.h> header file. */
/* #undef HAVE_SYS_NDIR_H */
/* Define if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define if you have the <sys/poll.h> header file. */
#define HAVE_SYS_POLL_H 1
/* Define if you have the <sys/proc.h> header file. */
#define HAVE_SYS_PROC_H 1
/* Define if you have the <sys/procfs.h> header file. */
#define HAVE_SYS_PROCFS_H 1
/* Define if you have the <sys/ptrace.h> header file. */
#define HAVE_SYS_PTRACE_H 1
/* Define if you have the <sys/reg.h> header file. */
/* #undef HAVE_SYS_REG_H */
/* Define if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
/* Define if you have the <sys/syscall.h> header file. */
#define HAVE_SYS_SYSCALL_H 1
/* Define if you have the <sys/user.h> header file. */
#define HAVE_SYS_USER_H 1
/* Define if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define if you have the <term.h> header file. */
#define HAVE_TERM_H 1
/* Define if you have the <termio.h> header file. */
/* #undef HAVE_TERMIO_H */
/* Define if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define if you have the <thread_db.h> header file. */
/* #undef HAVE_THREAD_DB_H */
/* Define if you have the <time.h> header file. */
#define HAVE_TIME_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if you have the <values.h> header file. */
/* #undef HAVE_VALUES_H */
/* Define if you have the <wait.h> 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"
/* Define to BFD's default architecture. */
#define DEFAULT_BFD_ARCH bfd_rs6000_arch
/* Define to BFD's default target vector. */
#define DEFAULT_BFD_VEC bfd_elf32_powerpc_vec
/* Define to 1 if your system has the _etext variable. */
#define HAVE__ETEXT 1
/* Define to 1 to avoid a clash between <widec.h> and <wchar.h> 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 <machine/reg.h>. */
#define HAVE_STRUCT_REG 1
/* Define if <stdint.h> 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 <sys/procfs.h> has pstatus_t. */
/* #undef HAVE_PSTATUS_T */
/* Define if <sys/procfs.h> has prrun_t. */
/* #undef HAVE_PRRUN_T */
/* Define if <sys/procfs.h> has gregset_t. */
#define HAVE_GREGSET_T 1
/* Define if <sys/procfs.h> has fpregset_t. */
#define HAVE_FPREGSET_T 1
/* Define if <sys/procfs.h> has prgregset_t. */
#define HAVE_PRGREGSET_T 1
/* Define if <sys/procfs.h> has prfpregset_t. */
#define HAVE_PRFPREGSET_T 1
/* Define if <sys/procfs.h> has prgregset32_t. */
/* #undef HAVE_PRGREGSET32_T */
/* Define if <sys/procfs.h> has prfpregset32_t. */
/* #undef HAVE_PRFPREGSET32_T */
/* Define if <sys/procfs.h> has lwpid_t. */
#define HAVE_LWPID_T 1
/* Define if <sys/procfs.h> has psaddr_t. */
#define HAVE_PSADDR_T 1
/* Define if <sys/procfs.h> has prsysent_t. */
/* #undef HAVE_PRSYSENT_T */
/* Define if <sys/procfs.h> has pr_sigset_t. */
/* #undef HAVE_PR_SIGSET_T */
/* Define if <sys/procfs.h> has pr_sigaction64_t. */
/* #undef HAVE_PR_SIGACTION64_T */
/* Define if <sys/procfs.h> has pr_siginfo64_t. */
/* #undef HAVE_PR_SIGINFO64_T */
/* Define if <thread_db.h> 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 */

View file

@ -1,230 +0,0 @@
/* $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_rs6000_tdep;
extern initialize_file_ftype _initialize_ppcfbsd_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;
extern initialize_file_ftype _initialize_fbsd_proc;
extern initialize_file_ftype _initialize_gcore;
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_ppcfbsd_nat;
extern initialize_file_ftype _initialize_thread_db;
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_rs6000_tdep ();
_initialize_ppcfbsd_tdep ();
_initialize_corelow ();
_initialize_solib ();
_initialize_svr4_solib ();
_initialize_ser_hardwire ();
_initialize_ser_pipe ();
_initialize_ser_tcp ();
#ifndef CROSS_DEBUGGER
_initialize_fbsd_proc ();
_initialize_gcore ();
_initialize_kernel_u_addr ();
_initialize_infptrace ();
_initialize_inftarg ();
_initialize_ppcfbsd_nat ();
_initialize_thread_db ();
#endif
_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 ();
}

View file

@ -1,14 +0,0 @@
# $FreeBSD$
.if !defined(GDB_CROSS_DEBUGGER)
LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c
LIBSRCS+= ppcfbsd-nat.c
.endif
LIBSRCS+= solib.c solib-svr4.c
LIBSRCS+= ppc-sysv-tdep.c ppcfbsd-tdep.c rs6000-tdep.c
nm.h:
echo '#include "powerpc/nm-fbsd.h"' > ${.TARGET}
tm.h:
echo '#include "powerpc/tm-ppc-eabi.h"' > ${.TARGET}

View file

@ -1,550 +0,0 @@
/* $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 <alloca.h> 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 <vfork.h>. */
/* #undef HAVE_VFORK_H */
/* Define as __inline if that's what the C compiler calls it. */
/* #undef inline */
/* Define to `long' if <sys/types.h> doesn't define. */
/* #undef off_t */
/* Define to `int' if <sys/types.h> 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 <sys/types.h> 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 <sys/stat.h> 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. */
/* #undef HAVE_STRUCT_REG_R_FS */
/* Define if your struct stat has st_blocks. */
#define HAVE_STRUCT_STAT_ST_BLOCKS 1
/* Define if your struct reg has r_gs. */
/* #undef HAVE_STRUCT_REG_R_GS */
/* Define if <link.h> 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 <link.h> 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 <link.h> 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 <sys/link.h> has struct link_map32 */
/* #undef HAVE_STRUCT_LINK_MAP32 */
/* Define if <sys/link.h> 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 <proc_service.h> 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 <sys/ptrace.h> defines the PTRACE_GETREGS request. */
/* #undef HAVE_PTRACE_GETREGS */
/* Define if <sys/ptrace.h> defines the PTRACE_GETFPXREGS request. */
/* #undef HAVE_PTRACE_GETFPXREGS */
/* Define if <sys/ptrace.h> defines the PT_GETDBREGS request. */
#define HAVE_PT_GETDBREGS 1
/* Define if <sys/ptrace.h> defines the PT_GETXMMREGS request. */
/* #undef HAVE_PT_GETXMMREGS */
/* Define if libunwind library is being used. */
/* #undef HAVE_LIBUNWIND */
/* hostfile */
/* #undef GDB_XM_FILE */
/* targetfile */
#define GDB_TM_FILE config/powerpc/tm-ppc-eabi.h
/* nativefile */
#ifndef CROSS_DEBUGGER
#define GDB_NM_FILE config/ia64/nm-fbsd.h
#endif
/* Define to 1 so <sys/proc.h> gets a definition of anon_hdl. Works
around a <sys/proc.h> 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. */
/* #undef HAVE_SBRK */
/* 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 <argz.h> header file. */
/* #undef HAVE_ARGZ_H */
/* Define if you have the <ctype.h> header file. */
#define HAVE_CTYPE_H 1
/* Define if you have the <curses.h> header file. */
#define HAVE_CURSES_H 1
/* Define if you have the <dirent.h> header file. */
#define HAVE_DIRENT_H 1
/* Define if you have the <libunwind-ia64.h> header file. */
/* #undef HAVE_LIBUNWIND_IA64_H */
/* Define if you have the <libunwind.h> header file. */
/* #undef HAVE_LIBUNWIND_H */
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define if you have the <link.h> header file. */
#define HAVE_LINK_H 1
/* Define if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if you have the <machine/reg.h> header file. */
#define HAVE_MACHINE_REG_H 1
/* Define if you have the <malloc.h> header file. */
/* #undef HAVE_MALLOC_H */
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define if you have the <ncurses.h> header file. */
#define HAVE_NCURSES_H 1
/* Define if you have the <ndir.h> header file. */
/* #undef HAVE_NDIR_H */
/* Define if you have the <nl_types.h> header file. */
#define HAVE_NL_TYPES_H 1
/* Define if you have the <nlist.h> header file. */
#define HAVE_NLIST_H 1
/* Define if you have the <poll.h> header file. */
#define HAVE_POLL_H 1
/* Define if you have the <proc_service.h> header file. */
/* #undef HAVE_PROC_SERVICE_H */
/* Define if you have the <ptrace.h> header file. */
/* #undef HAVE_PTRACE_H */
/* Define if you have the <sgtty.h> header file. */
#define HAVE_SGTTY_H 1
/* Define if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define if you have the <sys/debugreg.h> header file. */
/* #undef HAVE_SYS_DEBUGREG_H */
/* Define if you have the <sys/dir.h> header file. */
/* #undef HAVE_SYS_DIR_H */
/* Define if you have the <sys/fault.h> header file. */
/* #undef HAVE_SYS_FAULT_H */
/* Define if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define if you have the <sys/filio.h> header file. */
#define HAVE_SYS_FILIO_H 1
/* Define if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define if you have the <sys/ndir.h> header file. */
/* #undef HAVE_SYS_NDIR_H */
/* Define if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define if you have the <sys/poll.h> header file. */
#define HAVE_SYS_POLL_H 1
/* Define if you have the <sys/proc.h> header file. */
#define HAVE_SYS_PROC_H 1
/* Define if you have the <sys/procfs.h> header file. */
#define HAVE_SYS_PROCFS_H 1
/* Define if you have the <sys/ptrace.h> header file. */
#define HAVE_SYS_PTRACE_H 1
/* Define if you have the <sys/reg.h> header file. */
/* #undef HAVE_SYS_REG_H */
/* Define if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
/* Define if you have the <sys/syscall.h> header file. */
#define HAVE_SYS_SYSCALL_H 1
/* Define if you have the <sys/user.h> header file. */
#define HAVE_SYS_USER_H 1
/* Define if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define if you have the <term.h> header file. */
#define HAVE_TERM_H 1
/* Define if you have the <termio.h> header file. */
/* #undef HAVE_TERMIO_H */
/* Define if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define if you have the <thread_db.h> header file. */
/* #undef HAVE_THREAD_DB_H */
/* Define if you have the <time.h> header file. */
#define HAVE_TIME_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if you have the <values.h> header file. */
/* #undef HAVE_VALUES_H */
/* Define if you have the <wait.h> 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"
/* Define to BFD's default architecture. */
#define DEFAULT_BFD_ARCH bfd_rs6000_arch
/* Define to BFD's default target vector. */
#define DEFAULT_BFD_VEC bfd_elf64_powerpc_vec
/* Define to 1 if your system has the _etext variable. */
#define HAVE__ETEXT 1
/* Define to 1 to avoid a clash between <widec.h> and <wchar.h> 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 <machine/reg.h>. */
#define HAVE_STRUCT_REG 1
/* Define if <stdint.h> 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 <sys/procfs.h> has pstatus_t. */
/* #undef HAVE_PSTATUS_T */
/* Define if <sys/procfs.h> has prrun_t. */
/* #undef HAVE_PRRUN_T */
/* Define if <sys/procfs.h> has gregset_t. */
#define HAVE_GREGSET_T 1
/* Define if <sys/procfs.h> has fpregset_t. */
#define HAVE_FPREGSET_T 1
/* Define if <sys/procfs.h> has prgregset_t. */
#define HAVE_PRGREGSET_T 1
/* Define if <sys/procfs.h> has prfpregset_t. */
#define HAVE_PRFPREGSET_T 1
/* Define if <sys/procfs.h> has prgregset32_t. */
/* #undef HAVE_PRGREGSET32_T */
/* Define if <sys/procfs.h> has prfpregset32_t. */
/* #undef HAVE_PRFPREGSET32_T */
/* Define if <sys/procfs.h> has lwpid_t. */
#define HAVE_LWPID_T 1
/* Define if <sys/procfs.h> has psaddr_t. */
#define HAVE_PSADDR_T 1
/* Define if <sys/procfs.h> has prsysent_t. */
/* #undef HAVE_PRSYSENT_T */
/* Define if <sys/procfs.h> has pr_sigset_t. */
/* #undef HAVE_PR_SIGSET_T */
/* Define if <sys/procfs.h> has pr_sigaction64_t. */
/* #undef HAVE_PR_SIGACTION64_T */
/* Define if <sys/procfs.h> has pr_siginfo64_t. */
/* #undef HAVE_PR_SIGINFO64_T */
/* Define if <thread_db.h> 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 */

View file

@ -1,230 +0,0 @@
/* $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_rs6000_tdep;
extern initialize_file_ftype _initialize_ppcfbsd_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;
extern initialize_file_ftype _initialize_fbsd_proc;
extern initialize_file_ftype _initialize_gcore;
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_ppcfbsd_nat;
extern initialize_file_ftype _initialize_thread_db;
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_rs6000_tdep ();
_initialize_ppcfbsd_tdep ();
_initialize_corelow ();
_initialize_solib ();
_initialize_svr4_solib ();
_initialize_ser_hardwire ();
_initialize_ser_pipe ();
_initialize_ser_tcp ();
#ifndef CROSS_DEBUGGER
_initialize_fbsd_proc ();
_initialize_gcore ();
_initialize_kernel_u_addr ();
_initialize_infptrace ();
_initialize_inftarg ();
_initialize_ppcfbsd_nat ();
_initialize_thread_db ();
#endif
_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 ();
}

View file

@ -1,14 +0,0 @@
# $FreeBSD$
.if !defined(GDB_CROSS_DEBUGGER)
LIBSRCS+= fbsd-threads.c
LIBSRCS+= solib.c solib-legacy.c solib-svr4.c
LIBSRCS+= sparc-nat.c sparc64-nat.c sparc64fbsd-nat.c
.endif
LIBSRCS+= sparc-tdep.c sparc64-tdep.c sparc64fbsd-tdep.c
nm.h:
echo '#include "sparc/nm-fbsd.h"' > ${.TARGET}
tm.h:
echo '#include "sparc/tm-fbsd.h"' > ${.TARGET}

View file

@ -1,550 +0,0 @@
/* $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 <alloca.h> 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 <vfork.h>. */
/* #undef HAVE_VFORK_H */
/* Define as __inline if that's what the C compiler calls it. */
/* #undef inline */
/* Define to `long' if <sys/types.h> doesn't define. */
/* #undef off_t */
/* Define to `int' if <sys/types.h> 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 <sys/types.h> 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 <sys/stat.h> 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. */
/* #undef HAVE_STRUCT_REG_R_FS */
/* Define if your struct stat has st_blocks. */
#define HAVE_STRUCT_STAT_ST_BLOCKS 1
/* Define if your struct reg has r_gs. */
/* #undef HAVE_STRUCT_REG_R_GS */
/* Define if <link.h> 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 <link.h> 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 <link.h> 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 <sys/link.h> has struct link_map32 */
/* #undef HAVE_STRUCT_LINK_MAP32 */
/* Define if <sys/link.h> 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 <proc_service.h> 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 <sys/ptrace.h> defines the PTRACE_GETREGS request. */
/* #undef HAVE_PTRACE_GETREGS */
/* Define if <sys/ptrace.h> defines the PTRACE_GETFPXREGS request. */
/* #undef HAVE_PTRACE_GETFPXREGS */
/* Define if <sys/ptrace.h> defines the PT_GETDBREGS request. */
#define HAVE_PT_GETDBREGS 1
/* Define if <sys/ptrace.h> defines the PT_GETXMMREGS request. */
/* #undef HAVE_PT_GETXMMREGS */
/* Define if libunwind library is being used. */
/* #undef HAVE_LIBUNWIND */
/* hostfile */
/* #undef GDB_XM_FILE */
/* targetfile */
#define GDB_TM_FILE config/sparc/tm-fbsd.h
/* nativefile */
#ifndef CROSS_DEBUGGER
#define GDB_NM_FILE config/sparc/nm-fbsd.h
#endif
/* Define to 1 so <sys/proc.h> gets a definition of anon_hdl. Works
around a <sys/proc.h> 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. */
/* #undef HAVE_SBRK */
/* 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 <argz.h> header file. */
/* #undef HAVE_ARGZ_H */
/* Define if you have the <ctype.h> header file. */
#define HAVE_CTYPE_H 1
/* Define if you have the <curses.h> header file. */
#define HAVE_CURSES_H 1
/* Define if you have the <dirent.h> header file. */
#define HAVE_DIRENT_H 1
/* Define if you have the <libunwind-ia64.h> header file. */
/* #undef HAVE_LIBUNWIND_IA64_H */
/* Define if you have the <libunwind.h> header file. */
/* #undef HAVE_LIBUNWIND_H */
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define if you have the <link.h> header file. */
#define HAVE_LINK_H 1
/* Define if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if you have the <machine/reg.h> header file. */
#define HAVE_MACHINE_REG_H 1
/* Define if you have the <malloc.h> header file. */
/* #undef HAVE_MALLOC_H */
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define if you have the <ncurses.h> header file. */
#define HAVE_NCURSES_H 1
/* Define if you have the <ndir.h> header file. */
/* #undef HAVE_NDIR_H */
/* Define if you have the <nl_types.h> header file. */
#define HAVE_NL_TYPES_H 1
/* Define if you have the <nlist.h> header file. */
#define HAVE_NLIST_H 1
/* Define if you have the <poll.h> header file. */
#define HAVE_POLL_H 1
/* Define if you have the <proc_service.h> header file. */
/* #undef HAVE_PROC_SERVICE_H */
/* Define if you have the <ptrace.h> header file. */
/* #undef HAVE_PTRACE_H */
/* Define if you have the <sgtty.h> header file. */
#define HAVE_SGTTY_H 1
/* Define if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define if you have the <sys/debugreg.h> header file. */
/* #undef HAVE_SYS_DEBUGREG_H */
/* Define if you have the <sys/dir.h> header file. */
/* #undef HAVE_SYS_DIR_H */
/* Define if you have the <sys/fault.h> header file. */
/* #undef HAVE_SYS_FAULT_H */
/* Define if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define if you have the <sys/filio.h> header file. */
#define HAVE_SYS_FILIO_H 1
/* Define if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define if you have the <sys/ndir.h> header file. */
/* #undef HAVE_SYS_NDIR_H */
/* Define if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define if you have the <sys/poll.h> header file. */
#define HAVE_SYS_POLL_H 1
/* Define if you have the <sys/proc.h> header file. */
#define HAVE_SYS_PROC_H 1
/* Define if you have the <sys/procfs.h> header file. */
#define HAVE_SYS_PROCFS_H 1
/* Define if you have the <sys/ptrace.h> header file. */
#define HAVE_SYS_PTRACE_H 1
/* Define if you have the <sys/reg.h> header file. */
/* #undef HAVE_SYS_REG_H */
/* Define if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
/* Define if you have the <sys/syscall.h> header file. */
#define HAVE_SYS_SYSCALL_H 1
/* Define if you have the <sys/user.h> header file. */
#define HAVE_SYS_USER_H 1
/* Define if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define if you have the <term.h> header file. */
#define HAVE_TERM_H 1
/* Define if you have the <termio.h> header file. */
/* #undef HAVE_TERMIO_H */
/* Define if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define if you have the <thread_db.h> header file. */
/* #undef HAVE_THREAD_DB_H */
/* Define if you have the <time.h> header file. */
#define HAVE_TIME_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if you have the <values.h> header file. */
/* #undef HAVE_VALUES_H */
/* Define if you have the <wait.h> 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"
/* Define to BFD's default architecture. */
#define DEFAULT_BFD_ARCH bfd_sparc_arch
/* Define to BFD's default target vector. */
#define DEFAULT_BFD_VEC bfd_elf64_sparc_vec
/* Define to 1 if your system has the _etext variable. */
#define HAVE__ETEXT 1
/* Define to 1 to avoid a clash between <widec.h> and <wchar.h> 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 <machine/reg.h>. */
#define HAVE_STRUCT_REG 1
/* Define if <stdint.h> 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 <sys/procfs.h> has pstatus_t. */
/* #undef HAVE_PSTATUS_T */
/* Define if <sys/procfs.h> has prrun_t. */
/* #undef HAVE_PRRUN_T */
/* Define if <sys/procfs.h> has gregset_t. */
#define HAVE_GREGSET_T 1
/* Define if <sys/procfs.h> has fpregset_t. */
#define HAVE_FPREGSET_T 1
/* Define if <sys/procfs.h> has prgregset_t. */
#define HAVE_PRGREGSET_T 1
/* Define if <sys/procfs.h> has prfpregset_t. */
#define HAVE_PRFPREGSET_T 1
/* Define if <sys/procfs.h> has prgregset32_t. */
/* #undef HAVE_PRGREGSET32_T */
/* Define if <sys/procfs.h> has prfpregset32_t. */
/* #undef HAVE_PRFPREGSET32_T */
/* Define if <sys/procfs.h> has lwpid_t. */
#define HAVE_LWPID_T 1
/* Define if <sys/procfs.h> has psaddr_t. */
#define HAVE_PSADDR_T 1
/* Define if <sys/procfs.h> has prsysent_t. */
/* #undef HAVE_PRSYSENT_T */
/* Define if <sys/procfs.h> has pr_sigset_t. */
/* #undef HAVE_PR_SIGSET_T */
/* Define if <sys/procfs.h> has pr_sigaction64_t. */
/* #undef HAVE_PR_SIGACTION64_T */
/* Define if <sys/procfs.h> has pr_siginfo64_t. */
/* #undef HAVE_PR_SIGINFO64_T */
/* Define if <thread_db.h> 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 */

View file

@ -1,232 +0,0 @@
/* $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_sparc_tdep;
extern initialize_file_ftype _initialize_sparc64fbsd_tdep;
extern initialize_file_ftype _initialize_corelow;
extern initialize_file_ftype _initialize_ser_hardwire;
extern initialize_file_ftype _initialize_ser_pipe;
extern initialize_file_ftype _initialize_ser_tcp;
extern initialize_file_ftype _initialize_thread_db;
extern initialize_file_ftype _initialize_sparc64fbsd_nat;
extern initialize_file_ftype _initialize_sparc64_nat;
extern initialize_file_ftype _initialize_sparc_nat;
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_solib;
extern initialize_file_ftype _initialize_svr4_solib;
extern initialize_file_ftype _initialize_svr4_lm;
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_sparc_tdep ();
_initialize_sparc64fbsd_tdep ();
_initialize_corelow ();
_initialize_ser_hardwire ();
_initialize_ser_pipe ();
_initialize_ser_tcp ();
#ifndef CROSS_DEBUGGER
_initialize_thread_db ();
_initialize_sparc64fbsd_nat ();
_initialize_sparc64_nat ();
_initialize_sparc_nat ();
_initialize_kernel_u_addr ();
_initialize_infptrace ();
_initialize_inftarg ();
_initialize_solib ();
_initialize_svr4_solib ();
_initialize_svr4_lm ();
#endif
_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 ();
}

View file

@ -1,20 +0,0 @@
# $FreeBSD$
PROG= gdb${GDB_SUFFIX}
SRCS= gdb.c
BULIBS= ${OBJ_BU}/libbfd/libbfd${PIE_SUFFIX}.a \
${OBJ_BU}/libopcodes/libopcodes${PIE_SUFFIX}.a \
${OBJ_BU}/libiberty/libiberty${PIE_SUFFIX}.a
GDBLIBS= ${OBJ_GDB}/libgdb/libgdb${PIE_SUFFIX}.a
# libthread_db.so calls back into gdb for the proc services. Make all the
# global symbols visible.
LDFLAGS+= -Wl,-E
DPADD= ${GDBLIBS} ${BULIBS}
LDADD= ${GDBLIBS} ${BULIBS}
LIBADD+= m edit ncursesw gnuregex
.include <bsd.prog.mk>
CFLAGS+= -DDEBUGDIR=\"${DEBUGDIR}\"

View file

@ -1,25 +0,0 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libreadline/readline \
gnu/lib/libregex \
gnu/usr.bin/binutils/libbfd \
gnu/usr.bin/binutils/libiberty \
gnu/usr.bin/binutils/libopcodes \
gnu/usr.bin/gdb/libgdb \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/msun \
lib/ncurses/ncursesw \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View file

@ -1,376 +0,0 @@
.\" Copyright (c) 1991 Free Software Foundation
.\" See section COPYING for conditions for redistribution
.\" $FreeBSD$
.TH gdb 1 "4nov1991" "GNU Tools" "GNU Tools"
.SH NAME
gdb \- The GNU Debugger
.SH SYNOPSIS
.na
.TP
.B gdb
.RB "[\|" \-help "\|]"
.RB "[\|" \-nx "\|]"
.RB "[\|" \-q "\|]"
.RB "[\|" \-batch "\|]"
.RB "[\|" \-cd=\c
.I dir\c
\|]
.RB "[\|" \-f "\|]"
.RB "[\|" "\-b\ "\c
.IR bps "\|]"
.RB "[\|" "\-tty="\c
.IR dev "\|]"
.RB "[\|" "\-s "\c
.I symfile\c
\&\|]
.RB "[\|" "\-e "\c
.I prog\c
\&\|]
.RB "[\|" "\-se "\c
.I prog\c
\&\|]
.RB "[\|" "\-c "\c
.I core\c
\&\|]
.RB "[\|" "\-x "\c
.I cmds\c
\&\|]
.RB "[\|" "\-d "\c
.I dir\c
\&\|]
.RB "[\|" \c
.I prog\c
.RB "[\|" \c
.IR core \||\| procID\c
\&\|]\&\|]
.ad b
.SH DEPRECATION NOTICE
This version of gdb is deprecated and will be removed from future versions
of the FreeBSD base system.
A newer version of gdb is available from ports or packages
(devel/gdb).
.SH DESCRIPTION
The purpose of a debugger such as GDB is to allow you to see what is
going on ``inside'' another program while it executes\(em\&or what another
program was doing at the moment it crashed.
GDB can do four main kinds of things (plus other things in support of
these) to help you catch bugs in the act:
.TP
\ \ \ \(bu
Start your program, specifying anything that might affect its behavior.
.TP
\ \ \ \(bu
Make your program stop on specified conditions.
.TP
\ \ \ \(bu
Examine what has happened, when your program has stopped.
.TP
\ \ \ \(bu
Change things in your program, so you can experiment with correcting the
effects of one bug and go on to learn about another.
.PP
You can use GDB to debug programs written in C, C++, and Modula-2.
Fortran support will be added when a GNU Fortran compiler is ready.
GDB is invoked with the shell command \c
.B gdb\c
\&. Once started, it reads
commands from the terminal until you tell it to exit with the GDB
command \c
.B quit\c
\&. You can get online help from \c
.B gdb\c
\& itself
by using the command \c
.B help\c
\&.
You can run \c
.B gdb\c
\& with no arguments or options; but the most
usual way to start GDB is with one argument or two, specifying an
executable program as the argument:
.sp
.br
gdb\ program
.br
.sp
You can also start with both an executable program and a core file specified:
.sp
.br
gdb\ program\ core
.br
.sp
You can, instead, specify a process ID as a second argument, if you want
to debug a running process:
.sp
.br
gdb\ program\ 1234
.br
.sp
would attach GDB to process \c
.B 1234\c
\& (unless you also have a file
named `\|\c
.B 1234\c
\&\|'; GDB does check for a core file first).
Here are some of the most frequently needed GDB commands:
.TP
.B break \fR[\|\fIfile\fB:\fR\|]\fIfunction
\&
Set a breakpoint at \c
.I function\c
\& (in \c
.I file\c
\&).
.TP
.B run \fR[\|\fIarglist\fR\|]
Start your program (with \c
.I arglist\c
\&, if specified).
.TP
.B bt
Backtrace: display the program stack.
.TP
.BI print " expr"\c
\&
Display the value of an expression.
.TP
.B c
Continue running your program (after stopping, e.g. at a breakpoint).
.TP
.B next
Execute next program line (after stopping); step \c
.I over\c
\& any
function calls in the line.
.TP
.B step
Execute next program line (after stopping); step \c
.I into\c
\& any
function calls in the line.
.TP
.B help \fR[\|\fIname\fR\|]
Show information about GDB command \c
.I name\c
\&, or general information
about using GDB.
.TP
.B quit
Exit from GDB.
.PP
For full details on GDB, see \c
.I
Using GDB: A Guide to the GNU Source-Level Debugger\c
\&, by Richard M. Stallman and Roland H. Pesch. The same text is available online
as the \c
.B gdb\c
\& entry in the \c
.B info\c
\& program.
.SH OPTIONS
Any arguments other than options specify an executable
file and core file (or process ID); that is, the first argument
encountered with no
associated option flag is equivalent to a `\|\c
.B \-se\c
\&\|' option, and the
second, if any, is equivalent to a `\|\c
.B \-c\c
\&\|' option if it's the name of a file. Many options have
both long and short forms; both are shown here. The long forms are also
recognized if you truncate them, so long as enough of the option is
present to be unambiguous. (If you prefer, you can flag option
arguments with `\|\c
.B +\c
\&\|' rather than `\|\c
.B \-\c
\&\|', though we illustrate the
more usual convention.)
All the options and command line arguments you give are processed
in sequential order. The order makes a difference when the
`\|\c
.B \-x\c
\&\|' option is used.
.TP
.B \-help
.TP
.B \-h
List all options, with brief explanations.
.TP
.BI "\-symbols=" "file"\c
.TP
.BI "\-s " "file"\c
\&
Read symbol table from file \c
.I file\c
\&.
.TP
.BI "\-exec=" "file"\c
.TP
.BI "\-e " "file"\c
\&
Use file \c
.I file\c
\& as the executable file to execute when
appropriate, and for examining pure data in conjunction with a core
dump.
.TP
.BI "\-se=" "file"\c
\&
Read symbol table from file \c
.I file\c
\& and use it as the executable
file.
.TP
.BI "\-core=" "file"\c
.TP
.BI "\-c " "file"\c
\&
Use file \c
.I file\c
\& as a core dump to examine.
.TP
.BI "\-command=" "file"\c
.TP
.BI "\-x " "file"\c
\&
Execute GDB commands from file \c
.I file\c
\&.
.TP
.BI "\-directory=" "directory"\c
.TP
.BI "\-d " "directory"\c
\&
Add \c
.I directory\c
\& to the path to search for source files.
.PP
.TP
.B \-nx
.TP
.B \-n
Do not execute commands from any `\|\c
.B .gdbinit\c
\&\|' initialization files.
Normally, the commands in these files are executed after all the
command options and arguments have been processed.
.TP
.B \-quiet
.TP
.B \-q
``Quiet''. Do not print the introductory and copyright messages. These
messages are also suppressed in batch mode.
.TP
.B \-batch
Run in batch mode. Exit with status \c
.B 0\c
\& after processing all the command
files specified with `\|\c
.B \-x\c
\&\|' (and `\|\c
.B .gdbinit\c
\&\|', if not inhibited).
Exit with nonzero status if an error occurs in executing the GDB
commands in the command files.
Batch mode may be useful for running GDB as a filter, for example to
download and run a program on another computer; in order to make this
more useful, the message
.sp
.br
Program\ exited\ normally.
.br
.sp
(which is ordinarily issued whenever a program running under GDB control
terminates) is not issued when running in batch mode.
.TP
.BI "\-cd=" "directory"\c
\&
Run GDB using \c
.I directory\c
\& as its working directory,
instead of the current directory.
.TP
.B \-fullname
.TP
.B \-f
Emacs sets this option when it runs GDB as a subprocess. It tells GDB
to output the full file name and line number in a standard,
recognizable fashion each time a stack frame is displayed (which
includes each time the program stops). This recognizable format looks
like two `\|\c
.B \e032\c
\&\|' characters, followed by the file name, line number
and character position separated by colons, and a newline. The
Emacs-to-GDB interface program uses the two `\|\c
.B \e032\c
\&\|' characters as
a signal to display the source code for the frame.
.TP
.BI "\-b " "bps"\c
\&
Set the line speed (baud rate or bits per second) of any serial
interface used by GDB for remote debugging.
.TP
.BI "\-tty=" "device"\c
\&
Run using \c
.I device\c
\& for your program's standard input and output.
.PP
.SH "SEE ALSO"
.RB "`\|" gdb "\|'"
entry in
.B info\c
\&;
.I
Using GDB: A Guide to the GNU Source-Level Debugger\c
, Richard M. Stallman and Roland H. Pesch, July 1991.
.SH COPYING
Copyright (c) 1991 Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
.PP
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
.PP
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be included in
translations approved by the Free Software Foundation instead of in
the original English.

View file

@ -1,26 +0,0 @@
# $FreeBSD$
# Not elf specific so don't install in /usr/libexec/elf
BINDIR=/usr/bin
GDBDIR= ${SRCTOP}/contrib/gdb
.PATH: ${GDBDIR}/gdb/signals
.PATH: ${GDBDIR}/gdb/gdbserver
.PATH: ${GDBDIR}/gdb
PROG= gdbserver
SRCS= inferiors.c mem-break.c regcache.c remote-utils.c \
server.c signals.c target.c utils.c
SRCS+= fbsd-low.c
SRCS+= fbsd-${MACHINE_CPUARCH}-low.c reg-${MACHINE_CPUARCH}.c
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
SRCS+= i387-fp.c
.endif
#CFLAGS+= -I${.CURDIR}/../arch/${MACHINE_ARCH}
CFLAGS+= -I${GDBDIR}/gdb/gdbserver
CFLAGS+= -I${GDBDIR}/gdb/regformats
CFLAGS+= -DNO_MMALLOC -DGDBSERVER
.include <bsd.prog.mk>

View file

@ -1,18 +0,0 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
include \
include/arpa \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View file

@ -1,213 +0,0 @@
/* GNU/FreeBSD/amd64 specific low level interface, for the remote server for GDB.
Copyright 1995, 1996, 1998, 1999, 2000, 2001, 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 <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "server.h"
#include "fbsd-low.h"
#include "i387-fp.h"
#include <sys/stddef.h>
#include <sys/types.h>
#include <sys/ptrace.h>
#include <machine/reg.h>
/* Mapping between the general-purpose registers in `struct user'
format and GDB's register array layout. */
static int amd64_regmap[] = {
offsetof(struct reg, r_rax),
offsetof(struct reg, r_rbx),
offsetof(struct reg, r_rcx),
offsetof(struct reg, r_rdx),
offsetof(struct reg, r_rsi),
offsetof(struct reg, r_rdi),
offsetof(struct reg, r_rbp),
offsetof(struct reg, r_rsp),
offsetof(struct reg, r_r8),
offsetof(struct reg, r_r9),
offsetof(struct reg, r_r10),
offsetof(struct reg, r_r11),
offsetof(struct reg, r_r12),
offsetof(struct reg, r_r13),
offsetof(struct reg, r_r14),
offsetof(struct reg, r_r15),
offsetof(struct reg, r_rip),
offsetof(struct reg, r_rflags), /* XXX 64-bit */
offsetof(struct reg, r_cs),
offsetof(struct reg, r_ss),
offsetof(struct reg, r_ds),
offsetof(struct reg, r_es),
offsetof(struct reg, r_fs),
offsetof(struct reg, r_gs),
};
#define AMD64_NUM_REGS (sizeof(amd64_regmap) / sizeof(amd64_regmap[0]))
static const char amd64_breakpoint[] = { 0xCC };
#define AMD64_BP_LEN 1
extern int debug_threads;
static int
amd64_cannot_store_register(int regno)
{
return (regno >= AMD64_NUM_REGS);
}
static int
amd64_cannot_fetch_register(int regno)
{
return (regno >= AMD64_NUM_REGS);
}
static void
amd64_fill_gregset(void *buf)
{
int i;
for (i = 0; i < AMD64_NUM_REGS; i++)
collect_register(i, ((char *)buf) + amd64_regmap[i]);
}
static void
amd64_store_gregset(const void *buf)
{
int i;
for (i = 0; i < AMD64_NUM_REGS; i++)
supply_register(i, ((char *)buf) + amd64_regmap[i]);
}
static void
amd64_fill_fpregset(void *buf)
{
i387_cache_to_fsave(buf);
}
static void
amd64_store_fpregset(const void *buf)
{
i387_fsave_to_cache(buf);
}
static void
amd64_fill_fpxregset(void *buf)
{
i387_cache_to_fxsave(buf);
}
static void
amd64_store_fpxregset(const void *buf)
{
i387_fxsave_to_cache(buf);
}
struct regset_info target_regsets[] = {
{
PT_GETREGS,
PT_SETREGS,
sizeof(struct reg),
GENERAL_REGS,
amd64_fill_gregset,
amd64_store_gregset,
},
#ifdef HAVE_PTRACE_GETFPXREGS
{
PTRACE_GETFPXREGS,
PTRACE_SETFPXREGS,
sizeof(elf_fpxregset_t),
EXTENDED_REGS,
amd64_fill_fpxregset,
amd64_store_fpxregset,
},
#endif
{
PT_GETFPREGS,
PT_SETFPREGS,
sizeof(struct fpreg),
FP_REGS,
amd64_fill_fpregset,
amd64_store_fpregset,
},
{
0,
0,
-1,
-1,
NULL,
NULL,
}
};
static CORE_ADDR
amd64_get_pc(void)
{
unsigned long pc;
collect_register_by_name("rip", &pc);
if (debug_threads)
fprintf(stderr, "stop pc (before any decrement) is %016lx\n", pc);
return (pc);
}
static void
amd64_set_pc(CORE_ADDR newpc)
{
if (debug_threads)
fprintf(stderr, "set pc to %016lx\n", (long)newpc);
supply_register_by_name("rip", &newpc);
}
static int
amd64_breakpoint_at(CORE_ADDR pc)
{
unsigned char c;
read_inferior_memory(pc, &c, 1);
if (c == 0xCC)
return (1);
return (0);
}
struct fbsd_target_ops the_low_target = {
AMD64_NUM_REGS,
amd64_regmap,
amd64_cannot_fetch_register,
amd64_cannot_store_register,
amd64_get_pc,
amd64_set_pc,
amd64_breakpoint,
AMD64_BP_LEN,
NULL,
1,
amd64_breakpoint_at,
};

View file

@ -1,146 +0,0 @@
/* FreeBSD/ARM specific low level interface, for the remote server for GDB.
Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004
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 <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "server.h"
#include "fbsd-low.h"
#ifdef HAVE_SYS_REG_H
#include <sys/reg.h>
#endif
#include <sys/procfs.h>
#include <sys/ptrace.h>
#define arm_num_regs 26
static int arm_regmap[] = {
0, 4, 8, 12, 16, 20, 24, 28,
32, 36, 40, 44, 48, 52, 56, 60,
-1, -1, -1, -1, -1, -1, -1, -1, -1,
64
};
static int
arm_cannot_store_register (int regno)
{
return (regno >= arm_num_regs);
}
static int
arm_cannot_fetch_register (int regno)
{
return (regno >= arm_num_regs);
}
extern int debug_threads;
static CORE_ADDR
arm_get_pc ()
{
unsigned long pc;
collect_register_by_name ("pc", &pc);
if (debug_threads)
fprintf (stderr, "stop pc is %08lx\n", pc);
return pc;
}
static void
arm_set_pc (CORE_ADDR pc)
{
unsigned long newpc = pc;
supply_register_by_name ("pc", &newpc);
}
/* Correct in either endianness. We do not support Thumb yet. */
static const unsigned long arm_breakpoint = 0xef9f0001;
#define arm_breakpoint_len 4
static int
arm_breakpoint_at (CORE_ADDR where)
{
unsigned long insn;
(*the_target->read_memory) (where, (char *) &insn, 4);
if (insn == arm_breakpoint)
return 1;
/* If necessary, recognize more trap instructions here. GDB only uses the
one. */
return 0;
}
/* We only place breakpoints in empty marker functions, and thread locking
is outside of the function. So rather than importing software single-step,
we can just run until exit. */
static CORE_ADDR
arm_reinsert_addr ()
{
unsigned long pc;
collect_register_by_name ("lr", &pc);
return pc;
}
static void
arm_fill_gregset (void *buf)
{
int i;
for (i = 0; i < arm_num_regs; i++)
if (arm_regmap[i] != -1)
collect_register (i, ((char *) buf) + arm_regmap[i]);
}
static void
arm_store_gregset (const void *buf)
{
int i;
for (i = 0; i < arm_num_regs; i++)
if (arm_regmap[i] != -1)
supply_register (i, ((char *) buf) + arm_regmap[i]);
}
struct regset_info target_regsets[] = {
{PT_GETREGS, PT_SETREGS, sizeof (struct reg),
GENERAL_REGS,
arm_fill_gregset, arm_store_gregset },
{ 0, 0, -1, -1, NULL, NULL }
};
struct fbsd_target_ops the_low_target = {
arm_num_regs,
arm_regmap,
arm_cannot_fetch_register,
arm_cannot_store_register,
arm_get_pc,
arm_set_pc,
(const char *) &arm_breakpoint,
arm_breakpoint_len,
arm_reinsert_addr,
0,
arm_breakpoint_at,
};

View file

@ -1,176 +0,0 @@
/* GNU/Linux/i386 specific low level interface, for the remote server for GDB.
Copyright 1995, 1996, 1998, 1999, 2000, 2001, 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 <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "server.h"
#include "fbsd-low.h"
#include "i387-fp.h"
#ifdef HAVE_SYS_REG_H
#include <sys/reg.h>
#else
#include <machine/reg.h>
#endif
/* This module only supports access to the general purpose registers. */
#define i386_num_regs 16
/* This stuff comes from i386-fbsd-nat.c. */
/* Mapping between the general-purpose registers in `struct user'
format and GDB's register array layout. */
static int i386_regmap[] =
{
tEAX * 4, tECX * 4, tEDX * 4, tEBX * 4,
tESP * 4, tEBP * 4, tESI * 4, tEDI * 4,
tEIP * 4, tEFLAGS * 4, tCS * 4, tSS * 4,
tDS * 4, tES * 4, tFS * 4, tGS * 4
};
static int
i386_cannot_store_register (int regno)
{
return (regno >= i386_num_regs);
}
static int
i386_cannot_fetch_register (int regno)
{
return (regno >= i386_num_regs);
}
#include <sys/procfs.h>
#include <sys/ptrace.h>
static void
i386_fill_gregset (void *buf)
{
int i;
for (i = 0; i < i386_num_regs; i++)
collect_register (i, ((char *) buf) + i386_regmap[i]);
}
static void
i386_store_gregset (const void *buf)
{
int i;
for (i = 0; i < i386_num_regs; i++)
supply_register (i, ((char *) buf) + i386_regmap[i]);
}
static void
i386_fill_fpregset (void *buf)
{
i387_cache_to_fsave (buf);
}
static void
i386_store_fpregset (const void *buf)
{
i387_fsave_to_cache (buf);
}
static void
i386_fill_fpxregset (void *buf)
{
i387_cache_to_fxsave (buf);
}
static void
i386_store_fpxregset (const void *buf)
{
i387_fxsave_to_cache (buf);
}
struct regset_info target_regsets[] = {
{ PT_GETREGS, PT_SETREGS, sizeof (struct reg),
GENERAL_REGS,
i386_fill_gregset, i386_store_gregset },
#ifdef HAVE_PTRACE_GETFPXREGS
{ PTRACE_GETFPXREGS, PTRACE_SETFPXREGS, sizeof (elf_fpxregset_t),
EXTENDED_REGS,
i386_fill_fpxregset, i386_store_fpxregset },
#endif
{ PT_GETFPREGS, PT_SETFPREGS, sizeof (struct fpreg),
FP_REGS,
i386_fill_fpregset, i386_store_fpregset },
{ 0, 0, -1, -1, NULL, NULL }
};
static const char i386_breakpoint[] = { 0xCC };
#define i386_breakpoint_len 1
extern int debug_threads;
static CORE_ADDR
i386_get_pc ()
{
unsigned long pc;
collect_register_by_name ("eip", &pc);
if (debug_threads)
fprintf (stderr, "stop pc (before any decrement) is %08lx\n", pc);
return pc;
}
static void
i386_set_pc (CORE_ADDR newpc)
{
if (debug_threads)
fprintf (stderr, "set pc to %08lx\n", (long) newpc);
supply_register_by_name ("eip", &newpc);
}
static int
i386_breakpoint_at (CORE_ADDR pc)
{
unsigned char c;
read_inferior_memory (pc, &c, 1);
if (c == 0xCC)
return 1;
return 0;
}
struct fbsd_target_ops the_low_target = {
i386_num_regs,
i386_regmap,
i386_cannot_fetch_register,
i386_cannot_store_register,
i386_get_pc,
i386_set_pc,
i386_breakpoint,
i386_breakpoint_len,
NULL,
1,
i386_breakpoint_at,
};

File diff suppressed because it is too large Load diff

View file

@ -1,122 +0,0 @@
/* Internal interfaces for the GNU/Linux specific target code for gdbserver.
Copyright 2002, 2004 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. */
/*
* $FreeBSD$
*/
typedef void (*regset_fill_func) (void *);
typedef void (*regset_store_func) (const void *);
enum regset_type {
GENERAL_REGS,
FP_REGS,
EXTENDED_REGS,
};
struct regset_info
{
int get_request, set_request;
int size;
enum regset_type type;
regset_fill_func fill_function;
regset_store_func store_function;
};
extern struct regset_info target_regsets[];
struct fbsd_target_ops
{
int num_regs;
int *regmap;
int (*cannot_fetch_register) (int);
/* Returns 0 if we can store the register, 1 if we can not
store the register, and 2 if failure to store the register
is acceptable. */
int (*cannot_store_register) (int);
CORE_ADDR (*get_pc) (void);
void (*set_pc) (CORE_ADDR newpc);
const char *breakpoint;
int breakpoint_len;
CORE_ADDR (*breakpoint_reinsert_addr) (void);
int decr_pc_after_break;
int (*breakpoint_at) (CORE_ADDR pc);
};
extern struct fbsd_target_ops the_low_target;
#define get_process(inf) ((struct process_info *)(inf))
#define get_thread_process(thr) (get_process (inferior_target_data (thr)))
#define get_process_thread(proc) ((struct thread_info *) \
find_inferior_id (&all_threads, \
get_process (proc)->tid))
struct process_info
{
struct inferior_list_entry head;
int thread_known;
int lwpid;
int tid;
/* If this flag is set, the next SIGSTOP will be ignored (the process will
be immediately resumed). */
int stop_expected;
/* If this flag is set, the process is known to be stopped right now (stop
event already received in a wait()). */
int stopped;
/* If this flag is set, we have sent a SIGSTOP to this process and are
waiting for it to stop. */
int sigstop_sent;
/* If this flag is set, STATUS_PENDING is a waitstatus that has not yet
been reported. */
int status_pending_p;
int status_pending;
/* If this flag is set, the pending status is a (GDB-placed) breakpoint. */
int pending_is_breakpoint;
CORE_ADDR pending_stop_pc;
/* If this is non-zero, it is a breakpoint to be reinserted at our next
stop (SIGTRAP stops only). */
CORE_ADDR bp_reinsert;
/* If this flag is set, the last continue operation on this process
was a single-step. */
int stepping;
/* If this is non-zero, it points to a chain of signals which need to
be delivered to this process. */
struct pending_signals *pending_signals;
/* A link used when resuming. It is initialized from the resume request,
and then processed and cleared in fbsd_resume_one_process. */
struct thread_resume *resume;
};
extern struct inferior_list all_processes;
void fbsd_attach_lwp (int pid, int tid);
int thread_db_init (void);

View file

@ -1,156 +0,0 @@
/* FreeBSD/PowerPC specific low level interface, for the remote server for
GDB.
Copyright 1995, 1996, 1998, 1999, 2000, 2001, 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 <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "server.h"
#include "fbsd-low.h"
#include <sys/procfs.h>
#include <sys/ptrace.h>
#define ppc_num_regs 71
/* Currently, don't check/send MQ. */
static int ppc_regmap[] =
{ 0, 4, 8, 12, 16, 20, 24, 28,
32, 36, 40, 44, 48, 52, 56, 60,
64, 68, 72, 76, 80, 84, 88, 92,
96, 100, 104, 108, 112, 116, 120, 124,
#if 0
/*
* XXX on FreeBSD the gdbserver for PowerPC was only tested with FPU-less
* cores i.e. e500. Let's leave the original FPR references around in case
* someone picks up and brings support for AIM-like FPU machines.
*/
PT_FPR0*4, PT_FPR0*4 + 8, PT_FPR0*4+16, PT_FPR0*4+24,
PT_FPR0*4+32, PT_FPR0*4+40, PT_FPR0*4+48, PT_FPR0*4+56,
PT_FPR0*4+64, PT_FPR0*4+72, PT_FPR0*4+80, PT_FPR0*4+88,
PT_FPR0*4+96, PT_FPR0*4+104, PT_FPR0*4+112, PT_FPR0*4+120,
PT_FPR0*4+128, PT_FPR0*4+136, PT_FPR0*4+144, PT_FPR0*4+152,
PT_FPR0*4+160, PT_FPR0*4+168, PT_FPR0*4+176, PT_FPR0*4+184,
PT_FPR0*4+192, PT_FPR0*4+200, PT_FPR0*4+208, PT_FPR0*4+216,
PT_FPR0*4+224, PT_FPR0*4+232, PT_FPR0*4+240, PT_FPR0*4+248,
#endif
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
144, -1, 132, 128, 140, 136, -1
};
static int
ppc_cannot_store_register (int regno)
{
/* Some kernels do not allow us to store fpscr. */
if (regno == find_regno ("fpscr"))
return 2;
return 0;
}
static int
ppc_cannot_fetch_register (int regno)
{
return 0;
}
static CORE_ADDR
ppc_get_pc (void)
{
unsigned long pc;
collect_register_by_name ("pc", &pc);
return (CORE_ADDR) pc;
}
static void
ppc_set_pc (CORE_ADDR pc)
{
unsigned long newpc = pc;
supply_register_by_name ("pc", &newpc);
}
/* Correct in either endianness. Note that this file is
for PowerPC only, not PowerPC64.
This instruction is "twge r2, r2", which GDB uses as a software
breakpoint. */
static const unsigned long ppc_breakpoint = 0x7d821008;
#define ppc_breakpoint_len 4
static int
ppc_breakpoint_at (CORE_ADDR where)
{
unsigned long insn;
(*the_target->read_memory) (where, (char *) &insn, 4);
if (insn == ppc_breakpoint)
return 1;
/* If necessary, recognize more trap instructions here. GDB only uses the
one. */
return 0;
}
static void
ppc_fill_gregset (void *buf)
{
int i;
for (i = 0; i < ppc_num_regs; i++)
if (ppc_regmap[i] != -1)
collect_register (i, ((char *) buf) + ppc_regmap[i]);
}
static void
ppc_store_gregset (const void *buf)
{
int i;
for (i = 0; i < ppc_num_regs; i++)
if (ppc_regmap[i] != -1)
supply_register (i, ((char *) buf) + ppc_regmap[i]);
}
struct regset_info target_regsets[] = {
{ PT_GETREGS, PT_SETREGS, sizeof (struct reg),
GENERAL_REGS,
ppc_fill_gregset, ppc_store_gregset },
{ 0, 0, -1, -1, NULL, NULL }
};
struct fbsd_target_ops the_low_target = {
ppc_num_regs,
ppc_regmap,
ppc_cannot_fetch_register,
ppc_cannot_store_register,
ppc_get_pc,
ppc_set_pc,
(const char *) &ppc_breakpoint,
ppc_breakpoint_len,
NULL,
0,
ppc_breakpoint_at,
};

View file

@ -1,99 +0,0 @@
/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
/* A register protocol for GDB, the GNU debugger.
Copyright 2001, 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. */
/* This file was created with the aid of ``regdat.sh'' and ``../../../../contrib/gdb/gdb/regformats/reg-x86-64.dat''. */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "regdef.h"
#include "regcache.h"
struct reg regs_x86_64[] = {
{ "rax", 0, 64 },
{ "rbx", 64, 64 },
{ "rcx", 128, 64 },
{ "rdx", 192, 64 },
{ "rsi", 256, 64 },
{ "rdi", 320, 64 },
{ "rbp", 384, 64 },
{ "rsp", 448, 64 },
{ "r8", 512, 64 },
{ "r9", 576, 64 },
{ "r10", 640, 64 },
{ "r11", 704, 64 },
{ "r12", 768, 64 },
{ "r13", 832, 64 },
{ "r14", 896, 64 },
{ "r15", 960, 64 },
{ "rip", 1024, 64 },
{ "eflags", 1088, 32 },
{ "cs", 1120, 32 },
{ "ss", 1152, 32 },
{ "ds", 1184, 32 },
{ "es", 1216, 32 },
{ "fs", 1248, 32 },
{ "gs", 1280, 32 },
{ "st0", 1312, 80 },
{ "st1", 1392, 80 },
{ "st2", 1472, 80 },
{ "st3", 1552, 80 },
{ "st4", 1632, 80 },
{ "st5", 1712, 80 },
{ "st6", 1792, 80 },
{ "st7", 1872, 80 },
{ "fctrl", 1952, 32 },
{ "fstat", 1984, 32 },
{ "ftag", 2016, 32 },
{ "fiseg", 2048, 32 },
{ "fioff", 2080, 32 },
{ "foseg", 2112, 32 },
{ "fooff", 2144, 32 },
{ "fop", 2176, 32 },
{ "xmm0", 2208, 128 },
{ "xmm1", 2336, 128 },
{ "xmm2", 2464, 128 },
{ "xmm3", 2592, 128 },
{ "xmm4", 2720, 128 },
{ "xmm5", 2848, 128 },
{ "xmm6", 2976, 128 },
{ "xmm7", 3104, 128 },
{ "xmm8", 3232, 128 },
{ "xmm9", 3360, 128 },
{ "xmm10", 3488, 128 },
{ "xmm11", 3616, 128 },
{ "xmm12", 3744, 128 },
{ "xmm13", 3872, 128 },
{ "xmm14", 4000, 128 },
{ "xmm15", 4128, 128 },
{ "mxcsr", 4256, 32 },
};
const char *expedite_regs_x86_64[] = { "rbp", "rsp", "rip", 0 };
void
init_registers ()
{
set_register_cache (regs_x86_64,
sizeof (regs_x86_64) / sizeof (regs_x86_64[0]));
gdbserver_expedite_regs = expedite_regs_x86_64;
}

View file

@ -1,68 +0,0 @@
/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
/* A register protocol for GDB, the GNU debugger.
Copyright 2001, 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. */
/* This file was created with the aid of ``regdat.sh'' and ``reg-arm.dat''. */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "regdef.h"
#include "regcache.h"
struct reg regs_arm[] = {
{ "r0", 0, 32 },
{ "r1", 32, 32 },
{ "r2", 64, 32 },
{ "r3", 96, 32 },
{ "r4", 128, 32 },
{ "r5", 160, 32 },
{ "r6", 192, 32 },
{ "r7", 224, 32 },
{ "r8", 256, 32 },
{ "r9", 288, 32 },
{ "r10", 320, 32 },
{ "r11", 352, 32 },
{ "r12", 384, 32 },
{ "sp", 416, 32 },
{ "lr", 448, 32 },
{ "pc", 480, 32 },
{ "f0", 512, 96 },
{ "f1", 608, 96 },
{ "f2", 704, 96 },
{ "f3", 800, 96 },
{ "f4", 896, 96 },
{ "f5", 992, 96 },
{ "f6", 1088, 96 },
{ "f7", 1184, 96 },
{ "fps", 1280, 32 },
{ "cpsr", 1312, 32 },
};
const char *expedite_regs_arm[] = { "r11", "sp", "pc", 0 };
void
init_registers ()
{
set_register_cache (regs_arm,
sizeof (regs_arm) / sizeof (regs_arm[0]));
gdbserver_expedite_regs = expedite_regs_arm;
}

View file

@ -1,63 +0,0 @@
/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
/* This file was created with the aid of ``regdat.sh'' and ``../../../../contrib/gdb/gdb/regformats/reg-i386.dat''. */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "regdef.h"
#include "regcache.h"
struct reg regs_i386[] = {
{ "eax", 0, 32 },
{ "ecx", 32, 32 },
{ "edx", 64, 32 },
{ "ebx", 96, 32 },
{ "esp", 128, 32 },
{ "ebp", 160, 32 },
{ "esi", 192, 32 },
{ "edi", 224, 32 },
{ "eip", 256, 32 },
{ "eflags", 288, 32 },
{ "cs", 320, 32 },
{ "ss", 352, 32 },
{ "ds", 384, 32 },
{ "es", 416, 32 },
{ "fs", 448, 32 },
{ "gs", 480, 32 },
{ "st0", 512, 80 },
{ "st1", 592, 80 },
{ "st2", 672, 80 },
{ "st3", 752, 80 },
{ "st4", 832, 80 },
{ "st5", 912, 80 },
{ "st6", 992, 80 },
{ "st7", 1072, 80 },
{ "fctrl", 1152, 32 },
{ "fstat", 1184, 32 },
{ "ftag", 1216, 32 },
{ "fiseg", 1248, 32 },
{ "fioff", 1280, 32 },
{ "foseg", 1312, 32 },
{ "fooff", 1344, 32 },
{ "fop", 1376, 32 },
{ "xmm0", 1408, 128 },
{ "xmm1", 1536, 128 },
{ "xmm2", 1664, 128 },
{ "xmm3", 1792, 128 },
{ "xmm4", 1920, 128 },
{ "xmm5", 2048, 128 },
{ "xmm6", 2176, 128 },
{ "xmm7", 2304, 128 },
{ "mxcsr", 2432, 32 },
};
const char *expedite_regs_i386[] = { "ebp", "esp", "eip", 0 };
void
init_registers ()
{
set_register_cache (regs_i386,
sizeof (regs_i386) / sizeof (regs_i386[0]));
gdbserver_expedite_regs = expedite_regs_i386;
}

View file

@ -1,113 +0,0 @@
/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
/* A register protocol for GDB, the GNU debugger.
Copyright 2001, 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. */
/* This file was created with the aid of ``regdat.sh'' and ``../../../../contrib/gdb/gdb/regformats/reg-ppc.dat''. */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "regdef.h"
#include "regcache.h"
struct reg regs_ppc[] = {
{ "r0", 0, 32 },
{ "r1", 32, 32 },
{ "r2", 64, 32 },
{ "r3", 96, 32 },
{ "r4", 128, 32 },
{ "r5", 160, 32 },
{ "r6", 192, 32 },
{ "r7", 224, 32 },
{ "r8", 256, 32 },
{ "r9", 288, 32 },
{ "r10", 320, 32 },
{ "r11", 352, 32 },
{ "r12", 384, 32 },
{ "r13", 416, 32 },
{ "r14", 448, 32 },
{ "r15", 480, 32 },
{ "r16", 512, 32 },
{ "r17", 544, 32 },
{ "r18", 576, 32 },
{ "r19", 608, 32 },
{ "r20", 640, 32 },
{ "r21", 672, 32 },
{ "r22", 704, 32 },
{ "r23", 736, 32 },
{ "r24", 768, 32 },
{ "r25", 800, 32 },
{ "r26", 832, 32 },
{ "r27", 864, 32 },
{ "r28", 896, 32 },
{ "r29", 928, 32 },
{ "r30", 960, 32 },
{ "r31", 992, 32 },
{ "f0", 1024, 64 },
{ "f1", 1088, 64 },
{ "f2", 1152, 64 },
{ "f3", 1216, 64 },
{ "f4", 1280, 64 },
{ "f5", 1344, 64 },
{ "f6", 1408, 64 },
{ "f7", 1472, 64 },
{ "f8", 1536, 64 },
{ "f9", 1600, 64 },
{ "f10", 1664, 64 },
{ "f11", 1728, 64 },
{ "f12", 1792, 64 },
{ "f13", 1856, 64 },
{ "f14", 1920, 64 },
{ "f15", 1984, 64 },
{ "f16", 2048, 64 },
{ "f17", 2112, 64 },
{ "f18", 2176, 64 },
{ "f19", 2240, 64 },
{ "f20", 2304, 64 },
{ "f21", 2368, 64 },
{ "f22", 2432, 64 },
{ "f23", 2496, 64 },
{ "f24", 2560, 64 },
{ "f25", 2624, 64 },
{ "f26", 2688, 64 },
{ "f27", 2752, 64 },
{ "f28", 2816, 64 },
{ "f29", 2880, 64 },
{ "f30", 2944, 64 },
{ "f31", 3008, 64 },
{ "pc", 3072, 32 },
{ "ps", 3104, 32 },
{ "cr", 3136, 32 },
{ "lr", 3168, 32 },
{ "ctr", 3200, 32 },
{ "xer", 3232, 32 },
{ "fpscr", 3264, 32 },
};
const char *expedite_regs_ppc[] = { "r1", "pc", 0 };
void
init_registers ()
{
set_register_cache (regs_ppc,
sizeof (regs_ppc) / sizeof (regs_ppc[0]));
gdbserver_expedite_regs = expedite_regs_ppc;
}

View file

@ -1,16 +0,0 @@
# $FreeBSD$
PROG= kgdb${GDB_SUFFIX}
SRCS= main.c kld.c kthr.c trgt.c trgt_${TARGET_CPUARCH}.c
WARNS?= 2
BULIBS= ${OBJ_BU}/libbfd/libbfd${PIE_SUFFIX}.a \
${OBJ_BU}/libopcodes/libopcodes${PIE_SUFFIX}.a \
${OBJ_BU}/libiberty/libiberty${PIE_SUFFIX}.a
GDBLIBS= ${OBJ_GDB}/libgdb/libgdb${PIE_SUFFIX}.a
DPADD= ${GDBLIBS} ${BULIBS}
LDADD= ${GDBLIBS} ${BULIBS}
LIBADD+= m edit ncursesw gnuregex kvm
.include <bsd.prog.mk>

View file

@ -1,27 +0,0 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libreadline/readline \
gnu/lib/libregex \
gnu/usr.bin/binutils/libbfd \
gnu/usr.bin/binutils/libiberty \
gnu/usr.bin/binutils/libopcodes \
gnu/usr.bin/gdb/libgdb \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libelf \
lib/libkvm \
lib/msun \
lib/ncurses/ncursesw \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View file

@ -1,150 +0,0 @@
.\" Copyright (c) 2004 Marcel Moolenaar
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd July 5, 2017
.Dt KGDB 1
.Os
.Sh NAME
.Nm kgdb
.Nd "kernel debugger"
.Sh SYNOPSIS
.Nm
.Op Fl a | Fl f | Fl fullname
.Op Fl b Ar rate
.Op Fl q | Fl quiet
.Op Fl v
.Op Fl w
.Op Fl d Ar crashdir
.Op Fl c Ar core | Fl n Ar dumpnr | Fl r Ar device
.Op Ar kernel Op Ar core
.Sh DEPRECATION NOTICE
This version of
.Nm
is deprecated and will be removed from future versions of the
.Fx
base system.
A newer version of
.Nm
is available from ports or packages
(devel/gdb).
.Sh DESCRIPTION
The
.Nm
utility is a debugger based on
.Xr gdb 1
that allows debugging of kernel core files.
.Pp
The options are as follows:
.Bl -tag -width ".Fl d Ar crashdir"
.It Fl a
Increase the annotation level.
An annotation level of 1 features the historical
.Fl fullname
option of
.Xr gdb 1 .
This is useful when running
.Nm
in Emacs.
The
.Fl f
or
.Fl fullname
options are supported for backward compatibility as well.
.It Fl b Ar rate
Set the baudrate to
.Ar rate .
.It Fl q
Suppress printing of the banner when the debugger starts.
The
.Fl quiet
form is supported for compatibility as well.
.It Fl v
Increase verbosity.
.It Fl w
Opens kmem-based targets in read-write mode.
(This is identical to what
.Fl -wcore
used to do in previous
gdb versions for
.Fx . )
.It Fl d Ar crashdir
Use
.Ar crashdir
instead of the default,
.Pa /var/crash
to locate kernel core dump files in.
The name
.Pa vmcore.
plus the dump number will be appended to determine
the actual dump file name.
.It Fl c Ar core
Explicitly use
.Ar core
as the core dump file.
.It Fl n Ar dumpnr
Use the kernel core dump file numbered
.Ar dumpnr
for debugging.
.It Fl r Ar device
Use
.Ar device
to connect
.Nm
to for a remote debugging session.
.El
.Pp
The
.Fl c , n ,
and
.Fl r
options are mutually exclusive.
.Pp
Optionally, the name of the kernel symbol file and
the name of the core dump file can be supplied on the
command-line as positional arguments.
If no kernel symbol file name has been given, the
symbol file of the currently running kernel will be
used.
If no core dump file has been specified through either
of the options or the last command-line argument,
.Pa /dev/mem
will be opened to allow debugging the currently running
kernel.
.Sh FILES
.Bl -tag -width ".Pa /var/crash"
.It Pa /dev/mem
Default memory image to open if no core dump file
has been specified.
.It Pa /var/crash
Default directory to locate kernel core dump files.
.El
.Sh SEE ALSO
.Xr gdb 1
.Sh HISTORY
The
.Nm
utility first appeared in its current form in
.Fx 5.3 .

View file

@ -1,81 +0,0 @@
/*
* Copyright (c) 2004 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifndef _KGDB_H_
#define _KGDB_H_
struct thread_info;
extern kvm_t *kvm;
struct kthr {
struct kthr *next;
uintptr_t paddr;
uintptr_t kaddr;
uintptr_t kstack;
uintptr_t pcb;
int tid;
int pid;
int cpu;
};
extern struct kthr *curkthr;
void initialize_kld_target(void);
void initialize_kgdb_target(void);
void kgdb_dmesg(void);
CORE_ADDR kgdb_trgt_core_pcb(u_int);
CORE_ADDR kgdb_trgt_stop_pcb(u_int, u_int);
void kgdb_trgt_new_objfile(struct objfile *);
void kgdb_trgt_fetch_registers(int);
void kgdb_trgt_store_registers(int);
void kld_init(void);
void kld_new_objfile(struct objfile *);
frame_unwind_sniffer_ftype kgdb_trgt_trapframe_sniffer;
struct kthr *kgdb_thr_first(void);
struct kthr *kgdb_thr_init(void);
struct kthr *kgdb_thr_lookup_tid(int);
struct kthr *kgdb_thr_lookup_pid(int);
struct kthr *kgdb_thr_lookup_paddr(uintptr_t);
struct kthr *kgdb_thr_lookup_taddr(uintptr_t);
struct kthr *kgdb_thr_next(struct kthr *);
struct kthr *kgdb_thr_select(struct kthr *);
char *kgdb_thr_extra_thread_info(int);
CORE_ADDR kgdb_lookup(const char *sym);
CORE_ADDR kgdb_parse_1(const char *, int);
#define kgdb_parse(exp) kgdb_parse_1((exp), 0)
#define kgdb_parse_quiet(exp) kgdb_parse_1((exp), 1)
extern int (*arm_tdep_pc_fixup)(CORE_ADDR *pc);
int kgdb_trgt_pc_fixup(CORE_ADDR *pc);
#endif /* _KGDB_H_ */

View file

@ -1,515 +0,0 @@
/*
* Copyright (c) 2004 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <kvm.h>
#include <libgen.h>
#include <defs.h>
#include <command.h>
#include <completer.h>
#include <environ.h>
#include <exec.h>
#include <frame-unwind.h>
#include <inferior.h>
#include <objfiles.h>
#include <gdbcore.h>
#include <language.h>
#include <solist.h>
#include "kgdb.h"
struct lm_info {
CORE_ADDR base_address;
};
/* Offsets of fields in linker_file structure. */
static CORE_ADDR off_address, off_filename, off_pathname, off_next;
/* KVA of 'linker_path' which corresponds to the kern.module_path sysctl .*/
static CORE_ADDR module_path_addr;
static CORE_ADDR linker_files_addr;
static CORE_ADDR kernel_file_addr;
static struct target_so_ops kld_so_ops;
static int
kld_ok (char *path)
{
struct stat sb;
if (stat(path, &sb) == 0 && S_ISREG(sb.st_mode))
return (1);
return (0);
}
/*
* Look for a matching file checking for debug suffixes before the raw file:
* - filename + ".debug" (e.g. foo.ko.debug)
* - filename (e.g. foo.ko)
*/
static const char *kld_suffixes[] = {
".debug",
".symbols",
"",
NULL
};
static int
check_kld_path (char *path, size_t path_size)
{
const char **suffix;
char *ep;
ep = path + strlen(path);
suffix = kld_suffixes;
while (*suffix != NULL) {
if (strlcat(path, *suffix, path_size) < path_size) {
if (kld_ok(path))
return (1);
}
/* Restore original path to remove suffix. */
*ep = '\0';
suffix++;
}
return (0);
}
/*
* Try to find the path for a kld by looking in the kernel's directory and
* in the various paths in the module path.
*/
static int
find_kld_path (char *filename, char *path, size_t path_size)
{
char *module_path;
char *kernel_dir, *module_dir, *cp;
int error;
if (exec_bfd) {
kernel_dir = dirname(bfd_get_filename(exec_bfd));
if (kernel_dir != NULL) {
snprintf(path, path_size, "%s/%s", kernel_dir,
filename);
if (check_kld_path(path, path_size))
return (1);
}
}
if (module_path_addr != 0) {
target_read_string(module_path_addr, &module_path, PATH_MAX,
&error);
if (error == 0) {
make_cleanup(xfree, module_path);
cp = module_path;
while ((module_dir = strsep(&cp, ";")) != NULL) {
snprintf(path, path_size, "%s/%s", module_dir,
filename);
if (check_kld_path(path, path_size))
return (1);
}
}
}
return (0);
}
/*
* Read a kernel pointer given a KVA in 'address'.
*/
static CORE_ADDR
read_pointer (CORE_ADDR address)
{
CORE_ADDR value;
if (target_read_memory(address, (char *)&value, TARGET_PTR_BIT / 8) !=
0)
return (0);
return (extract_unsigned_integer(&value, TARGET_PTR_BIT / 8));
}
/*
* Try to find this kld in the kernel linker's list of linker files.
*/
static int
find_kld_address (char *arg, CORE_ADDR *address)
{
CORE_ADDR kld;
char *kld_filename;
char *filename;
int error;
if (linker_files_addr == 0 || off_address == 0 || off_filename == 0 ||
off_next == 0)
return (0);
filename = basename(arg);
for (kld = read_pointer(linker_files_addr); kld != 0;
kld = read_pointer(kld + off_next)) {
/* Try to read this linker file's filename. */
target_read_string(read_pointer(kld + off_filename),
&kld_filename, PATH_MAX, &error);
if (error)
continue;
/* Compare this kld's filename against our passed in name. */
if (strcmp(kld_filename, filename) != 0) {
xfree(kld_filename);
continue;
}
xfree(kld_filename);
/*
* We found a match, use its address as the base
* address if we can read it.
*/
*address = read_pointer(kld + off_address);
if (*address == 0)
return (0);
return (1);
}
return (0);
}
static void
adjust_section_address (struct section_table *sec, CORE_ADDR *curr_base)
{
struct bfd_section *asect = sec->the_bfd_section;
bfd *abfd = sec->bfd;
if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0) {
sec->addr += *curr_base;
sec->endaddr += *curr_base;
return;
}
*curr_base = align_power(*curr_base,
bfd_get_section_alignment(abfd, asect));
sec->addr = *curr_base;
sec->endaddr = sec->addr + bfd_section_size(abfd, asect);
*curr_base = sec->endaddr;
}
static void
load_kld (char *path, CORE_ADDR base_addr, int from_tty)
{
struct section_addr_info *sap;
struct section_table *sections = NULL, *sections_end = NULL, *s;
struct cleanup *cleanup;
bfd *bfd;
CORE_ADDR curr_addr;
int i;
/* Open the kld. */
bfd = bfd_openr(path, gnutarget);
if (bfd == NULL)
error("\"%s\": can't open: %s", path,
bfd_errmsg(bfd_get_error()));
cleanup = make_cleanup_bfd_close(bfd);
if (!bfd_check_format(bfd, bfd_object))
error("\%s\": not an object file", path);
/* Make sure we have a .text section. */
if (bfd_get_section_by_name (bfd, ".text") == NULL)
error("\"%s\": can't find text section", path);
/* Build a section table from the bfd and relocate the sections. */
if (build_section_table (bfd, &sections, &sections_end))
error("\"%s\": can't find file sections", path);
cleanup = make_cleanup(xfree, sections);
curr_addr = base_addr;
for (s = sections; s < sections_end; s++)
adjust_section_address(s, &curr_addr);
/* Build a section addr info to pass to symbol_file_add(). */
sap = build_section_addr_info_from_section_table (sections,
sections_end);
cleanup = make_cleanup((make_cleanup_ftype *)free_section_addr_info,
sap);
printf_unfiltered("add symbol table from file \"%s\" at\n", path);
for (i = 0; i < sap->num_sections; i++)
printf_unfiltered("\t%s_addr = %s\n", sap->other[i].name,
local_hex_string(sap->other[i].addr));
if (from_tty && (!query("%s", "")))
error("Not confirmed.");
symbol_file_add(path, from_tty, sap, 0, OBJF_USERLOADED);
do_cleanups(cleanup);
}
static void
kgdb_add_kld_cmd (char *arg, int from_tty)
{
char path[PATH_MAX];
CORE_ADDR base_addr;
if (!exec_bfd)
error("No kernel symbol file");
/* Try to open the raw path to handle absolute paths first. */
snprintf(path, sizeof(path), "%s", arg);
if (!check_kld_path(path, sizeof(path))) {
/*
* If that didn't work, look in the various possible
* paths for the module.
*/
if (!find_kld_path(arg, path, sizeof(path))) {
error("Unable to locate kld");
return;
}
}
if (!find_kld_address(arg, &base_addr)) {
error("Unable to find kld in kernel");
return;
}
load_kld(path, base_addr, from_tty);
reinit_frame_cache();
}
static void
kld_relocate_section_addresses (struct so_list *so, struct section_table *sec)
{
static CORE_ADDR curr_addr;
if (sec == so->sections)
curr_addr = so->lm_info->base_address;
adjust_section_address(sec, &curr_addr);
}
static void
kld_free_so (struct so_list *so)
{
xfree(so->lm_info);
}
static void
kld_clear_solib (void)
{
}
static void
kld_solib_create_inferior_hook (void)
{
}
static void
kld_special_symbol_handling (void)
{
}
static struct so_list *
kld_current_sos (void)
{
struct so_list *head, **prev, *new;
CORE_ADDR kld, kernel;
char *path;
int error;
if (linker_files_addr == 0 || kernel_file_addr == 0 ||
off_address == 0 || off_filename == 0 || off_next == 0)
return (NULL);
head = NULL;
prev = &head;
/*
* Walk the list of linker files creating so_list entries for
* each non-kernel file.
*/
kernel = read_pointer(kernel_file_addr);
for (kld = read_pointer(linker_files_addr); kld != 0;
kld = read_pointer(kld + off_next)) {
/* Skip the main kernel file. */
if (kld == kernel)
continue;
new = xmalloc(sizeof(*new));
memset(new, 0, sizeof(*new));
new->lm_info = xmalloc(sizeof(*new->lm_info));
new->lm_info->base_address = 0;
/* Read the base filename and store it in so_original_name. */
target_read_string(read_pointer(kld + off_filename),
&path, sizeof(new->so_original_name), &error);
if (error != 0) {
warning("kld_current_sos: Can't read filename: %s\n",
safe_strerror(error));
free_so(new);
continue;
}
strlcpy(new->so_original_name, path,
sizeof(new->so_original_name));
xfree(path);
/*
* Try to read the pathname (if it exists) and store
* it in so_name.
*/
if (find_kld_path(new->so_original_name, new->so_name,
sizeof(new->so_name))) {
/* we found the kld */;
} else if (off_pathname != 0) {
target_read_string(read_pointer(kld + off_pathname),
&path, sizeof(new->so_name), &error);
if (error != 0) {
warning(
"kld_current_sos: Can't read pathname for \"%s\": %s\n",
new->so_original_name,
safe_strerror(error));
strlcpy(new->so_name, new->so_original_name,
sizeof(new->so_name));
} else {
strlcpy(new->so_name, path,
sizeof(new->so_name));
xfree(path);
}
} else
strlcpy(new->so_name, new->so_original_name,
sizeof(new->so_name));
/* Read this kld's base address. */
new->lm_info->base_address = read_pointer(kld + off_address);
if (new->lm_info->base_address == 0) {
warning(
"kld_current_sos: Invalid address for kld \"%s\"",
new->so_original_name);
free_so(new);
continue;
}
/* Append to the list. */
*prev = new;
prev = &new->next;
}
return (head);
}
static int
kld_open_symbol_file_object (void *from_ttyp)
{
return (0);
}
static int
kld_in_dynsym_resolve_code (CORE_ADDR pc)
{
return (0);
}
static int
kld_find_and_open_solib (char *solib, unsigned o_flags, char **temp_pathname)
{
char path[PATH_MAX];
int fd;
*temp_pathname = NULL;
if (!find_kld_path(solib, path, sizeof(path))) {
errno = ENOENT;
return (-1);
}
fd = open(path, o_flags, 0);
if (fd >= 0)
*temp_pathname = xstrdup(path);
return (fd);
}
void
kld_new_objfile (struct objfile *objfile)
{
if (!have_partial_symbols())
return;
/*
* Compute offsets of relevant members in struct linker_file
* and the addresses of global variables. Don't warn about
* kernels that don't have 'pathname' in the linker_file
* struct since 6.x kernels don't have it.
*/
off_address = kgdb_parse("&((struct linker_file *)0)->address");
off_filename = kgdb_parse("&((struct linker_file *)0)->filename");
off_pathname = kgdb_parse_quiet("&((struct linker_file *)0)->pathname");
off_next = kgdb_parse("&((struct linker_file *)0)->link.tqe_next");
module_path_addr = kgdb_parse("linker_path");
linker_files_addr = kgdb_parse("&linker_files.tqh_first");
kernel_file_addr = kgdb_parse("&linker_kernel_file");
}
static int
load_klds_stub (void *arg)
{
SOLIB_ADD(NULL, 1, &current_target, auto_solib_add);
return (0);
}
void
kld_init (void)
{
catch_errors(load_klds_stub, NULL, NULL, RETURN_MASK_ALL);
}
void
initialize_kld_target(void)
{
struct cmd_list_element *c;
kld_so_ops.relocate_section_addresses = kld_relocate_section_addresses;
kld_so_ops.free_so = kld_free_so;
kld_so_ops.clear_solib = kld_clear_solib;
kld_so_ops.solib_create_inferior_hook = kld_solib_create_inferior_hook;
kld_so_ops.special_symbol_handling = kld_special_symbol_handling;
kld_so_ops.current_sos = kld_current_sos;
kld_so_ops.open_symbol_file_object = kld_open_symbol_file_object;
kld_so_ops.in_dynsym_resolve_code = kld_in_dynsym_resolve_code;
kld_so_ops.find_and_open_solib = kld_find_and_open_solib;
current_target_so_ops = &kld_so_ops;
c = add_com("add-kld", class_files, kgdb_add_kld_cmd,
"Usage: add-kld FILE\n\
Load the symbols from the kernel loadable module FILE.");
set_cmd_completer(c, filename_completer);
}

View file

@ -1,252 +0,0 @@
/*
* Copyright (c) 2004 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/cpuset.h>
#include <sys/proc.h>
#include <sys/types.h>
#include <sys/signal.h>
#include <err.h>
#include <inttypes.h>
#include <kvm.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <defs.h>
#include <frame-unwind.h>
#include "kgdb.h"
static CORE_ADDR dumppcb;
static int dumptid;
static cpuset_t stopped_cpus;
static struct kthr *first;
struct kthr *curkthr;
CORE_ADDR
kgdb_lookup(const char *sym)
{
CORE_ADDR addr;
char *name;
asprintf(&name, "&%s", sym);
addr = kgdb_parse(name);
free(name);
return (addr);
}
struct kthr *
kgdb_thr_first(void)
{
return (first);
}
static void
kgdb_thr_add_procs(uintptr_t paddr)
{
struct proc p;
struct thread td;
struct kthr *kt;
CORE_ADDR addr;
while (paddr != 0) {
if (kvm_read(kvm, paddr, &p, sizeof(p)) != sizeof(p)) {
warnx("kvm_read: %s", kvm_geterr(kvm));
break;
}
addr = (uintptr_t)TAILQ_FIRST(&p.p_threads);
while (addr != 0) {
if (kvm_read(kvm, addr, &td, sizeof(td)) !=
sizeof(td)) {
warnx("kvm_read: %s", kvm_geterr(kvm));
break;
}
kt = malloc(sizeof(*kt));
kt->next = first;
kt->kaddr = addr;
if (td.td_tid == dumptid)
kt->pcb = dumppcb;
else if (td.td_oncpu != NOCPU &&
CPU_ISSET(td.td_oncpu, &stopped_cpus))
kt->pcb = kgdb_trgt_core_pcb(td.td_oncpu);
else
kt->pcb = (uintptr_t)td.td_pcb;
kt->kstack = td.td_kstack;
kt->tid = td.td_tid;
kt->pid = p.p_pid;
kt->paddr = paddr;
kt->cpu = td.td_oncpu;
first = kt;
addr = (uintptr_t)TAILQ_NEXT(&td, td_plist);
}
paddr = (uintptr_t)LIST_NEXT(&p, p_list);
}
}
struct kthr *
kgdb_thr_init(void)
{
long cpusetsize;
struct kthr *kt;
CORE_ADDR addr;
uintptr_t paddr;
while (first != NULL) {
kt = first;
first = kt->next;
free(kt);
}
addr = kgdb_lookup("allproc");
if (addr == 0)
return (NULL);
kvm_read(kvm, addr, &paddr, sizeof(paddr));
dumppcb = kgdb_lookup("dumppcb");
if (dumppcb == 0)
return (NULL);
addr = kgdb_lookup("dumptid");
if (addr != 0)
kvm_read(kvm, addr, &dumptid, sizeof(dumptid));
else
dumptid = -1;
addr = kgdb_lookup("stopped_cpus");
CPU_ZERO(&stopped_cpus);
cpusetsize = sysconf(_SC_CPUSET_SIZE);
if (cpusetsize != -1 && (u_long)cpusetsize <= sizeof(cpuset_t) &&
addr != 0)
kvm_read(kvm, addr, &stopped_cpus, cpusetsize);
kgdb_thr_add_procs(paddr);
addr = kgdb_lookup("zombproc");
if (addr != 0) {
kvm_read(kvm, addr, &paddr, sizeof(paddr));
kgdb_thr_add_procs(paddr);
}
curkthr = kgdb_thr_lookup_tid(dumptid);
if (curkthr == NULL)
curkthr = first;
return (first);
}
struct kthr *
kgdb_thr_lookup_tid(int tid)
{
struct kthr *kt;
kt = first;
while (kt != NULL && kt->tid != tid)
kt = kt->next;
return (kt);
}
struct kthr *
kgdb_thr_lookup_taddr(uintptr_t taddr)
{
struct kthr *kt;
kt = first;
while (kt != NULL && kt->kaddr != taddr)
kt = kt->next;
return (kt);
}
struct kthr *
kgdb_thr_lookup_pid(int pid)
{
struct kthr *kt;
kt = first;
while (kt != NULL && kt->pid != pid)
kt = kt->next;
return (kt);
}
struct kthr *
kgdb_thr_lookup_paddr(uintptr_t paddr)
{
struct kthr *kt;
kt = first;
while (kt != NULL && kt->paddr != paddr)
kt = kt->next;
return (kt);
}
struct kthr *
kgdb_thr_next(struct kthr *kt)
{
return (kt->next);
}
struct kthr *
kgdb_thr_select(struct kthr *kt)
{
struct kthr *pcur;
pcur = curkthr;
curkthr = kt;
return (pcur);
}
char *
kgdb_thr_extra_thread_info(int tid)
{
char comm[MAXCOMLEN + 1];
char td_name[MAXCOMLEN + 1];
struct kthr *kt;
struct proc *p;
struct thread *t;
static char buf[64];
kt = kgdb_thr_lookup_tid(tid);
if (kt == NULL)
return (NULL);
snprintf(buf, sizeof(buf), "PID=%d", kt->pid);
p = (struct proc *)kt->paddr;
if (kvm_read(kvm, (uintptr_t)&p->p_comm[0], &comm, sizeof(comm)) !=
sizeof(comm))
return (buf);
strlcat(buf, ": ", sizeof(buf));
strlcat(buf, comm, sizeof(buf));
t = (struct thread *)kt->kaddr;
if (kvm_read(kvm, (uintptr_t)&t->td_name[0], &td_name,
sizeof(td_name)) == sizeof(td_name) &&
strcmp(comm, td_name) != 0) {
strlcat(buf, "/", sizeof(buf));
strlcat(buf, td_name, sizeof(buf));
}
return (buf);
}

View file

@ -1,481 +0,0 @@
/*
* Copyright (c) 2004 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/resource.h>
#include <sys/select.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <errno.h>
#include <err.h>
#include <inttypes.h>
#include <kvm.h>
#include <limits.h>
#include <paths.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
/* libgdb stuff. */
#include <defs.h>
#include <frame.h>
#include <frame-unwind.h>
#include <inferior.h>
#include <interps.h>
#include <cli-out.h>
#include <main.h>
#include <objfiles.h>
#include <target.h>
#include <top.h>
#include <ui-file.h>
#include <bfd.h>
#include <gdbcore.h>
#include <wrapper.h>
extern frame_unwind_sniffer_ftype *kgdb_sniffer_kluge;
#include "kgdb.h"
static int dumpnr;
static int quiet;
static int verbose;
static char crashdir[PATH_MAX];
static char *kernel;
static char *remote;
static char *vmcore;
static struct ui_file *parse_gdberr;
static void (*kgdb_new_objfile_chain)(struct objfile * objfile);
static void
usage(void)
{
fprintf(stderr,
"usage: %s [-afqvw] [-b rate] [-d crashdir] [-c core | -n dumpnr | -r device]\n"
"\t[kernel [core]]\n", getprogname());
exit(1);
}
static void
kernel_from_dumpnr(int nr)
{
char path[PATH_MAX];
FILE *info;
char *s;
struct stat st;
int l;
/*
* If there's a kernel image right here in the crash directory, then
* use it. The kernel image is either called kernel.<nr> or is in a
* subdirectory kernel.<nr> and called kernel. The latter allows us
* to collect the modules in the same place.
*/
snprintf(path, sizeof(path), "%s/kernel.%d", crashdir, nr);
if (stat(path, &st) == 0) {
if (S_ISREG(st.st_mode)) {
kernel = strdup(path);
return;
}
if (S_ISDIR(st.st_mode)) {
snprintf(path, sizeof(path), "%s/kernel.%d/kernel",
crashdir, nr);
if (stat(path, &st) == 0 && S_ISREG(st.st_mode)) {
kernel = strdup(path);
return;
}
}
}
/*
* No kernel image here. Parse the dump header. The kernel object
* directory can be found there and we probably have the kernel
* image still in it. The object directory may also have a kernel
* with debugging info (called kernel.debug). If we have a debug
* kernel, use it.
*/
snprintf(path, sizeof(path), "%s/info.%d", crashdir, nr);
info = fopen(path, "r");
if (info == NULL) {
warn("%s", path);
return;
}
while (fgets(path, sizeof(path), info) != NULL) {
l = strlen(path);
if (l > 0 && path[l - 1] == '\n')
path[--l] = '\0';
if (strncmp(path, " ", 4) == 0) {
s = strchr(path, ':');
s = (s == NULL) ? path + 4 : s + 1;
l = snprintf(path, sizeof(path), "%s/kernel.debug", s);
if (stat(path, &st) == -1 || !S_ISREG(st.st_mode)) {
path[l - 6] = '\0';
if (stat(path, &st) == -1 ||
!S_ISREG(st.st_mode))
break;
}
kernel = strdup(path);
break;
}
}
fclose(info);
}
static void
kgdb_new_objfile(struct objfile *objfile)
{
static int once = 1;
kld_new_objfile(objfile);
kgdb_trgt_new_objfile(objfile);
if (kgdb_new_objfile_chain != NULL)
kgdb_new_objfile_chain(objfile);
if (once && objfile != NULL && objfile == symfile_objfile) {
/*
* The initial kernel has just been loaded. Start the
* remote target if we have one.
*/
once = 0;
if (remote != NULL)
push_remote_target (remote, 0);
}
}
/*
* Parse an expression and return its value. If 'quiet' is true, then
* any error messages from the parser are masked.
*/
CORE_ADDR
kgdb_parse_1(const char *exp, int quiet)
{
struct ui_file *old_stderr;
struct cleanup *old_chain;
struct expression *expr;
struct value *val;
char *s;
CORE_ADDR n;
old_stderr = gdb_stderr;
if (quiet)
gdb_stderr = parse_gdberr;
n = 0;
s = xstrdup(exp);
old_chain = make_cleanup(xfree, s);
if (gdb_parse_exp_1(&s, NULL, 0, &expr) && *s == '\0') {
make_cleanup(free_current_contents, &expr);
if (gdb_evaluate_expression(expr, &val))
n = value_as_address(val);
}
do_cleanups(old_chain);
gdb_stderr = old_stderr;
return (n);
}
#define MSGBUF_SEQ_TO_POS(size, seq) ((seq) % (size))
void
kgdb_dmesg(void)
{
CORE_ADDR bufp;
int size, rseq, wseq;
char c;
/*
* Display the unread portion of the message buffer. This gives the
* user a some initial data to work from.
*/
if (quiet)
return;
bufp = kgdb_parse("msgbufp->msg_ptr");
size = (int)kgdb_parse("msgbufp->msg_size");
if (bufp == 0 || size == 0)
return;
rseq = (int)kgdb_parse("msgbufp->msg_rseq");
wseq = (int)kgdb_parse("msgbufp->msg_wseq");
rseq = MSGBUF_SEQ_TO_POS(size, rseq);
wseq = MSGBUF_SEQ_TO_POS(size, wseq);
if (rseq == wseq)
return;
printf("\nUnread portion of the kernel message buffer:\n");
while (rseq < wseq) {
read_memory(bufp + rseq, &c, 1);
putchar(c);
rseq++;
if (rseq == size)
rseq = 0;
}
if (c != '\n')
putchar('\n');
putchar('\n');
}
static void
kgdb_init(char *argv0 __unused)
{
parse_gdberr = mem_fileopen();
set_prompt("(kgdb) ");
initialize_kgdb_target();
initialize_kld_target();
kgdb_new_objfile_chain = target_new_objfile_hook;
target_new_objfile_hook = kgdb_new_objfile;
}
/*
* Remote targets can support any number of syntaxes and we want to
* support them all with one addition: we support specifying a device
* node for a serial device without the "/dev/" prefix.
*
* What we do is to stat(2) the existing remote target first. If that
* fails, we try it with "/dev/" prepended. If that succeeds we use
* the resulting path, otherwise we use the original target. If
* either stat(2) succeeds make sure the file is either a character
* device or a FIFO.
*/
static void
verify_remote(void)
{
char path[PATH_MAX];
struct stat st;
if (stat(remote, &st) != 0) {
snprintf(path, sizeof(path), "/dev/%s", remote);
if (stat(path, &st) != 0)
return;
free(remote);
remote = strdup(path);
}
if (!S_ISCHR(st.st_mode) && !S_ISFIFO(st.st_mode))
errx(1, "%s: not a special file, FIFO or socket", remote);
}
static void
add_arg(struct captured_main_args *args, char *arg)
{
args->argc++;
args->argv = reallocf(args->argv, (args->argc + 1) * sizeof(char *));
if (args->argv == NULL)
err(1, "Out of memory building argument list");
args->argv[args->argc] = arg;
}
int
main(int argc, char *argv[])
{
char path[PATH_MAX];
struct stat st;
struct captured_main_args args;
char *s;
int a, ch;
dumpnr = -1;
strlcpy(crashdir, "/var/crash", sizeof(crashdir));
s = getenv("KGDB_CRASH_DIR");
if (s != NULL)
strlcpy(crashdir, s, sizeof(crashdir));
/* Convert long options into short options. */
for (a = 1; a < argc; a++) {
s = argv[a];
if (s[0] == '-') {
s++;
/* Long options take either 1 or 2 dashes. */
if (s[0] == '-')
s++;
if (strcmp(s, "quiet") == 0)
argv[a] = "-q";
else if (strcmp(s, "fullname") == 0)
argv[a] = "-f";
}
}
quiet = 0;
memset (&args, 0, sizeof args);
args.use_windows = 0;
args.interpreter_p = INTERP_CONSOLE;
args.argv = malloc(sizeof(char *));
args.argv[0] = argv[0];
while ((ch = getopt(argc, argv, "ab:c:d:fn:qr:vw")) != -1) {
switch (ch) {
case 'a':
annotation_level++;
break;
case 'b': {
int i;
char *p;
i = strtol(optarg, &p, 0);
if (*p != '\0' || p == optarg)
warnx("warning: could not set baud rate to `%s'.\n",
optarg);
else
baud_rate = i;
break;
}
case 'c': /* use given core file. */
if (vmcore != NULL) {
warnx("option %c: can only be specified once",
optopt);
usage();
/* NOTREACHED */
}
vmcore = strdup(optarg);
break;
case 'd': /* lookup dumps in given directory. */
strlcpy(crashdir, optarg, sizeof(crashdir));
break;
case 'f':
annotation_level = 1;
break;
case 'n': /* use dump with given number. */
dumpnr = strtol(optarg, &s, 0);
if (dumpnr < 0 || *s != '\0') {
warnx("option %c: invalid kernel dump number",
optopt);
usage();
/* NOTREACHED */
}
break;
case 'q':
quiet = 1;
add_arg(&args, "-q");
break;
case 'r': /* use given device for remote session. */
if (remote != NULL) {
warnx("option %c: can only be specified once",
optopt);
usage();
/* NOTREACHED */
}
remote = strdup(optarg);
break;
case 'v': /* increase verbosity. */
verbose++;
break;
case 'w': /* core file is writeable. */
add_arg(&args, "--write");
break;
case '?':
default:
usage();
}
}
if (((vmcore != NULL) ? 1 : 0) + ((dumpnr >= 0) ? 1 : 0) +
((remote != NULL) ? 1 : 0) > 1) {
warnx("options -c, -n and -r are mutually exclusive");
usage();
/* NOTREACHED */
}
if (verbose > 1)
warnx("using %s as the crash directory", crashdir);
if (argc > optind)
kernel = strdup(argv[optind++]);
if (argc > optind && (dumpnr >= 0 || remote != NULL)) {
warnx("options -n and -r do not take a core file. Ignored");
optind = argc;
}
if (dumpnr >= 0) {
snprintf(path, sizeof(path), "%s/vmcore.%d", crashdir, dumpnr);
if (stat(path, &st) == -1)
err(1, "%s", path);
if (!S_ISREG(st.st_mode))
errx(1, "%s: not a regular file", path);
vmcore = strdup(path);
} else if (remote != NULL) {
verify_remote();
} else if (argc > optind) {
if (vmcore == NULL)
vmcore = strdup(argv[optind++]);
if (argc > optind)
warnx("multiple core files specified. Ignored");
} else if (vmcore == NULL && kernel == NULL) {
vmcore = strdup(_PATH_MEM);
kernel = strdup(getbootfile());
}
if (verbose) {
if (vmcore != NULL)
warnx("core file: %s", vmcore);
if (remote != NULL)
warnx("device file: %s", remote);
if (kernel != NULL)
warnx("kernel image: %s", kernel);
}
/* A remote target requires an explicit kernel argument. */
if (remote != NULL && kernel == NULL) {
warnx("remote debugging requires a kernel");
usage();
/* NOTREACHED */
}
/* If we don't have a kernel image yet, try to find one. */
if (kernel == NULL) {
if (dumpnr >= 0)
kernel_from_dumpnr(dumpnr);
if (kernel == NULL)
errx(1, "couldn't find a suitable kernel image");
if (verbose)
warnx("kernel image: %s", kernel);
}
add_arg(&args, kernel);
if (vmcore != NULL)
add_arg(&args, vmcore);
/* The libgdb code uses optind too. Reset it... */
optind = 0;
/* Terminate argv list. */
add_arg(&args, NULL);
init_ui_hook = kgdb_init;
frame_tdep_pc_fixup = kgdb_trgt_pc_fixup;
kgdb_sniffer_kluge = kgdb_trgt_trapframe_sniffer;
return (gdb_main(&args));
}

View file

@ -1,395 +0,0 @@
/*
* Copyright (c) 2004 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/user.h>
#include <err.h>
#include <fcntl.h>
#include <kvm.h>
#include <defs.h>
#include <readline/readline.h>
#include <command.h>
#include <exec.h>
#include <frame-unwind.h>
#include <gdb.h>
#include <gdbcore.h>
#include <gdbthread.h>
#include <inferior.h>
#include <language.h>
#include <regcache.h>
#include <solib.h>
#include <target.h>
#include <ui-out.h>
#include "kgdb.h"
#ifdef CROSS_DEBUGGER
/*
* We suppress the call to add_target() of core_ops in corelow.c because if
* there are multiple core_stratum targets, the find_core_target() function
* won't know which one to return and returns none. We need it to return
* our target. We only have to do that when we're building a cross-debugger
* because fbsd-threads.c is part of a native debugger and it too defines
* coreops_suppress_target with 1 as the initializer.
*/
int coreops_suppress_target = 1;
#endif
static CORE_ADDR stoppcbs;
static void kgdb_core_cleanup(void *);
static char *vmcore;
static struct target_ops kgdb_trgt_ops;
kvm_t *kvm;
static char kvm_err[_POSIX2_LINE_MAX];
#define KERNOFF (kgdb_kernbase ())
#define PINKERNEL(x) ((x) >= KERNOFF)
static int
kgdb_resolve_symbol(const char *name, kvaddr_t *kva)
{
struct minimal_symbol *ms;
ms = lookup_minimal_symbol (name, NULL, NULL);
if (ms == NULL)
return (1);
*kva = SYMBOL_VALUE_ADDRESS (ms);
return (0);
}
static CORE_ADDR
kgdb_kernbase (void)
{
static CORE_ADDR kernbase;
struct minimal_symbol *sym;
if (kernbase == 0) {
sym = lookup_minimal_symbol ("kernbase", NULL, NULL);
if (sym == NULL) {
kernbase = KERNBASE;
} else {
kernbase = SYMBOL_VALUE_ADDRESS (sym);
}
}
return kernbase;
}
static void
kgdb_trgt_open(char *filename, int from_tty)
{
struct cleanup *old_chain;
struct thread_info *ti;
struct kthr *kt;
kvm_t *nkvm;
char *temp;
int ontop;
target_preopen (from_tty);
if (!filename)
error ("No vmcore file specified.");
if (!exec_bfd)
error ("Can't open a vmcore without a kernel");
filename = tilde_expand (filename);
if (filename[0] != '/') {
temp = concat (current_directory, "/", filename, NULL);
xfree(filename);
filename = temp;
}
old_chain = make_cleanup (xfree, filename);
nkvm = kvm_open2(bfd_get_filename(exec_bfd), filename,
write_files ? O_RDWR : O_RDONLY, kvm_err, kgdb_resolve_symbol);
if (nkvm == NULL)
error ("Failed to open vmcore: %s", kvm_err);
/* Don't free the filename now and close any previous vmcore. */
discard_cleanups(old_chain);
unpush_target(&kgdb_trgt_ops);
kvm = nkvm;
vmcore = filename;
old_chain = make_cleanup(kgdb_core_cleanup, NULL);
ontop = !push_target (&kgdb_trgt_ops);
discard_cleanups (old_chain);
kgdb_dmesg();
init_thread_list();
kt = kgdb_thr_init();
while (kt != NULL) {
ti = add_thread(pid_to_ptid(kt->tid));
kt = kgdb_thr_next(kt);
}
if (curkthr != 0)
inferior_ptid = pid_to_ptid(curkthr->tid);
if (ontop) {
/* XXX: fetch registers? */
kld_init();
flush_cached_frames();
select_frame (get_current_frame());
print_stack_frame(get_selected_frame(),
frame_relative_level(get_selected_frame()), 1);
} else
warning(
"you won't be able to access this vmcore until you terminate\n\
your %s; do ``info files''", target_longname);
}
static void
kgdb_trgt_close(int quitting)
{
if (kvm != NULL) {
inferior_ptid = null_ptid;
CLEAR_SOLIB();
if (kvm_close(kvm) != 0)
warning("cannot close \"%s\": %s", vmcore,
kvm_geterr(kvm));
kvm = NULL;
xfree(vmcore);
vmcore = NULL;
if (kgdb_trgt_ops.to_sections) {
xfree(kgdb_trgt_ops.to_sections);
kgdb_trgt_ops.to_sections = NULL;
kgdb_trgt_ops.to_sections_end = NULL;
}
}
}
static void
kgdb_core_cleanup(void *arg)
{
kgdb_trgt_close(0);
}
static void
kgdb_trgt_detach(char *args, int from_tty)
{
if (args)
error ("Too many arguments");
unpush_target(&kgdb_trgt_ops);
reinit_frame_cache();
if (from_tty)
printf_filtered("No vmcore file now.\n");
}
static char *
kgdb_trgt_extra_thread_info(struct thread_info *ti)
{
return (kgdb_thr_extra_thread_info(ptid_get_pid(ti->ptid)));
}
static void
kgdb_trgt_files_info(struct target_ops *target)
{
printf_filtered ("\t`%s', ", vmcore);
wrap_here (" ");
printf_filtered ("file type %s.\n", "FreeBSD kernel vmcore");
}
static void
kgdb_trgt_find_new_threads(void)
{
struct target_ops *tb;
if (kvm != NULL)
return;
tb = find_target_beneath(&kgdb_trgt_ops);
if (tb->to_find_new_threads != NULL)
tb->to_find_new_threads();
}
static char *
kgdb_trgt_pid_to_str(ptid_t ptid)
{
static char buf[33];
snprintf(buf, sizeof(buf), "Thread %d", ptid_get_pid(ptid));
return (buf);
}
static int
kgdb_trgt_thread_alive(ptid_t ptid)
{
return (kgdb_thr_lookup_tid(ptid_get_pid(ptid)) != NULL);
}
static int
kgdb_trgt_xfer_memory(CORE_ADDR memaddr, char *myaddr, int len, int write,
struct mem_attrib *attrib, struct target_ops *target)
{
struct target_ops *tb;
if (kvm != NULL) {
if (len == 0)
return (0);
if (!write)
return (kvm_read2(kvm, memaddr, myaddr, len));
else
return (kvm_write(kvm, memaddr, myaddr, len));
}
tb = find_target_beneath(target);
return (tb->to_xfer_memory(memaddr, myaddr, len, write, attrib, tb));
}
static int
kgdb_trgt_ignore_breakpoints(CORE_ADDR addr, char *contents)
{
return 0;
}
static void
kgdb_switch_to_thread(int tid)
{
char buf[16];
int thread_id;
thread_id = pid_to_thread_id(pid_to_ptid(tid));
if (thread_id == 0)
error ("invalid tid");
snprintf(buf, sizeof(buf), "%d", thread_id);
gdb_thread_select(uiout, buf);
}
static void
kgdb_set_proc_cmd (char *arg, int from_tty)
{
CORE_ADDR addr;
struct kthr *thr;
if (!arg)
error_no_arg ("proc address for the new context");
if (kvm == NULL)
error ("only supported for core file target");
addr = (CORE_ADDR) parse_and_eval_address (arg);
if (!PINKERNEL (addr)) {
thr = kgdb_thr_lookup_pid((int)addr);
if (thr == NULL)
error ("invalid pid");
} else {
thr = kgdb_thr_lookup_paddr(addr);
if (thr == NULL)
error("invalid proc address");
}
kgdb_switch_to_thread(thr->tid);
}
static void
kgdb_set_tid_cmd (char *arg, int from_tty)
{
CORE_ADDR addr;
struct kthr *thr;
if (!arg)
error_no_arg ("TID or thread address for the new context");
addr = (CORE_ADDR) parse_and_eval_address (arg);
if (kvm != NULL && PINKERNEL (addr)) {
thr = kgdb_thr_lookup_taddr(addr);
if (thr == NULL)
error("invalid thread address");
addr = thr->tid;
}
kgdb_switch_to_thread(addr);
}
int fbsdcoreops_suppress_target = 1;
void
initialize_kgdb_target(void)
{
kgdb_trgt_ops.to_magic = OPS_MAGIC;
kgdb_trgt_ops.to_shortname = "kernel";
kgdb_trgt_ops.to_longname = "kernel core dump file";
kgdb_trgt_ops.to_doc =
"Use a vmcore file as a target. Specify the filename of the vmcore file.";
kgdb_trgt_ops.to_stratum = core_stratum;
kgdb_trgt_ops.to_has_memory = 1;
kgdb_trgt_ops.to_has_registers = 1;
kgdb_trgt_ops.to_has_stack = 1;
kgdb_trgt_ops.to_open = kgdb_trgt_open;
kgdb_trgt_ops.to_close = kgdb_trgt_close;
kgdb_trgt_ops.to_attach = find_default_attach;
kgdb_trgt_ops.to_detach = kgdb_trgt_detach;
kgdb_trgt_ops.to_extra_thread_info = kgdb_trgt_extra_thread_info;
kgdb_trgt_ops.to_fetch_registers = kgdb_trgt_fetch_registers;
kgdb_trgt_ops.to_files_info = kgdb_trgt_files_info;
kgdb_trgt_ops.to_find_new_threads = kgdb_trgt_find_new_threads;
kgdb_trgt_ops.to_pid_to_str = kgdb_trgt_pid_to_str;
kgdb_trgt_ops.to_store_registers = kgdb_trgt_store_registers;
kgdb_trgt_ops.to_thread_alive = kgdb_trgt_thread_alive;
kgdb_trgt_ops.to_xfer_memory = kgdb_trgt_xfer_memory;
kgdb_trgt_ops.to_insert_breakpoint = kgdb_trgt_ignore_breakpoints;
kgdb_trgt_ops.to_remove_breakpoint = kgdb_trgt_ignore_breakpoints;
add_target(&kgdb_trgt_ops);
add_com ("proc", class_obscure, kgdb_set_proc_cmd,
"Set current process context");
add_com ("tid", class_obscure, kgdb_set_tid_cmd,
"Set current thread context");
}
CORE_ADDR
kgdb_trgt_stop_pcb(u_int cpuid, u_int pcbsz)
{
static int once = 0;
if (stoppcbs == 0 && !once) {
once = 1;
stoppcbs = kgdb_lookup("stoppcbs");
}
if (stoppcbs == 0)
return 0;
return (stoppcbs + pcbsz * cpuid);
}

View file

@ -1,212 +0,0 @@
/*
* Copyright (c) 2004 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <machine/pcb.h>
#include <machine/frame.h>
#include <err.h>
#include <kvm.h>
#include <string.h>
#include <defs.h>
#include <target.h>
#include <gdbthread.h>
#include <inferior.h>
#include <regcache.h>
#include <frame-unwind.h>
#include <amd64-tdep.h>
#include "kgdb.h"
CORE_ADDR
kgdb_trgt_core_pcb(u_int cpuid)
{
return (kgdb_trgt_stop_pcb(cpuid, sizeof(struct pcb)));
}
void
kgdb_trgt_fetch_registers(int regno __unused)
{
struct kthr *kt;
struct pcb pcb;
kt = kgdb_thr_lookup_tid(ptid_get_pid(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));
}
supply_register(AMD64_RBX_REGNUM, (char *)&pcb.pcb_rbx);
supply_register(AMD64_RBP_REGNUM, (char *)&pcb.pcb_rbp);
supply_register(AMD64_RSP_REGNUM, (char *)&pcb.pcb_rsp);
supply_register(AMD64_R8_REGNUM + 4, (char *)&pcb.pcb_r12);
supply_register(AMD64_R8_REGNUM + 5, (char *)&pcb.pcb_r13);
supply_register(AMD64_R8_REGNUM + 6, (char *)&pcb.pcb_r14);
supply_register(AMD64_R15_REGNUM, (char *)&pcb.pcb_r15);
supply_register(AMD64_RIP_REGNUM, (char *)&pcb.pcb_rip);
}
void
kgdb_trgt_store_registers(int regno __unused)
{
fprintf_unfiltered(gdb_stderr, "XXX: %s\n", __func__);
}
void
kgdb_trgt_new_objfile(struct objfile *objfile)
{
}
struct kgdb_frame_cache {
CORE_ADDR pc;
CORE_ADDR sp;
};
static int kgdb_trgt_frame_offset[20] = {
offsetof(struct trapframe, tf_rax),
offsetof(struct trapframe, tf_rbx),
offsetof(struct trapframe, tf_rcx),
offsetof(struct trapframe, tf_rdx),
offsetof(struct trapframe, tf_rsi),
offsetof(struct trapframe, tf_rdi),
offsetof(struct trapframe, tf_rbp),
offsetof(struct trapframe, tf_rsp),
offsetof(struct trapframe, tf_r8),
offsetof(struct trapframe, tf_r9),
offsetof(struct trapframe, tf_r10),
offsetof(struct trapframe, tf_r11),
offsetof(struct trapframe, tf_r12),
offsetof(struct trapframe, tf_r13),
offsetof(struct trapframe, tf_r14),
offsetof(struct trapframe, tf_r15),
offsetof(struct trapframe, tf_rip),
offsetof(struct trapframe, tf_rflags),
offsetof(struct trapframe, tf_cs),
offsetof(struct trapframe, tf_ss)
};
static struct kgdb_frame_cache *
kgdb_trgt_frame_cache(struct frame_info *next_frame, void **this_cache)
{
char buf[MAX_REGISTER_SIZE];
struct kgdb_frame_cache *cache;
cache = *this_cache;
if (cache == NULL) {
cache = FRAME_OBSTACK_ZALLOC(struct kgdb_frame_cache);
*this_cache = cache;
cache->pc = frame_func_unwind(next_frame);
frame_unwind_register(next_frame, SP_REGNUM, buf);
cache->sp = extract_unsigned_integer(buf,
register_size(current_gdbarch, SP_REGNUM));
}
return (cache);
}
static void
kgdb_trgt_trapframe_this_id(struct frame_info *next_frame, void **this_cache,
struct frame_id *this_id)
{
struct kgdb_frame_cache *cache;
cache = kgdb_trgt_frame_cache(next_frame, this_cache);
*this_id = frame_id_build(cache->sp, cache->pc);
}
static void
kgdb_trgt_trapframe_prev_register(struct frame_info *next_frame,
void **this_cache, int regnum, int *optimizedp, enum lval_type *lvalp,
CORE_ADDR *addrp, int *realnump, void *valuep)
{
char dummy_valuep[MAX_REGISTER_SIZE];
struct kgdb_frame_cache *cache;
int ofs, regsz;
regsz = register_size(current_gdbarch, regnum);
if (valuep == NULL)
valuep = dummy_valuep;
memset(valuep, 0, regsz);
*optimizedp = 0;
*addrp = 0;
*lvalp = not_lval;
*realnump = -1;
ofs = (regnum >= AMD64_RAX_REGNUM && regnum <= AMD64_EFLAGS_REGNUM + 2)
? kgdb_trgt_frame_offset[regnum] : -1;
if (ofs == -1)
return;
cache = kgdb_trgt_frame_cache(next_frame, this_cache);
*addrp = cache->sp + ofs;
*lvalp = lval_memory;
target_read_memory(*addrp, valuep, regsz);
}
static const struct frame_unwind kgdb_trgt_trapframe_unwind = {
UNKNOWN_FRAME,
&kgdb_trgt_trapframe_this_id,
&kgdb_trgt_trapframe_prev_register
};
const struct frame_unwind *
kgdb_trgt_trapframe_sniffer(struct frame_info *next_frame)
{
char *pname;
CORE_ADDR pc;
pc = frame_pc_unwind(next_frame);
pname = NULL;
find_pc_partial_function(pc, &pname, NULL, NULL);
if (pname == NULL)
return (NULL);
if (strcmp(pname, "calltrap") == 0 ||
strcmp(pname, "fast_syscall_common") == 0 ||
strcmp(pname, "mchk_calltrap") == 0 ||
strcmp(pname, "nmi_calltrap") == 0 ||
(pname[0] == 'X' && pname[1] != '_'))
return (&kgdb_trgt_trapframe_unwind);
/* printf("%s: %lx =%s\n", __func__, pc, pname); */
return (NULL);
}
/*
* This function ensures, that the PC is inside the
* function section which is understood by GDB.
*
* Return 0 when fixup is necessary, -1 otherwise.
*/
int
kgdb_trgt_pc_fixup(CORE_ADDR *pc __unused)
{
return (-1);
}

View file

@ -1,286 +0,0 @@
/*
* Copyright (c) 2004 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#ifndef CROSS_DEBUGGER
#include <machine/pcb.h>
#include <machine/frame.h>
#include <machine/armreg.h>
#endif
#include <err.h>
#include <kvm.h>
#include <string.h>
#include <defs.h>
#include <target.h>
#include <gdbthread.h>
#include <inferior.h>
#include <regcache.h>
#include <frame-unwind.h>
#include <arm-tdep.h>
#include "kgdb.h"
CORE_ADDR
kgdb_trgt_core_pcb(u_int cpuid)
{
#ifndef CROSS_DEBUGGER
return (kgdb_trgt_stop_pcb(cpuid, sizeof(struct pcb)));
#else
return -1;
#endif
}
void
kgdb_trgt_fetch_registers(int regno __unused)
{
#ifndef CROSS_DEBUGGER
struct kthr *kt;
struct pcb pcb;
int i;
kt = kgdb_thr_lookup_tid(ptid_get_pid(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 + 4; i <= ARM_SP_REGNUM; i++) {
supply_register(i, (char *)&pcb.pcb_regs.sf_r4 +
(i - (ARM_A1_REGNUM + 4 )) * 4);
}
supply_register(ARM_PC_REGNUM, (char *)&pcb.pcb_regs.sf_pc);
supply_register(ARM_LR_REGNUM, (char *)&pcb.pcb_regs.sf_lr);
#endif
}
void
kgdb_trgt_store_registers(int regno __unused)
{
fprintf_unfiltered(gdb_stderr, "XXX: %s\n", __func__);
}
void
kgdb_trgt_new_objfile(struct objfile *objfile)
{
}
#ifndef CROSS_DEBUGGER
struct kgdb_frame_cache {
CORE_ADDR fp;
CORE_ADDR sp;
CORE_ADDR pc;
};
static int kgdb_trgt_frame_offset[26] = {
offsetof(struct trapframe, tf_r0),
offsetof(struct trapframe, tf_r1),
offsetof(struct trapframe, tf_r2),
offsetof(struct trapframe, tf_r3),
offsetof(struct trapframe, tf_r4),
offsetof(struct trapframe, tf_r5),
offsetof(struct trapframe, tf_r6),
offsetof(struct trapframe, tf_r7),
offsetof(struct trapframe, tf_r8),
offsetof(struct trapframe, tf_r9),
offsetof(struct trapframe, tf_r10),
offsetof(struct trapframe, tf_r11),
offsetof(struct trapframe, tf_r12),
offsetof(struct trapframe, tf_svc_sp),
offsetof(struct trapframe, tf_svc_lr),
offsetof(struct trapframe, tf_pc),
-1, -1, -1, -1, -1, -1, -1, -1, -1,
offsetof(struct trapframe, tf_spsr)
};
static struct kgdb_frame_cache *
kgdb_trgt_frame_cache(struct frame_info *next_frame, void **this_cache)
{
char buf[MAX_REGISTER_SIZE];
struct kgdb_frame_cache *cache;
cache = *this_cache;
if (cache == NULL) {
cache = FRAME_OBSTACK_ZALLOC(struct kgdb_frame_cache);
*this_cache = cache;
frame_unwind_register(next_frame, ARM_SP_REGNUM, buf);
cache->sp = extract_unsigned_integer(buf,
register_size(current_gdbarch, ARM_SP_REGNUM));
frame_unwind_register(next_frame, ARM_FP_REGNUM, buf);
cache->fp = extract_unsigned_integer(buf,
register_size(current_gdbarch, ARM_FP_REGNUM));
cache->pc = frame_func_unwind(next_frame);
}
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)
{
struct kgdb_frame_cache *cache;
cache = kgdb_trgt_frame_cache(next_frame, this_cache);
*this_id = frame_id_build(cache->sp, cache->pc);
}
static void
kgdb_trgt_trapframe_prev_register(struct frame_info *next_frame,
void **this_cache, int regnum, int *optimizedp, enum lval_type *lvalp,
CORE_ADDR *addrp, int *realnump, void *valuep)
{
char dummy_valuep[MAX_REGISTER_SIZE];
struct kgdb_frame_cache *cache;
int ofs, regsz;
CORE_ADDR sp;
regsz = register_size(current_gdbarch, regnum);
if (valuep == NULL)
valuep = dummy_valuep;
memset(valuep, 0, regsz);
*optimizedp = 0;
*addrp = 0;
*lvalp = not_lval;
*realnump = -1;
ofs = (regnum >= 0 && regnum <= ARM_PS_REGNUM)
? kgdb_trgt_frame_offset[regnum] : -1;
if (ofs == -1)
return;
cache = kgdb_trgt_frame_cache(next_frame, this_cache);
sp = cache->sp;
ofs = kgdb_trgt_frame_offset[regnum];
*addrp = sp + ofs;
*lvalp = lval_memory;
target_read_memory(*addrp, valuep, regsz);
}
static const struct frame_unwind kgdb_trgt_trapframe_unwind = {
UNKNOWN_FRAME,
&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) {
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);
}
/*
* This function ensures, that the PC is inside the
* function section which is understood by GDB.
*
* Return 0 when fixup is necessary, -1 otherwise.
*/
int
kgdb_trgt_pc_fixup(CORE_ADDR *pc)
{
#ifndef CROSS_DEBUGGER
struct minimal_symbol *msymbol;
int valpc;
/*
* exception_exit and swi_exit are special. These functions
* are artificially injected into the stack to be executed
* as the last entry in calling chain when all functions exit.
* Treat them differently.
*/
msymbol = lookup_minimal_symbol_by_pc(*pc);
if (msymbol != NULL) {
if (strcmp(DEPRECATED_SYMBOL_NAME(msymbol), "exception_exit") == 0)
return (0);
if (strcmp(DEPRECATED_SYMBOL_NAME(msymbol), "swi_exit") == 0)
return (0);
}
/*
* kdb_enter contains an invalid instruction which is supposed
* to generate a trap. BFD does not understand it and treats
* this part of function as a separate function. Move PC
* two instruction earlier to be inside kdb_enter section.
*/
target_read_memory(*pc - 4, (char*)&valpc, 4);
if (valpc == 0xe7ffffff) {
*pc = *pc - 8;
return (0);
}
/*
* When the panic/vpanic is the last (noreturn) function,
* the bottom of the calling function looks as below.
* mov lr, pc
* b panic
* Normally, GDB is not able to detect function boundaries,
* so move the PC two instruction earlier where it can deal
* with it.
* Match this pair of instructions: mov lr, pc followed with
* non-linked branch.
*/
if ((valpc & 0xff000000) == 0xea000000) {
target_read_memory(*pc - 8, (char*)&valpc, 4);
if (valpc == 0xe1a0e00f) {
*pc -= 8;
return (0);
}
}
#endif
return (-1);
}

View file

@ -1,418 +0,0 @@
/*
* Copyright (c) 2004 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/proc.h>
#include <vm/vm.h>
#include <vm/pmap.h>
#include <machine/pcb.h>
#include <machine/frame.h>
#include <machine/segments.h>
#include <machine/tss.h>
#include <err.h>
#include <kvm.h>
#include <string.h>
#include <defs.h>
#include <target.h>
#include <gdbthread.h>
#include <inferior.h>
#include <regcache.h>
#include <frame-unwind.h>
#include <i386-tdep.h>
#include "kgdb.h"
static int ofs_fix;
CORE_ADDR
kgdb_trgt_core_pcb(u_int cpuid)
{
return (kgdb_trgt_stop_pcb(cpuid, sizeof(struct pcb)));
}
void
kgdb_trgt_fetch_registers(int regno __unused)
{
struct kthr *kt;
struct pcb pcb;
kt = kgdb_thr_lookup_tid(ptid_get_pid(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));
}
supply_register(I386_EBX_REGNUM, (char *)&pcb.pcb_ebx);
supply_register(I386_ESP_REGNUM, (char *)&pcb.pcb_esp);
supply_register(I386_EBP_REGNUM, (char *)&pcb.pcb_ebp);
supply_register(I386_ESI_REGNUM, (char *)&pcb.pcb_esi);
supply_register(I386_EDI_REGNUM, (char *)&pcb.pcb_edi);
supply_register(I386_EIP_REGNUM, (char *)&pcb.pcb_eip);
}
void
kgdb_trgt_store_registers(int regno __unused)
{
fprintf_unfiltered(gdb_stderr, "XXX: %s\n", __func__);
}
void
kgdb_trgt_new_objfile(struct objfile *objfile)
{
/*
* In revision 1.117 of i386/i386/exception.S trap handlers
* were changed to pass trapframes by reference rather than
* by value. Detect this by seeing if the first instruction
* at the 'calltrap' label is a "push %esp" which has the
* opcode 0x54.
*/
if (kgdb_parse("((char *)calltrap)[0]") == 0x54)
ofs_fix = 4;
else
ofs_fix = 0;
}
struct kgdb_tss_cache {
CORE_ADDR pc;
CORE_ADDR sp;
CORE_ADDR tss;
};
static int kgdb_trgt_tss_offset[15] = {
offsetof(struct i386tss, tss_eax),
offsetof(struct i386tss, tss_ecx),
offsetof(struct i386tss, tss_edx),
offsetof(struct i386tss, tss_ebx),
offsetof(struct i386tss, tss_esp),
offsetof(struct i386tss, tss_ebp),
offsetof(struct i386tss, tss_esi),
offsetof(struct i386tss, tss_edi),
offsetof(struct i386tss, tss_eip),
offsetof(struct i386tss, tss_eflags),
offsetof(struct i386tss, tss_cs),
offsetof(struct i386tss, tss_ss),
offsetof(struct i386tss, tss_ds),
offsetof(struct i386tss, tss_es),
offsetof(struct i386tss, tss_fs)
};
/*
* If the current thread is executing on a CPU, fetch the common_tss
* for that CPU.
*
* This is painful because 'struct pcpu' is variant sized, so we can't
* use it. Instead, we lookup the GDT selector for this CPU and
* extract the base of the TSS from there.
*/
static CORE_ADDR
kgdb_trgt_fetch_tss(void)
{
struct kthr *kt;
struct segment_descriptor sd;
uintptr_t addr, cpu0prvpage, tss;
kt = kgdb_thr_lookup_tid(ptid_get_pid(inferior_ptid));
if (kt == NULL || kt->cpu == NOCPU || kt->cpu < 0)
return (0);
addr = kgdb_lookup("gdt");
if (addr == 0)
return (0);
addr += (kt->cpu * NGDT + GPROC0_SEL) * sizeof(sd);
if (kvm_read(kvm, addr, &sd, sizeof(sd)) != sizeof(sd)) {
warnx("kvm_read: %s", kvm_geterr(kvm));
return (0);
}
if (sd.sd_type != SDT_SYS386BSY) {
warnx("descriptor is not a busy TSS");
return (0);
}
tss = sd.sd_hibase << 24 | sd.sd_lobase;
/*
* In SMP kernels, the TSS is stored as part of the per-CPU
* data. On older kernels, the CPU0's private page
* is stored at an address that isn't mapped in minidumps.
* However, the data is mapped at the alternate cpu0prvpage
* address. Thus, if the TSS is at the invalid address,
* change it to be relative to cpu0prvpage instead.
*/
if (trunc_page(tss) == 0xffc00000) {
addr = kgdb_lookup("cpu0prvpage");
if (addr == 0)
return (0);
if (kvm_read(kvm, addr, &cpu0prvpage, sizeof(cpu0prvpage)) !=
sizeof(cpu0prvpage)) {
warnx("kvm_read: %s", kvm_geterr(kvm));
return (0);
}
tss = cpu0prvpage + (tss & PAGE_MASK);
}
return ((CORE_ADDR)tss);
}
static struct kgdb_tss_cache *
kgdb_trgt_tss_cache(struct frame_info *next_frame, void **this_cache)
{
char buf[MAX_REGISTER_SIZE];
struct kgdb_tss_cache *cache;
cache = *this_cache;
if (cache == NULL) {
cache = FRAME_OBSTACK_ZALLOC(struct kgdb_tss_cache);
*this_cache = cache;
cache->pc = frame_func_unwind(next_frame);
frame_unwind_register(next_frame, SP_REGNUM, buf);
cache->sp = extract_unsigned_integer(buf,
register_size(current_gdbarch, SP_REGNUM));
cache->tss = kgdb_trgt_fetch_tss();
}
return (cache);
}
static void
kgdb_trgt_dblfault_this_id(struct frame_info *next_frame, void **this_cache,
struct frame_id *this_id)
{
struct kgdb_tss_cache *cache;
cache = kgdb_trgt_tss_cache(next_frame, this_cache);
*this_id = frame_id_build(cache->sp, cache->pc);
}
static void
kgdb_trgt_dblfault_prev_register(struct frame_info *next_frame,
void **this_cache, int regnum, int *optimizedp, enum lval_type *lvalp,
CORE_ADDR *addrp, int *realnump, void *valuep)
{
char dummy_valuep[MAX_REGISTER_SIZE];
struct kgdb_tss_cache *cache;
int ofs, regsz;
regsz = register_size(current_gdbarch, regnum);
if (valuep == NULL)
valuep = dummy_valuep;
memset(valuep, 0, regsz);
*optimizedp = 0;
*addrp = 0;
*lvalp = not_lval;
*realnump = -1;
ofs = (regnum >= I386_EAX_REGNUM && regnum <= I386_FS_REGNUM)
? kgdb_trgt_tss_offset[regnum] : -1;
if (ofs == -1)
return;
cache = kgdb_trgt_tss_cache(next_frame, this_cache);
if (cache->tss == 0)
return;
*addrp = cache->tss + ofs;
*lvalp = lval_memory;
target_read_memory(*addrp, valuep, regsz);
}
static const struct frame_unwind kgdb_trgt_dblfault_unwind = {
UNKNOWN_FRAME,
&kgdb_trgt_dblfault_this_id,
&kgdb_trgt_dblfault_prev_register
};
struct kgdb_frame_cache {
int frame_type;
CORE_ADDR pc;
CORE_ADDR sp;
};
#define FT_NORMAL 1
#define FT_INTRFRAME 2
#define FT_INTRTRAPFRAME 3
#define FT_TIMERFRAME 4
static int kgdb_trgt_frame_offset[15] = {
offsetof(struct trapframe, tf_eax),
offsetof(struct trapframe, tf_ecx),
offsetof(struct trapframe, tf_edx),
offsetof(struct trapframe, tf_ebx),
offsetof(struct trapframe, tf_esp),
offsetof(struct trapframe, tf_ebp),
offsetof(struct trapframe, tf_esi),
offsetof(struct trapframe, tf_edi),
offsetof(struct trapframe, tf_eip),
offsetof(struct trapframe, tf_eflags),
offsetof(struct trapframe, tf_cs),
offsetof(struct trapframe, tf_ss),
offsetof(struct trapframe, tf_ds),
offsetof(struct trapframe, tf_es),
offsetof(struct trapframe, tf_fs)
};
static struct kgdb_frame_cache *
kgdb_trgt_frame_cache(struct frame_info *next_frame, void **this_cache)
{
char buf[MAX_REGISTER_SIZE];
struct kgdb_frame_cache *cache;
char *pname;
CORE_ADDR pcx;
uintptr_t addr, setidt_disp;
cache = *this_cache;
if (cache == NULL) {
cache = FRAME_OBSTACK_ZALLOC(struct kgdb_frame_cache);
*this_cache = cache;
pcx = frame_pc_unwind(next_frame);
if (pcx >= PMAP_TRM_MIN_ADDRESS) {
addr = kgdb_lookup("setidt_disp");
if (addr != 0) {
if (kvm_read(kvm, addr, &setidt_disp,
sizeof(setidt_disp)) !=
sizeof(setidt_disp))
warnx("kvm_read: %s", kvm_geterr(kvm));
else
pcx -= setidt_disp;
}
}
cache->pc = pcx;
find_pc_partial_function(cache->pc, &pname, NULL, NULL);
if (pname[0] != 'X')
cache->frame_type = FT_NORMAL;
else if (strcmp(pname, "Xtimerint") == 0)
cache->frame_type = FT_TIMERFRAME;
else if (strcmp(pname, "Xcpustop") == 0 ||
strcmp(pname, "Xrendezvous") == 0 ||
strcmp(pname, "Xipi_intr_bitmap_handler") == 0 ||
strcmp(pname, "Xlazypmap") == 0)
cache->frame_type = FT_INTRTRAPFRAME;
else
cache->frame_type = FT_INTRFRAME;
frame_unwind_register(next_frame, SP_REGNUM, buf);
cache->sp = extract_unsigned_integer(buf,
register_size(current_gdbarch, SP_REGNUM));
}
return (cache);
}
static void
kgdb_trgt_trapframe_this_id(struct frame_info *next_frame, void **this_cache,
struct frame_id *this_id)
{
struct kgdb_frame_cache *cache;
cache = kgdb_trgt_frame_cache(next_frame, this_cache);
*this_id = frame_id_build(cache->sp, cache->pc);
}
static void
kgdb_trgt_trapframe_prev_register(struct frame_info *next_frame,
void **this_cache, int regnum, int *optimizedp, enum lval_type *lvalp,
CORE_ADDR *addrp, int *realnump, void *valuep)
{
char dummy_valuep[MAX_REGISTER_SIZE];
struct kgdb_frame_cache *cache;
int ofs, regsz;
regsz = register_size(current_gdbarch, regnum);
if (valuep == NULL)
valuep = dummy_valuep;
memset(valuep, 0, regsz);
*optimizedp = 0;
*addrp = 0;
*lvalp = not_lval;
*realnump = -1;
ofs = (regnum >= I386_EAX_REGNUM && regnum <= I386_FS_REGNUM)
? kgdb_trgt_frame_offset[regnum] + ofs_fix : -1;
if (ofs == -1)
return;
cache = kgdb_trgt_frame_cache(next_frame, this_cache);
switch (cache->frame_type) {
case FT_NORMAL:
break;
case FT_INTRFRAME:
ofs += 4;
break;
case FT_TIMERFRAME:
break;
case FT_INTRTRAPFRAME:
ofs -= ofs_fix;
break;
default:
fprintf_unfiltered(gdb_stderr, "Correct FT_XXX frame offsets "
"for %d\n", cache->frame_type);
break;
}
*addrp = cache->sp + ofs;
*lvalp = lval_memory;
target_read_memory(*addrp, valuep, regsz);
}
static const struct frame_unwind kgdb_trgt_trapframe_unwind = {
UNKNOWN_FRAME,
&kgdb_trgt_trapframe_this_id,
&kgdb_trgt_trapframe_prev_register
};
const struct frame_unwind *
kgdb_trgt_trapframe_sniffer(struct frame_info *next_frame)
{
char *pname;
CORE_ADDR pc;
pc = frame_pc_unwind(next_frame);
if (pc >= PMAP_TRM_MIN_ADDRESS)
return (&kgdb_trgt_trapframe_unwind);
pname = NULL;
find_pc_partial_function(pc, &pname, NULL, NULL);
if (pname == NULL)
return (NULL);
if (strcmp(pname, "dblfault_handler") == 0)
return (&kgdb_trgt_dblfault_unwind);
if (strcmp(pname, "calltrap") == 0 ||
(pname[0] == 'X' && pname[1] != '_'))
return (&kgdb_trgt_trapframe_unwind);
/* printf("%s: %llx =%s\n", __func__, pc, pname); */
return (NULL);
}
/*
* This function ensures, that the PC is inside the
* function section which is understood by GDB.
*
* Return 0 when fixup is necessary, -1 otherwise.
*/
int
kgdb_trgt_pc_fixup(CORE_ADDR *pc __unused)
{
return (-1);
}

View file

@ -1,253 +0,0 @@
/*
* Copyright (c) 2007 Juniper Networks, Inc.
* Copyright (c) 2004 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* from: src/gnu/usr.bin/gdb/kgdb/trgt_alpha.c,v 1.2.2.1 2005/09/15 05:32:10 marcel
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <machine/asm.h>
#include <machine/pcb.h>
#include <machine/frame.h>
#include <err.h>
#include <kvm.h>
#include <string.h>
#include <defs.h>
#include <target.h>
#include <gdbthread.h>
#include <inferior.h>
#include <regcache.h>
#include <frame-unwind.h>
#include <mips-tdep.h>
#ifndef CROSS_DEBUGGER
#include <machine/pcb.h>
#endif
#include "kgdb.h"
CORE_ADDR
kgdb_trgt_core_pcb(u_int cpuid)
{
return (kgdb_trgt_stop_pcb(cpuid, sizeof(struct pcb)));
}
void
kgdb_trgt_fetch_registers(int regno __unused)
{
#ifndef CROSS_DEBUGGER
struct kthr *kt;
struct pcb pcb;
kt = kgdb_thr_lookup_tid(ptid_get_pid(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));
}
supply_register(MIPS_S0_REGNUM, (char *)&pcb.pcb_context[PCB_REG_S0]);
supply_register(MIPS_S1_REGNUM, (char *)&pcb.pcb_context[PCB_REG_S1]);
supply_register(MIPS_S2_REGNUM, (char *)&pcb.pcb_context[PCB_REG_S2]);
supply_register(MIPS_S3_REGNUM, (char *)&pcb.pcb_context[PCB_REG_S3]);
supply_register(MIPS_S4_REGNUM, (char *)&pcb.pcb_context[PCB_REG_S4]);
supply_register(MIPS_S5_REGNUM, (char *)&pcb.pcb_context[PCB_REG_S5]);
supply_register(MIPS_S6_REGNUM, (char *)&pcb.pcb_context[PCB_REG_S6]);
supply_register(MIPS_S7_REGNUM, (char *)&pcb.pcb_context[PCB_REG_S7]);
supply_register(MIPS_SP_REGNUM, (char *)&pcb.pcb_context[PCB_REG_SP]);
supply_register(MIPS_FP_REGNUM, (char *)&pcb.pcb_context[PCB_REG_GP]);
supply_register(MIPS_RA_REGNUM, (char *)&pcb.pcb_context[PCB_REG_RA]);
supply_register(MIPS_EMBED_PC_REGNUM, (char *)&pcb.pcb_context[PCB_REG_PC]);
#endif
}
void
kgdb_trgt_store_registers(int regno __unused)
{
fprintf_unfiltered(gdb_stderr, "Unimplemented function: %s\n", __func__);
}
void
kgdb_trgt_new_objfile(struct objfile *objfile)
{
}
#ifndef CROSS_DEBUGGER
struct kgdb_frame_cache {
CORE_ADDR pc;
CORE_ADDR sp;
};
static int kgdb_trgt_frame_offset[] = {
offsetof(struct trapframe, zero),
offsetof(struct trapframe, ast),
offsetof(struct trapframe, v0),
offsetof(struct trapframe, v1),
offsetof(struct trapframe, a0),
offsetof(struct trapframe, a1),
offsetof(struct trapframe, a2),
offsetof(struct trapframe, a3),
#if defined(__mips_n32) || defined(__mips_n64)
offsetof(struct trapframe, a4),
offsetof(struct trapframe, a5),
offsetof(struct trapframe, a6),
offsetof(struct trapframe, a7),
offsetof(struct trapframe, t0),
offsetof(struct trapframe, t1),
offsetof(struct trapframe, t2),
offsetof(struct trapframe, t3),
#else
offsetof(struct trapframe, t0),
offsetof(struct trapframe, t1),
offsetof(struct trapframe, t2),
offsetof(struct trapframe, t3),
offsetof(struct trapframe, t4),
offsetof(struct trapframe, t5),
offsetof(struct trapframe, t6),
offsetof(struct trapframe, t7),
#endif
offsetof(struct trapframe, s0),
offsetof(struct trapframe, s1),
offsetof(struct trapframe, s2),
offsetof(struct trapframe, s3),
offsetof(struct trapframe, s4),
offsetof(struct trapframe, s5),
offsetof(struct trapframe, s6),
offsetof(struct trapframe, s7),
offsetof(struct trapframe, t8),
offsetof(struct trapframe, t9),
offsetof(struct trapframe, k0),
offsetof(struct trapframe, k1),
offsetof(struct trapframe, gp),
offsetof(struct trapframe, sp),
offsetof(struct trapframe, s8),
offsetof(struct trapframe, ra),
};
static struct kgdb_frame_cache *
kgdb_trgt_frame_cache(struct frame_info *next_frame, void **this_cache)
{
char buf[MAX_REGISTER_SIZE];
struct kgdb_frame_cache *cache;
cache = *this_cache;
if (cache == NULL) {
cache = FRAME_OBSTACK_ZALLOC(struct kgdb_frame_cache);
*this_cache = cache;
cache->pc = frame_func_unwind(next_frame);
frame_unwind_register(next_frame, SP_REGNUM, buf);
cache->sp = extract_unsigned_integer(buf,
register_size(current_gdbarch, SP_REGNUM));
}
return (cache);
}
static void
kgdb_trgt_trapframe_this_id(struct frame_info *next_frame, void **this_cache,
struct frame_id *this_id)
{
struct kgdb_frame_cache *cache;
cache = kgdb_trgt_frame_cache(next_frame, this_cache);
*this_id = frame_id_build(cache->sp, cache->pc);
}
static void
kgdb_trgt_trapframe_prev_register(struct frame_info *next_frame __unused,
void **this_cache __unused, int regnum __unused, int *optimizedp __unused,
enum lval_type *lvalp __unused, CORE_ADDR *addrp __unused,
int *realnump __unused, void *valuep __unused)
{
char dummy_valuep[MAX_REGISTER_SIZE];
struct kgdb_frame_cache *cache;
int ofs, regsz;
regsz = register_size(current_gdbarch, regnum);
if (valuep == NULL)
valuep = dummy_valuep;
memset(valuep, 0, regsz);
*optimizedp = 0;
*addrp = 0;
*lvalp = not_lval;
*realnump = -1;
ofs = (regnum >= 0 && regnum <= MIPS_RA_REGNUM) ?
kgdb_trgt_frame_offset[regnum] : -1;
if (ofs == -1)
return;
cache = kgdb_trgt_frame_cache(next_frame, this_cache);
*addrp = cache->sp + ofs * 8;
*lvalp = lval_memory;
target_read_memory(*addrp, valuep, regsz);
}
static const struct frame_unwind kgdb_trgt_trapframe_unwind = {
UNKNOWN_FRAME,
&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)
return (NULL);
if ((strcmp(pname, "MipsKernIntr") == 0) ||
(strcmp(pname, "MipsKernGenException") == 0) ||
(strcmp(pname, "MipsUserIntr") == 0) ||
(strcmp(pname, "MipsUserGenException") == 0))
return (&kgdb_trgt_trapframe_unwind);
#endif
return (NULL);
}
/*
* This function ensures, that the PC is inside the
* function section which is understood by GDB.
*
* Return 0 when fixup is necessary, -1 otherwise.
*/
int
kgdb_trgt_pc_fixup(CORE_ADDR *pc __unused)
{
return (-1);
}

View file

@ -1,214 +0,0 @@
/*-
* Copyright (c) 2006 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#ifdef CROSS_DEBUGGER
#include <sys/powerpc/include/pcb.h>
#include <sys/powerpc/include/frame.h>
#else
#include <machine/pcb.h>
#include <machine/frame.h>
#endif
#include <err.h>
#include <kvm.h>
#include <string.h>
#include <defs.h>
#include <target.h>
#include <gdbthread.h>
#include <inferior.h>
#include <regcache.h>
#include <frame-unwind.h>
#include <ppc-tdep.h>
#include "kgdb.h"
CORE_ADDR
kgdb_trgt_core_pcb(u_int cpuid)
{
return (kgdb_trgt_stop_pcb(cpuid, sizeof(struct pcb)));
}
void
kgdb_trgt_fetch_registers(int regno __unused)
{
struct kthr *kt;
struct pcb pcb;
struct gdbarch_tdep *tdep;
int i;
tdep = gdbarch_tdep (current_gdbarch);
kt = kgdb_thr_lookup_tid(ptid_get_pid(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));
}
/*
* r14-r31 are saved in the pcb
*/
for (i = 14; i <= 31; i++) {
supply_register(tdep->ppc_gp0_regnum + i,
(char *)&pcb.pcb_context[i]);
}
/* r1 is saved in the sp field */
supply_register(tdep->ppc_gp0_regnum + 1, (char *)&pcb.pcb_sp);
supply_register(tdep->ppc_lr_regnum, (char *)&pcb.pcb_lr);
supply_register(tdep->ppc_cr_regnum, (char *)&pcb.pcb_cr);
}
void
kgdb_trgt_store_registers(int regno __unused)
{
fprintf_unfiltered(gdb_stderr, "XXX: %s\n", __func__);
}
void
kgdb_trgt_new_objfile(struct objfile *objfile)
{
}
struct kgdb_frame_cache {
CORE_ADDR pc;
CORE_ADDR sp;
};
static struct kgdb_frame_cache *
kgdb_trgt_frame_cache(struct frame_info *next_frame, void **this_cache)
{
char buf[MAX_REGISTER_SIZE];
struct kgdb_frame_cache *cache;
cache = *this_cache;
if (cache == NULL) {
cache = FRAME_OBSTACK_ZALLOC(struct kgdb_frame_cache);
*this_cache = cache;
cache->pc = frame_func_unwind(next_frame);
frame_unwind_register(next_frame, SP_REGNUM, buf);
cache->sp = extract_unsigned_integer(buf,
register_size(current_gdbarch, SP_REGNUM));
}
return (cache);
}
static void
kgdb_trgt_trapframe_this_id(struct frame_info *next_frame, void **this_cache,
struct frame_id *this_id)
{
struct kgdb_frame_cache *cache;
cache = kgdb_trgt_frame_cache(next_frame, this_cache);
*this_id = frame_id_build(cache->sp, cache->pc);
}
static void
kgdb_trgt_trapframe_prev_register(struct frame_info *next_frame,
void **this_cache, int regnum, int *optimizedp, enum lval_type *lvalp,
CORE_ADDR *addrp, int *realnump, void *valuep)
{
char dummy_valuep[MAX_REGISTER_SIZE];
struct gdbarch_tdep *tdep;
struct kgdb_frame_cache *cache;
int ofs, regsz;
tdep = gdbarch_tdep(current_gdbarch);
regsz = register_size(current_gdbarch, regnum);
if (valuep == NULL)
valuep = dummy_valuep;
memset(valuep, 0, regsz);
*optimizedp = 0;
*addrp = 0;
*lvalp = not_lval;
*realnump = -1;
if (regnum >= tdep->ppc_gp0_regnum &&
regnum <= tdep->ppc_gplast_regnum)
ofs = offsetof(struct trapframe,
fixreg[regnum - tdep->ppc_gp0_regnum]);
else if (regnum == tdep->ppc_lr_regnum)
ofs = offsetof(struct trapframe, lr);
else if (regnum == tdep->ppc_cr_regnum)
ofs = offsetof(struct trapframe, cr);
else if (regnum == tdep->ppc_xer_regnum)
ofs = offsetof(struct trapframe, xer);
else if (regnum == tdep->ppc_ctr_regnum)
ofs = offsetof(struct trapframe, ctr);
else if (regnum == PC_REGNUM)
ofs = offsetof(struct trapframe, srr0);
else
return;
cache = kgdb_trgt_frame_cache(next_frame, this_cache);
*addrp = cache->sp + 8 + ofs;
*lvalp = lval_memory;
target_read_memory(*addrp, valuep, regsz);
}
static const struct frame_unwind kgdb_trgt_trapframe_unwind = {
UNKNOWN_FRAME,
&kgdb_trgt_trapframe_this_id,
&kgdb_trgt_trapframe_prev_register
};
const struct frame_unwind *
kgdb_trgt_trapframe_sniffer(struct frame_info *next_frame)
{
char *pname;
CORE_ADDR pc;
pc = frame_pc_unwind(next_frame);
pname = NULL;
find_pc_partial_function(pc, &pname, NULL, NULL);
if (pname == NULL)
return (NULL);
if (strcmp(pname, "asttrapexit") == 0 ||
strcmp(pname, "trapexit") == 0)
return (&kgdb_trgt_trapframe_unwind);
/* printf("%s: %llx =%s\n", __func__, pc, pname); */
return (NULL);
}
/*
* This function ensures, that the PC is inside the
* function section which is understood by GDB.
*
* Return 0 when fixup is necessary, -1 otherwise.
*/
int
kgdb_trgt_pc_fixup(CORE_ADDR *pc __unused)
{
return (-1);
}

View file

@ -1,211 +0,0 @@
/*-
* Copyright (c) 2006 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <machine/pcb.h>
#include <machine/frame.h>
#include <err.h>
#include <kvm.h>
#include <string.h>
#include <defs.h>
#include <target.h>
#include <gdbthread.h>
#include <inferior.h>
#include <regcache.h>
#include <frame-unwind.h>
#include <ppc-tdep.h>
#include "kgdb.h"
CORE_ADDR
kgdb_trgt_core_pcb(u_int cpuid)
{
return (kgdb_trgt_stop_pcb(cpuid, sizeof(struct pcb)));
}
void
kgdb_trgt_fetch_registers(int regno __unused)
{
struct kthr *kt;
struct pcb pcb;
struct gdbarch_tdep *tdep;
int i;
tdep = gdbarch_tdep (current_gdbarch);
kt = kgdb_thr_lookup_tid(ptid_get_pid(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));
}
/*
* r14-r31 are saved in the pcb
*/
for (i = 14; i <= 31; i++) {
supply_register(tdep->ppc_gp0_regnum + i,
(char *)&pcb.pcb_context[i]);
}
/* r1 is saved in the sp field */
supply_register(tdep->ppc_gp0_regnum + 1, (char *)&pcb.pcb_sp);
/* r2 is saved in the toc field */
supply_register(tdep->ppc_gp0_regnum + 2, (char *)&pcb.pcb_toc);
supply_register(tdep->ppc_lr_regnum, (char *)&pcb.pcb_lr);
supply_register(tdep->ppc_cr_regnum, (char *)&pcb.pcb_cr);
}
void
kgdb_trgt_store_registers(int regno __unused)
{
fprintf_unfiltered(gdb_stderr, "XXX: %s\n", __func__);
}
void
kgdb_trgt_new_objfile(struct objfile *objfile)
{
}
struct kgdb_frame_cache {
CORE_ADDR pc;
CORE_ADDR sp;
};
static struct kgdb_frame_cache *
kgdb_trgt_frame_cache(struct frame_info *next_frame, void **this_cache)
{
char buf[MAX_REGISTER_SIZE];
struct kgdb_frame_cache *cache;
cache = *this_cache;
if (cache == NULL) {
cache = FRAME_OBSTACK_ZALLOC(struct kgdb_frame_cache);
*this_cache = cache;
cache->pc = frame_func_unwind(next_frame);
frame_unwind_register(next_frame, SP_REGNUM, buf);
cache->sp = extract_unsigned_integer(buf,
register_size(current_gdbarch, SP_REGNUM));
}
return (cache);
}
static void
kgdb_trgt_trapframe_this_id(struct frame_info *next_frame, void **this_cache,
struct frame_id *this_id)
{
struct kgdb_frame_cache *cache;
cache = kgdb_trgt_frame_cache(next_frame, this_cache);
*this_id = frame_id_build(cache->sp, cache->pc);
}
static void
kgdb_trgt_trapframe_prev_register(struct frame_info *next_frame,
void **this_cache, int regnum, int *optimizedp, enum lval_type *lvalp,
CORE_ADDR *addrp, int *realnump, void *valuep)
{
char dummy_valuep[MAX_REGISTER_SIZE];
struct gdbarch_tdep *tdep;
struct kgdb_frame_cache *cache;
int ofs, regsz;
tdep = gdbarch_tdep(current_gdbarch);
regsz = register_size(current_gdbarch, regnum);
if (valuep == NULL)
valuep = dummy_valuep;
memset(valuep, 0, regsz);
*optimizedp = 0;
*addrp = 0;
*lvalp = not_lval;
*realnump = -1;
if (regnum >= tdep->ppc_gp0_regnum &&
regnum <= tdep->ppc_gplast_regnum)
ofs = offsetof(struct trapframe,
fixreg[regnum - tdep->ppc_gp0_regnum]);
else if (regnum == tdep->ppc_lr_regnum)
ofs = offsetof(struct trapframe, lr);
else if (regnum == tdep->ppc_cr_regnum)
ofs = offsetof(struct trapframe, cr);
else if (regnum == tdep->ppc_xer_regnum)
ofs = offsetof(struct trapframe, xer);
else if (regnum == tdep->ppc_ctr_regnum)
ofs = offsetof(struct trapframe, ctr);
else if (regnum == PC_REGNUM)
ofs = offsetof(struct trapframe, srr0);
else
return;
cache = kgdb_trgt_frame_cache(next_frame, this_cache);
*addrp = cache->sp + 48 + ofs;
*lvalp = lval_memory;
target_read_memory(*addrp, valuep, regsz);
}
static const struct frame_unwind kgdb_trgt_trapframe_unwind = {
UNKNOWN_FRAME,
&kgdb_trgt_trapframe_this_id,
&kgdb_trgt_trapframe_prev_register
};
const struct frame_unwind *
kgdb_trgt_trapframe_sniffer(struct frame_info *next_frame)
{
char *pname;
CORE_ADDR pc;
pc = frame_pc_unwind(next_frame);
pname = NULL;
find_pc_partial_function(pc, &pname, NULL, NULL);
if (pname == NULL)
return (NULL);
if (strcmp(pname, "asttrapexit") == 0 ||
strcmp(pname, "trapexit") == 0)
return (&kgdb_trgt_trapframe_unwind);
/* printf("%s: %llx =%s\n", __func__, pc, pname); */
return (NULL);
}
/*
* This function ensures, that the PC is inside the
* function section which is understood by GDB.
*
* Return 0 when fixup is necessary, -1 otherwise.
*/
int
kgdb_trgt_pc_fixup(CORE_ADDR *pc __unused)
{
return (-1);
}

View file

@ -1,218 +0,0 @@
/*
* Copyright (c) 2004 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <machine/asm.h>
#include <machine/pcb.h>
#include <machine/frame.h>
#include <err.h>
#include <kvm.h>
#include <string.h>
#include <defs.h>
#include <target.h>
#include <gdbthread.h>
#include <inferior.h>
#include <regcache.h>
#include <frame-unwind.h>
#include <sparc-tdep.h>
#include <sparc64-tdep.h>
#include "kgdb.h"
CORE_ADDR
kgdb_trgt_core_pcb(u_int cpuid)
{
return (kgdb_trgt_stop_pcb(cpuid, sizeof(struct pcb)));
}
void
kgdb_trgt_fetch_registers(int regno __unused)
{
struct kthr *kt;
struct pcb pcb;
kt = kgdb_thr_lookup_tid(ptid_get_pid(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));
}
supply_register(SPARC_SP_REGNUM, (char *)&pcb.pcb_sp);
sparc_supply_rwindow(current_regcache, pcb.pcb_sp, -1);
supply_register(SPARC64_PC_REGNUM, (char *)&pcb.pcb_pc);
pcb.pcb_pc += 4;
supply_register(SPARC64_NPC_REGNUM, (char *)&pcb.pcb_pc);
}
void
kgdb_trgt_store_registers(int regno __unused)
{
fprintf_unfiltered(gdb_stderr, "XXX: %s\n", __func__);
}
void
kgdb_trgt_new_objfile(struct objfile *objfile)
{
}
struct kgdb_frame_cache {
CORE_ADDR pc;
CORE_ADDR sp;
CORE_ADDR fp;
};
static struct kgdb_frame_cache *
kgdb_trgt_frame_cache(struct frame_info *next_frame, void **this_cache)
{
char buf[MAX_REGISTER_SIZE];
struct kgdb_frame_cache *cache;
cache = *this_cache;
if (cache == NULL) {
cache = FRAME_OBSTACK_ZALLOC(struct kgdb_frame_cache);
*this_cache = cache;
cache->pc = frame_func_unwind(next_frame);
frame_unwind_register(next_frame, SPARC_SP_REGNUM, buf);
cache->sp = extract_unsigned_integer(buf,
register_size(current_gdbarch, SPARC_SP_REGNUM));
frame_unwind_register(next_frame, SPARC_FP_REGNUM, buf);
cache->fp = extract_unsigned_integer(buf,
register_size(current_gdbarch, SPARC_FP_REGNUM));
cache->fp += BIAS - sizeof(struct trapframe);
}
return (cache);
}
static void
kgdb_trgt_trapframe_this_id(struct frame_info *next_frame, void **this_cache,
struct frame_id *this_id)
{
struct kgdb_frame_cache *cache;
cache = kgdb_trgt_frame_cache(next_frame, this_cache);
*this_id = frame_id_build(cache->sp, cache->pc);
}
static void
kgdb_trgt_trapframe_prev_register(struct frame_info *next_frame,
void **this_cache, int regnum, int *optimizedp, enum lval_type *lvalp,
CORE_ADDR *addrp, int *realnump, void *valuep)
{
char dummy_valuep[MAX_REGISTER_SIZE];
struct kgdb_frame_cache *cache;
int ofs, regsz;
regsz = register_size(current_gdbarch, regnum);
if (valuep == NULL)
valuep = dummy_valuep;
memset(valuep, 0, regsz);
*optimizedp = 0;
*addrp = 0;
*lvalp = not_lval;
*realnump = -1;
cache = kgdb_trgt_frame_cache(next_frame, this_cache);
switch (regnum) {
case SPARC_SP_REGNUM:
ofs = offsetof(struct trapframe, tf_sp);
break;
case SPARC64_PC_REGNUM:
ofs = offsetof(struct trapframe, tf_tpc);
break;
case SPARC64_NPC_REGNUM:
ofs = offsetof(struct trapframe, tf_tnpc);
break;
case SPARC_O0_REGNUM:
case SPARC_O1_REGNUM:
case SPARC_O2_REGNUM:
case SPARC_O3_REGNUM:
case SPARC_O4_REGNUM:
case SPARC_O5_REGNUM:
case SPARC_O7_REGNUM:
ofs = offsetof(struct trapframe, tf_out) +
(regnum - SPARC_O0_REGNUM) * 8;
break;
default:
if (regnum >= SPARC_L0_REGNUM && regnum <= SPARC_I7_REGNUM) {
ofs = (regnum - SPARC_L0_REGNUM) * 8;
*addrp = cache->sp + BIAS + ofs;
*lvalp = lval_memory;
target_read_memory(*addrp, valuep, regsz);
}
return;
}
*addrp = cache->fp + ofs;
*lvalp = lval_memory;
target_read_memory(*addrp, valuep, regsz);
}
static const struct frame_unwind kgdb_trgt_trapframe_unwind = {
UNKNOWN_FRAME,
&kgdb_trgt_trapframe_this_id,
&kgdb_trgt_trapframe_prev_register
};
const struct frame_unwind *
kgdb_trgt_trapframe_sniffer(struct frame_info *next_frame)
{
char *pname;
CORE_ADDR pc;
pc = frame_func_unwind(next_frame);
pname = NULL;
find_pc_partial_function(pc, &pname, NULL, NULL);
if (pname == NULL)
return (NULL);
if (strcmp(pname, "tl0_intr") == 0 ||
strcmp(pname, "tl0_trap") == 0 ||
strcmp(pname, "tl1_intr") == 0 ||
strcmp(pname, "tl1_trap") == 0)
return (&kgdb_trgt_trapframe_unwind);
/* printf("%s: %lx =%s\n", __func__, pc, pname); */
return (NULL);
}
/*
* This function ensures, that the PC is inside the
* function section which is understood by GDB.
*
* Return 0 when fixup is necessary, -1 otherwise.
*/
int
kgdb_trgt_pc_fixup(CORE_ADDR *pc __unused)
{
return (-1);
}

View file

@ -1,80 +0,0 @@
# $FreeBSD$
# These assignments duplicate much of the functionality of
# MACHINE_CPUARCH, but there's no easy way to export make functions...
.if defined(TARGET_ARCH)
TARGET_CPUARCH=${TARGET_ARCH:${__TO_CPUARCH}}
.else
TARGET_CPUARCH=${MACHINE_CPUARCH}
.endif
TARGET_ARCH?= ${MACHINE_ARCH}
LIB= gdb
INTERNALLIB=
SRCS= annotate.c arch-utils.c auxv.c ax-gdb.c ax-general.c \
bcache.c bfd-target.c block.c blockframe.c breakpoint.c \
buildsym.c \
c-exp.y c-lang.c c-typeprint.c c-valprint.c charset.c \
cli-cmds.c cli-decode.c cli-dump.c cli-interp.c cli-logging.c \
cli-out.c cli-script.c cli-setshow.c cli-utils.c coff-pe-read.c \
coffread.c complaints.c completer.c copying.c corefile.c \
corelow.c cp-abi.c cp-namespace.c cp-support.c cp-valprint.c \
dbxread.c dcache.c demangle.c dictionary.c disasm.c doublest.c \
dummy-frame.c dwarf2-frame.c dwarf2expr.c dwarf2loc.c \
dwarf2read.c dwarfread.c \
elfread.c environ.c eval.c event-loop.c event-top.c exec.c \
expprint.c \
f-exp.y f-lang.c f-typeprint.c f-valprint.c findvar.c \
${_fork_child} frame-base.c frame-unwind.c frame.c \
gdb-events.c gdbarch.c gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \
hpacc-abi.c \
inf-loop.c infcall.c infcmd.c inflow.c ${_infptrace} infrun.c \
${_inftarg} init.c interps.c \
jv-exp.y jv-lang.c jv-typeprint.c jv-valprint.c \
kod-cisco.c kod.c \
language.c linespec.c \
m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c macrocmd.c \
macroexp.c macroscope.c macrotab.c main.c maint.c mdebugread.c \
mem-break.c memattr.c mi-cmd-break.c mi-cmd-disas.c \
mi-cmd-env.c mi-cmd-file.c mi-cmd-stack.c mi-cmd-var.c \
mi-cmds.c mi-console.c mi-getopt.c mi-interp.c mi-main.c \
mi-out.c mi-parse.c mi-symbol-cmds.c minsyms.c mipsread.c \
nlmread.c \
objc-exp.y objc-lang.c objfiles.c observer.c osabi.c \
p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \
regcache.c reggroups.c remote-fileio.c remote-utils.c remote.c \
scm-exp.c scm-lang.c scm-valprint.c sentinel-frame.c ser-pipe.c \
ser-tcp.c ser-unix.c serial.c signals.c source.c stabsread.c \
stack.c std-regs.c symfile.c symmisc.c symtab.c \
target.c thread.c top.c tracepoint.c trad-frame.c tui-command.c \
tui-data.c tui-disasm.c tui-file.c tui-hooks.c tui-interp.c \
tui-io.c tui-layout.c tui-out.c tui-regs.c tui-source.c \
tui-stack.c tui-win.c tui-windata.c tui-wingeneral.c \
tui-winsource.c tui.c typeprint.c \
ui-file.c ui-out.c user-regs.c utils.c \
valarith.c valops.c valprint.c values.c varobj.c \
wrapper.c ${LIBSRCS}
.for stupid_gnu in \
xregcomp xre_exec xregexec xre_search xre_compile_fastmap xregerror xre_comp xre_set_syntax
CFLAGS+= -D${stupid_gnu}=${stupid_gnu:S/^x//}
.endfor
.if ${TARGET_ARCH} == ${MACHINE_ARCH}
_fork_child= fork-child.c
_infptrace= infptrace.c
_inftarg= inftarg.c
.endif
GENSRCS= version.c
version.c:
echo '#include "version.h"' > ${.TARGET}
echo 'const char version[] = ${VERSION};' >> ${.TARGET}
echo 'const char host_name[] = "${MACHINE_ARCH}-${VENDOR}-freebsd";' \
>> ${.TARGET}
echo 'const char target_name[] = "${TARGET_ARCH}-${VENDOR}-freebsd";' \
>> ${.TARGET}
.include <bsd.lib.mk>

View file

@ -1,19 +0,0 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/libreadline/readline \
include \
include/arpa \
include/xlocale \
lib/libthread_db \
lib/msun \
lib/ncurses/ncursesw \
usr.bin/yacc.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

File diff suppressed because it is too large Load diff

Some files were not shown because too many files have changed in this diff Show more