This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb displaying incorrect signal names with remote target ?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]