[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] User emulation & gdb & sigsegv
From: |
Edgar E. Iglesias |
Subject: |
Re: [Qemu-devel] User emulation & gdb & sigsegv |
Date: |
Thu, 11 Dec 2008 00:18:13 +0100 |
User-agent: |
Mutt/1.5.16 (2007-06-09) |
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 <address@hidden>
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 */