Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » debugging error with qemu and linux kernel
debugging error with qemu and linux kernel [message #1245453] Thu, 13 February 2014 21:00 Go to next message
Roozbeh Gh. is currently offline Roozbeh Gh.Friend
Messages: 2
Registered: February 2014
Junior Member
I am trying to debug a kernel with qemu but whenever eclipse (3.7.2) tries to connect it issues kill (I see it in selected console for gdb) and gives me "Target selection failed", "Remote communication error. Target disconnected.: Connection reset by peer."
Also this is the output in console :

+ target remote localhost:28214
The target architecture is assumed to be i8086
[f000:fff0] 0xffff0: ljmp $0xf000,$0xe05b
+ symbol-file obj/kern/kernel
kill

Which kind of means it is connected but get killed.

So I run qemu like this in a terminal :
1.
qemu -hda obj/kern/kernel.img -serial mon:stdio -gdb tcp::28214 -D qemu.log -S

and if I issue "gdb" in the same folder I can debug fine with gdb (and it also shows that ljmp instruction too)

2. In eclipse my debugger is gdbserver, "Using standard create process launcher", in "Main" tab page, GDB debugger is "GDB", GDB command set is "Standard". in "Connection" tab page, type is "TCP", "localhost" and port is "28214".

Thanks
Re: debugging error with qemu and linux kernel [message #1245975 is a reply to message #1245453] Fri, 14 February 2014 14:41 Go to previous messageGo to next message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
Try to use the "GDB (DSF) ..." type of process launcher, this is the one that is being actively maintained:
https://wiki.eclipse.org/CDT/User/FAQ#How_can_I_choose_another_debugger_integration_for_CDT.3F

If it still fails with that launcher type you can look at the detailed 'gdb traces' to see what is happening:
https://wiki.eclipse.org/CDT/User/FAQ#I.27ve_been_asked_for_.27gdb_traces.27.2C_where_can_I_find_them.3F

Marc
Re: debugging error with qemu and linux kernel [message #1246089 is a reply to message #1245975] Fri, 14 February 2014 18:03 Go to previous messageGo to next message
Roozbeh Gh. is currently offline Roozbeh Gh.Friend
Messages: 2
Registered: February 2014
Junior Member
The reason I switched to standard create process was with GDB (DSF) I am always getting this error :
(and the solution suggested in internet was to switch to standard process)

Error in final launch sequence
Failed to execute MI command:
maintenance set python print-stack off
Error message from debugger back end:
Undefined maintenance set python command: "print-stack off". Try "help maintenance set python".
Undefined maintenance set python command: "print-stack off". Try "help maintenance set python".
Re: debugging error with qemu and linux kernel [message #1248679 is a reply to message #1246089] Mon, 17 February 2014 14:35 Go to previous message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
This error has been fixed in Eclipse and GDB so if you upgrade either one, things should work.
You could in fact downgrad GDB (if that is easier) and it would also make this work.

Marc
Previous Topic:Call hierarchy of variables
Next Topic:"Build Working Set" builds the whole project
Goto Forum:
  


Current Time: Wed Apr 24 23:54:11 GMT 2024

Powered by FUDForum. Page generated in 0.02708 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top