kagali-san
kagali-san

Reputation: 3072

How to use DDD for kernel debugging of a local Qemu virtual machine?

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'?

Upvotes: 4

Views: 1326

Answers (2)

VividD
VividD

Reputation: 10536

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

A picture from this tutorial:

enter image description here

Upvotes: 2

gby
gby

Reputation: 15218

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

$ gdb qemuKernelFile
(gdb) target remote localhost:1234

Upvotes: 2

Related Questions