Program doesn't stop at breakpoints
-
- CodeLite Enthusiast
- Posts: 13
- Joined: Sun Jan 18, 2009 9:30 pm
- Location: Thüringen (Germany)
- Contact:
Program doesn't stop at breakpoints
Hello,
first of all, great IDE, always searched for a good Visual Studio alternative for Linux.
So after a while I decided to try the current svn version (r2724). The problem is: the debugger doesn't work properly anymore. When I set a breakpoint, Codelite detects it (i.e. I see this green arrow) but the program itself continue running and I can't debug at all.
Oliver
first of all, great IDE, always searched for a good Visual Studio alternative for Linux.
So after a while I decided to try the current svn version (r2724). The problem is: the debugger doesn't work properly anymore. When I set a breakpoint, Codelite detects it (i.e. I see this green arrow) but the program itself continue running and I can't debug at all.
Oliver
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Program doesn't stop at breakpoints
First let me start by saying: it works for me (Win, Mac and Linux)
Now seriously:
1. from settings -> debugger settings -> enable full logging
2. make sure your program is complied with -g (do re-build if you need)
3. try to debug it and paste here the 'Debugger' tab output
Eran
Now seriously:
1. from settings -> debugger settings -> enable full logging
2. make sure your program is complied with -g (do re-build if you need)
3. try to debug it and paste here the 'Debugger' tab output
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 13
- Joined: Sun Jan 18, 2009 9:30 pm
- Location: Thüringen (Germany)
- Contact:
Re: Program doesn't stop at breakpoints
Ok, done, here we are. In one version of yesterday I believe there was an error in the "Trace"-Tab, something about "broken pipe", but not it is disappeared. o.O
Code: Select all
DEBUG>>set unwindonsignal on
DEBUG>>set breakpoint pending on
DEBUG>>set width 0
DEBUG>>set height 0
DEBUG>>set environment LD_LIBRARY_PATH = .
-break-insert "/home/oliver/siedler25/trunk/src/GameManager.cpp:211"
DEBUG>>00000029-break-insert "/home/oliver/siedler25/trunk/src/GameManager.cpp:211"
Debug session started successfully!
DEBUG>>00000030-exec-run
DEBUG>>~"GNU gdb 6.8-debian\n"
GNU gdb 6.8-debian
DEBUG>>~"Copyright (C) 2008 Free Software Foundation, Inc.\n"
Copyright (C) 2008 Free Software Foundation, Inc.
DEBUG>>~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n"
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
DEBUG>>~"This is free software: you are free to change and redistribute it.\n"
This is free software: you are free to change and redistribute it.
DEBUG>>~"There is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\n"
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
DEBUG>>~"and \"show warranty\" for details.\n"
and "show warranty" for details.
DEBUG>>~"This GDB was configured as \"i486-linux-gnu\"...\n"
This GDB was configured as "i486-linux-gnu"...
DEBUG>>(gdb)
Debuggee process ID: 13553
DEBUG>>&"set unwindonsignal on\n"
set unwindonsignal on
DEBUG>>^done
DEBUG>>(gdb)
DEBUG>>&"set breakpoint pending on\n"
set breakpoint pending on
DEBUG>>^done
DEBUG>>(gdb)
DEBUG>>&"set width 0\n"
set width 0
DEBUG>>^done
DEBUG>>(gdb)
DEBUG>>&"set height 0\n"
set height 0
DEBUG>>^done
DEBUG>>(gdb)
DEBUG>>&"set environment LD_LIBRARY_PATH = .\n"
set environment LD_LIBRARY_PATH = .
DEBUG>>^done
DEBUG>>(gdb)
DEBUG>>00000029^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x083672f9",func="GameManager::StartMenu()",file="/home/oliver/siedler25/trunk/src/GameManager.cpp",fullname="/home/oliver/siedler25/trunk/src/GameManager.cpp",line="211",times="0"}
Found the breakpoint ID!
Storing debugger breakpoint Id=1
Successfully set breakpoint 1 at: /home/oliver/siedler25/trunk/src/GameManager.cpp:211
DEBUG>>(gdb)
DEBUG>>00000030^running
Continuing...
DEBUG>>(gdb)
DEBUG>>~"[Thread debugging using libthread_db enabled]\n"
[Thread debugging using libthread_db enabled]
DEBUG>>~"[New Thread 0xb7a5d6c0 (LWP 13553)]\n"
[New Thread 0xb7a5d6c0 (LWP 13553)]
DEBUG>>~"[New Thread 0xb5881b90 (LWP 13558)]\n"
[New Thread 0xb5881b90 (LWP 13558)]
DEBUG>>~"[Switching to Thread 0xb7a5d6c0 (LWP 13553)]\n"
[Switching to Thread 0xb7a5d6c0 (LWP 13553)]
DEBUG>>00000030*stopped,reason="breakpoint-hit",bkptno="1",thread-id="1",frame={addr="0x083672f9",func="GameManager::StartMenu",args=[{name="this",value="0x862af30"}],file="/home/oliver/siedler25/trunk/src/GameManager.cpp",fullname="/home/oliver/siedler25/trunk/src/GameManager.cpp",line="211"}
DEBUG>>00000031-file-list-exec-source-file
DEBUG>>(gdb)
DEBUG>>00000031^done,line="211",file="/home/oliver/siedler25/trunk/src/GameManager.cpp",fullname="/home/oliver/siedler25/trunk/src/GameManager.cpp",macro-info="0"
DEBUG>>00000032-data-evaluate-expression *this
DEBUG>>00000033-stack-list-arguments 1 0 0
DEBUG>>00000034-stack-list-locals --all-values
DEBUG>>(gdb)
DEBUG>>
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Program doesn't stop at breakpoints
Well, looking at this debugger log, I dont see any problem...
according to the debugger log, you should be now at:
/home/oliver/siedler25/trunk/src/GameManager.cpp",fullname="/home/oliver/siedler25/trunk/src/GameManager.cpp, line 211...
Is this not the case?
Eran
according to the debugger log, you should be now at:
/home/oliver/siedler25/trunk/src/GameManager.cpp",fullname="/home/oliver/siedler25/trunk/src/GameManager.cpp, line 211...
Is this not the case?
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 13
- Joined: Sun Jan 18, 2009 9:30 pm
- Location: Thüringen (Germany)
- Contact:
Re: Program doesn't stop at breakpoints
Yes, im actually there, but the program (which should be debugged) continue running. In the editor I just see the green arrow which stays there und if I press F10 e.g. nothing happens. Btw: if i click "stop debugging" nothing happens as well, somehow as if the connection between Codelite und gdb is half-broken. o.O
edit: The "stop debugging" only doesn't work when it hangs in the break point.
edit: The "stop debugging" only doesn't work when it hangs in the break point.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Program doesn't stop at breakpoints
Have u tried to debug it from the command line?
EDIT: One other thing, when u hit F10, what happens? (in the debugger log)
You can also try and talk to gdb from the debugger tab (at the bottom of that tab there is a text control which u can send commands to gdb).
Eran
EDIT: One other thing, when u hit F10, what happens? (in the debugger log)
You can also try and talk to gdb from the debugger tab (at the bottom of that tab there is a text control which u can send commands to gdb).
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 13
- Joined: Sun Jan 18, 2009 9:30 pm
- Location: Thüringen (Germany)
- Contact:
Re: Program doesn't stop at breakpoints
When it hangs and I press F10 nothing happens, but I get a error message in the Trace-Tab:
Error: can't write to file descriptor 16 (error 32: Broken pipe)
Apparently it works for the first part of the program (step by step), but when a singleton is created the program starts running and seems not to care of the debugger. Maybe a gdb problem, but I thought it works with the stable version.
edit: Hmm, it IS a gdb problem, it always loses control in a singleton method. Very strange, anyway.
Error: can't write to file descriptor 16 (error 32: Broken pipe)
Apparently it works for the first part of the program (step by step), but when a singleton is created the program starts running and seems not to care of the debugger. Maybe a gdb problem, but I thought it works with the stable version.
edit: Hmm, it IS a gdb problem, it always loses control in a singleton method. Very strange, anyway.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Program doesn't stop at breakpoints
Good to hear thatOLiverr wrote:edit: Hmm, it IS a gdb problem, it always loses control in a singleton method. Very strange, anyway
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 13
- Joined: Sun Jan 18, 2009 9:30 pm
- Location: Thüringen (Germany)
- Contact:
Re: Program doesn't stop at breakpoints
Hi,
new experience: I tested it on another distribution (arch) und with the plain gdb (console) it works, but in Codelite not. So I disabled the auto resolving of this and voila, it works too. Any idea why? The Singleton is implemented as a baseclass with a static "me"-member.
new experience: I tested it on another distribution (arch) und with the plain gdb (console) it works, but in Codelite not. So I disabled the auto resolving of this and voila, it works too. Any idea why? The Singleton is implemented as a baseclass with a static "me"-member.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Program doesn't stop at breakpoints
You might want to enable full debugger logging and try to debug it again from within codelite.OLiverr wrote:Hi,
new experience: I tested it on another distribution (arch) und with the plain gdb (console) it works, but in Codelite not. So I disabled the auto resolving of this and voila, it works too. Any idea why? The Singleton is implemented as a baseclass with a static "me"-member.
to enable the debugger logging: settings -> debugger settings ... -> tick 'enable full logging'
Paste here the output from the 'Debug' tab
Eran
Make sure you have read the HOW TO POST thread