This is the mail archive of the gdb-patches@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: [PATCH] sim: nrun: decode signal when crashing


On Monday 27 December 2010 21:04:01 Mike Frysinger wrote:
> 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 ...

committed in light of this
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


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