Code::Blocks Forums

User forums => Help => Topic started by: jarro_2783 on August 28, 2006, 09:25:07 am

Title: Debugging doesn't work any more.
Post by: jarro_2783 on August 28, 2006, 09:25:07 am
I can't debug any programs. It used to work and now since I formatted my computer and installed the latest version of code blocks it doesn't work. Here is a screenshot of what I mean.

(http://img245.imageshack.us/img245/3170/nodebugeb9.th.jpg) (http://img245.imageshack.us/my.php?image=nodebugeb9.jpg)

The problems are the two lines

Quote
No source file named C:/programming/programs/test-debug/main.cpp.
No source file named C:/games/freedom/game/prjfreedom/src/engine/win32/win32_filesystem.cpp.

The first line is the break point I have got which you can see in the screenshot. The second line is an old breakpoint from a project I had open just before this one and then closed, I don't know why that's there.
The main problem is it doesn't seem to be finding the file and breaking where I want it to.

I did turn debugging on with -g, and it works if I use gdb straight up.
Title: Re: Debugging doesn't work any more.
Post by: mandrav on August 28, 2006, 09:32:53 am
Mind sharing some more info, like your programs versions (gcc, gdb)?
Title: Re: Debugging doesn't work any more.
Post by: jarro_2783 on August 28, 2006, 09:38:58 am
oh sorry, I installed the latest mingw by downloading all the packages separately.

gcc - 3.4.5
gdb 5.2.1
C::B - august 27th nightly.

I think that's all.
Title: Re: Debugging doesn't work any more.
Post by: mandrav on August 28, 2006, 09:40:32 am
gdb 5.2.1

Get gdb 6.3 (http://prdownloads.sf.net/mingw/gdb-6.3-2.exe?download)...
Title: Re: Debugging doesn't work any more.
Post by: jarro_2783 on August 28, 2006, 09:45:45 am
thanks, it worked.
Any idea why they don't have that on their download page?
Title: Re: Debugging doesn't work any more.
Post by: mandrav on August 28, 2006, 09:50:19 am
thanks, it worked.
Any idea why they don't have that on their download page?

Have what? The link I posted comes from the MinGW download page. It's at the bottom of the page where it says "Snapshot".
Title: Re: Debugging doesn't work any more.
Post by: jarro_2783 on August 28, 2006, 11:50:44 pm
ok, I missed that. I got it from higher up where it is listed under "current".
Title: Re: Debugging doesn't work any more.
Post by: Phatency on August 29, 2006, 09:56:27 am
I've been having the same problem since last week, and all I've done is install nightlies.
MinGW 5.0.3
 - gcc 3.4.2 (should I get 3.4.5 candidate?)
 - gdb 6.3
CodeBlocks Version 1.0 revision 2918 ()   gcc 3.4.5 Windows/unicode


I created two console application projects (test & test2), and now breakpoints seem to work for these projects (don't know why they didn't work before).

I still get "no source file named x" warnings from all projects with breakpoints which I have opened since codeblocks started (even closed ones!), and I have to open these projects, remove breakpoints, and the warnings are gone.

Simple example with 2 console application -projects both with one breakpoint.
Code
Building to ensure sources are up-to-date
Build succeeded
Selecting target: Debug
Adding source dir: C:\CodeBlocks\user\temp\test2\
Adding source dir: C:\CodeBlocks\user\temp\test2\
Adding file: .\test2.exe
Starting debugger: done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb 6.3
No source file named C:/CodeBlocks/user/temp/test/main.cpp.
Breakpoint 1 (C:/CodeBlocks/user/temp/test/main.cpp:5) pending.
At C:/CodeBlocks/user/temp/test2/main.cpp:5
Debugger finished with status 0

Title: Re: Debugging doesn't work any more.
Post by: Phatency on August 30, 2006, 07:39:17 pm
I still have these issues after clean-installing gcc 3.4.5 (with gdb 6.3.2). I also have one project in which breakpoints don't work at all, but I haven't found a way to recreate such project. No breakpoints seem to be cleaned after closing a project, so all breakpoints in closed files are still registered to gdb, resulting to "no source file named" errors.
Title: Re: Debugging doesn't work any more.
Post by: Phatency on September 02, 2006, 11:16:35 am
While no one seemed to be interested, I took a few screenshots. Is this really the intended behaviour?

Two console-applications with both one breakpoint:
http://phatency.loota.fi/img/ss/cb_bp.png

Closing the other console-application, re-debugging, breakpoint from the closed project is still listed:
http://phatency.loota.fi/img/ss/cb_bp2.png

edit:
submitted to BerliOS.
Title: Re: Debugging doesn't work any more.
Post by: killerbot on September 02, 2006, 11:38:35 am
we will get to the debugger, recently codecompletion got high attention.

Could you please file all these issus with attachments to the berlios project page, well the bug tracker that is.

many thanks.