User forums > Help

A bug for Code::Blocks to work with CDB X64

<< < (2/4) > >>

geoffzou:
Under X86 setting


--- Code: ---[debug]Command-line: D:\QQDownload\software\Microsoft SDKs\Windows\8.0\Debuggers\x86\cdb.exe -G -lines -2 -y D:/QQDownload/software/HelloW/; -srcpath D:/QQDownload/software/HelloW/; D:/QQDownload/software/HelloW/bin/Debug/HelloW.exe
[debug]Working dir : D:\QQDownload\software\HelloW

Starting debugger: D:\QQDownload\software\Microsoft SDKs\Windows\8.0\Debuggers\x86\cdb.exe -G -lines -2 -y D:/QQDownload/software/HelloW/; -srcpath D:/QQDownload/software/HelloW/; D:/QQDownload/software/HelloW/bin/Debug/HelloW.exe
done
Setting breakpoints

[debug]Microsoft (R) Windows Debugger Version 6.2.9200.20512 X86
[debug]Copyright (c) Microsoft Corporation. All rights reserved.
[debug]CommandLine: D:/QQDownload/software/HelloW/bin/Debug/HelloW.exe
[debug]Symbol search path is: D:/QQDownload/software/HelloW/;D:\QQDownload\software\Win7Symbols;SRV*D:\QQDownload\software\Win7Symbols*http://msdl.microsoft.com/download/symbols
[debug]Executable search path is:
[debug]ModLoad: 00b70000 00bf2000   HelloW.exe
[debug]ModLoad: 77240000 773c0000   ntdll.dll
[debug]ModLoad: 74a40000 74b50000   C:\Windows\syswow64\kernel32.dll
[debug]ModLoad: 74c50000 74c97000   C:\Windows\syswow64\KERNELBASE.dll
[debug](118c.1b18): Break instruction exception - code 80000003 (first chance)
[debug]eax=00000000 ebx=00000000 ecx=0aba0000 edx=000fdd58 esi=fffffffe edi=00000000
[debug]eip=772e0fab esp=0036f934 ebp=0036f960 iopl=0         nv up ei pl zr na pe nc
[debug]cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
[debug]ntdll!LdrpDoDebuggerBreak+0x2c:
[debug]772e0fab cc              int     3
[debug]0:000>
[debug]> |.
[debug].  0 id: 118c create name: HelloW.exe
[debug]0:000>
[debug]> bc *
[debug]0:000>
[debug]> bu1 `D:/QQDownload/software/HelloW/main.cpp:21`
[debug]*** WARNING: Unable to verify checksum for HelloW.exe
[debug]0:000>

*** WARNING: Unable to verify checksum for HelloW.exe

[debug]> l+t
[debug]Source options are 1:
[debug]     1/t - Step/trace by source line
[debug]0:000>
[debug]> l+s
[debug]Source options are 5:
[debug]     1/t - Step/trace by source line
[debug]     4/s - List source code at prompt
[debug]0:000>
[debug]> l+o
[debug]Source options are d:
[debug]     1/t - Step/trace by source line
[debug]     4/s - List source code at prompt
[debug]     8/o - Only show source code at prompt
[debug]0:000>
[debug]> g
[debug]Breakpoint 1 hit
[debug]>   21:    testLoop();
[debug]0:000>
[debug]> k n

Breakpoint 1 hit

[debug] # ChildEBP RetAddr  
[debug]00 0036fd6c 00b9781d HelloW!main+0x39 [d:\qqdownload\software\hellow\main.cpp @ 21]
[debug]01 0036fdb4 74a533aa HelloW!__tmainCRTStartup+0xf2 [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 240]
[debug]02 0036fdc0 77279ef2 kernel32!BaseThreadInitThunk+0xe
[debug]03 0036fe00 77279ec5 ntdll!__RtlUserThreadStart+0x70
[debug]04 0036fe18 00000000 ntdll!_RtlUserThreadStart+0x1b
[debug]0:000>

At d:\qqdownload\software\hellow\main.cpp:21

[debug]> k n
[debug] # ChildEBP RetAddr  
[debug]00 0036fd6c 00b9781d HelloW!main+0x39 [d:\qqdownload\software\hellow\main.cpp @ 21]
[debug]01 0036fdb4 74a533aa HelloW!__tmainCRTStartup+0xf2 [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 240]
[debug]02 0036fdc0 77279ef2 kernel32!BaseThreadInitThunk+0xe
[debug]03 0036fe00 77279ec5 ntdll!__RtlUserThreadStart+0x70
[debug]04 0036fe18 00000000 ntdll!_RtlUserThreadStart+0x1b
[debug]0:000>
[debug]> k n
[debug] # ChildEBP RetAddr  
[debug]00 0036fd6c 00b9781d HelloW!main+0x39 [d:\qqdownload\software\hellow\main.cpp @ 21]
[debug]01 0036fdb4 74a533aa HelloW!__tmainCRTStartup+0xf2 [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 240]
[debug]02 0036fdc0 77279ef2 kernel32!BaseThreadInitThunk+0xe
[debug]03 0036fe00 77279ec5 ntdll!__RtlUserThreadStart+0x70
[debug]04 0036fe18 00000000 ntdll!_RtlUserThreadStart+0x1b
[debug]0:000>
[debug]> bu5 /1 `D:/QQDownload/software/HelloW/main.cpp:12`

Continuing...

[debug]0:000>
[debug]> g
[debug]Breakpoint 5 hit
[debug]>   12:         cout<<"i: "<<i<<' '<<var<<endl;
[debug]0:000>

Breakpoint 5 hit

[debug]> k n
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x2e [d:\qqdownload\software\hellow\main.cpp @ 12]
[debug]01 0036fd6c 00b9781d HelloW!main+0x3e [d:\qqdownload\software\hellow\main.cpp @ 23]
[debug]02 0036fdb4 74a533aa HelloW!__tmainCRTStartup+0xf2 [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 240]
[debug]03 0036fdc0 77279ef2 kernel32!BaseThreadInitThunk+0xe
[debug]04 0036fe00 77279ec5 ntdll!__RtlUserThreadStart+0x70
[debug]05 0036fe18 00000000 ntdll!_RtlUserThreadStart+0x1b
[debug]0:000>

At d:\qqdownload\software\hellow\main.cpp:12

[debug]> k n
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x2e [d:\qqdownload\software\hellow\main.cpp @ 12]
[debug]01 0036fd6c 00b9781d HelloW!main+0x3e [d:\qqdownload\software\hellow\main.cpp @ 23]
[debug]02 0036fdb4 74a533aa HelloW!__tmainCRTStartup+0xf2 [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 240]
[debug]03 0036fdc0 77279ef2 kernel32!BaseThreadInitThunk+0xe
[debug]04 0036fe00 77279ec5 ntdll!__RtlUserThreadStart+0x70
[debug]05 0036fe18 00000000 ntdll!_RtlUserThreadStart+0x1b
[debug]0:000>
[debug]> p
[debug]>   13:     }
[debug]0:000>
[debug]> k n 1
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x6d [d:\qqdownload\software\hellow\main.cpp @ 13]
[debug]0:000>

At d:\qqdownload\software\hellow\main.cpp:13

[debug]> k n
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x6d [d:\qqdownload\software\hellow\main.cpp @ 13]
[debug]01 0036fd6c 00b9781d HelloW!main+0x3e [d:\qqdownload\software\hellow\main.cpp @ 23]
[debug]02 0036fdb4 74a533aa HelloW!__tmainCRTStartup+0xf2 [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 240]
[debug]03 0036fdc0 77279ef2 kernel32!BaseThreadInitThunk+0xe
[debug]04 0036fe00 77279ec5 ntdll!__RtlUserThreadStart+0x70
[debug]05 0036fe18 00000000 ntdll!_RtlUserThreadStart+0x1b
[debug]0:000>
[debug]> p
[debug]>    8:     for(int i=0; i<100; i++)
[debug]0:000>
[debug]> k n 1
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x16 [d:\qqdownload\software\hellow\main.cpp @ 8]
[debug]0:000>

At d:\qqdownload\software\hellow\main.cpp:8

[debug]> k n
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x16 [d:\qqdownload\software\hellow\main.cpp @ 8]
[debug]01 0036fd6c 00b9781d HelloW!main+0x3e [d:\qqdownload\software\hellow\main.cpp @ 23]
[debug]02 0036fdb4 74a533aa HelloW!__tmainCRTStartup+0xf2 [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 240]
[debug]03 0036fdc0 77279ef2 kernel32!BaseThreadInitThunk+0xe
[debug]04 0036fe00 77279ec5 ntdll!__RtlUserThreadStart+0x70
[debug]05 0036fe18 00000000 ntdll!_RtlUserThreadStart+0x1b
[debug]0:000>
[debug]> p
[debug]>   10:         var += i;
[debug]0:000>
[debug]> k n 1
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x25 [d:\qqdownload\software\hellow\main.cpp @ 10]
[debug]0:000>

At d:\qqdownload\software\hellow\main.cpp:10

[debug]> k n
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x25 [d:\qqdownload\software\hellow\main.cpp @ 10]
[debug]01 0036fd6c 00b9781d HelloW!main+0x3e [d:\qqdownload\software\hellow\main.cpp @ 23]
[debug]02 0036fdb4 74a533aa HelloW!__tmainCRTStartup+0xf2 [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 240]
[debug]03 0036fdc0 77279ef2 kernel32!BaseThreadInitThunk+0xe
[debug]04 0036fe00 77279ec5 ntdll!__RtlUserThreadStart+0x70
[debug]05 0036fe18 00000000 ntdll!_RtlUserThreadStart+0x1b
[debug]0:000>
[debug]> p
[debug]>   12:         cout<<"i: "<<i<<' '<<var<<endl;
[debug]0:000>
[debug]> k n 1
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x2e [d:\qqdownload\software\hellow\main.cpp @ 12]
[debug]0:000>

At d:\qqdownload\software\hellow\main.cpp:12

[debug]> k n
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x2e [d:\qqdownload\software\hellow\main.cpp @ 12]
[debug]01 0036fd6c 00b9781d HelloW!main+0x3e [d:\qqdownload\software\hellow\main.cpp @ 23]
[debug]02 0036fdb4 74a533aa HelloW!__tmainCRTStartup+0xf2 [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 240]
[debug]03 0036fdc0 77279ef2 kernel32!BaseThreadInitThunk+0xe
[debug]04 0036fe00 77279ec5 ntdll!__RtlUserThreadStart+0x70
[debug]05 0036fe18 00000000 ntdll!_RtlUserThreadStart+0x1b
[debug]0:000>
[debug]> p
[debug]>   13:     }
[debug]0:000>
[debug]> k n 1
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x6d [d:\qqdownload\software\hellow\main.cpp @ 13]
[debug]0:000>

At d:\qqdownload\software\hellow\main.cpp:13

[debug]> k n
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x6d [d:\qqdownload\software\hellow\main.cpp @ 13]
[debug]01 0036fd6c 00b9781d HelloW!main+0x3e [d:\qqdownload\software\hellow\main.cpp @ 23]
[debug]02 0036fdb4 74a533aa HelloW!__tmainCRTStartup+0xf2 [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 240]
[debug]03 0036fdc0 77279ef2 kernel32!BaseThreadInitThunk+0xe
[debug]04 0036fe00 77279ec5 ntdll!__RtlUserThreadStart+0x70
[debug]05 0036fe18 00000000 ntdll!_RtlUserThreadStart+0x1b
[debug]0:000>
[debug]> p
[debug]>    8:     for(int i=0; i<100; i++)
[debug]0:000>
[debug]> k n 1
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x16 [d:\qqdownload\software\hellow\main.cpp @ 8]
[debug]0:000>

At d:\qqdownload\software\hellow\main.cpp:8

[debug]> k n
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x16 [d:\qqdownload\software\hellow\main.cpp @ 8]
[debug]01 0036fd6c 00b9781d HelloW!main+0x3e [d:\qqdownload\software\hellow\main.cpp @ 23]
[debug]02 0036fdb4 74a533aa HelloW!__tmainCRTStartup+0xf2 [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 240]
[debug]03 0036fdc0 77279ef2 kernel32!BaseThreadInitThunk+0xe
[debug]04 0036fe00 77279ec5 ntdll!__RtlUserThreadStart+0x70
[debug]05 0036fe18 00000000 ntdll!_RtlUserThreadStart+0x1b
[debug]0:000>
[debug]> p
[debug]>   10:         var += i;
[debug]0:000>
[debug]> k n 1
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x25 [d:\qqdownload\software\hellow\main.cpp @ 10]
[debug]0:000>

At d:\qqdownload\software\hellow\main.cpp:10

[debug]> k n
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x25 [d:\qqdownload\software\hellow\main.cpp @ 10]
[debug]01 0036fd6c 00b9781d HelloW!main+0x3e [d:\qqdownload\software\hellow\main.cpp @ 23]
[debug]02 0036fdb4 74a533aa HelloW!__tmainCRTStartup+0xf2 [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 240]
[debug]03 0036fdc0 77279ef2 kernel32!BaseThreadInitThunk+0xe
[debug]04 0036fe00 77279ec5 ntdll!__RtlUserThreadStart+0x70
[debug]05 0036fe18 00000000 ntdll!_RtlUserThreadStart+0x1b
[debug]0:000>
[debug]> p
[debug]>   12:         cout<<"i: "<<i<<' '<<var<<endl;
[debug]0:000>
[debug]> k n 1
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x2e [d:\qqdownload\software\hellow\main.cpp @ 12]
[debug]0:000>

At d:\qqdownload\software\hellow\main.cpp:12

[debug]> k n
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x2e [d:\qqdownload\software\hellow\main.cpp @ 12]
[debug]01 0036fd6c 00b9781d HelloW!main+0x3e [d:\qqdownload\software\hellow\main.cpp @ 23]
[debug]02 0036fdb4 74a533aa HelloW!__tmainCRTStartup+0xf2 [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 240]
[debug]03 0036fdc0 77279ef2 kernel32!BaseThreadInitThunk+0xe
[debug]04 0036fe00 77279ec5 ntdll!__RtlUserThreadStart+0x70
[debug]05 0036fe18 00000000 ntdll!_RtlUserThreadStart+0x1b
[debug]0:000>
[debug]> p
[debug]>   13:     }
[debug]0:000>
[debug]> k n 1
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x6d [d:\qqdownload\software\hellow\main.cpp @ 13]
[debug]0:000>

At d:\qqdownload\software\hellow\main.cpp:13

[debug]> k n
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x6d [d:\qqdownload\software\hellow\main.cpp @ 13]
[debug]01 0036fd6c 00b9781d HelloW!main+0x3e [d:\qqdownload\software\hellow\main.cpp @ 23]
[debug]02 0036fdb4 74a533aa HelloW!__tmainCRTStartup+0xf2 [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 240]
[debug]03 0036fdc0 77279ef2 kernel32!BaseThreadInitThunk+0xe
[debug]04 0036fe00 77279ec5 ntdll!__RtlUserThreadStart+0x70
[debug]05 0036fe18 00000000 ntdll!_RtlUserThreadStart+0x1b
[debug]0:000>
[debug]> p
[debug]>    8:     for(int i=0; i<100; i++)
[debug]0:000>
[debug]> k n 1
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x16 [d:\qqdownload\software\hellow\main.cpp @ 8]
[debug]0:000>

At d:\qqdownload\software\hellow\main.cpp:8

[debug]> k n
[debug] # ChildEBP RetAddr  
[debug]00 0036fd60 00b71aee HelloW!testLoop+0x16 [d:\qqdownload\software\hellow\main.cpp @ 8]
[debug]01 0036fd6c 00b9781d HelloW!main+0x3e [d:\qqdownload\software\hellow\main.cpp @ 23]
[debug]02 0036fdb4 74a533aa HelloW!__tmainCRTStartup+0xf2 [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 240]
[debug]03 0036fdc0 77279ef2 kernel32!BaseThreadInitThunk+0xe
[debug]04 0036fe00 77279ec5 ntdll!__RtlUserThreadStart+0x70
[debug]05 0036fe18 00000000 ntdll!_RtlUserThreadStart+0x1b
[debug]0:000>
[debug]> q
[debug]quit:

Debugger finished with status 0
--- End code ---

geoffzou:

--- Quote from: oBFusCATed on April 08, 2013, 12:14:46 am ---Settings -> Debugger -> Full log or something like this...

--- End quote ---

Here we go. X64 is the problem one, while X86 works fine. Thanks!

oBFusCATed:
Please edit your posts to and use [ code ] tags, to make them a bit more readable.

Edit:
It seems that the output from CDB is different.
I have no time to fix this but you can try to play with this (adjusting reg expressions here and there).
If you search for ChildEBP you probably find all the places, where the output is checked.

geoffzou:

--- Quote from: oBFusCATed on April 08, 2013, 12:54:26 am ---Please edit your posts to and use [ code ] tags, to make them a bit more readable.

Edit:
It seems that the output from CDB is different.
I have no time to fix this but you can try to play with this (adjusting reg expressions here and there).
If you search for ChildEBP you probably find all the places, where the output is checked.

--- End quote ---

I am simply a user. I don't know about the underlying mechanism of debugger at all. Okay, shame on me :( Can anyone kindly enough to look into it?

geoffzou:

--- Quote from: geoffzou on April 08, 2013, 03:31:24 am ---
--- Quote from: oBFusCATed on April 08, 2013, 12:54:26 am ---Please edit your posts to and use [ code ] tags, to make them a bit more readable.

Edit:
It seems that the output from CDB is different.
I have no time to fix this but you can try to play with this (adjusting reg expressions here and there).
If you search for ChildEBP you probably find all the places, where the output is checked.

--- End quote ---

I am simply a user. I don't know about the underlying mechanism of debugger at all. Okay, shame on me :( Can anyone kindly enough to look into it?

--- End quote ---

OK, I just can't give it a break. Considering I am new to the whole CB things, please give me more detailed advice on how to get it fixed. Where is the related source code located? How is it integrated with CB IDE. If I only want to look into the local piece of code, is it possible for me to rid compiling the whole code base from svn?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version