User forums > Help

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

(1/4) > >>

geoffzou:
CB ver: 12.11, rev. 8629
OS: Win 7 x64
Win SDK 7.1 & 8, both x64
Compiler: extracted from MS VS Express 2012

After days of fiddling around, here is my problem:

CB's debugger now works perfectly with MinGW32, MinGW64, MS VC++ Express 2012 32-bit.

When I switch all settings to VC++ Express 64 bit, including the 64-bit cdb, all the buttons, e.g., "Debug/Continue", "Run to Cursor", "Next Line" still works, and console outputs as expected.

However, the only problem is that the yellow pointer showing which line the program stops at on the left margin is gone. By saying gone, I mean it doesn't show up at all. Callstack view has nothing in it either. It makes debugging actually impossible in this setting, as we will for sure lose track of where we are after several steps' tracing.

I'm new to this forum and to Code::Blocks. Since I failed to find any solution for this issue for some time, I assume this problem is unsolved. I haven't figure out how to effectively submit this bug to development team. If this concerns anyone other than me here, please help. Thanks!
 

oBFusCATed:
Can you post full debug log (make sure you enable it) from debug sessions with both cdb 32 and 64 bit, so we can see what are the differences.
Please try to follow the same steps for both sessions.

Also have you tried the plugin developed in this topic: http://forums.codeblocks.org/index.php?topic=16885.0 ?

geoffzou:

--- Quote from: oBFusCATed on April 07, 2013, 11:33:11 pm ---Can you post full debug log (make sure you enable it) from debug sessions with both cdb 32 and 64 bit, so we can see what are the differences.
Please try to follow the same steps for both sessions.

Also have you tried the plugin developed in this topic: http://forums.codeblocks.org/index.php?topic=16885.0 ?

--- End quote ---

This must be a naive question. How do I enable debug log for CB?

oBFusCATed:
Settings -> Debugger -> Full log or something like this...

geoffzou:
Under X64 setting


--- Code: ---[debug]Command-line: D:\QQDownload\software\Microsoft SDKs\Windows\8.0\Debuggers\x64\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\x64\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 AMD64
[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: 00000001`3f170000 00000001`3f21b000   HelloW.exe
[debug]ModLoad: 00000000`77060000 00000000`77209000   ntdll.dll
[debug]ModLoad: 00000000`76ad0000 00000000`76bef000   C:\Windows\system32\kernel32.dll
[debug]ModLoad: 000007fe`fcb00000 000007fe`fcb6b000   C:\Windows\system32\KERNELBASE.dll
[debug](fc8.e98): Break instruction exception - code 80000003 (first chance)
[debug]ntdll!LdrpDoDebuggerBreak+0x30:
[debug]00000000`7710cb60 cc              int     3
[debug]0:000>
[debug]> |.
[debug].  0 id: fc8 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] # Child-SP          RetAddr           Call Site
[debug]00 00000000`0015fd50 00000001`3f1aa2f6 HelloW!main+0x42 [d:\qqdownload\software\hellow\main.cpp @ 21]
[debug]01 00000000`0015fd90 00000000`76ae652d HelloW!__tmainCRTStartup+0x136 [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crt0.c @ 240]
[debug]02 00000000`0015fdd0 00000000`7708c521 kernel32!BaseThreadInitThunk+0xd
[debug]03 00000000`0015fe00 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
[debug]0:000>
[debug]> k n
[debug] # Child-SP          RetAddr           Call Site
[debug]00 00000000`0015fd50 00000001`3f1aa2f6 HelloW!main+0x42 [d:\qqdownload\software\hellow\main.cpp @ 21]
[debug]01 00000000`0015fd90 00000000`76ae652d HelloW!__tmainCRTStartup+0x136 [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crt0.c @ 240]
[debug]02 00000000`0015fdd0 00000000`7708c521 kernel32!BaseThreadInitThunk+0xd
[debug]03 00000000`0015fe00 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
[debug]0:000>
[debug]> bu4 /1 `D:/QQDownload/software/HelloW/main.cpp:12`

Continuing...

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

Breakpoint 4 hit

[debug]> k n
[debug] # Child-SP          RetAddr           Call Site
[debug]00 00000000`0015fd10 00000001`3f171b07 HelloW!testLoop+0x37 [d:\qqdownload\software\hellow\main.cpp @ 12]
[debug]01 00000000`0015fd50 00000001`3f1aa2f6 HelloW!main+0x47 [d:\qqdownload\software\hellow\main.cpp @ 23]
[debug]02 00000000`0015fd90 00000000`76ae652d HelloW!__tmainCRTStartup+0x136 [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crt0.c @ 240]
[debug]03 00000000`0015fdd0 00000000`7708c521 kernel32!BaseThreadInitThunk+0xd
[debug]04 00000000`0015fe00 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
[debug]0:000>
[debug]> p
[debug]>   13:     }
[debug]0:000>
[debug]> k n 1
[debug] # Child-SP          RetAddr           Call Site
[debug]00 00000000`0015fd10 00000001`3f171b07 HelloW!testLoop+0x7b [d:\qqdownload\software\hellow\main.cpp @ 13]
[debug]0:000>
[debug]> p
[debug]>    8:     for(int i=0; i<100; i++)
[debug]0:000>
[debug]> k n 1
[debug] # Child-SP          RetAddr           Call Site
[debug]00 00000000`0015fd10 00000001`3f171b07 HelloW!testLoop+0x16 [d:\qqdownload\software\hellow\main.cpp @ 8]
[debug]0:000>
[debug]> p
[debug]>   10:         var += i;
[debug]0:000>
[debug]> k n 1
[debug] # Child-SP          RetAddr           Call Site
[debug]00 00000000`0015fd10 00000001`3f171b07 HelloW!testLoop+0x27 [d:\qqdownload\software\hellow\main.cpp @ 10]
[debug]0:000>
[debug]> p
[debug]>   12:         cout<<"i: "<<i<<' '<<var<<endl;
[debug]0:000>
[debug]> k n 1
[debug] # Child-SP          RetAddr           Call Site
[debug]00 00000000`0015fd10 00000001`3f171b07 HelloW!testLoop+0x37 [d:\qqdownload\software\hellow\main.cpp @ 12]
[debug]0:000>
[debug]> p
[debug]>   13:     }
[debug]0:000>
[debug]> k n 1
[debug] # Child-SP          RetAddr           Call Site
[debug]00 00000000`0015fd10 00000001`3f171b07 HelloW!testLoop+0x7b [d:\qqdownload\software\hellow\main.cpp @ 13]
[debug]0:000>
[debug]> p
[debug]>    8:     for(int i=0; i<100; i++)
[debug]0:000>
[debug]> k n 1
[debug] # Child-SP          RetAddr           Call Site
[debug]00 00000000`0015fd10 00000001`3f171b07 HelloW!testLoop+0x16 [d:\qqdownload\software\hellow\main.cpp @ 8]
[debug]0:000>
[debug]> p
[debug]>   10:         var += i;
[debug]0:000>
[debug]> k n 1
[debug] # Child-SP          RetAddr           Call Site
[debug]00 00000000`0015fd10 00000001`3f171b07 HelloW!testLoop+0x27 [d:\qqdownload\software\hellow\main.cpp @ 10]
[debug]0:000>
[debug]> p
[debug]>   12:         cout<<"i: "<<i<<' '<<var<<endl;
[debug]0:000>
[debug]> k n 1
[debug] # Child-SP          RetAddr           Call Site
[debug]00 00000000`0015fd10 00000001`3f171b07 HelloW!testLoop+0x37 [d:\qqdownload\software\hellow\main.cpp @ 12]
[debug]0:000>
[debug]> p
[debug]>   13:     }
[debug]0:000>
[debug]> k n 1
[debug] # Child-SP          RetAddr           Call Site
[debug]00 00000000`0015fd10 00000001`3f171b07 HelloW!testLoop+0x7b [d:\qqdownload\software\hellow\main.cpp @ 13]
[debug]0:000>
[debug]> p
[debug]>    8:     for(int i=0; i<100; i++)
[debug]0:000>
[debug]> k n 1
[debug] # Child-SP          RetAddr           Call Site
[debug]00 00000000`0015fd10 00000001`3f171b07 HelloW!testLoop+0x16 [d:\qqdownload\software\hellow\main.cpp @ 8]
[debug]0:000>
[debug]> q
[debug]quit:

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

Navigation

[0] Message Index

[#] Next page

Go to full version