Page 1 of 2
Program doesn't stop at breakpoints
Posted: Sun Jan 18, 2009 9:39 pm
by OLiverr
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
Re: Program doesn't stop at breakpoints
Posted: Sun Jan 18, 2009 9:44 pm
by eranif
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
Re: Program doesn't stop at breakpoints
Posted: Sun Jan 18, 2009 10:08 pm
by OLiverr
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>>
Re: Program doesn't stop at breakpoints
Posted: Sun Jan 18, 2009 10:17 pm
by eranif
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
Re: Program doesn't stop at breakpoints
Posted: Sun Jan 18, 2009 10:26 pm
by OLiverr
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.
Re: Program doesn't stop at breakpoints
Posted: Sun Jan 18, 2009 10:32 pm
by eranif
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
Re: Program doesn't stop at breakpoints
Posted: Sun Jan 18, 2009 11:22 pm
by OLiverr
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.
Re: Program doesn't stop at breakpoints
Posted: Sun Jan 18, 2009 11:50 pm
by eranif
OLiverr wrote:edit: Hmm, it IS a gdb problem, it always loses control in a singleton method. Very strange, anyway
Good to hear that
Eran
Re: Program doesn't stop at breakpoints
Posted: Wed Jan 28, 2009 2:12 am
by OLiverr
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.
Re: Program doesn't stop at breakpoints
Posted: Wed Jan 28, 2009 3:57 am
by eranif
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.
You might want to enable full debugger logging and try to debug it again from within codelite.
to enable the debugger logging: settings -> debugger settings ... -> tick 'enable full logging'
Paste here the output from the 'Debug' tab
Eran