Changeset View
Changeset View
Standalone View
Standalone View
head/devel/gdb/files/extrapatch-kgdb
diff --git gdb/Makefile.in gdb/Makefile.in | diff --git gdb/Makefile.in gdb/Makefile.in | ||||
index 17b71c6e7c..95e92d08b4 100644 | index 13627e07e0..a72fd8fe0f 100644 | ||||
--- gdb/Makefile.in | --- gdb/Makefile.in | ||||
+++ gdb/Makefile.in | +++ gdb/Makefile.in | ||||
@@ -230,7 +230,8 @@ INCGNU = -I$(srcdir)/gnulib/import -I$(GNULIB_BUILDDIR)/import | @@ -236,7 +236,8 @@ INCGNU = -I$(srcdir)/gnulib/import -I$(GNULIB_BUILDDIR)/import | ||||
# Generated headers in the gnulib directory. These must be listed | # Generated headers in the gnulib directory. These must be listed | ||||
# so that they are generated before other files are compiled. | # so that they are generated before other files are compiled. | ||||
-GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@ | -GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@ | ||||
+GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h \ | +GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h \ | ||||
+ $(GNULIB_BUILDDIR)/import/alloca.h @GNULIB_STDINT_H@ | + $(GNULIB_BUILDDIR)/import/alloca.h @GNULIB_STDINT_H@ | ||||
# | # | ||||
# CLI sub directory definitons | # CLI sub directory definitons | ||||
@@ -629,6 +630,7 @@ TARGET_OBS = @TARGET_OBS@ | @@ -643,6 +644,7 @@ TARGET_OBS = @TARGET_OBS@ | ||||
# All target-dependent objects files that require 64-bit CORE_ADDR | # All target-dependent objects files that require 64-bit CORE_ADDR | ||||
# (used with --enable-targets=all --enable-64-bit-bfd). | # (used with --enable-targets=all --enable-64-bit-bfd). | ||||
ALL_64_TARGET_OBS = \ | ALL_64_TARGET_OBS = \ | ||||
+ aarch64-fbsd-kern.o \ | + aarch64-fbsd-kern.o \ | ||||
aarch64-fbsd-tdep.o \ | aarch64-fbsd-tdep.o \ | ||||
aarch64-linux-tdep.o \ | aarch64-linux-tdep.o \ | ||||
aarch64-newlib-tdep.o \ | aarch64-newlib-tdep.o \ | ||||
@@ -642,6 +644,7 @@ ALL_64_TARGET_OBS = \ | @@ -656,6 +658,7 @@ ALL_64_TARGET_OBS = \ | ||||
amd64-darwin-tdep.o \ | amd64-darwin-tdep.o \ | ||||
amd64-dicos-tdep.o \ | amd64-dicos-tdep.o \ | ||||
amd64-fbsd-tdep.o \ | amd64-fbsd-tdep.o \ | ||||
+ amd64fbsd-kern.o \ | + amd64fbsd-kern.o \ | ||||
amd64-linux-tdep.o \ | amd64-linux-tdep.o \ | ||||
amd64-nbsd-tdep.o \ | amd64-nbsd-tdep.o \ | ||||
amd64-obsd-tdep.o \ | amd64-obsd-tdep.o \ | ||||
@@ -656,6 +659,7 @@ ALL_64_TARGET_OBS = \ | @@ -670,6 +673,7 @@ ALL_64_TARGET_OBS = \ | ||||
ia64-vms-tdep.o \ | ia64-vms-tdep.o \ | ||||
mips64-obsd-tdep.o \ | mips64-obsd-tdep.o \ | ||||
sparc64-fbsd-tdep.o \ | sparc64-fbsd-tdep.o \ | ||||
+ sparc64fbsd-kern.o \ | + sparc64fbsd-kern.o \ | ||||
sparc64-linux-tdep.o \ | sparc64-linux-tdep.o \ | ||||
sparc64-nbsd-tdep.o \ | sparc64-nbsd-tdep.o \ | ||||
sparc64-obsd-tdep.o \ | sparc64-obsd-tdep.o \ | ||||
@@ -670,6 +674,7 @@ ALL_TARGET_OBS = \ | @@ -685,6 +689,7 @@ ALL_TARGET_OBS = \ | ||||
arch/arm-linux.o \ | |||||
arch/i386.o \ | arch/i386.o \ | ||||
arch/ppc-linux-common.o \ | |||||
arm-bsd-tdep.o \ | arm-bsd-tdep.o \ | ||||
+ arm-fbsd-kern.o \ | + arm-fbsd-kern.o \ | ||||
arm-fbsd-tdep.o \ | arm-fbsd-tdep.o \ | ||||
arm-linux-tdep.o \ | arm-linux-tdep.o \ | ||||
arm-nbsd-tdep.o \ | arm-nbsd-tdep.o \ | ||||
@@ -684,6 +689,8 @@ ALL_TARGET_OBS = \ | @@ -699,6 +704,8 @@ ALL_TARGET_OBS = \ | ||||
cris-linux-tdep.o \ | cris-linux-tdep.o \ | ||||
cris-tdep.o \ | cris-tdep.o \ | ||||
dicos-tdep.o \ | dicos-tdep.o \ | ||||
+ fbsd-kld.o \ | + fbsd-kld.o \ | ||||
+ fbsd-kthr.o \ | + fbsd-kthr.o \ | ||||
fbsd-tdep.o \ | fbsd-tdep.o \ | ||||
frv-linux-tdep.o \ | frv-linux-tdep.o \ | ||||
frv-tdep.o \ | frv-tdep.o \ | ||||
@@ -700,6 +707,7 @@ ALL_TARGET_OBS = \ | @@ -715,6 +722,7 @@ ALL_TARGET_OBS = \ | ||||
i386-darwin-tdep.o \ | i386-darwin-tdep.o \ | ||||
i386-dicos-tdep.o \ | i386-dicos-tdep.o \ | ||||
i386-fbsd-tdep.o \ | i386-fbsd-tdep.o \ | ||||
+ i386fbsd-kern.o \ | + i386fbsd-kern.o \ | ||||
i386-gnu-tdep.o \ | i386-gnu-tdep.o \ | ||||
i386-go32-tdep.o \ | i386-go32-tdep.o \ | ||||
i386-linux-tdep.o \ | i386-linux-tdep.o \ | ||||
@@ -724,6 +732,7 @@ ALL_TARGET_OBS = \ | @@ -738,6 +746,7 @@ ALL_TARGET_OBS = \ | ||||
mep-tdep.o \ | mep-tdep.o \ | ||||
microblaze-linux-tdep.o \ | microblaze-linux-tdep.o \ | ||||
microblaze-tdep.o \ | microblaze-tdep.o \ | ||||
+ mipsfbsd-kern.o \ | + mipsfbsd-kern.o \ | ||||
mips-fbsd-tdep.o \ | mips-fbsd-tdep.o \ | ||||
mips-linux-tdep.o \ | mips-linux-tdep.o \ | ||||
mips-nbsd-tdep.o \ | mips-nbsd-tdep.o \ | ||||
@@ -741,6 +750,7 @@ ALL_TARGET_OBS = \ | @@ -755,6 +764,7 @@ ALL_TARGET_OBS = \ | ||||
nto-tdep.o \ | |||||
obsd-tdep.o \ | obsd-tdep.o \ | ||||
or1k-tdep.o \ | |||||
ppc-fbsd-tdep.o \ | ppc-fbsd-tdep.o \ | ||||
+ ppcfbsd-kern.o \ | + ppcfbsd-kern.o \ | ||||
ppc-linux-tdep.o \ | ppc-linux-tdep.o \ | ||||
ppc-nbsd-tdep.o \ | ppc-nbsd-tdep.o \ | ||||
ppc-obsd-tdep.o \ | ppc-obsd-tdep.o \ | ||||
@@ -1610,7 +1620,7 @@ generated_files = \ | @@ -1611,7 +1621,7 @@ generated_files = \ | ||||
# Flags needed to compile Python code | # Flags needed to compile Python code | ||||
PYTHON_CFLAGS = @PYTHON_CFLAGS@ | PYTHON_CFLAGS = @PYTHON_CFLAGS@ | ||||
-all: gdb$(EXEEXT) $(CONFIG_ALL) | -all: gdb$(EXEEXT) $(CONFIG_ALL) gdb-gdb.py gdb-gdb.gdb | ||||
+all: gdb$(EXEEXT) kgdb$(EXEEXT) $(CONFIG_ALL) | +all: gdb$(EXEEXT) kgdb$(EXEEXT) $(CONFIG_ALL) gdb-gdb.py gdb-gdb.gdb | ||||
@$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do | @$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do | ||||
# Rule for compiling .c files in the top-level gdb directory. | # Rule for compiling .c files in the top-level gdb directory. | ||||
@@ -1920,6 +1930,12 @@ gdb$(EXEEXT): gdb.o $(LIBGDB_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) | @@ -1924,6 +1934,12 @@ ifneq ($(CODESIGN_CERT),) | ||||
-o gdb$(EXEEXT) gdb.o $(LIBGDB_OBS) \ | $(ECHO_SIGN) $(CODESIGN) -s $(CODESIGN_CERT) gdb$(EXEEXT) | ||||
$(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) | endif | ||||
+kgdb$(EXEEXT): kgdb-main.o $(LIBGDB_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) | +kgdb$(EXEEXT): kgdb-main.o $(LIBGDB_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) | ||||
+ rm -f kgdb$(EXEEXT) | + rm -f kgdb$(EXEEXT) | ||||
+ $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ | + $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ | ||||
+ -o kgdb$(EXEEXT) kgdb-main.o $(LIBGDB_OBS) \ | + -o kgdb$(EXEEXT) kgdb-main.o $(LIBGDB_OBS) \ | ||||
+ $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) | + $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) | ||||
+ | + | ||||
# Convenience rule to handle recursion. | # Convenience rule to handle recursion. | ||||
$(LIBGNU) $(GNULIB_H): all-lib | $(LIBGNU) $(GNULIB_H): all-lib | ||||
all-lib: $(GNULIB_BUILDDIR)/Makefile | all-lib: $(GNULIB_BUILDDIR)/Makefile | ||||
@@ -1964,7 +1980,7 @@ clean mostlyclean: $(CONFIG_CLEAN) | @@ -1968,7 +1984,7 @@ clean mostlyclean: $(CONFIG_CLEAN) | ||||
@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(CLEANDIRS)" subdir_do | @$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(CLEANDIRS)" subdir_do | ||||
rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp init.l-tmp version.c-tmp | rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp init.l-tmp version.c-tmp | ||||
rm -f init.c version.c observer.h observer.inc | rm -f init.c version.c | ||||
- rm -f gdb$(EXEEXT) core make.log | - rm -f gdb$(EXEEXT) core make.log | ||||
+ rm -f gdb$(EXEEXT) core make.log kgdb$(EXEEXT) | + rm -f gdb$(EXEEXT) core make.log kgdb$(EXEEXT) | ||||
rm -f gdb[0-9]$(EXEEXT) | rm -f gdb[0-9]$(EXEEXT) | ||||
rm -f test-cp-name-parser$(EXEEXT) | rm -f test-cp-name-parser$(EXEEXT) | ||||
rm -f xml-builtin.c stamp-xml | rm -f xml-builtin.c stamp-xml | ||||
@@ -2178,6 +2194,7 @@ MAKEOVERRIDES = | @@ -2183,6 +2199,7 @@ MAKEOVERRIDES = | ||||
ALLDEPFILES = \ | ALLDEPFILES = \ | ||||
aarch64-fbsd-nat.c \ | aarch64-fbsd-nat.c \ | ||||
+ aarch64-fbsd-kern.c \ | + aarch64-fbsd-kern.c \ | ||||
aarch64-fbsd-tdep.c \ | aarch64-fbsd-tdep.c \ | ||||
aarch64-linux-nat.c \ | aarch64-linux-nat.c \ | ||||
aarch64-linux-tdep.c \ | aarch64-linux-tdep.c \ | ||||
@@ -2195,6 +2212,7 @@ ALLDEPFILES = \ | @@ -2200,6 +2217,7 @@ ALLDEPFILES = \ | ||||
amd64-bsd-nat.c \ | amd64-bsd-nat.c \ | ||||
amd64-darwin-tdep.c \ | amd64-darwin-tdep.c \ | ||||
amd64-dicos-tdep.c \ | amd64-dicos-tdep.c \ | ||||
+ amd64fbsd-kern.c \ | + amd64fbsd-kern.c \ | ||||
amd64-fbsd-nat.c \ | amd64-fbsd-nat.c \ | ||||
amd64-fbsd-tdep.c \ | amd64-fbsd-tdep.c \ | ||||
amd64-linux-nat.c \ | amd64-linux-nat.c \ | ||||
@@ -2209,6 +2227,7 @@ ALLDEPFILES = \ | @@ -2214,6 +2232,7 @@ ALLDEPFILES = \ | ||||
arc-tdep.c \ | arc-tdep.c \ | ||||
arm.c \ | arm.c \ | ||||
arm-bsd-tdep.c \ | arm-bsd-tdep.c \ | ||||
+ arm-fbsd-kern.c \ | + arm-fbsd-kern.c \ | ||||
arm-fbsd-nat.c \ | arm-fbsd-nat.c \ | ||||
arm-fbsd-tdep.c \ | arm-fbsd-tdep.c \ | ||||
arm-get-next-pcs.c \ | arm-get-next-pcs.c \ | ||||
@@ -2228,6 +2247,9 @@ ALLDEPFILES = \ | @@ -2233,6 +2252,9 @@ ALLDEPFILES = \ | ||||
darwin-nat.c \ | darwin-nat.c \ | ||||
dicos-tdep.c \ | dicos-tdep.c \ | ||||
exec.c \ | exec.c \ | ||||
+ fbsd-kld.c \ | + fbsd-kld.c \ | ||||
+ fbsd-kthr.c \ | + fbsd-kthr.c \ | ||||
+ fbsd-kvm.c \ | + fbsd-kvm.c \ | ||||
fbsd-nat.c \ | fbsd-nat.c \ | ||||
fbsd-tdep.c \ | fbsd-tdep.c \ | ||||
fork-child.c \ | fork-child.c \ | ||||
@@ -2249,6 +2271,7 @@ ALLDEPFILES = \ | @@ -2254,6 +2276,7 @@ ALLDEPFILES = \ | ||||
i386-darwin-nat.c \ | i386-darwin-nat.c \ | ||||
i386-darwin-tdep.c \ | i386-darwin-tdep.c \ | ||||
i386-dicos-tdep.c \ | i386-dicos-tdep.c \ | ||||
+ i386fbsd-kern.c \ | + i386fbsd-kern.c \ | ||||
i386-fbsd-nat.c \ | i386-fbsd-nat.c \ | ||||
i386-fbsd-tdep.c \ | i386-fbsd-tdep.c \ | ||||
i386-gnu-nat.c \ | i386-gnu-nat.c \ | ||||
@@ -2290,6 +2313,7 @@ ALLDEPFILES = \ | @@ -2293,6 +2316,7 @@ ALLDEPFILES = \ | ||||
mingw-hdep.c \ | mingw-hdep.c \ | ||||
mips-fbsd-nat.c \ | mips-fbsd-nat.c \ | ||||
mips-fbsd-tdep.c \ | mips-fbsd-tdep.c \ | ||||
+ mipsfbsd-kern.c \ | + mipsfbsd-kern.c \ | ||||
mips-linux-nat.c \ | mips-linux-nat.c \ | ||||
mips-linux-tdep.c \ | mips-linux-tdep.c \ | ||||
mips-nbsd-nat.c \ | mips-nbsd-nat.c \ | ||||
@@ -2307,6 +2331,7 @@ ALLDEPFILES = \ | @@ -2310,6 +2334,7 @@ ALLDEPFILES = \ | ||||
obsd-nat.c \ | obsd-nat.c \ | ||||
obsd-tdep.c \ | obsd-tdep.c \ | ||||
posix-hdep.c \ | posix-hdep.c \ | ||||
+ ppcfbsd-kern.c \ | + ppcfbsd-kern.c \ | ||||
ppc-fbsd-nat.c \ | ppc-fbsd-nat.c \ | ||||
ppc-fbsd-tdep.c \ | ppc-fbsd-tdep.c \ | ||||
ppc-linux-nat.c \ | ppc-linux-nat.c \ | ||||
@@ -2351,6 +2376,7 @@ ALLDEPFILES = \ | @@ -2355,6 +2380,7 @@ ALLDEPFILES = \ | ||||
sparc-sol2-nat.c \ | sparc-sol2-nat.c \ | ||||
sparc-sol2-tdep.c \ | sparc-sol2-tdep.c \ | ||||
sparc-tdep.c \ | sparc-tdep.c \ | ||||
+ sparc64fbsd-kern.c \ | + sparc64fbsd-kern.c \ | ||||
sparc64-fbsd-nat.c \ | sparc64-fbsd-nat.c \ | ||||
sparc64-fbsd-tdep.c \ | sparc64-fbsd-tdep.c \ | ||||
sparc64-linux-nat.c \ | sparc64-linux-nat.c \ | ||||
@@ -2638,7 +2664,7 @@ endif | @@ -2643,7 +2669,7 @@ endif | ||||
# A list of all the objects we might care about in this build, for | # A list of all the objects we might care about in this build, for | ||||
# dependency tracking. | # dependency tracking. | ||||
-all_object_files = gdb.o $(LIBGDB_OBS) gdbtk-main.o \ | -all_object_files = gdb.o $(LIBGDB_OBS) gdbtk-main.o \ | ||||
+all_object_files = kgdb-main.o gdb.o $(LIBGDB_OBS) gdbtk-main.o \ | +all_object_files = kgdb-main.o gdb.o $(LIBGDB_OBS) gdbtk-main.o \ | ||||
test-cp-name-parser.o | test-cp-name-parser.o | ||||
# All the .deps files to include. | # All the .deps files to include. | ||||
diff --git gdb/config.in gdb/config.in | diff --git gdb/config.in gdb/config.in | ||||
index 1d11a97080..50a5a5b322 100644 | index 527290296e..8e0e90fd67 100644 | ||||
--- gdb/config.in | --- gdb/config.in | ||||
+++ gdb/config.in | +++ gdb/config.in | ||||
@@ -222,6 +222,9 @@ | @@ -228,6 +228,9 @@ | ||||
/* Define to 1 if your system has the kinfo_getvmmap function. */ | /* Define to 1 if your system has the kinfo_getvmmap function. */ | ||||
#undef HAVE_KINFO_GETVMMAP | #undef HAVE_KINFO_GETVMMAP | ||||
+/* Define to 1 if your system has the kvm_open2 function. */ | +/* Define to 1 if your system has the kvm_open2 function. */ | ||||
+#undef HAVE_KVM_OPEN2 | +#undef HAVE_KVM_OPEN2 | ||||
+ | + | ||||
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */ | /* Define if you have <langinfo.h> and nl_langinfo(CODESET). */ | ||||
#undef HAVE_LANGINFO_CODESET | #undef HAVE_LANGINFO_CODESET | ||||
diff --git gdb/configure gdb/configure | diff --git gdb/configure gdb/configure | ||||
index 84a0790c0d..f4c323d4ab 100755 | index 3849b9494f..18d2e363dc 100755 | ||||
--- gdb/configure | --- gdb/configure | ||||
+++ gdb/configure | +++ gdb/configure | ||||
@@ -7927,6 +7927,66 @@ $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h | @@ -8082,6 +8082,66 @@ $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h | ||||
fi | fi | ||||
+# kgdb needs kvm_open2 for cross-debugging | +# kgdb needs kvm_open2 for cross-debugging | ||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_open2" >&5 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_open2" >&5 | ||||
+$as_echo_n "checking for library containing kvm_open2... " >&6; } | +$as_echo_n "checking for library containing kvm_open2... " >&6; } | ||||
+if test "${ac_cv_search_kvm_open2+set}" = set; then : | +if test "${ac_cv_search_kvm_open2+set}" = set; then : | ||||
+ $as_echo_n "(cached) " >&6 | + $as_echo_n "(cached) " >&6 | ||||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
+ | + | ||||
+fi | +fi | ||||
+ | + | ||||
+ | + | ||||
if test "X$prefix" = "XNONE"; then | if test "X$prefix" = "XNONE"; then | ||||
acl_final_prefix="$ac_default_prefix" | acl_final_prefix="$ac_default_prefix" | ||||
diff --git gdb/configure.ac gdb/configure.ac | diff --git gdb/configure.ac gdb/configure.ac | ||||
index d4133ea71e..bac85c53e0 100644 | index 4c20ea5178..df156b484f 100644 | ||||
--- gdb/configure.ac | --- gdb/configure.ac | ||||
+++ gdb/configure.ac | +++ gdb/configure.ac | ||||
@@ -523,6 +523,11 @@ AC_SEARCH_LIBS(kinfo_getvmmap, util util-freebsd, | @@ -534,6 +534,11 @@ AC_SEARCH_LIBS(kinfo_getfile, util util-freebsd, | ||||
[AC_DEFINE(HAVE_KINFO_GETVMMAP, 1, | [AC_DEFINE(HAVE_KINFO_GETFILE, 1, | ||||
[Define to 1 if your system has the kinfo_getvmmap function. ])]) | [Define to 1 if your system has the kinfo_getfile function. ])]) | ||||
+# kgdb needs kvm_open2 for cross-debugging | +# kgdb needs kvm_open2 for cross-debugging | ||||
+AC_SEARCH_LIBS(kvm_open2, kvm, | +AC_SEARCH_LIBS(kvm_open2, kvm, | ||||
+ [AC_DEFINE(HAVE_KVM_OPEN2, 1, | + [AC_DEFINE(HAVE_KVM_OPEN2, 1, | ||||
+ [Define to 1 if your system has the kvm_open2 function. ])]) | + [Define to 1 if your system has the kvm_open2 function. ])]) | ||||
+ | + | ||||
AM_ICONV | AM_ICONV | ||||
# GDB may fork/exec the iconv program to get the list of supported character | # GDB may fork/exec the iconv program to get the list of supported character | ||||
diff --git gdb/configure.nat gdb/configure.nat | diff --git gdb/configure.nat gdb/configure.nat | ||||
index 8e14892722..ada205f34d 100644 | index 7611266d86..8656015365 100644 | ||||
--- gdb/configure.nat | --- gdb/configure.nat | ||||
+++ gdb/configure.nat | +++ gdb/configure.nat | ||||
@@ -62,7 +62,8 @@ case ${gdb_host} in | @@ -62,7 +62,8 @@ case ${gdb_host} in | ||||
LOADLIBES='-ldl $(RDYNAMIC)' | LOADLIBES='-ldl $(RDYNAMIC)' | ||||
;; | ;; | ||||
fbsd*) | fbsd*) | ||||
- NATDEPFILES='fork-child.o fork-inferior.o inf-ptrace.o fbsd-nat.o' | - NATDEPFILES='fork-child.o fork-inferior.o inf-ptrace.o fbsd-nat.o' | ||||
+ NATDEPFILES='fork-child.o fork-inferior.o inf-ptrace.o fbsd-nat.o \ | + NATDEPFILES='fork-child.o fork-inferior.o inf-ptrace.o fbsd-nat.o \ | ||||
+ fbsd-kvm.o' | + fbsd-kvm.o' | ||||
HAVE_NATIVE_GCORE_HOST=1 | HAVE_NATIVE_GCORE_HOST=1 | ||||
LOADLIBES='-lkvm' | LOADLIBES='-lkvm' | ||||
;; | ;; | ||||
diff --git gdb/configure.tgt gdb/configure.tgt | diff --git gdb/configure.tgt gdb/configure.tgt | ||||
index fb8014a8e8..4bb43e366c 100644 | index f197160896..ced1140328 100644 | ||||
--- gdb/configure.tgt | --- gdb/configure.tgt | ||||
+++ gdb/configure.tgt | +++ gdb/configure.tgt | ||||
@@ -92,7 +92,7 @@ esac | @@ -94,7 +94,7 @@ esac | ||||
case "${targ}" in | case "${targ}" in | ||||
*-*-freebsd* | *-*-kfreebsd*-gnu) | *-*-freebsd* | *-*-kfreebsd*-gnu) | ||||
- os_obs="fbsd-tdep.o solib-svr4.o";; | - os_obs="fbsd-tdep.o solib-svr4.o";; | ||||
+ os_obs="fbsd-tdep.o solib-svr4.o fbsd-kld.o fbsd-kthr.o";; | + os_obs="fbsd-tdep.o solib-svr4.o fbsd-kld.o fbsd-kthr.o";; | ||||
*-*-netbsd* | *-*-knetbsd*-gnu) | *-*-netbsd* | *-*-knetbsd*-gnu) | ||||
os_obs="nbsd-tdep.o solib-svr4.o";; | os_obs="nbsd-tdep.o solib-svr4.o";; | ||||
*-*-openbsd*) | *-*-openbsd*) | ||||
@@ -109,7 +109,7 @@ aarch64*-*-elf | aarch64*-*-rtems*) | @@ -111,7 +111,7 @@ aarch64*-*-elf | aarch64*-*-rtems*) | ||||
aarch64*-*-freebsd*) | aarch64*-*-freebsd*) | ||||
# Target: FreeBSD/aarch64 | # Target: FreeBSD/aarch64 | ||||
- gdb_target_obs="aarch64-fbsd-tdep.o" | - gdb_target_obs="aarch64-fbsd-tdep.o" | ||||
+ gdb_target_obs="aarch64-fbsd-tdep.o aarch64-fbsd-kern.o" | + gdb_target_obs="aarch64-fbsd-tdep.o aarch64-fbsd-kern.o" | ||||
;; | ;; | ||||
aarch64*-*-linux*) | aarch64*-*-linux*) | ||||
@@ -162,7 +162,7 @@ arm*-*-linux*) | @@ -164,7 +164,7 @@ arm*-*-linux*) | ||||
;; | ;; | ||||
arm*-*-freebsd*) | arm*-*-freebsd*) | ||||
# Target: FreeBSD/arm | # Target: FreeBSD/arm | ||||
- gdb_target_obs="arm-fbsd-tdep.o" | - gdb_target_obs="arm-fbsd-tdep.o" | ||||
+ gdb_target_obs="arm-fbsd-tdep.o arm-fbsd-kern.o" | + gdb_target_obs="arm-fbsd-tdep.o arm-fbsd-kern.o" | ||||
;; | ;; | ||||
arm*-*-netbsd* | arm*-*-knetbsd*-gnu) | arm*-*-netbsd* | arm*-*-knetbsd*-gnu) | ||||
# Target: NetBSD/arm | # Target: NetBSD/arm | ||||
@@ -249,7 +249,11 @@ i[34567]86-*-dicos*) | @@ -251,7 +251,11 @@ i[34567]86-*-dicos*) | ||||
;; | ;; | ||||
i[34567]86-*-freebsd* | i[34567]86-*-kfreebsd*-gnu) | i[34567]86-*-freebsd* | i[34567]86-*-kfreebsd*-gnu) | ||||
# Target: FreeBSD/i386 | # Target: FreeBSD/i386 | ||||
- gdb_target_obs="i386-bsd-tdep.o i386-fbsd-tdep.o " | - gdb_target_obs="i386-bsd-tdep.o i386-fbsd-tdep.o " | ||||
+ gdb_target_obs="i386-bsd-tdep.o i386-fbsd-tdep.o i386fbsd-kern.o" | + gdb_target_obs="i386-bsd-tdep.o i386-fbsd-tdep.o i386fbsd-kern.o" | ||||
+ if test "x$enable_64_bit_bfd" = "xyes"; then | + if test "x$enable_64_bit_bfd" = "xyes"; then | ||||
+ # Target: FreeBSD amd64 | + # Target: FreeBSD amd64 | ||||
+ gdb_target_obs="amd64fbsd-tdep.o amd64fbsd-kern.o ${gdb_target_obs}" | + gdb_target_obs="amd64fbsd-tdep.o amd64fbsd-kern.o ${gdb_target_obs}" | ||||
+ fi | + fi | ||||
;; | ;; | ||||
i[34567]86-*-netbsd* | i[34567]86-*-knetbsd*-gnu) | i[34567]86-*-netbsd* | i[34567]86-*-knetbsd*-gnu) | ||||
# Target: NetBSD/i386 | # Target: NetBSD/i386 | ||||
@@ -408,7 +412,7 @@ mips*-*-netbsd* | mips*-*-knetbsd*-gnu) | @@ -405,7 +409,7 @@ mips*-*-netbsd* | mips*-*-knetbsd*-gnu) | ||||
;; | ;; | ||||
mips*-*-freebsd*) | mips*-*-freebsd*) | ||||
# Target: MIPS running FreeBSD | # Target: MIPS running FreeBSD | ||||
- gdb_target_obs="mips-tdep.o mips-fbsd-tdep.o" | - gdb_target_obs="mips-tdep.o mips-fbsd-tdep.o" | ||||
+ gdb_target_obs="mips-tdep.o mips-fbsd-tdep.o mipsfbsd-kern.o" | + gdb_target_obs="mips-tdep.o mips-fbsd-tdep.o mipsfbsd-kern.o" | ||||
gdb_sim=../sim/mips/libsim.a | gdb_sim=../sim/mips/libsim.a | ||||
;; | ;; | ||||
mips64*-*-openbsd*) | mips64*-*-openbsd*) | ||||
@@ -472,7 +476,7 @@ or1k-*-* | or1knd-*-*) | @@ -464,7 +468,7 @@ or1k-*-* | or1knd-*-*) | ||||
powerpc*-*-freebsd*) | powerpc*-*-freebsd*) | ||||
# Target: FreeBSD/powerpc | # Target: FreeBSD/powerpc | ||||
gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o ppc64-tdep.o \ | gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o ppc64-tdep.o \ | ||||
- ppc-fbsd-tdep.o \ | - ppc-fbsd-tdep.o \ | ||||
+ ppc-fbsd-tdep.o ppcfbsd-kern.o \ | + ppc-fbsd-tdep.o ppcfbsd-kern.o \ | ||||
ravenscar-thread.o ppc-ravenscar-thread.o" | ravenscar-thread.o ppc-ravenscar-thread.o" | ||||
;; | ;; | ||||
@@ -594,6 +598,7 @@ sparc64-*-linux*) | @@ -587,6 +591,7 @@ sparc64-*-linux*) | ||||
sparc*-*-freebsd* | sparc*-*-kfreebsd*-gnu) | sparc*-*-freebsd* | sparc*-*-kfreebsd*-gnu) | ||||
# Target: FreeBSD/sparc64 | # Target: FreeBSD/sparc64 | ||||
gdb_target_obs="sparc-tdep.o sparc64-tdep.o sparc64-fbsd-tdep.o \ | gdb_target_obs="sparc-tdep.o sparc64-tdep.o sparc64-fbsd-tdep.o \ | ||||
+ sparc64fbsd-kern.o \ | + sparc64fbsd-kern.o \ | ||||
ravenscar-thread.o sparc-ravenscar-thread.o" | ravenscar-thread.o sparc-ravenscar-thread.o" | ||||
;; | ;; | ||||
sparc-*-netbsd* | sparc-*-knetbsd*-gnu) | sparc-*-netbsd* | sparc-*-knetbsd*-gnu) | ||||
@@ -716,8 +721,8 @@ x86_64-*-linux*) | @@ -709,8 +714,8 @@ x86_64-*-linux*) | ||||
;; | ;; | ||||
x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu) | x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu) | ||||
# Target: FreeBSD/amd64 | # Target: FreeBSD/amd64 | ||||
- gdb_target_obs="amd64-fbsd-tdep.o ${i386_tobjs} \ | - gdb_target_obs="amd64-fbsd-tdep.o ${i386_tobjs} \ | ||||
- i386-bsd-tdep.o i386-fbsd-tdep.o" | - i386-bsd-tdep.o i386-fbsd-tdep.o" | ||||
+ gdb_target_obs="amd64-fbsd-tdep.o amd64fbsd-kern.o ${i386_tobjs} \ | + gdb_target_obs="amd64-fbsd-tdep.o amd64fbsd-kern.o ${i386_tobjs} \ | ||||
+ i386-bsd-tdep.o i386-fbsd-tdep.o i386fbsd-kern.o" | + i386-bsd-tdep.o i386-fbsd-tdep.o i386fbsd-kern.o" | ||||
;; | ;; | ||||
x86_64-*-mingw* | x86_64-*-cygwin*) | x86_64-*-mingw* | x86_64-*-cygwin*) | ||||
# Target: MingW/amd64 | # Target: MingW/amd64 | ||||
diff --git gdb/defs.h gdb/defs.h | diff --git gdb/defs.h gdb/defs.h | ||||
index 4fb2129b30..0cb0bad5c5 100644 | index fc4217005a..3d2eb6b1e9 100644 | ||||
--- gdb/defs.h | --- gdb/defs.h | ||||
+++ gdb/defs.h | +++ gdb/defs.h | ||||
@@ -516,6 +516,7 @@ enum gdb_osabi | @@ -481,6 +481,7 @@ enum gdb_osabi | ||||
GDB_OSABI_SOLARIS, | GDB_OSABI_SOLARIS, | ||||
GDB_OSABI_LINUX, | GDB_OSABI_LINUX, | ||||
GDB_OSABI_FREEBSD, | GDB_OSABI_FREEBSD, | ||||
+ GDB_OSABI_FREEBSD_KERNEL, | + GDB_OSABI_FREEBSD_KERNEL, | ||||
GDB_OSABI_NETBSD, | GDB_OSABI_NETBSD, | ||||
GDB_OSABI_OPENBSD, | GDB_OSABI_OPENBSD, | ||||
GDB_OSABI_WINCE, | GDB_OSABI_WINCE, | ||||
diff --git gdb/gnulib/configure gdb/gnulib/configure | diff --git gdb/gnulib/configure gdb/gnulib/configure | ||||
index 37efd06b67..a23fc0a81c 100644 | index a152abcb76..140c4ad6a8 100644 | ||||
--- gdb/gnulib/configure | --- gdb/gnulib/configure | ||||
+++ gdb/gnulib/configure | +++ gdb/gnulib/configure | ||||
@@ -16790,6 +16790,7 @@ else | @@ -17214,6 +17214,7 @@ else | ||||
case "$host_os" in | case "$host_os" in | ||||
# Guess all is fine on glibc systems. | # Guess all is fine on glibc systems. | ||||
*-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; | *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; | ||||
+ freebsd*) gl_cv_func_gettimeofday_clobber="guessing no" ;; | + freebsd*) gl_cv_func_gettimeofday_clobber="guessing no" ;; | ||||
# If we don't know, assume the worst. | # If we don't know, assume the worst. | ||||
*) gl_cv_func_gettimeofday_clobber="guessing yes" ;; | *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; | ||||
esac | esac | ||||
diff --git gdb/osabi.c gdb/osabi.c | diff --git gdb/osabi.c gdb/osabi.c | ||||
index 129164f51e..4eacc074a3 100644 | index 7d0540b181..c61c518652 100644 | ||||
--- gdb/osabi.c | --- gdb/osabi.c | ||||
+++ gdb/osabi.c | +++ gdb/osabi.c | ||||
@@ -65,6 +65,7 @@ static const struct osabi_names gdb_osabi_names[] = | @@ -66,6 +66,7 @@ static const struct osabi_names gdb_osabi_names[] = | ||||
{ "Solaris", NULL }, | { "Solaris", NULL }, | ||||
{ "GNU/Linux", "linux(-gnu)?" }, | { "GNU/Linux", "linux(-gnu[^-]*)?" }, | ||||
{ "FreeBSD", NULL }, | { "FreeBSD", NULL }, | ||||
+ { "FreeBSD/kernel", NULL }, | + { "FreeBSD/kernel", NULL }, | ||||
{ "NetBSD", NULL }, | { "NetBSD", NULL }, | ||||
{ "OpenBSD", NULL }, | { "OpenBSD", NULL }, | ||||
{ "WindowsCE", NULL }, | { "WindowsCE", NULL }, | ||||
diff --git gdb/regcache.c gdb/regcache.c | diff --git gdb/regcache.c gdb/regcache.c | ||||
index fb6a904dec..f9b7105b8f 100644 | index f3f845aad6..7ca007a422 100644 | ||||
--- gdb/regcache.c | --- gdb/regcache.c | ||||
+++ gdb/regcache.c | +++ gdb/regcache.c | ||||
@@ -1079,6 +1079,23 @@ regcache::raw_supply_zeroed (int regnum) | @@ -1035,6 +1035,22 @@ reg_buffer::raw_supply_zeroed (int regnum) | ||||
m_register_status[regnum] = REG_VALID; | m_register_status[regnum] = REG_VALID; | ||||
} | } | ||||
+void | +void | ||||
+regcache::raw_supply_unsigned (int regnum, ULONGEST val) | +reg_buffer::raw_supply_unsigned (int regnum, ULONGEST val) | ||||
+{ | +{ | ||||
+ enum bfd_endian byte_order = gdbarch_byte_order (m_descr->gdbarch); | + enum bfd_endian byte_order = gdbarch_byte_order (m_descr->gdbarch); | ||||
+ gdb_byte *regbuf; | + gdb_byte *regbuf; | ||||
+ size_t regsize; | + size_t regsize; | ||||
+ | + | ||||
+ assert_regnum (regnum); | + assert_regnum (regnum); | ||||
+ gdb_assert (!m_readonly_p); | |||||
+ | + | ||||
+ regbuf = register_buffer (regnum); | + regbuf = register_buffer (regnum); | ||||
+ regsize = m_descr->sizeof_register[regnum]; | + regsize = m_descr->sizeof_register[regnum]; | ||||
+ | + | ||||
+ store_unsigned_integer (regbuf, regsize, byte_order, val); | + store_unsigned_integer (regbuf, regsize, byte_order, val); | ||||
+ m_register_status[regnum] = REG_VALID; | + m_register_status[regnum] = REG_VALID; | ||||
+} | +} | ||||
+ | + | ||||
/* Collect register REGNUM from REGCACHE and store its contents in BUF. */ | /* See common/common-regcache.h. */ | ||||
void | void | ||||
diff --git gdb/regcache.h gdb/regcache.h | diff --git gdb/regcache.h gdb/regcache.h | ||||
index 9e3da8c3fc..5c65a9be1e 100644 | index 4a45f33871..94f542c087 100644 | ||||
--- gdb/regcache.h | --- gdb/regcache.h | ||||
+++ gdb/regcache.h | +++ gdb/regcache.h | ||||
@@ -294,6 +294,8 @@ public: | @@ -207,6 +207,8 @@ public: | ||||
void raw_supply_integer (int regnum, const gdb_byte *addr, int addr_len, | only LEN, without editing the rest of the register. */ | ||||
bool is_signed); | void raw_supply_part (int regnum, int offset, int len, const gdb_byte *in); | ||||
+ void raw_supply_unsigned (int regnum, ULONGEST val); | + void raw_supply_unsigned (int regnum, ULONGEST val); | ||||
+ | + | ||||
void raw_supply_zeroed (int regnum); | void invalidate (int regnum); | ||||
enum register_status get_register_status (int regnum) const; | virtual ~reg_buffer () = default; |