From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EpGRX-0004Y5-Oe for qemu-devel@nongnu.org; Wed, 21 Dec 2005 21:44:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EpGRX-0004Xb-7H for qemu-devel@nongnu.org; Wed, 21 Dec 2005 21:44:35 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EpGRX-0004XR-4V for qemu-devel@nongnu.org; Wed, 21 Dec 2005 21:44:35 -0500 Received: from [64.233.162.195] (helo=zproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EpGQZ-000725-Up for qemu-devel@nongnu.org; Wed, 21 Dec 2005 21:43:36 -0500 Received: by zproxy.gmail.com with SMTP id r28so299346nza for ; Wed, 21 Dec 2005 18:43:33 -0800 (PST) Message-ID: <16af12af0512211843h2c73e20v72ec61d150eb13d7@mail.gmail.com> Date: Wed, 21 Dec 2005 18:43:31 -0800 From: Andre Pech Sender: andre.pech@gmail.com MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_149_13529388.1135219411384" Subject: [Qemu-devel] Problems with gdbserver and debugging Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ------=_Part_149_13529388.1135219411384 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 breakpoin= t 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 wher= e 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 ------=_Part_149_13529388.1135219411384 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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
------=_Part_149_13529388.1135219411384--