Code::Blocks Forums

User forums => Help => Topic started by: nev4 on June 22, 2006, 10:59:07 pm

Title: How to debug
Post by: nev4 on June 22, 2006, 10:59:07 pm
I try to debug any code with c::b and i get only error: This project/target has no debugging information. Please change this in the Project's build options and retry... What i should to do? i have not set up anything yet.
Title: Re: How to debug
Post by: Michael on June 22, 2006, 11:04:02 pm
I try to debug any code with c::b and i get only error: This project/target has no debugging information. Please change this in the Project's build options and retry... What i should to do? i have not set up anything yet.

Hello,

You should give some further information as OS, C::B revision, compiler used, and so on.

Anyway, did you build with e.g., the -g flag (MinGW compiler)? See under Project-->Build options.

Best wishes,
Michael

PS.: You can search in the forum for useful thread/post :).
Title: Re: How to debug
Post by: nev4 on June 23, 2006, 04:28:33 pm
I'm using WINXP, codeblocks-1.0rc2_mingw.exe, GNU GCC compiler, now have turned on -g flag. Still have same effect. Also messages box has line like this; "No symbol table is loaded. Use the "file" command.".
(I hope to have something (debugging) like visual c++)

I have file dbg_x86_6.6.03.5.exe but i dont know how to use it C::B if it must be used. It's Debugging Tools for Windows. But I can't redirect this for debugger through Settings->Compiler->Proggrams->Debugger, even if I add additional path.
Title: Re: How to debug
Post by: Michael on June 23, 2006, 04:34:21 pm
I'm using WINXP, codeblocks-1.0rc2_mingw.exe, GNU GCC compiler, now have turned on -g flag. Still have same effect. Also messages box has line like this; "No symbol table is loaded. Use the "file" command.".
(I hope to have something (debugging) like visual c++)

I have file dbg_x86_6.6.03.5.exe but i dont know how to use it C::B if it must be used. It's Debugging Tools for Windows. But I can't redirect this for debugger through Settings->Compiler->Proggrams->Debugger, even if I add additional path.

Hello,

I would advice you to remove RC2 and download the latest nightly build. Download and install MinGW (installer 5.0.2, chose canditade) and gdb from www.mingw.org.

Best wishes,
Michael
Title: Re: How to debug
Post by: nev4 on June 23, 2006, 09:45:22 pm
All I have now are:

wxmsw26u_gcc_cb.dll (this should be nightly build)
gdb-6.5/...
MinGW/...

how should i put it into one piece? Because i have not knowledge in compilers and debuggers.
Title: Re: How to debug
Post by: Michael on June 23, 2006, 09:52:44 pm
gdb-6.5/...

gdb 6.5 :?? AFAIK the last gdb available for MinGW is 6.3.2.

how should i put it into one piece? Because i have not knowledge in compilers and debuggers.

On how to use a nightly build, have a look at here:

http://www.codeblocks.org/nightly/
http://forums.codeblocks.org/index.php?topic=3232.0

Best wishes,
Michael
Title: Re: How to debug
Post by: nev4 on June 25, 2006, 10:31:07 am
I have nightly build with all requirements, but on Hello World app i get this message:
Building to ensure sources are up-to-date
Build succeeded
Selecting target: default
Adding source dir: C:\Documents and Settings\nev4\Desktop\ore\testas\
Adding source dir: C:\Documents and Settings\nev4\Desktop\ore\testas\
Adding file: testas.exe
Starting debugger: done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
(no debugging symbols found)
Debugger name and version: GNU gdb 6.3

Program exited normally.
Debugger finished with status 0
Title: Re: How to debug
Post by: sethjackson on June 25, 2006, 04:10:21 pm
I have nightly build with all requirements, but on Hello World app i get this message:
Building to ensure sources are up-to-date
Build succeeded
Selecting target: default
Adding source dir: C:\Documents and Settings\nev4\Desktop\ore\testas\
Adding source dir: C:\Documents and Settings\nev4\Desktop\ore\testas\
Adding file: testas.exe
Starting debugger: done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
(no debugging symbols found)
Debugger name and version: GNU gdb 6.3

Program exited normally.
Debugger finished with status 0


(no debugging symbols found)

You need to enable Produce debugging symbols (-g option). :)
Title: Re: How to debug
Post by: nev4 on June 25, 2006, 08:11:17 pm
Finally it works. I have set it (-g), restarted C::B lots of times. But now as I restarted PC it finally works.