This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Fix debugging kfreebsd-amd64 lockup
- From: Pedro Alves <palves at redhat dot com>
- To: Hector Oron <hector dot oron at gmail dot com>
- Cc: gdb-patches at sourceware dot org, jepler at unpythonic dot net, Christoph Egger <christoph at debian dot org>
- Date: Sat, 25 May 2013 15:45:48 +0100
- Subject: Re: Fix debugging kfreebsd-amd64 lockup
- References: <CAODfWeEhiUTE2hDO_7n1hjwOh6-7-y=2m_OBjYFiGKZ4jvXVKw at mail dot gmail dot com>
On 05/24/2013 09:27 PM, Hector Oron wrote:
> Hello,
>
> The patch is missing a changelog entry, but could you please comment
> on the following code:
Please see:
http://sourceware.org/gdb/wiki/ContributionChecklist
>
> --- a/gdb/common/signals.c
> +++ b/gdb/common/signals.c
> @@ -600,6 +600,15 @@
> return SIGINFO;
> #endif
>
> +#if defined(__GLIBC__) && defined(__FreeBSD_kernel__)
> + case TARGET_SIGNAL_LINUXTHREADS_RESTART:
> + return 32;
> + case TARGET_SIGNAL_LINUXTHREADS_CANCEL:
> + return 33;
> + case TARGET_SIGNAL_LINUXTHREADS_DEBUG:
> + return 34;
> +#endif
Note signals have been renamed GDB_SIGNAL_XXX from
TARGET_SIGNAL_XXX a while ago.
But GDB_SIGNAL_LINUXTHREADS_RESTART etc. aren't defined anywhere
in upstream GDB AFAICS. Looks like this depends on other patches.
The downstream bug report is pretty vague. :-(
32-34 would be the first realtime signals, right?
Why aren't these bits in that same file working for you then? :
/* Always use __SIGRTMIN if it's available. SIGRTMIN is the lowest
_available_ realtime signal, not the lowest supported; glibc takes
several for its own use. */
#ifndef REALTIME_LO
# if defined(__SIGRTMIN)
# define REALTIME_LO __SIGRTMIN
# define REALTIME_HI (__SIGRTMAX + 1)
# elif defined(SIGRTMIN)
# define REALTIME_LO SIGRTMIN
# define REALTIME_HI (SIGRTMAX + 1)
# endif
#endif
...
#if defined (REALTIME_LO)
if (hostsig >= REALTIME_LO && hostsig < REALTIME_HI)
{
/* This block of GDB_SIGNAL_REALTIME value is in order. */
if (33 <= hostsig && hostsig <= 63)
return (enum gdb_signal)
(hostsig - 33 + (int) GDB_SIGNAL_REALTIME_33);
else if (hostsig == 32)
return GDB_SIGNAL_REALTIME_32;
else if (64 <= hostsig && hostsig <= 127)
return (enum gdb_signal)
(hostsig - 64 + (int) GDB_SIGNAL_REALTIME_64);
else
error (_("GDB bug: target.c (gdb_signal_from_host): "
"unrecognized real-time signal"));
}
#endif
--
Pedro Alves