tag:blogger.com,1999:blog-3992037435056807380.post3310334495764735199..comments2023-10-22T05:28:07.166-07:00Comments on Linux Hacks: Setting up kgdb using kvm/qemuAnkihttp://www.blogger.com/profile/10548127478425975716noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-3992037435056807380.post-59489834646438400482010-02-26T10:26:16.479-08:002010-02-26T10:26:16.479-08:00(sorry, klicked "publish" way too fast) ...(sorry, klicked "publish" way too fast) ....<br /><br />GDB:<br />----<br />target remote 168.X.Y.Z:4555<br /><br />After the QEMU boot window stopped at the kgdb module hook.<br /><br />That was it ...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992037435056807380.post-1092108948711127502010-02-26T10:21:17.584-08:002010-02-26T10:21:17.584-08:00For me, the pty option with kvm/qemu didn't do...For me, the pty option with kvm/qemu didn't do the trick for any reason. Instead, what finally worked for me, was giving the tcp socket to qemu together with the "-serial" option. <br /><br />Here is my configuration:<br /><br />KVM / QEMU:<br />-----------<br />kvm -hda myImage.img -name entengruetze -boot c -std-vga -k de -usb -usbdevice disk:/dev/... -usbdevice disk:/dev/sdb -m 2048 -net nic,vlan=0 -net tap, vlan=0 -soundhw all -serial tcp::4555,server,nowait<br /><br />"-serial tcp::4555,server,nowait" is the important part<br /><br />This makes qemu translate the serial line connectivity from the VM into a socket on the host. Qemu would also support for UDP socket, but that could lead to an unreliable connection for gdb and be causing data loss.<br />server-Option is important to enable connection from gdb, nowait ensures, that the booting process comes to the point, where the kgdb modules hook in and stop the boot process showing the message "... awaiting connection from remote gdb..."<br /><br />GRUB BOOT PARAMETERS:<br />---------------------<br />linux /boot/vmlinuz ...... kgdboc=ttyS0 kgdbwaitAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992037435056807380.post-86256158482441979682009-04-01T22:38:00.000-07:002009-04-01T22:38:00.000-07:00Hi Varun, I am not able to debug modules and their...Hi Varun, I am not able to debug modules and their symbols. I am using qemu -s + gdb. Is there any trick you know how to resolve this?UV Saradhihttps://www.blogger.com/profile/12971967635889474611noreply@blogger.comtag:blogger.com,1999:blog-3992037435056807380.post-69240992939028783272009-01-09T20:11:00.000-08:002009-01-09T20:11:00.000-08:00Hi Steve, no i have not played around loadable mod...Hi Steve, no i have not played around loadable modules but i think this might help you http://www.linuxjournal.com/article/4525varunhttps://www.blogger.com/profile/09636412072339634643noreply@blogger.comtag:blogger.com,1999:blog-3992037435056807380.post-62800871690338194222009-01-09T16:37:00.000-08:002009-01-09T16:37:00.000-08:00Have you played around with loadable modules? If I...Have you played around with loadable modules? If I load a module in the virtual machine, how do I get all the symbol information back to the host and into gdb?Steve Patehttps://www.blogger.com/profile/06679201646537246333noreply@blogger.comtag:blogger.com,1999:blog-3992037435056807380.post-48463106482429033512008-07-26T05:50:00.000-07:002008-07-26T05:50:00.000-07:00thanks :-)thanks :-)varunhttps://www.blogger.com/profile/09636412072339634643noreply@blogger.comtag:blogger.com,1999:blog-3992037435056807380.post-58861761420764641692008-07-11T03:17:00.000-07:002008-07-11T03:17:00.000-07:00Great work, people like me who doesnt follow kerne...Great work, people like me who doesnt follow kernel development that much about will find this very useful. keep them comingKasiviswanathanhttps://www.blogger.com/profile/12763949592237960437noreply@blogger.com