diff options
Diffstat (limited to 'devel/gdb/files/extrapatch-kgdb')
-rw-r--r-- | devel/gdb/files/extrapatch-kgdb | 158 |
1 files changed, 91 insertions, 67 deletions
diff --git a/devel/gdb/files/extrapatch-kgdb b/devel/gdb/files/extrapatch-kgdb index b61d3b7237d0..5ce135790aba 100644 --- a/devel/gdb/files/extrapatch-kgdb +++ b/devel/gdb/files/extrapatch-kgdb @@ -1,8 +1,8 @@ diff --git gdb/Makefile.in gdb/Makefile.in -index 13627e07e0..a72fd8fe0f 100644 +index 5614cc3386..b9acc63c3f 100644 --- gdb/Makefile.in +++ gdb/Makefile.in -@@ -236,7 +236,8 @@ INCGNU = -I$(srcdir)/gnulib/import -I$(GNULIB_BUILDDIR)/import +@@ -230,7 +230,8 @@ INCGNU = -I$(srcdir)/gnulib/import -I$(GNULIB_BUILDDIR)/import # Generated headers in the gnulib directory. These must be listed # so that they are generated before other files are compiled. @@ -12,7 +12,7 @@ index 13627e07e0..a72fd8fe0f 100644 # # CLI sub directory definitons -@@ -643,6 +644,7 @@ TARGET_OBS = @TARGET_OBS@ +@@ -632,6 +633,7 @@ TARGET_OBS = @TARGET_OBS@ # All target-dependent objects files that require 64-bit CORE_ADDR # (used with --enable-targets=all --enable-64-bit-bfd). ALL_64_TARGET_OBS = \ @@ -20,7 +20,7 @@ index 13627e07e0..a72fd8fe0f 100644 aarch64-fbsd-tdep.o \ aarch64-linux-tdep.o \ aarch64-newlib-tdep.o \ -@@ -656,6 +658,7 @@ ALL_64_TARGET_OBS = \ +@@ -646,6 +648,7 @@ ALL_64_TARGET_OBS = \ amd64-darwin-tdep.o \ amd64-dicos-tdep.o \ amd64-fbsd-tdep.o \ @@ -28,7 +28,7 @@ index 13627e07e0..a72fd8fe0f 100644 amd64-linux-tdep.o \ amd64-nbsd-tdep.o \ amd64-obsd-tdep.o \ -@@ -670,6 +673,7 @@ ALL_64_TARGET_OBS = \ +@@ -660,6 +663,7 @@ ALL_64_TARGET_OBS = \ ia64-vms-tdep.o \ mips64-obsd-tdep.o \ sparc64-fbsd-tdep.o \ @@ -36,24 +36,24 @@ index 13627e07e0..a72fd8fe0f 100644 sparc64-linux-tdep.o \ sparc64-nbsd-tdep.o \ sparc64-obsd-tdep.o \ -@@ -685,6 +689,7 @@ ALL_TARGET_OBS = \ - arch/i386.o \ +@@ -676,6 +680,7 @@ ALL_TARGET_OBS = \ arch/ppc-linux-common.o \ + arch/riscv.o \ arm-bsd-tdep.o \ + arm-fbsd-kern.o \ arm-fbsd-tdep.o \ arm-linux-tdep.o \ arm-nbsd-tdep.o \ -@@ -699,6 +704,8 @@ ALL_TARGET_OBS = \ - cris-linux-tdep.o \ - cris-tdep.o \ +@@ -693,6 +698,8 @@ ALL_TARGET_OBS = \ + csky-linux-tdep.o \ + csky-tdep.o \ dicos-tdep.o \ + fbsd-kld.o \ + fbsd-kthr.o \ fbsd-tdep.o \ frv-linux-tdep.o \ frv-tdep.o \ -@@ -715,6 +722,7 @@ ALL_TARGET_OBS = \ +@@ -709,6 +716,7 @@ ALL_TARGET_OBS = \ i386-darwin-tdep.o \ i386-dicos-tdep.o \ i386-fbsd-tdep.o \ @@ -61,7 +61,7 @@ index 13627e07e0..a72fd8fe0f 100644 i386-gnu-tdep.o \ i386-go32-tdep.o \ i386-linux-tdep.o \ -@@ -738,6 +746,7 @@ ALL_TARGET_OBS = \ +@@ -732,6 +740,7 @@ ALL_TARGET_OBS = \ mep-tdep.o \ microblaze-linux-tdep.o \ microblaze-tdep.o \ @@ -69,15 +69,23 @@ index 13627e07e0..a72fd8fe0f 100644 mips-fbsd-tdep.o \ mips-linux-tdep.o \ mips-nbsd-tdep.o \ -@@ -755,6 +764,7 @@ ALL_TARGET_OBS = \ - obsd-tdep.o \ +@@ -750,6 +759,7 @@ ALL_TARGET_OBS = \ + or1k-linux-tdep.o \ or1k-tdep.o \ ppc-fbsd-tdep.o \ + ppcfbsd-kern.o \ ppc-linux-tdep.o \ ppc-nbsd-tdep.o \ ppc-obsd-tdep.o \ -@@ -1611,7 +1621,7 @@ generated_files = \ +@@ -757,6 +767,7 @@ ALL_TARGET_OBS = \ + ppc-sysv-tdep.o \ + ppc64-tdep.o \ + ravenscar-thread.o \ ++ riscv-fbsd-kern.o \ + riscv-fbsd-tdep.o \ + riscv-linux-tdep.o \ + riscv-tdep.o \ +@@ -1629,7 +1640,7 @@ generated_files = \ # Flags needed to compile Python code PYTHON_CFLAGS = @PYTHON_CFLAGS@ @@ -86,37 +94,36 @@ index 13627e07e0..a72fd8fe0f 100644 @$(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. -@@ -1924,6 +1934,12 @@ ifneq ($(CODESIGN_CERT),) +@@ -1894,6 +1905,12 @@ ifneq ($(CODESIGN_CERT),) $(ECHO_SIGN) $(CODESIGN) -s $(CODESIGN_CERT) gdb$(EXEEXT) endif +kgdb$(EXEEXT): kgdb-main.o $(LIBGDB_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) -+ rm -f kgdb$(EXEEXT) -+ $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ ++ $(SILENCE) rm -f kgdb$(EXEEXT) ++ $(ECHO_CXXLD) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ + -o kgdb$(EXEEXT) kgdb-main.o $(LIBGDB_OBS) \ + $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) + # Convenience rule to handle recursion. $(LIBGNU) $(GNULIB_H): all-lib all-lib: $(GNULIB_BUILDDIR)/Makefile -@@ -1968,7 +1984,7 @@ clean mostlyclean: $(CONFIG_CLEAN) - @$(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 init.c version.c -- rm -f gdb$(EXEEXT) core make.log -+ rm -f gdb$(EXEEXT) core make.log kgdb$(EXEEXT) +@@ -1940,6 +1957,7 @@ clean mostlyclean: $(CONFIG_CLEAN) + rm -f init.c stamp-init version.c stamp-version + rm -f gdb$(EXEEXT) core make.log rm -f gdb[0-9]$(EXEEXT) ++ rm -f kgdb$(EXEEXT) rm -f test-cp-name-parser$(EXEEXT) rm -f xml-builtin.c stamp-xml -@@ -2183,6 +2199,7 @@ MAKEOVERRIDES = + rm -f $(DEPDIR)/* +@@ -2154,6 +2172,7 @@ force_update: + MAKEOVERRIDES = ALLDEPFILES = \ - aarch64-fbsd-nat.c \ + aarch64-fbsd-kern.c \ + aarch64-fbsd-nat.c \ aarch64-fbsd-tdep.c \ aarch64-linux-nat.c \ - aarch64-linux-tdep.c \ -@@ -2200,6 +2217,7 @@ ALLDEPFILES = \ +@@ -2173,6 +2192,7 @@ ALLDEPFILES = \ amd64-bsd-nat.c \ amd64-darwin-tdep.c \ amd64-dicos-tdep.c \ @@ -124,7 +131,7 @@ index 13627e07e0..a72fd8fe0f 100644 amd64-fbsd-nat.c \ amd64-fbsd-tdep.c \ amd64-linux-nat.c \ -@@ -2214,6 +2232,7 @@ ALLDEPFILES = \ +@@ -2187,6 +2207,7 @@ ALLDEPFILES = \ arc-tdep.c \ arm.c \ arm-bsd-tdep.c \ @@ -132,17 +139,17 @@ index 13627e07e0..a72fd8fe0f 100644 arm-fbsd-nat.c \ arm-fbsd-tdep.c \ arm-get-next-pcs.c \ -@@ -2233,6 +2252,9 @@ ALLDEPFILES = \ +@@ -2207,6 +2228,9 @@ ALLDEPFILES = \ + csky-tdep.c \ darwin-nat.c \ dicos-tdep.c \ - exec.c \ + fbsd-kld.c \ + fbsd-kthr.c \ + fbsd-kvm.c \ fbsd-nat.c \ fbsd-tdep.c \ fork-child.c \ -@@ -2254,6 +2276,7 @@ ALLDEPFILES = \ +@@ -2228,6 +2252,7 @@ ALLDEPFILES = \ i386-darwin-nat.c \ i386-darwin-tdep.c \ i386-dicos-tdep.c \ @@ -150,15 +157,15 @@ index 13627e07e0..a72fd8fe0f 100644 i386-fbsd-nat.c \ i386-fbsd-tdep.c \ i386-gnu-nat.c \ -@@ -2293,6 +2316,7 @@ ALLDEPFILES = \ +@@ -2264,6 +2289,7 @@ ALLDEPFILES = \ + microblaze-linux-tdep.c \ + microblaze-tdep.c \ mingw-hdep.c \ ++ mipsfbsd-kern.c \ mips-fbsd-nat.c \ mips-fbsd-tdep.c \ -+ mipsfbsd-kern.c \ mips-linux-nat.c \ - mips-linux-tdep.c \ - mips-nbsd-nat.c \ -@@ -2310,6 +2334,7 @@ ALLDEPFILES = \ +@@ -2283,6 +2309,7 @@ ALLDEPFILES = \ obsd-nat.c \ obsd-tdep.c \ posix-hdep.c \ @@ -166,7 +173,15 @@ index 13627e07e0..a72fd8fe0f 100644 ppc-fbsd-nat.c \ ppc-fbsd-tdep.c \ ppc-linux-nat.c \ -@@ -2355,6 +2380,7 @@ ALLDEPFILES = \ +@@ -2297,6 +2324,7 @@ ALLDEPFILES = \ + procfs.c \ + ravenscar-thread.c \ + remote-sim.c \ ++ riscv-fbsd-kern.c \ + riscv-fbsd-nat.c \ + riscv-fbsd-tdep.c \ + riscv-linux-nat.c \ +@@ -2333,6 +2361,7 @@ ALLDEPFILES = \ sparc-sol2-nat.c \ sparc-sol2-tdep.c \ sparc-tdep.c \ @@ -174,7 +189,7 @@ index 13627e07e0..a72fd8fe0f 100644 sparc64-fbsd-nat.c \ sparc64-fbsd-tdep.c \ sparc64-linux-nat.c \ -@@ -2643,7 +2669,7 @@ endif +@@ -2596,7 +2625,7 @@ endif # A list of all the objects we might care about in this build, for # dependency tracking. @@ -184,10 +199,10 @@ index 13627e07e0..a72fd8fe0f 100644 # All the .deps files to include. diff --git gdb/config.in gdb/config.in -index 527290296e..8e0e90fd67 100644 +index ea907d2b56..ee9146fd4e 100644 --- gdb/config.in +++ gdb/config.in -@@ -228,6 +228,9 @@ +@@ -219,6 +219,9 @@ /* Define to 1 if your system has the kinfo_getvmmap function. */ #undef HAVE_KINFO_GETVMMAP @@ -198,10 +213,10 @@ index 527290296e..8e0e90fd67 100644 #undef HAVE_LANGINFO_CODESET diff --git gdb/configure gdb/configure -index 3849b9494f..18d2e363dc 100755 +index 854837c50a..1f2da364cf 100755 --- gdb/configure +++ gdb/configure -@@ -8082,6 +8082,66 @@ $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h +@@ -8107,6 +8107,66 @@ $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h fi @@ -269,10 +284,10 @@ index 3849b9494f..18d2e363dc 100755 if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" diff --git gdb/configure.ac gdb/configure.ac -index 4c20ea5178..df156b484f 100644 +index 1527585839..37e8ce54b0 100644 --- gdb/configure.ac +++ gdb/configure.ac -@@ -534,6 +534,11 @@ AC_SEARCH_LIBS(kinfo_getfile, util util-freebsd, +@@ -511,6 +511,11 @@ AC_SEARCH_LIBS(kinfo_getfile, util util-freebsd, [AC_DEFINE(HAVE_KINFO_GETFILE, 1, [Define to 1 if your system has the kinfo_getfile function. ])]) @@ -285,24 +300,24 @@ index 4c20ea5178..df156b484f 100644 # GDB may fork/exec the iconv program to get the list of supported character diff --git gdb/configure.nat gdb/configure.nat -index 7611266d86..8656015365 100644 +index 64ee101d83..f32e6328e0 100644 --- gdb/configure.nat +++ gdb/configure.nat -@@ -62,7 +62,8 @@ case ${gdb_host} in +@@ -63,7 +63,8 @@ case ${gdb_host} in LOADLIBES='-ldl $(RDYNAMIC)' ;; 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 nat/fork-inferior.o inf-ptrace.o fbsd-nat.o' ++ NATDEPFILES='fork-child.o nat/fork-inferior.o inf-ptrace.o fbsd-nat.o \ + fbsd-kvm.o' HAVE_NATIVE_GCORE_HOST=1 LOADLIBES='-lkvm' ;; diff --git gdb/configure.tgt gdb/configure.tgt -index f197160896..ced1140328 100644 +index 27f122ad04..5fa0d0179e 100644 --- gdb/configure.tgt +++ gdb/configure.tgt -@@ -94,7 +94,7 @@ esac +@@ -98,7 +98,7 @@ esac case "${targ}" in *-*-freebsd* | *-*-kfreebsd*-gnu) @@ -311,7 +326,7 @@ index f197160896..ced1140328 100644 *-*-netbsd* | *-*-knetbsd*-gnu) os_obs="nbsd-tdep.o solib-svr4.o";; *-*-openbsd*) -@@ -111,7 +111,7 @@ aarch64*-*-elf | aarch64*-*-rtems*) +@@ -115,7 +115,7 @@ aarch64*-*-elf | aarch64*-*-rtems*) aarch64*-*-freebsd*) # Target: FreeBSD/aarch64 @@ -320,7 +335,7 @@ index f197160896..ced1140328 100644 ;; aarch64*-*-linux*) -@@ -164,7 +164,7 @@ arm*-*-linux*) +@@ -168,7 +168,7 @@ arm*-*-linux*) ;; arm*-*-freebsd*) # Target: FreeBSD/arm @@ -329,7 +344,7 @@ index f197160896..ced1140328 100644 ;; arm*-*-netbsd* | arm*-*-knetbsd*-gnu) # Target: NetBSD/arm -@@ -251,7 +251,11 @@ i[34567]86-*-dicos*) +@@ -267,7 +267,11 @@ i[34567]86-*-dicos*) ;; i[34567]86-*-freebsd* | i[34567]86-*-kfreebsd*-gnu) # Target: FreeBSD/i386 @@ -342,7 +357,7 @@ index f197160896..ced1140328 100644 ;; i[34567]86-*-netbsd* | i[34567]86-*-knetbsd*-gnu) # Target: NetBSD/i386 -@@ -405,7 +409,7 @@ mips*-*-netbsd* | mips*-*-knetbsd*-gnu) +@@ -421,7 +425,7 @@ mips*-*-netbsd* | mips*-*-knetbsd*-gnu) ;; mips*-*-freebsd*) # Target: MIPS running FreeBSD @@ -351,7 +366,7 @@ index f197160896..ced1140328 100644 gdb_sim=../sim/mips/libsim.a ;; mips64*-*-openbsd*) -@@ -464,7 +468,7 @@ or1k-*-* | or1knd-*-*) +@@ -488,7 +492,7 @@ or1k-*-* | or1knd-*-*) powerpc*-*-freebsd*) # Target: FreeBSD/powerpc gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o ppc64-tdep.o \ @@ -360,7 +375,16 @@ index f197160896..ced1140328 100644 ravenscar-thread.o ppc-ravenscar-thread.o" ;; -@@ -587,6 +591,7 @@ sparc64-*-linux*) +@@ -543,7 +547,7 @@ s390*-*-linux*) + + riscv*-*-freebsd*) + # Target: FreeBSD/riscv +- gdb_target_obs="riscv-fbsd-tdep.o" ++ gdb_target_obs="riscv-fbsd-tdep.o riscv-fbsd-kern.o" + ;; + + riscv*-*-linux*) +@@ -622,6 +626,7 @@ sparc64-*-linux*) sparc*-*-freebsd* | sparc*-*-kfreebsd*-gnu) # Target: FreeBSD/sparc64 gdb_target_obs="sparc-tdep.o sparc64-tdep.o sparc64-fbsd-tdep.o \ @@ -368,7 +392,7 @@ index f197160896..ced1140328 100644 ravenscar-thread.o sparc-ravenscar-thread.o" ;; sparc-*-netbsd* | sparc-*-knetbsd*-gnu) -@@ -709,8 +714,8 @@ x86_64-*-linux*) +@@ -749,8 +754,8 @@ x86_64-*-linux*) ;; x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu) # Target: FreeBSD/amd64 @@ -380,10 +404,10 @@ index f197160896..ced1140328 100644 x86_64-*-mingw* | x86_64-*-cygwin*) # Target: MingW/amd64 diff --git gdb/defs.h gdb/defs.h -index fc4217005a..3d2eb6b1e9 100644 +index a44e186907..c4bfd42073 100644 --- gdb/defs.h +++ gdb/defs.h -@@ -481,6 +481,7 @@ enum gdb_osabi +@@ -484,6 +484,7 @@ enum gdb_osabi GDB_OSABI_SOLARIS, GDB_OSABI_LINUX, GDB_OSABI_FREEBSD, @@ -392,10 +416,10 @@ index fc4217005a..3d2eb6b1e9 100644 GDB_OSABI_OPENBSD, GDB_OSABI_WINCE, diff --git gdb/gnulib/configure gdb/gnulib/configure -index a152abcb76..140c4ad6a8 100644 +index 340c622cb3..bf0c4dd5d9 100644 --- gdb/gnulib/configure +++ gdb/gnulib/configure -@@ -17214,6 +17214,7 @@ else +@@ -18579,6 +18579,7 @@ else case "$host_os" in # Guess all is fine on glibc systems. *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; @@ -404,7 +428,7 @@ index a152abcb76..140c4ad6a8 100644 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; esac diff --git gdb/osabi.c gdb/osabi.c -index 7d0540b181..c61c518652 100644 +index 5d4bbcdff8..a982b22624 100644 --- gdb/osabi.c +++ gdb/osabi.c @@ -66,6 +66,7 @@ static const struct osabi_names gdb_osabi_names[] = @@ -416,10 +440,10 @@ index 7d0540b181..c61c518652 100644 { "OpenBSD", NULL }, { "WindowsCE", NULL }, diff --git gdb/regcache.c gdb/regcache.c -index f3f845aad6..7ca007a422 100644 +index 6e3eee9663..49ca1e1535 100644 --- gdb/regcache.c +++ gdb/regcache.c -@@ -1035,6 +1035,22 @@ reg_buffer::raw_supply_zeroed (int regnum) +@@ -1003,6 +1003,22 @@ reg_buffer::raw_supply_zeroed (int regnum) m_register_status[regnum] = REG_VALID; } @@ -443,10 +467,10 @@ index f3f845aad6..7ca007a422 100644 void diff --git gdb/regcache.h gdb/regcache.h -index 4a45f33871..94f542c087 100644 +index 2b703ea4a4..d06e001957 100644 --- gdb/regcache.h +++ gdb/regcache.h -@@ -207,6 +207,8 @@ public: +@@ -224,6 +224,8 @@ public: only LEN, without editing the rest of the register. */ void raw_supply_part (int regnum, int offset, int len, const gdb_byte *in); |