This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb displaying incorrect signal names with remote target ?
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb at sourceware dot org
- Cc: Julian Smith <jsmith at undo-software dot com>, gdb at sources dot redhat dot com
- Date: Wed, 14 Oct 2009 22:04:57 +0100
- Subject: Re: gdb displaying incorrect signal names with remote target ?
- References: <20091014214827.7259ea9e.jsmith@undo-software.com>
On Wednesday 14 October 2009 21:48:27, Julian Smith wrote:
> The inferior is receiving SIGUSR1 (signal number 10 on my i386 Linux
> system), thus the remote target sends a packet `S0a' to gdb.
There's the problem. The remote target needs to send the
remote protocol code for SIGUSR1 , not the targets'. That would
be... TARGET_SIGNAL_USR1 = 30. The manual describes this:
"In the below the exact meaning of @dfn{signal
number} is defined by the header @file{include/gdb/signals.h} in the
@value{GDBN} source code."
... and include/gdb/signals.h says:
/* The numbering of these signals is chosen to match traditional unix
signals (insofar as various unices use the same numbers, anyway).
It is also the numbering of the GDB remote protocol. Other remote
protocols, if they use a different numbering, should make sure to
translate appropriately.
--
Pedro Alves