Author Topic: Debugging  (Read 12244 times)

Offline cborders

  • Multiple posting newcomer
  • *
  • Posts: 14
Debugging
« on: December 13, 2005, 06:40:01 pm »
I just downloaded CodeBlocks and I am using it to develop with Ogre using the Windows SDK and the VS2003 compiler.  I tried to debug my application and it tool me that the debug path was not set in the preferences.  So I tried to set it, but didn't know what it should point to.  What should I put in that box?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Debugging
« Reply #1 on: December 13, 2005, 06:54:56 pm »
First of all, what version of C::B are you using?
Be patient!
This bug will be fixed soon...

Offline cborders

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Debugging
« Reply #2 on: December 13, 2005, 06:58:51 pm »
Sorry about that!  I am using C::B 1.0 rc2

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Debugging
« Reply #3 on: December 13, 2005, 07:04:07 pm »
Well, debugger support for MSVC Toolkit has been recently added in SVN. This means you would either have to build HEAD yourself (check the wiki) or use one of the prebuilt HEAD snapshots (this for example).
« Last Edit: December 13, 2005, 08:02:53 pm by mandrav »
Be patient!
This bug will be fixed soon...

Offline cborders

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Debugging
« Reply #4 on: December 13, 2005, 07:08:36 pm »
Awesome!  Thank you!

takeshimiya

  • Guest
Re: Debugging
« Reply #5 on: December 13, 2005, 07:15:08 pm »
Cideblocks :lol:

Probably http://wiki.codeblocks.org/ will work better. :P

Offline cborders

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Debugging
« Reply #6 on: January 17, 2006, 05:38:23 pm »
Ok, I am still trying to get this working.  I downloaded the prebuild SVN-HEAD and installed it, reset all of my includes and linker paths butb now my app runs fin under the Release build, but crashes under the Debug build.  I tried to debug the app, which is why I started this process and I got this error:

So I try to set it up, but it's already set:

So I think, what in the world is going on!  It looks like it's already set up! So I click on the browse button and find that cbd.exe doesn't exist!

 :shock:  I know that I'm probably doing something wrong so what should I do now?

Offline Frank3000

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Debugging
« Reply #7 on: January 17, 2006, 06:43:13 pm »
Hi,
you have to install the Debugging Tools for Windows.
http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx
And add the installation path to: Compiler Settings->Programs->Additional Paths

Frank

« Last Edit: January 17, 2006, 06:55:17 pm by Frank3000 »
Klingon multitasking systems do not support 'time-sharing'. When a Klingon program wants to run,
it challenges the scheduler in hand-to-hand combat and owns the machine.

Offline cborders

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Debugging
« Reply #8 on: January 17, 2006, 07:13:50 pm »
I just downloaded it and installed it.  Then under Settings->Compiler->Programs->Additional Paths I added the path to where it installed and now when I build the debug version I get a lot of linker warnings.
Code
-------------- Build: Debug in BSP_Test ---------------
main.cpp
Linking console executable: Debug\BSP.exe
LINK : LNK6004: Debug\BSP.exe not found or not built by the last incremental link; performing full link
LIBC.lib(fp8.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(wincrt0.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(wincmdln.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(stdenvp.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(stdargv.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(crt0msg.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(crt0init.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(crt0fp.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(crt0dat.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(winxfltr.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(winsig.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(convrtcp.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(onexit.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(nlsdata2.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(nlsdata1.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(ctype.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(crtmbox.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(cmiscdat.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(abort.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(a_str.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(a_map.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(a_env.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(secfail.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(seccook.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(seccinit.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(secchk.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(loadcfg.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(mbctype.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(ismbspc.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(ismbbyte.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(ioinit.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(_newmode.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(handler.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(sbheap.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(realloc.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(msize.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(malloc.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(heapinit.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(free.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(calloc.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(resetstk.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(tolower.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(isctype.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(atox.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(_fptostr.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
« Last Edit: January 17, 2006, 08:11:49 pm by cborders »

Offline cborders

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Debugging
« Reply #9 on: January 17, 2006, 08:11:56 pm »
Ok, I had to download the .NET 1.1 SDK to get the libc.pdb file!  :x
Now it compiles with no warnings, but it still won't run with the debug build.  It runs fine with the Release build so I am not sure what the issue could be.  If someone needs more info please ask and I'll let you know, I just want to get this working!

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Debugging
« Reply #10 on: January 17, 2006, 08:26:29 pm »
Ok, I had to download the .NET 1.1 SDK to get the libc.pdb file!  :x
Now it compiles with no warnings, but it still won't run with the debug build.  It runs fine with the Release build so I am not sure what the issue could be.  If someone needs more info please ask and I'll let you know, I just want to get this working!

Now, I don't quite understand the question: is it a problem with C::B's debugger or a bug in your program?
Be patient!
This bug will be fixed soon...

Offline cborders

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Debugging
« Reply #11 on: January 17, 2006, 08:34:35 pm »
I don't know!  I am creating an app using Ogre and I'm not sure if it's something that I'm doing wrong with my setup in Code::Blocks or something that's going wrong with my code so I posted the situation on both forums to see if anyone could tell me for certain where the issue is.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Debugging
« Reply #12 on: January 17, 2006, 08:48:57 pm »
Have you tried debugging your program? Does the debugger work? If it does, then please just say so because this topic is about the debugger...
Be patient!
This bug will be fixed soon...

Offline cborders

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Debugging
« Reply #13 on: January 17, 2006, 09:02:30 pm »
The debugger wasn't getting to my break point so I moved the break point to the very first line of the constructor and found out that it does in fact work.  It must be an error on the Ogre side, so I'll go hide over there.