4

I want to use GNU DDD (gdb graphic shell) to debug Linux kernel, that is running (in some distro) inside qemu.

I have vmlinux image outside of Qemu, and launch Qemu with -s -S, so it acts like gdbserver (stops at start and waits for debuging commands). Now, how to connect DDD to that gdbserver using local vmlinux image?

Should I just open image and tell gdb 'target remote'?

VividD
  • 10,456
  • 6
  • 64
  • 111
kagali-san
  • 2,964
  • 7
  • 48
  • 87

2 Answers2

2

With minor adjustments, you can use procedure described in great detail here.

A picture from this tutorial:

enter image description here

VividD
  • 10,456
  • 6
  • 64
  • 111
2

You basically answered your own question - yes, use target remote gdb command in ddd to connect:

$ gdb qemuKernelFile
(gdb) target remote localhost:1234
gby
  • 14,900
  • 40
  • 57