All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@axis.com>
To: qemu-devel@nongnu.org, Lionel Landwerlin <lionel.landwerlin@openwide.fr>
Subject: Re: [Qemu-devel] User emulation & gdb & sigsegv
Date: Fri, 12 Dec 2008 09:44:32 +0100	[thread overview]
Message-ID: <20081212084432.GA26464@edgar.se.axis.com> (raw)
In-Reply-To: <1229031730.3898.28.camel@cocoduo.atr>

On Thu, Dec 11, 2008 at 10:42:10PM +0100, Lionel Landwerlin wrote:
> Le jeudi 11 décembre 2008 à 00:18 +0100, Edgar E. Iglesias a écrit :
> > On Thu, Dec 11, 2008 at 12:06:53AM +0100, Lionel Landwerlin wrote:
> > > Hello,
> > > 
> > > Currently, when using gdb connected to qemu, if a sigsegv is raised,
> > > Qemu just exits.
> > > 
> > > How should I modify Qemu to redirect this last signal to the connected
> > > gdb and print a stack trace at least ?
> > > 
> > > I tried to call gdb_handlesig(gdbstub.c) from
> > > force_sig(linux-user/signal.c) but Qemu just crashes.
> > > 
> > > Any idea is welcome :)
> > 
> > Hello,
> > 
> > I've got this in my git, IIRC it helped me out in those situations.
> > 
> > Cheers
> > 
> > commit 1efa40a743e16dbe2803a8d16902bf89850e80a3
> > Author: Edgar E. Iglesias <edgar.iglesias@axis.com>
> > Date:   Mon Sep 29 14:14:24 2008 +0200
> > 
> >     Pass default handler signals to gdb aswell.
> > 
> > diff --git a/linux-user/signal.c b/linux-user/signal.c
> > index 9640923..b7d22a1 100644
> > --- a/linux-user/signal.c
> > +++ b/linux-user/signal.c
> > @@ -365,6 +365,7 @@ int queue_signal(CPUState *env, int sig, target_siginfo_t *info)
> >          if (sig != TARGET_SIGCHLD &&
> >              sig != TARGET_SIGURG &&
> >              sig != TARGET_SIGWINCH) {
> > +	    sig = gdb_handlesig(env, sig);
> >              force_sig(sig);
> >          } else {
> >              return 0; /* indicate ignored */
> > 
> > 
> 
> In fact this patch just make qemu crash too.
> Have you tested this patch on the current svn  ?

Nope, it's on my git with other patches, don't know if there are
dependencies. Feel free to have a look at
git://repo.or.cz/qemu/cris-port.git if you're interested. No
guarantees that it will help though :)

> What cpu did you use to test it ?

I run it on CRIS all the time.

Regards

  reply	other threads:[~2008-12-12  8:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-10 23:06 [Qemu-devel] User emulation & gdb & sigsegv Lionel Landwerlin
2008-12-10 23:18 ` Edgar E. Iglesias
2008-12-11 21:42   ` Lionel Landwerlin
2008-12-12  8:44     ` Edgar E. Iglesias [this message]
2008-12-17 19:45 ` Daniel Jacobowitz

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=20081212084432.GA26464@edgar.se.axis.com \
    --to=edgar.iglesias@axis.com \
    --cc=lionel.landwerlin@openwide.fr \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.