Skip to content

Commit

Permalink
gdb: Update gdb to version 11.2 (coolsnowwolf#8954)
Browse files Browse the repository at this point in the history
* gdb: update to 10.2

Replace some OpenWrt patches with openembedded ones for easier
maintainability. Remove several outdated ones as well.

Replace PKG_RELEASE with AUTORELEASE to avoid manual bumps.

Remove !arc dependency as it is supported upstream now.

Signed-off-by: Rosen Penev <[email protected]>

* gdb: Update to version 11.1

GDB 11.1 now depends on gmp.

Signed-off-by: Hauke Mehrtens <[email protected]>

* gdb: Add explicit patch to libgmp

Without giving the patch gdb does not compile on Arch Linux.

Signed-off-by: Hauke Mehrtens <[email protected]>

* gdb: Make only full gdb depend on libgmp

libgmp is only needed for the full gdb and not for the gdbserver
application.

Signed-off-by: Hauke Mehrtens <[email protected]>

* gdb: Update gdb to version 11.2

This is a minor corrective release over GDB 11.1, fixing the following issues:
* PR sim/28302 (gdb fails to build with glibc 2.34)
* PR build/28318 (std::thread support configure check does not use CXX_DIALECT)
* PR gdb/28405 (arm-none-eabi: internal-error: ptid_t remote_target::select_thread_for_ambiguous_stop_reply(const target_waitstatus*): Assertion `first_resumed_thread != nullptr' failed)
* PR tui/28483 ([gdb/tui] breakpoint creation not displayed)
* PR build/28555 (uclibc compile failure since commit 4655f8509fd44e6efabefa373650d9982ff37fd6)
* PR rust/28637 (Rust characters will be encoded using DW_ATE_UTF)
* PR gdb/28758 (GDB 11 doesn't work correctly on binaries with a SHT_RELR (.relr.dyn) section)
* PR gdb/28785 (Support SHT_RELR (.relr.dyn) section)

The sizes of the ipk changed on mips 24Kc like this:
2285775 gdb_11.1-3_mips_24kc.ipk
2287441 gdb_11.2-4_mips_24kc.ipk
191828 gdbserver_11.1-3_mips_24kc.ipk
191811 gdbserver_11.2-4_mips_24kc.ipk

Signed-off-by: Hauke Mehrtens <[email protected]>

Co-authored-by: Rosen Penev <[email protected]>
Co-authored-by: Hauke Mehrtens <[email protected]>
  • Loading branch information
3 people authored Feb 26, 2022
1 parent a19b934 commit a36b8f3
Show file tree
Hide file tree
Showing 8 changed files with 112 additions and 114 deletions.
15 changes: 9 additions & 6 deletions package/devel/gdb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=gdb
PKG_VERSION:=10.1
PKG_RELEASE:=1
PKG_VERSION:=11.2
PKG_RELEASE:=$(AUTORELEASE)

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/gdb
PKG_HASH:=f82f1eceeec14a3afa2de8d9b0d3c91d5a3820e23e0a01bbb70ef9f0276b62c0
PKG_HASH:=1497c36a71881b8671a9a84a0ee40faab788ca30d7ba19d8463c3cc787152e32

PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
Expand All @@ -33,7 +33,7 @@ endef
define Package/gdb
$(call Package/gdb/Default)
TITLE:=GNU Debugger
DEPENDS+=+libreadline +libncurses +zlib
DEPENDS+=+libreadline +libncurses +zlib +libgmp
endef

define Package/gdb/description
Expand All @@ -45,7 +45,6 @@ endef
define Package/gdbserver
$(call Package/gdb/Default)
TITLE:=Remote server for GNU Debugger
DEPENDS+=@!arc
endef

define Package/gdbserver/description
Expand All @@ -63,7 +62,11 @@ CONFIGURE_ARGS+= \
--disable-ubsan \
--disable-sim \
--disable-werror \
--disable-source-highlight
--disable-source-highlight \
--without-mpc \
--without-mpfr \
--without-isl \
--with-libgmp-prefix=$(STAGING_DIR)/usr

CONFIGURE_VARS+= \
ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline"
Expand Down
38 changes: 0 additions & 38 deletions package/devel/gdb/patches/010-aarch64-headers.patch

This file was deleted.

53 changes: 0 additions & 53 deletions package/devel/gdb/patches/100-musl_fix.patch

This file was deleted.

12 changes: 6 additions & 6 deletions package/devel/gdb/patches/110-shared_libgcc.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure.ac
+++ b/configure.ac
@@ -1302,13 +1302,13 @@ if test -z "$LD"; then
@@ -1300,13 +1300,13 @@ if test -z "$LD"; then
fi
fi

Expand All @@ -17,7 +17,7 @@
AC_LANG_PUSH(C++)
AC_LINK_IFELSE([AC_LANG_SOURCE([
#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
@@ -1648,7 +1648,7 @@ AC_ARG_WITH(stage1-ldflags,
@@ -1705,7 +1705,7 @@ AC_ARG_WITH(stage1-ldflags,
# trust that they are doing what they want.
if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \
-a "$have_static_libs" = yes; then
Expand All @@ -26,7 +26,7 @@
fi])
AC_SUBST(stage1_ldflags)

@@ -1677,7 +1677,7 @@ AC_ARG_WITH(boot-ldflags,
@@ -1734,7 +1734,7 @@ AC_ARG_WITH(boot-ldflags,
# statically. But if the user explicitly specified the libraries to
# use, trust that they are doing what they want.
if test "$poststage1_libs" = ""; then
Expand All @@ -37,7 +37,7 @@

--- a/configure
+++ b/configure
@@ -5075,14 +5075,14 @@ if test -z "$LD"; then
@@ -5257,14 +5257,14 @@ if test -z "$LD"; then
fi
fi

Expand All @@ -56,7 +56,7 @@
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -5883,7 +5883,7 @@ else
@@ -6149,7 +6149,7 @@ else
# trust that they are doing what they want.
if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \
-a "$have_static_libs" = yes; then
Expand All @@ -65,7 +65,7 @@
fi
fi

@@ -5919,7 +5919,7 @@ else
@@ -6185,7 +6185,7 @@ else
# statically. But if the user explicitly specified the libraries to
# use, trust that they are doing what they want.
if test "$poststage1_libs" = ""; then
Expand Down
35 changes: 35 additions & 0 deletions package/devel/gdb/patches/130-gdb-ctrl-c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From 63df98fa78c8a6e12b40ebdc5c155838d2bf8b5f Mon Sep 17 00:00:00 2001
From: Khem Raj <[email protected]>
Date: Thu, 29 Nov 2018 18:00:23 -0800
Subject: [PATCH 11/11] gdbserver ctrl-c handling

This problem was created by the upstream commit 78708b7c8c
After applying the commit, it will send SIGINT to the process
group(-signal_pid).
But if we use gdbserver send SIGINT, and the attached process is not a
process
group leader, then the "kill (-signal_pid, SIGINT)" returns error and
fails to
interrupt the attached process.

Upstream-Status: Submitted
[https://sourceware.org/bugzilla/show_bug.cgi?id=18945]

Author: Josh Gao
Signed-off-by: Zhixiong Chi <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
---
gdbserver/linux-low.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -5733,7 +5733,7 @@ linux_process_target::request_interrupt
{
/* Send a SIGINT to the process group. This acts just like the user
typed a ^C on the controlling terminal. */
- ::kill (-signal_pid, SIGINT);
+ ::kill (signal_pid, SIGINT);
}

bool
11 changes: 0 additions & 11 deletions package/devel/gdb/patches/130-uclibc-fix.patch

This file was deleted.

30 changes: 30 additions & 0 deletions package/devel/gdb/patches/140-sgidefs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 677b5b56135141c0d259e370aacd0e11c810aa15 Mon Sep 17 00:00:00 2001
From: Andre McCurdy <[email protected]>
Date: Fri, 5 Feb 2016 14:00:00 -0800
Subject: [PATCH] use <asm/sgidefs.h>

Build fix for MIPS with musl libc

The MIPS specific header <sgidefs.h> is provided by glibc and uclibc
but not by musl. Regardless of the libc, the kernel headers provide
<asm/sgidefs.h> which provides the same definitions, so use that
instead.

Upstream-Status: Pending

Signed-off-by: Andre McCurdy <[email protected]>
---
gdb/mips-linux-nat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -31,7 +31,7 @@
#include "gdb_proc_service.h"
#include "gregset.h"

-#include <sgidefs.h>
+#include <asm/sgidefs.h>
#include "nat/gdb_ptrace.h"
#include <asm/ptrace.h>
#include "inf-ptrace.h"
32 changes: 32 additions & 0 deletions package/devel/gdb/patches/150-mips64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From e92f8932ef488de2a56db4299131ce6a4eb170bd Mon Sep 17 00:00:00 2001
From: Khem Raj <[email protected]>
Date: Wed, 23 Mar 2016 06:30:09 +0000
Subject: [PATCH] mips-linux-nat: Define _ABIO32 if not defined

This helps building gdb on mips64 on musl, since
musl does not provide sgidefs.h this define is
only defined when GCC is using o32 ABI, in that
case gcc emits it as built-in define and hence
it works ok for mips32

Signed-off-by: Khem Raj <[email protected]>
---
Upstream-Status: Pending

gdb/mips-linux-nat.c | 5 +++++
1 file changed, 5 insertions(+)

--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -42,6 +42,11 @@
#define PTRACE_GET_THREAD_AREA 25
#endif

+/* musl does not define and relies on compiler built-in macros for it */
+#ifndef _ABIO32
+#define _ABIO32 1
+#endif
+
class mips_linux_nat_target final : public linux_nat_trad_target
{
public:

0 comments on commit a36b8f3

Please sign in to comment.