* [Qemu-devel] Problems with gdbserver and debugging
@ 2005-12-22 2:43 Andre Pech
2005-12-22 5:16 ` Tace
2005-12-22 5:31 ` Mulyadi Santosa
0 siblings, 2 replies; 3+ messages in thread
From: Andre Pech @ 2005-12-22 2:43 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1638 bytes --]
Hi,
I'm running into problems using qemu to debug a kernel module. My host and
virtual machine are both x86 running Fedora Core 4. After insmoding the
module in the virtual machine, starting gdbserver, running gdb on the host
with the module sections loaded at the right place, and setting a breakpoint
in the module code, gdb does not always get notified when the code is
exectuted. After adding debugging statements to qemu, I've experienced the
following two different failure cases:
1) The breakpoint is set, but translate.c:gen_intermediate_code_internal is
not being called for the breakpoint address. If I understand things
correctly, this suggests that the translation block invalidation code which
is executed each time a breakpoint is set has a problem in it.
2) translate.c:gen_intermetiate_code_internal is called on the address where
the breakpoint is set, and gen_debug is called. However, gdb does not break
into the code. With DEBUG_GDB set, you can see that the gdbstub code isn't
doing anything in this case, so the gdb process i am running is never
notified that the breakpoint was hit.
Both of these cases occur frequently, but not every time. I can run gdb,
have it break correctly, kill gdb (after disabling the breakpoint and
continuing), then start gdb again and have it fail.
I'm going to keep trying to debug this, but I was hoping that someone might
have some insight into what is going on here. I have not upgraded to qemu
0.8.0 yet, but i couldn't find anything that suggested that this would fix
the problem. Has anyone else run into similar problems?
Thanks
Andre Pech
[-- Attachment #2: Type: text/html, Size: 1699 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Problems with gdbserver and debugging
2005-12-22 2:43 [Qemu-devel] Problems with gdbserver and debugging Andre Pech
@ 2005-12-22 5:16 ` Tace
2005-12-22 5:31 ` Mulyadi Santosa
1 sibling, 0 replies; 3+ messages in thread
From: Tace @ 2005-12-22 5:16 UTC (permalink / raw)
To: qemu-devel
Hi,
I might have similar problems to what you just described. Mine's is
when my kernel module causes several oops, the gdbserver will no
longer break on the breakpoint in virtual machine. I have no idea why
this occurs and Fabrice hasn't reply to my mail yet...
On 12/22/05, Andre Pech <apech@arastra.com> wrote:
> Hi,
>
> I'm running into problems using qemu to debug a kernel module. My host and
> virtual machine are both x86 running Fedora Core 4. After insmoding the
> module in the virtual machine, starting gdbserver, running gdb on the host
> with the module sections loaded at the right place, and setting a breakpoint
> in the module code, gdb does not always get notified when the code is
> exectuted. After adding debugging statements to qemu, I've experienced the
> following two different failure cases:
>
> 1) The breakpoint is set, but
> translate.c:gen_intermediate_code_internal is not being
> called for the breakpoint address. If I understand things correctly, this
> suggests that the translation block invalidation code which is executed each
> time a breakpoint is set has a problem in it.
>
> 2) translate.c:gen_intermetiate_code_internal is called on
> the address where the breakpoint is set, and gen_debug is called. However,
> gdb does not break into the code. With DEBUG_GDB set, you can see that the
> gdbstub code isn't doing anything in this case, so the gdb process i am
> running is never notified that the breakpoint was hit.
>
> Both of these cases occur frequently, but not every time. I can run gdb,
> have it break correctly, kill gdb (after disabling the breakpoint and
> continuing), then start gdb again and have it fail.
>
> I'm going to keep trying to debug this, but I was hoping that someone might
> have some insight into what is going on here. I have not upgraded to qemu
> 0.8.0 yet, but i couldn't find anything that suggested that this would fix
> the problem. Has anyone else run into similar problems?
>
> Thanks
> Andre Pech
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Problems with gdbserver and debugging
2005-12-22 2:43 [Qemu-devel] Problems with gdbserver and debugging Andre Pech
2005-12-22 5:16 ` Tace
@ 2005-12-22 5:31 ` Mulyadi Santosa
1 sibling, 0 replies; 3+ messages in thread
From: Mulyadi Santosa @ 2005-12-22 5:31 UTC (permalink / raw)
To: qemu-devel, Andre Pech
Hello Andre...
> I'm running into problems using qemu to debug a kernel module. My
> host and virtual machine are both x86 running Fedora Core 4. After
> insmoding the module in the virtual machine, starting gdbserver,
> running gdb on the host with the module sections loaded at the right
> place, and setting a breakpoint in the module code, gdb does not
> always get notified when the code is exectuted. After adding
I'm not doing module debugging, only core kernel code debugging, but
more or less I run into same situation (last time confirmed with Qemu
0.7.1)
For additional info, sometimes I also suffered the other condition.
Breakpoint is hit, but even if I delete it, the emulation still stops
whenever the code at related physical address is hit. I tried to
printf() every gdb command received by Qemu's gdbstub and it confirmed
that breakpoint deletion command is actually received, but I can't
confirm what is the real bug there.
regards
Mulyadi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-12-22 5:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-22 2:43 [Qemu-devel] Problems with gdbserver and debugging Andre Pech
2005-12-22 5:16 ` Tace
2005-12-22 5:31 ` Mulyadi Santosa
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 NNTP newsgroup(s).