News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

How to set "Symbol search path" for CB 10.05 with windbg

Started by pinfutech, September 15, 2012, 08:58:23 AM

Previous topic - Next topic

pinfutech

as described below, the default path is the project path [F:\MyTemp\HelloWorld],
how can I set the symbol search path to the executable path [F:\MyTemp\HelloWorld\bin\Debug]
Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: F:\MyTemp\HelloWorld\
Adding source dir: F:\MyTemp\HelloWorld\
Adding file: bin\Debug\HelloWorld.exe
Starting debugger:
done
Setting breakpoints
Microsoft (R) Windows Debugger  Version 6.7.0005.0
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine: bin/Debug/HelloWorld.exe
Symbol search path is: F:/MyTemp/HelloWorld/;SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
Executable search path is:
ModLoad: 00400000 00407000   HelloWorld.exe
ModLoad: 7c920000 7c9b6000   ntdll.dll
ModLoad: 7c800000 7c91e000   C:\WINDOWS\system32\kernel32.dll
ModLoad: 10200000 1026c000   C:\WINDOWS\system32\MSVCRTD.dll
ModLoad: 10000000 100ca000   D:\home\bin\stlportd.5.2.dll
(15e8.e8c): Break instruction exception - code 80000003 (first chance)
eax=00241eb4 ebx=7ffd9000 ecx=00000000 edx=00000001 esi=00241f48 edi=00241eb4
eip=7c92120e esp=0012fb20 ebp=0012fc94 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202
ntdll!DbgBreakPoint:
7c92120e cc              int     3
*** WARNING: Unable to verify checksum for HelloWorld.exe
Breakpoint 1 hit
At F:/MyTemp/HelloWorld/HelloWorld.cpp:8
Continuing...
Debugger finished with status 0

oBFusCATed

1. Read the help of CDB for the correct command (CB doesn't use windbg)
2. Install a nightly build (this is optional, but recommended)
3. Put the command in the initial commands of the debugger
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

pinfutech

I'm using CB for first time, I use Visual Studio series for a long time.

What I confused is the hint message followed:
*** WARNING: Unable to verify checksum for HelloWorld.exe
now I know what happened.
No breakpoint, no the warning message, but if breakpoint set, the warning message is shown.
This is not errno, but is confusing.

cdb is a executable file in windbg package, CB call it silently.
As a newbie, I didn't know cdb and windbg, just download windbg package follow some guide by google.

Thanks for the reply.

oBFusCATed

Can I ask you why are you trying to use visual c++ with c::b?
If it is not a project requirement you'll have better success with mingw gcc + gdb,
because they work better inside c::b, especially the debugger as cdb is not meant for integration in other IDEs.
This is why we have pretty limited support for debugging vc++ executables.

Also if you want to use cdb or the debugger as a whole upgrading to a nightly build is highly recommended as there are many improvements and bug fixes.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

pinfutech

I develop cross-platform programs for Windows and Linux.
Not use mingw + gcc + gdb, just for performance consideration, and the other one, is I'm used to use Visual Studio 2003+.
Encapsulating lower level APIs, debug in Visual Studio IDE, and not so much code need edit under Linux, I use gcc+gdb under Linux.
Use CB, because some hardware provide VC6-based SDK and source, and I want to use a light-weight IDE for some develop machine.