public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] sim: nrun: decode signal when crashing
Date: Tue, 28 Dec 2010 04:43:00 -0000	[thread overview]
Message-ID: <201012272104.01777.vapier@gentoo.org> (raw)
In-Reply-To: <y0m62vxw8os.fsf@fche.csb>

[-- Attachment #1: Type: Text/Plain, Size: 945 bytes --]

On Tuesday, November 16, 2010 11:10:43 Frank Ch. Eigler wrote:
> vapier wrote:
> > [...]
> > 
> >        if (sigrc != 0)
> > 
> > -        fprintf (stderr, "program stopped with signal %d.\n", sigrc);
> > +	fprintf (stderr, "program stopped with signal %d (%s).\n", sigrc,
> > +		 strsignal (sigrc));
> > 
> >        break;
> 
> I don't know if we can assume that the target signal numbering matches
> the host.  Else I suspect we wouldn't have all those TARGET_SIGNAL_*
> defs.

looking through the code, it seems nrun.c already assumes this.  i cant find 
any logic that utilizes the signal_map member of the callback structure.

sim-reason.c:sim_stop_reason() sets sigrc to the target signal based on the 
sim signal (uses sim_signal_to_target()).  nrun.c:main() then compares that 
sigrc directly to the result of sim_signal_to_host().

so i think this patch is OK considering the existing state of things ...
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2010-12-28  2:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-16  2:50 Mike Frysinger
2010-11-16 16:10 ` Frank Ch. Eigler
2010-11-16 19:06   ` Mike Frysinger
2010-12-28  4:43   ` Mike Frysinger [this message]
2012-03-19  3:59     ` Mike Frysinger

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=201012272104.01777.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=fche@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).