Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb@sourceware.org
Cc: Julian Smith <jsmith@undo-software.com>,  gdb@sources.redhat.com
Subject: Re: gdb displaying incorrect signal names with remote target ?
Date: Wed, 14 Oct 2009 21:37:00 -0000	[thread overview]
Message-ID: <200910142204.58063.pedro@codesourcery.com> (raw)
In-Reply-To: <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


WARNING: multiple messages have this Message-ID
From: Pedro Alves <pedro@codesourcery.com>
To: gdb@sourceware.org
Cc: Julian Smith <jsmith@undo-software.com>,  gdb@sources.redhat.com
Subject: Re: gdb displaying incorrect signal names with remote target ?
Date: Wed, 14 Oct 2009 21:05:00 -0000	[thread overview]
Message-ID: <200910142204.58063.pedro@codesourcery.com> (raw)
Message-ID: <20091014210500.BX9nE2GRU3zURf5UaJsLVPs57QiqT6XfLKL9Pxop13Q@z> (raw)
In-Reply-To: <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


  parent reply	other threads:[~2009-10-14 21:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-14 20:54 Julian Smith
2009-10-14 21:01 ` Daniel Jacobowitz
2009-10-14 21:37 ` Pedro Alves [this message]
2009-10-14 21:05   ` Pedro Alves
2009-10-15  6:24   ` Julian Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200910142204.58063.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb@sources.redhat.com \
    --cc=gdb@sourceware.org \
    --cc=jsmith@undo-software.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox