From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KG1I2-0001QE-Me for qemu-devel@nongnu.org; Mon, 07 Jul 2008 20:42:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KG1I2-0001Q2-9z for qemu-devel@nongnu.org; Mon, 07 Jul 2008 20:42:42 -0400 Received: from [199.232.76.173] (port=59717 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KG1I2-0001Pz-4h for qemu-devel@nongnu.org; Mon, 07 Jul 2008 20:42:42 -0400 Received: from qb-out-1314.google.com ([72.14.204.169]:34453) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KG1I1-0005eE-PQ for qemu-devel@nongnu.org; Mon, 07 Jul 2008 20:42:42 -0400 Received: by qb-out-1314.google.com with SMTP id e19so5650132qba.26 for ; Mon, 07 Jul 2008 17:42:37 -0700 (PDT) Message-ID: Date: Mon, 7 Jul 2008 17:42:36 -0700 From: Atoosah MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_16352_28010692.1215477756510" Subject: [Qemu-devel] Using GDB with Qemu : No Symbol Table? 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_16352_28010692.1215477756510 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Thank you for your help, but I think my question was misunderstood. Debugging the kernel is not my goal. Instead, I want to debug qemu itself. i.e. I want to be able to add watchpoints/breakpoints to qemu source code. How do I compile Qemu to enable the symbol table? My difficulty is that I need to be able to make install my_qemu (i.e. the installed qemu version). Correct me if I'm wrong, but the -s -S options are necessary if the goal is debugging the kernel. Is there a patch available, such as the one provided in http://www.h7.dion.ne.jp/~qemu-win/DebuggingTips-en.html/ (which seems to be a rather old link)? Thanks again. On Wed, Jun 25, 2008 at 11:41 PM, Atoosah wrote: > $gdb vmlinux > (gdb) target remote localhost:1234 > Remote debuggin using localhost:1234 > 0x0000fff0 in ?? () > (gdb) break main > No symbol table is loaded. Use the "file" command. > (gdb) c > Continuing. try to compile your kernel with CONFIG_DEBUG_INFO=y and CONFIG_FRAME_POINTER=y. Both will enable gdb to easily resolve symbol names into addresses and tracking down function call chain in stack frame. regards, Mulyadi. ------=_Part_16352_28010692.1215477756510 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi

Thank you for your help, but I think my question was misunderstood.

Debugging the kernel is not my goal. Instead, I want to debug qemu itself. i.e. I want to be able to add watchpoints/breakpoints to qemu source code. How do I compile Qemu to enable the symbol table?

My difficulty is that I need to be able to make install my_qemu (i.e. the installed qemu version). Correct me if I'm wrong, but the -s -S options are necessary if the goal is debugging the kernel. Is there a patch available, such as the one provided in http://www.h7.dion.ne.jp/~qemu-win/DebuggingTips-en.html/ (which seems to be a rather old link)?

Thanks again.

On Wed, Jun 25, 2008 at 11:41 PM, Atoosah <atoosaah@gmail.com> wrote:
> $gdb vmlinux
> (gdb) target remote localhost:1234
> Remote debuggin using localhost:1234
> 0x0000fff0 in ?? ()
> (gdb) break main
> No symbol table is loaded. Use the "file" command.
> (gdb) c
> Continuing.

try to compile your kernel with CONFIG_DEBUG_INFO=y and
CONFIG_FRAME_POINTER=y. Both will enable gdb to easily resolve symbol
names into addresses and tracking down function call chain in stack
frame.

regards,

Mulyadi.

------=_Part_16352_28010692.1215477756510--