Author Topic: Debugger in windows can't work [SOLVED]  (Read 2752 times)

Offline Yuki

  • Single posting newcomer
  • *
  • Posts: 8
Debugger in windows can't work [SOLVED]
« on: March 20, 2007, 04:47:16 pm »
Hi . I'm new to use Code::Blocks .I just download the last nightly build of Code::Blocks and try .  but I found the debugger can't work . I just simply create a console project and add a breakpoint . when I choose debug->start . it can't work and give me some messages :

Building to ensure sources are up-to-date
Build succeeded
Selecting target: Debug
Adding source dir: D:\Documents and Settings\aa\My Documents\xx\
Adding source dir: D:\Documents and Settings\aa\My Documents\xx\
Adding file: bin\Debug\xx.exe
Starting debugger: done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger finished with status 1

My compiler is mingw gcc . OS is winxp with sp2 . the debugger works well when I use Code::Block 1.0rc2. please help me.

Thanks
« Last Edit: March 21, 2007, 06:53:14 am by Yuki »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5243
Re: Debugger in windows can't work
« Reply #1 on: March 20, 2007, 09:16:29 pm »
try new nightly build, a serious debug issue got recently fixed.
Make sure you have the -g (debugging symbols) on in your project settings.

Offline Yuki

  • Single posting newcomer
  • *
  • Posts: 8
Re: Debugger in windows can't work
« Reply #2 on: March 21, 2007, 05:24:37 am »
Thank you . But I have tried the latest nightly build (19 March 2007 :3730) . The debugger still has the same problem.It couldn't work.The debug mode has -g (produce debugging symbols) option in default settings.
And I try msvc toolkit 2003 .(I use the msvc 2003.net instead of the toolkit version).And the compiler works. But when I try to debug the program.It can't work :

Building to ensure sources are up-to-date
Build succeeded
Selecting target: Debug
Adding source dir: D:\Documents and Settings\aa\My Documents\xxx\
Adding source dir: D:\Documents and Settings\aa\My Documents\xxx\
Adding file: bin\Debug\xxx.exe
Starting debugger: done
Setting breakpoints
Microsoft (R) Windows Debugger  Version 6.4.0007.2
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine: bin/Debug/xxx.exe
Symbol search path is: D:/DOCUME~1/aa/MYDOCU~1/xxx/
Executable search path is:
ModLoad: 00400000 0043b000   xxx.exe
ModLoad: 7c920000 7c9b4000   ntdll.dll
ModLoad: 7c800000 7c91c000   D:\WINDOWS\system32\kernel32.dll
(2f8.3ac): Break instruction exception - code 80000003 (first chance)
eax=00251eb4 ebx=7ffdd000 ecx=00000001 edx=00000002 esi=00251f48 edi=00251eb4
eip=7c921230 esp=0013fb20 ebp=0013fc94 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntdll.dll -
ntdll!DbgBreakPoint:
7c921230 cc               int     3
*** WARNING: Unable to verify checksum for xxx.exe
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for D:\WINDOWS\system32\kernel32.dll -
Debugger finished with status 0


Offline Yuki

  • Single posting newcomer
  • *
  • Posts: 8
Re: Debugger in windows can't work
« Reply #3 on: March 21, 2007, 06:27:58 am »
Sorry . I have solved the problem . I download the newest mingw and gdb . and it works . I have tried the cygwin . and it works too . I'm really sorry.

My gcc and gdb version which has problems
gcc version 3.4.2 (mingw-special)
GNU gdb 5.1.1 (mingw experimental)

but msvc 2003 debugger can't work (May be I use msvc 2003.net instead of the toolkit version)

Thank you .