Patchwork [03/11] gdb: Patch for "unrecognized real-time signal" bug

login
register
mail settings
Submitter Paul Cercueil
Date April 3, 2014, 9:01 p.m.
Message ID <1396558881-29631-3-git-send-email-paul@crapouillou.net>
Download mbox | patch
Permalink /patch/336776/
State Not Applicable
Headers show

Comments

Paul Cercueil - April 3, 2014, 9:01 p.m.
From: Maarten ter Huurne <maarten@treewalker.org>

This avoids the following error at GDB startup:

GDB bug: target.c (gdb_signal_from_host): unrecognized real-time signal

For details, see:
  http://sourceware.org/bugzilla/show_bug.cgi?id=14523

Signed-Off-By: Maarten ter Huurne <maarten@treewalker.org>
Acked-By: Paul Cercueil <paul@crapouillou.net>
---
 package/gdb/7.4.1/signal-128.patch | 15 +++++++++++++++
 package/gdb/7.5.1/signal-128.patch | 15 +++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 package/gdb/7.4.1/signal-128.patch
 create mode 100644 package/gdb/7.5.1/signal-128.patch
Thomas Petazzoni - Oct. 12, 2014, 3:57 p.m.
Dear Paul Cercueil,

On Thu,  3 Apr 2014 23:01:13 +0200, Paul Cercueil wrote:
> From: Maarten ter Huurne <maarten@treewalker.org>
> 
> This avoids the following error at GDB startup:
> 
> GDB bug: target.c (gdb_signal_from_host): unrecognized real-time signal
> 
> For details, see:
>   http://sourceware.org/bugzilla/show_bug.cgi?id=14523
> 
> Signed-Off-By: Maarten ter Huurne <maarten@treewalker.org>
> Acked-By: Paul Cercueil <paul@crapouillou.net>
> ---
>  package/gdb/7.4.1/signal-128.patch | 15 +++++++++++++++
>  package/gdb/7.5.1/signal-128.patch | 15 +++++++++++++++
>  2 files changed, 30 insertions(+)
>  create mode 100644 package/gdb/7.4.1/signal-128.patch
>  create mode 100644 package/gdb/7.5.1/signal-128.patch

Those gdb versions are no longer supported in Buildroot. Plus, as
pointed out by Vicente, the bug is actually in uClibc and not in gdb,
so we've marked this patch as Rejected in our patch tracking system.

Thanks!

Thomas

Patch

diff --git a/package/gdb/7.4.1/signal-128.patch b/package/gdb/7.4.1/signal-128.patch
new file mode 100644
index 0000000..ea56372
--- /dev/null
+++ b/package/gdb/7.4.1/signal-128.patch
@@ -0,0 +1,15 @@ 
+diff -ru gdb-7.4.1.org/gdb/common/signals.c gdb-7.4.1/gdb/common/signals.c
+--- gdb-7.4.1.org/gdb/common/signals.c	2012-01-06 05:43:33.000000000 +0100
++++ gdb-7.4.1/gdb/common/signals.c	2012-08-29 22:40:56.000000000 +0200
+@@ -346,6 +346,11 @@
+       else if (64 <= hostsig && hostsig <= 127)
+ 	return (enum target_signal)
+ 	  (hostsig - 64 + (int) TARGET_SIGNAL_REALTIME_64);
++      else if (hostsig == 128)
++	/* Some platforms, such as Linux MIPS, have NSIG == 128, in which case
++	   signal 128 is the highest realtime signal. There is no constant for
++	   that though. */
++	return TARGET_SIGNAL_UNKNOWN;
+       else
+ 	error (_("GDB bug: target.c (target_signal_from_host): "
+ 	       "unrecognized real-time signal"));
diff --git a/package/gdb/7.5.1/signal-128.patch b/package/gdb/7.5.1/signal-128.patch
new file mode 100644
index 0000000..b46489e
--- /dev/null
+++ b/package/gdb/7.5.1/signal-128.patch
@@ -0,0 +1,15 @@ 
+diff -ru gdb-7.5.org/gdb/common/signals.c gdb-7.5/gdb/common/signals.c
+--- gdb-7.5.org/gdb/common/signals.c	2012-05-24 18:51:37.000000000 +0200
++++ gdb-7.5/gdb/common/signals.c	2012-08-29 22:32:07.000000000 +0200
+@@ -346,6 +346,11 @@
+       else if (64 <= hostsig && hostsig <= 127)
+ 	return (enum gdb_signal)
+ 	  (hostsig - 64 + (int) GDB_SIGNAL_REALTIME_64);
++      else if (hostsig == 128)
++	/* Some platforms, such as Linux MIPS, have NSIG == 128, in which case
++	   signal 128 is the highest realtime signal. There is no constant for
++	   that though. */
++	return GDB_SIGNAL_UNKNOWN;
+       else
+ 	error (_("GDB bug: target.c (gdb_signal_from_host): "
+ 	       "unrecognized real-time signal"));