qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Using GDB with Qemu : No Symbol Table?
@ 2008-07-08  0:42 Atoosah
  2008-07-08 14:34 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Atoosah @ 2008-07-08  0:42 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1141 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 1391 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [Qemu-devel] Using GDB with Qemu : No Symbol Table?
@ 2008-06-25 16:41 Atoosah
  2008-06-26  2:16 ` Mulyadi Santosa
  0 siblings, 1 reply; 4+ messages in thread
From: Atoosah @ 2008-06-25 16:41 UTC (permalink / raw)
  To: qemu-devel

Hi,

-- I'm using qemu version 0.8.2 on linux.  I need some pointers on how
to run qemu with gdb.

[installed_qemu/bin]$./qemu mydisk.img -m 256 -s -S

-- At this point, qemu loads up and waits on port 1234. qemu's console
output is:

Waiting gdb connection on port 1234

-- But, when I run gdb, and try to put a break statement before
continuing, gdb states that there is no symbol table as shown below.
(I don't have a symbol table compiled in the a file, so can't use
"file" command.) The qemu options available to me does not have a -g
option (as I've seen used in some examples).

$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.

Program received signal SIGINT, Interrupt.
(gdb) list
No symbol table is loaded. Use the "file" command.
(gdb) where
#0 0xc0101040 in ?? ()
#1 0xc01010ac4 in ?? ()
...

-- Any ideas why there would be no symbol table available to gdb? Are
there any steps I'm missing? Do I need to compile qemu differently?

thank you,
Atoosaah

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-07-08 14:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-08  0:42 [Qemu-devel] Using GDB with Qemu : No Symbol Table? Atoosah
2008-07-08 14:34 ` Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2008-06-25 16:41 Atoosah
2008-06-26  2:16 ` 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).