Kernel debugging support #101
Replies: 5 comments 1 reply
-
Honestly I've never used vng with kgbd, the closest thing that I've used is to generate a memory dump and use drgn to inspect it, something like this: Line 301 in ee99d23 That is not the same as attaching gdb directly via kgdb, maybe someone else has more experience than me on this and wants to comment... |
Beta Was this translation helpful? Give feedback.
-
@arighi I can take a stab at trying to make this work. If I enable networking in the VM, I should be able to connect to it from my laptop right? |
Beta Was this translation helpful? Give feedback.
-
@jfernandez sure! To access the VM from your host you can use If you have troubles with |
Beta Was this translation helpful? Give feedback.
-
@arighi I tried enabling bridge mode and ran into several issues not covered by your troubleshooting section. Instead I used the I think the best solution is to simply enable serial port communication between the host and VM. Then socat and libvirt are not requirements because networking is not needed for debugging. I can hack virtme-ng to do this, but I found already some serial port params being used and it was unclear if you are already setting this up. |
Beta Was this translation helpful? Give feedback.
-
fwiw, Im using gdb to control a virtme-ng session, heres my wrappers function vrun__ () { alias vrun_e="vrun_ -e $*" alias vrun_d="vrun_ -a nokaslr -o=-S -o=-s " function vrun_a () { |
Beta Was this translation helpful? Give feedback.
-
This may already be supported, so I thought I'd ask before I try to figure this out myself. I want to have a Kernel debugging setup with virtme-ng following these instructions: https://www.kernel.org/doc/html/latest/dev-tools/kgdb.html
gdb would run on the host machine, and kgdb in the VM. How would I go about configuring this?
Beta Was this translation helpful? Give feedback.
All reactions