Index: devel/gdb/Makefile =================================================================== --- devel/gdb/Makefile +++ devel/gdb/Makefile @@ -2,8 +2,8 @@ # $FreeBSD$ PORTNAME= gdb -PORTVERSION= 9.2 -PORTREVISION= 2 +PORTVERSION= 10.1 +PORTREVISION= 0 CATEGORIES= devel MASTER_SITES= GNU Index: devel/gdb/distinfo =================================================================== --- devel/gdb/distinfo +++ devel/gdb/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1591304030 -SHA256 (gdb-9.2.tar.xz) = 360cd7ae79b776988e89d8f9a01c985d0b1fa21c767a4295e5f88cb49175c555 -SIZE (gdb-9.2.tar.xz) = 20979436 +TIMESTAMP = 1604240338 +SHA256 (gdb-10.1.tar.xz) = f82f1eceeec14a3afa2de8d9b0d3c91d5a3820e23e0a01bbb70ef9f0276b62c0 +SIZE (gdb-10.1.tar.xz) = 21507112 SHA256 (bsdjhb-libcxx-gdbpy-229610a_GH0.tar.gz) = d4235f98b71c4d5e3f01744de279e64808229dd46c0f00cac6a12fdeb3a998a1 SIZE (bsdjhb-libcxx-gdbpy-229610a_GH0.tar.gz) = 5299 Index: devel/gdb/files/extrapatch-kgdb =================================================================== --- devel/gdb/files/extrapatch-kgdb +++ devel/gdb/files/extrapatch-kgdb @@ -463,9 +463,9 @@ # Target: MingW/amd64 diff --git gdb/defs.h gdb/defs.h index 567f214b81..abbaa1f950 100644 ---- gdb/defs.h -+++ gdb/defs.h -@@ -481,6 +481,7 @@ enum gdb_osabi +--- gdb/osabi.h ++++ gdb/osabi.h +@@ -31,6 +31,7 @@ enum gdb_osabi GDB_OSABI_SOLARIS, GDB_OSABI_LINUX, GDB_OSABI_FREEBSD, @@ -531,10 +531,10 @@ +++ gnulib/configure @@ -20267,6 +20267,8 @@ else case "$host_os" in - # Guess all is fine on glibc systems. - *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; -+ # Guess all is fine on FreeBSD. -+ freebsd*) gl_cv_func_gettimeofday_clobber="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; - esac + # Guess all is fine on glibc systems. + *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; ++ # Guess all is fine on FreeBSD. ++ freebsd*) gl_cv_func_gettimeofday_clobber="guessing no" ;; + # Guess all is fine on musl systems. + *-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;; + # Guess no on native Windows.. Index: devel/gdb/files/patch-commit-c47bae859 =================================================================== --- devel/gdb/files/patch-commit-c47bae859 +++ /dev/null @@ -1,99 +0,0 @@ -commit c47bae859a5af0d95224d90000df0e529f7c5aa0 -Author: Kevin Buettner -Date: Wed May 27 20:05:40 2020 -0700 - -diff --git a/gdb/python/python.c b/gdb/python/python.c -index 67f362b852..4bdd2201ab 100644 ---- gdb/python/python.c -+++ gdb/python/python.c -@@ -238,6 +238,30 @@ gdbpy_enter::~gdbpy_enter () - PyGILState_Release (m_state); - } - -+/* A helper class to save and restore the GIL, but without touching -+ the other globals that are handled by gdbpy_enter. */ -+ -+class gdbpy_gil -+{ -+public: -+ -+ gdbpy_gil () -+ : m_state (PyGILState_Ensure ()) -+ { -+ } -+ -+ ~gdbpy_gil () -+ { -+ PyGILState_Release (m_state); -+ } -+ -+ DISABLE_COPY_AND_ASSIGN (gdbpy_gil); -+ -+private: -+ -+ PyGILState_STATE m_state; -+}; -+ - /* Set the quit flag. */ - - static void -@@ -251,6 +275,10 @@ gdbpy_set_quit_flag (const struct extension_language_defn *extlang) - static int - gdbpy_check_quit_flag (const struct extension_language_defn *extlang) - { -+ if (!gdb_python_initialized) -+ return 0; -+ -+ gdbpy_gil gil; - return PyOS_InterruptOccurred (); - } - -@@ -943,30 +971,6 @@ gdbpy_source_script (const struct extension_language_defn *extlang, - - /* Posting and handling events. */ - --/* A helper class to save and restore the GIL, but without touching -- the other globals that are handled by gdbpy_enter. */ -- --class gdbpy_gil --{ --public: -- -- gdbpy_gil () -- : m_state (PyGILState_Ensure ()) -- { -- } -- -- ~gdbpy_gil () -- { -- PyGILState_Release (m_state); -- } -- -- DISABLE_COPY_AND_ASSIGN (gdbpy_gil); -- --private: -- -- PyGILState_STATE m_state; --}; -- - /* A single event. */ - struct gdbpy_event - { -@@ -1616,6 +1620,7 @@ finalize_python (void *ignore) - - Py_Finalize (); - -+ gdb_python_initialized = false; - restore_active_ext_lang (previous_active); - } - -@@ -1785,8 +1790,7 @@ do_start_initialization () - return false; - - /* Release the GIL while gdb runs. */ -- PyThreadState_Swap (NULL); -- PyEval_ReleaseLock (); -+ PyEval_SaveThread (); - - make_final_cleanup (finalize_python, NULL); - Index: devel/gdb/files/patch-gdb_amd64-bsd-nat.c =================================================================== --- devel/gdb/files/patch-gdb_amd64-bsd-nat.c +++ devel/gdb/files/patch-gdb_amd64-bsd-nat.c @@ -14,17 +14,17 @@ struct reg regs; + register_t old_rflags; - if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) + if (gdb_ptrace (PT_GETREGS, ptid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) perror_with_name (_("Couldn't get registers")); + old_rflags = regs.r_rflags; amd64_collect_native_gregset (regcache, ®s, regnum); -+ /* This is a workaround about the PSL_USERCHANGE posix limitation. */ ++ /* This is a workaround about the PSL_USERCHANGE posix limitation. */ + if ((regs.r_rflags ^ old_rflags ) & ~PSL_USERCHANGE) + { + regs.r_rflags ^= (regs.r_rflags ^ old_rflags ) & ~PSL_USERCHANGE; + } - if (ptrace (PT_SETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) + if (gdb_ptrace (PT_SETREGS, ptid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) perror_with_name (_("Couldn't write registers")); Index: devel/gdb/files/patch-gdb_gdbsupport_common-defs.h =================================================================== --- devel/gdb/files/patch-gdb_gdbsupport_common-defs.h +++ devel/gdb/files/patch-gdb_gdbsupport_common-defs.h @@ -1,5 +1,5 @@ ---- gdb/gdbsupport/common-defs.h.orig 2020-02-08 04:50:14.000000000 -0800 -+++ gdb/gdbsupport/common-defs.h 2020-02-27 10:06:21.899297000 -0800 +--- gdbsupport/common-defs.h.orig 2020-02-08 04:50:14.000000000 -0800 ++++ gdbsupport/common-defs.h 2020-02-27 10:06:21.899297000 -0800 @@ -55,9 +55,15 @@ Must do this before including any system header, since other system Index: devel/gdb/files/patch-gnulib_import_stddef.in.h =================================================================== --- devel/gdb/files/patch-gnulib_import_stddef.in.h +++ devel/gdb/files/patch-gnulib_import_stddef.in.h @@ -1,11 +1,11 @@ ---- gnulib/import/stddef.in.h.orig 2020-02-08 04:50:14.000000000 -0800 -+++ gnulib/import/stddef.in.h 2020-02-27 10:09:59.859133000 -0800 -@@ -84,7 +84,7 @@ - /* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is - a hack in case the configure-time test was done with g++ even though - we are currently compiling with gcc. */ --#if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) -+#if 0 +--- gnulib/import/stddef.in.h.orig 2020-09-13 04:33:41.000000000 +0200 ++++ gnulib/import/stddef.in.h 2020-11-01 15:46:55.395133000 +0100 +@@ -90,7 +90,7 @@ + #if defined _MSC_VER && defined __cplusplus + # include + #else +-# if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) ++# if 0 + # if !GNULIB_defined_max_align_t /* On the x86, the maximum storage alignment of double, long, etc. is 4, but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, - and the C11 standard allows this. Work around this problem by Index: devel/gdb/files/patch-libctf_swap.h =================================================================== --- devel/gdb/files/patch-libctf_swap.h +++ /dev/null @@ -1,11 +0,0 @@ ---- libctf/swap.h.orig 2020-02-27 15:22:32.550650000 -0800 -+++ libctf/swap.h 2020-02-27 15:22:43.397285000 -0800 -@@ -43,7 +43,7 @@ bswap_32 (uint32_t v) - | ((v & 0x000000ff) << 24)); - } - --inline uint64_t -+static inline uint64_t - bswap_identity_64 (uint64_t v) - { - return v; Index: devel/gdb/pkg-plist =================================================================== --- devel/gdb/pkg-plist +++ devel/gdb/pkg-plist @@ -78,6 +78,7 @@ %%DATADIR%%/syscalls/mips-n32-linux.xml %%DATADIR%%/syscalls/mips-n64-linux.xml %%DATADIR%%/syscalls/mips-o32-linux.xml +%%DATADIR%%/syscalls/netbsd.xml %%DATADIR%%/syscalls/ppc-linux.xml %%DATADIR%%/syscalls/ppc64-linux.xml %%DATADIR%%/syscalls/s390-linux.xml