Home » Category » Microsoft Visual C & C++

Microsoft Visual C & C++: dbghelp does not work properly on Windows XP

200| Wed, 30 Apr 2008 14:06:00 GMT| sergey_v| Comments (9)
Hi Everyone,

after upgrade to Windows XP recenty i've noticed that dbghelp does not show
symbols from the process, but only symbols dowloaded from MS.

After some investigation i've found that all MS-provided *.pdb symbols are
in "Microsoft C/C++ MSF 7.00" format whereas Visual Studio 6.0 generates
them in "Microsoft C/C++ program database 2.00" format.

Placing dbghelp.dll from Win2k to program folder solves the problem, but is
there any way to make this work on standard XP?
How can i produce "Microsoft C/C++ MSF 7.00" pdb file with C++ 6.0?

Regards, Sergey.

Keywords & Tags: dbghelp, work, properly, windows xp, microsoft, visual c++, vc

URL: http://www.7prog.com/visual-c-c++/80510/
 
«« Prev - Next »» 9 helpful answers below.

> after upgrade to Windows XP recenty i've noticed that dbghelp does not sho
w
> symbols from the process, but only symbols dowloaded from MS.
> After some investigation i've found that all MS-provided *.pdb symbols are
> in "Microsoft C/C++ MSF 7.00" format whereas Visual Studio 6.0 generates
> them in "Microsoft C/C++ program database 2.00" format.
> Placing dbghelp.dll from Win2k to program folder solves the problem, but i
s
> there any way to make this work on standard XP?


Better use redistributable DbgHelp.dll that comes with Debugging Tools for W
indows:
http://www.microsoft.com/whdc/ddk/d...ng/default.mspx

(the latest .H, .LIB and help files are also there, if you choose custom set
up
and install SDK)

> How can i produce "Microsoft C/C++ MSF 7.00" pdb file with C++ 6.0?
>


It is not possible, but it is not needed, because DbgHelp can read both form
ats.

You can use SymSetOptions function to set SYMOPT_DEBUG option
to receive debug messages from DbgHelp, they usually can help to find out
why symbols are not loaded.

You can also take a look at examples here:
http://www.debuginfo.com/examples/dbghelpexamples.html

Regards,
Oleg

oleg_starodumov | Wed, 30 Apr 2008 14:07:00 GMT |

Thanks, for support. But it looks like i still do not get execatly what i
want - have working environment on WinXP without additional modification of
client config and additional redistributables.


>Better use redistributable DbgHelp.dll that comes with Debugging Tools for
>Windows:
> http://www.microsoft.com/whdc/ddk/d...ng/default.mspx


Yes, this version works perfectly well (the one from Win2K too), but my
customer does realy not want to redistirubute anything beacuse of possible
licensing problems (even if someone says its freeware and so on ...).


>You can use SymSetOptions function to set SYMOPT_DEBUG


Good option, but the version of DbgHelp.dll that comes with _Windows XP_
simply ignores it and provides absolutelly __NO__ debug output. Damn these
microsofts with their enhancments.

Thanks.

sergeyv | Wed, 30 Apr 2008 14:08:00 GMT |

You can post a minimal example that reproduces the problem,
so that it is possible to see what exactly fails and how.
Oleg

oleg_starodumov | Wed, 30 Apr 2008 14:09:00 GMT |

Hi,

I think there is no solution for that problem except redisitributing 'good'
dbghelp.dll. Some more info

FAILURE: at SymGetSymFromAddr() with GetLastError() = 0x000001e7 Attempt to
access invalid address.

Sample output (note failure for both ProxySvc.exe and MSVCRTD.dll - both
have .pdb in "Microsoft C/C++ program database 2.00" format)

ThreadID: 0x026c
0x7c90eb94 KiFastSystemCallRet() + 0x0, ntdll.dll
Prms: 0x7c8023ed, 0x00000000, 0x00f6fe20, 0x00f6feb4
0x7c90d85c NtDelayExecution() + 0xc, ntdll.dll
Prms: 0x00000000, 0x00f6fe20, 0x00f6feb4, 0x00f6fe64
0x7c8023ed SleepEx() + 0x61, kernel32.dll
Prms: 0x00000064, 0x00000000, 0x00f6feb4, 0x0049a35e
0x7c802451 Sleep() + 0xf, kernel32.dll
Prms: 0x00000064, 0x00f6ff18, 0x00f6fec0, 0x00c92570
0x0049a35e --, ProxySvc.exe
Prms: 0x000000c8, 0x00f6ff7c, 0x00f6ff20, 0x00c92570
0x00454f39 --, ProxySvc.exe
Prms: 0x0012f558, 0x5f82d8af, 0x00c92570, 0xcccccccc
0x0049a3d0 --, ProxySvc.exe
Prms: 0x004f259c, 0x0012f558, 0x5f82d8af, 0x00c92570
0x1020bda7 --, MSVCRTD.dll
Prms: 0x00c92570, 0x0012f558, 0x5f82d8af, 0x00c92570
0x7c80b50b BaseThreadStart() + 0x37, kernel32.dll
Prms: 0x1020bd00, 0x00c92570, 0x00000000, 0x000000c8

Base File Name File Time Version
Description Location
----
----
0x59a60000-0x59ce4000 dbghelp.dll 23/08/2001 13:00:00 5.1.2600.2180
(x Windows Image Helper C:\WINXP\system32

Works correctly with the version available in latest debugging tools for
windows:

ThreadID: 0x1700
0x7c90eb94 KiFastSystemCallRet() + 0x0, ntdll.dll
Prms: 0x7c8023ed, 0x00000000, 0x00f6fe20, 0x00f6feb4
0x7c90d85c NtDelayExecution() + 0xc, ntdll.dll
Prms: 0x00000000, 0x00f6fe20, 0x00f6feb4, 0x00f6fe64
0x7c8023ed SleepEx() + 0x61, kernel32.dll
Prms: 0x00000064, 0x00000000, 0x00f6feb4, 0x0049a37e
0x7c802451 Sleep() + 0xf, kernel32.dll
Prms: 0x00000064, 0x00f6ff18, 0x00f6fec0, 0x00c92570
0x0049a37e IRunable::Sleep(), threadTools.cpp:129, ProxySvc.exe
Prms: 0x00000064, 0x00f6ff7c, 0x00f6ff20, 0x00c92570
0x00454f59 CMain::CManager::run(), Main.cpp:281, ProxySvc.exe
Prms: 0x0012f558, 0x5f82d8af, 0x00c92570, 0xcccccccc
0x0049a3f0 IRunable::staticRun(), threadTools.cpp:140, ProxySvc.exe
Prms: 0x004f259c, 0x0012f558, 0x5f82d8af, 0x00c92570
0x1020bda7 _threadstart(), thread.c:187, MSVCRTD.dll
Prms: 0x00c92570, 0x0012f558, 0x5f82d8af, 0x00c92570
0x7c80b50b BaseThreadStart() + 0x37, kernel32.dll
Prms: 0x1020bd00, 0x00c92570, 0x00000000, 0x000000c8

Base File Name File Time Version
Description Location
----
----
0x03000000-0x0342c000 dbghelp.dll 10/01/2005 12:53:44 6.4.0007.1
(vbl_ Windows Image Helper <skipped>

"Oleg Starodumov" <com-dot-debuginfo-at-oleg> wrote in message
news:ebemICVBFHA.4004...tk2msftngp13.phx.gbl...
> You can post a minimal example that reproduces the problem,
> so that it is possible to see what exactly fails and how.
> --
> Oleg
>
>

sergeyv | Wed, 30 Apr 2008 14:10:00 GMT |

I would suspect that symbols cannot be found.

How do you load symbols for the application?
Where are the symbol files stored?

Oleg

oleg_starodumov | Wed, 30 Apr 2008 14:11:00 GMT |

The XP version of dbghelp does support SYMOPT_DEBUG so I think it is
possilble that something is not set up correctly. Also, maybe your customer
does not care about this, but dbghelp is fully redistributable and free.
There is no problem distributing it. It is not wise to expect the target OS
to always have a copy of dbghelp that will answer his needs. That is why it
a smart thing to make sure he has one that is up to date and to ship with
it.

.pat styles (microsoft)

"sergey v" <sergey-v...mail.ru> wrote in message
news:uLVkh4UBFHA.2572...tk2msftngp13.phx.gbl...
> Thanks, for support. But it looks like i still do not get execatly what i
> want - have working environment on WinXP without additional modification
> of client config and additional redistributables.
>
> Yes, this version works perfectly well (the one from Win2K too), but my
> customer does realy not want to redistirubute anything beacuse of possible
> licensing problems (even if someone says its freeware and so on ...).
>
> Good option, but the version of DbgHelp.dll that comes with _Windows XP_
> simply ignores it and provides absolutelly __NO__ debug output. Damn these
> microsofts with their enhancments.
>
> Thanks.
>

patstyles | Wed, 30 Apr 2008 14:12:00 GMT |

The difference between 2 cases (successful and not successful) is only
version of dbghelp.dll. No changes in code or executable/pdb files
placement.

"Oleg Starodumov" <com-dot-debuginfo-at-oleg> wrote in message
news:%23uoL3G6BFHA.608...TK2MSFTNGP15.phx.gbl...
> I would suspect that symbols cannot be found.
> How do you load symbols for the application?
> Where are the symbol files stored?
> Oleg
>
>

sergeyv | Wed, 30 Apr 2008 14:13:00 GMT |

There were changes in the way symbol paths are handled between W2K and
WinXP. If you handle CBA_DEBUG_INFO in your SymbolCallbackFunction with
SYMOPT_DEBUG turned on, you should be able to monitor where it is lookiing
for files. Compare the two. I think this spew option was available on W2K.
I'm not completely sure. It's been many years since I worked on it.

.pat styles (microsoft)

"sergey v" <sergey-v...mail.ru> wrote in message
news:OAh1JhICFHA.2180...TK2MSFTNGP10.phx.gbl...
> The difference between 2 cases (successful and not successful) is only
> version of dbghelp.dll. No changes in code or executable/pdb files
> placement.
> "Oleg Starodumov" <com-dot-debuginfo-at-oleg> wrote in message
> news:%23uoL3G6BFHA.608...TK2MSFTNGP15.phx.gbl...
>

patstyles | Wed, 30 Apr 2008 14:14:00 GMT |

Recently started my old application and it happend to prepare process dump
with all symbols resoved (with standard XP dbghelp),

The only difference is that winxp dbghelp does not like SYMOPT_EXACT_SYMBOLS
option (i though i tried testing without it before).

"sergey v" <sergey-v...mail.ru> wrote in message
news:u4CLWLUBFHA.3596...TK2MSFTNGP12.phx.gbl...
> Hi Everyone,
> after upgrade to Windows XP recenty i've noticed that dbghelp does not
> show symbols from the process, but only symbols dowloaded from MS.
> After some investigation i've found that all MS-provided *.pdb symbols are
> in "Microsoft C/C++ MSF 7.00" format whereas Visual Studio 6.0 generates
> them in "Microsoft C/C++ program database 2.00" format.
> Placing dbghelp.dll from Win2k to program folder solves the problem, but
> is there any way to make this work on standard XP?
> How can i produce "Microsoft C/C++ MSF 7.00" pdb file with C++ 6.0?
> Regards, Sergey.
>

sergeyv | Wed, 30 Apr 2008 14:15:00 GMT |

Microsoft Visual C & C++ Hot Answers

Microsoft Visual C & C++ New questions

Microsoft Visual C & C++ Related Categories