Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Several annoying problems with Cygwin GDB
Several annoying problems with Cygwin GDB [message #722401] Mon, 05 September 2011 16:37 Go to next message
Laurent Haas is currently offline Laurent HaasFriend
Messages: 3
Registered: August 2011
Junior Member
Hi

I'm battling for few days against GDB Cygwin debugger in Eclipse, on a non-managed project (ie with an existing makefile).

I'm currently using Eclipse 3.7.0 (I20110613-1736) on WinXP, CDT 8.0.0.201106081058, and the latest Cygwin 1.7.9 with GDB 7.3.50.20110821-cvs (cygwin-special)

The most annoying bugs I have are :

1/ Unable to suspend while the code is running. Hitting the button in the Debug pane just does nothing, except you can't Resume afterwards (the button is disabled), and the only way is to terminate !

2/ Setting a breakpoint while the code is running is just impossible : It generates a yellow sign "Breakpoint attribute problem: Installation failed". The gdb traces console does not reflect this action. The only way is to terminate your program, set the breakpoint, and restart the debugging procedure !

3/ If by chance you can set a breakpoint at the right place, and the Disassembly window is opened, the Step Over command doesn't work. The gdb traces console says :

412,640 (gdb) 
414,031 125-exec-next --thread 6 1
414,031 125^error,msg="Warning:\nCannot insert breakpoint -192.\nError accessing memory address 0x7c\
343646: Input/Output error.\n"


and now, you're stuck. Closing the disassembly window afterwards is useless. You can only Resume (or Terminate)...

It is almost impossible to debug anything without spending hours on it.

Seriously, am I the only one to face these very annoying issues ? Or did I missed something ?

Thanks !

[Updated on: Mon, 05 September 2011 16:40]

Report message to a moderator

Re: Several annoying problems with Cygwin GDB [message #722580 is a reply to message #722401] Tue, 06 September 2011 09:00 Go to previous messageGo to next message
malo_nj  is currently offline malo_nj Friend
Messages: 33
Registered: December 2010
Member
Quote:
1/ Unable to suspend while the code is running. Hitting the button in the Debug pane just does nothing, except you can't Resume afterwards (the button is disabled), and the only way is to terminate !


Try entering s in the gdb console maybe it will resume. The problem that I used to have here is that the GDB gets suspended but Eclipse does not realize it. By entering step (s) in GDB console you will step once and Eclipse should figure that out.

Quote:
2/ Setting a breakpoint while the code is running is just impossible : It generates a yellow sign "Breakpoint attribute problem: Installation failed". The gdb traces console does not reflect this action. The only way is to terminate your program, set the breakpoint, and restart the debugging procedure !


I think this has to do with GDB non-stop debugging. By default when some of your code is running GDB is in a blocked state and only hitting an already existing break point or issuing pause will stop it.

Quote:
3/ If by chance you can set a breakpoint at the right place, and the Disassembly window is opened, the Step Over command doesn't work. The gdb traces console says


This is different this should not happen. Are you debugging a native win app or using a simulator? Memory address 0x7c has little sense if you are debugging win app. Did you chose the right tool-chain? If the disassembly is bad it could be that your binary parser is wrong. Chose cygwin GCC for toolchain if you are debugging *.exe files.

I`m not 100% shore about all of this. Don`t have the time to try it and it was a long time ago I had similar issues. Hope it helps.
Re: Several annoying problems with Cygwin GDB [message #722582 is a reply to message #722580] Tue, 06 September 2011 09:02 Go to previous message
malo_nj  is currently offline malo_nj Friend
Messages: 33
Registered: December 2010
Member
And if your not bound on using cygwin/gdb/eclipse combo try using MinGW its supposed to be less buggy.
Previous Topic:How to debug C++ code called from a JAVA Simulation Program
Next Topic:error when building
Goto Forum:
  


Current Time: Sat Apr 27 04:46:09 GMT 2024

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

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

Back to the top