Home Dashboard Directory Help
Search

IDiaEnumSymbolsByAddr::Next doesn't return huge PDB by Makoto Kato


Status: 

Closed
 as Fixed Help for as Fixed


3
0
Sign in
to vote
Type: Bug
ID: 722366
Opened: 2/1/2012 8:28:49 PM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

We want to dump symbols of PDB file using DIA SDK. But IDiaEnumSymbolsByAddr::Next don't return using huge x64 PDB file.

- Env
VS2008 SP1 and VS2010SP1

- Stack
0:002> ~0k
ChildEBP RetAddr
0044f99c 6845e12d msdia100!bsearch+0x46
0044f9e4 68466a46 msdia100!ModCache::blockByAddr+0x4d
0044fa20 6846695d msdia100!CFuncByAddrTrav::find+0x56
0044fa50 68466ec4 msdia100!CModSymsByAddrTrav::FInit+0x12d
0044fa58 684673f0 msdia100!CBlockByAddrTrav::next+0x14
0044fcec 68467936 msdia100!CGlobalDataByAddrTrav::get+0x100
0044fdbc 68467bd8 msdia100!CAllSymsByAddrTrav::getEnclosingSymbol+0x186
0044fe1c 68467ca6 msdia100!CAllSymsByAddrTrav::findNextAddress+0x178
0044fe3c 68467d62 msdia100!CAllSymsByAddrTrav::next+0x16
0044fe5c 6844103a msdia100!CAllSymsByAddrTrav::next+0x42
0044fe74 00201303 msdia100!CDiaEnumSymbolsByAddr::Next+0x4a
0044febc 00201362 dia_bug!printFunction+0x193
0044fec8 00201b78 dia_bug!wmain+0x22
0044ff10 75e8f13c dia_bug!__tmainCRTStartup+0x10b
0044ff1c 773ad819 kernel32!BaseThreadInitThunk+0xe
0044ff5c 773ada2b ntdll!__RtlUserThreadStart+0x23
0044ff74 00000000 ntdll!_RtlUserThreadStart+0x1b

- Sample code
bool printFunction(LPCWSTR pszPdbFile)
{
CComPtr<IDiaDataSource> data_source;
if (FAILED(data_source.CoCreateInstance(CLSID_DiaSource)))
    return false;

if (FAILED(data_source->loadDataFromPdb(pszPdbFile)))
    return false;

CComPtr<IDiaSession> session;
if (FAILED(data_source->openSession(&session)))
    return false;

CComPtr<IDiaEnumSymbolsByAddr> symbols;
if (FAILED(session->getSymbolsByAddr(&symbols)))
    return false;

CComPtr<IDiaSymbol> symbol;
if (FAILED(symbols->symbolByAddr(1, 0, &symbol)))
    return false;

ULONG count;
do {
    symbol.Release();
} while (SUCCEEDED(symbols->Next(1, &symbol, &count)) && count == 1);

return true;
}
Details
Sign in to post a comment.
Posted by Bruce Dawson on 5/29/2013 at 12:46 PM
Is this bug fixed in the VS 2012 version of msdia?
Posted by Microsoft on 2/10/2012 at 4:18 PM
We have fixed this problem in our code and the fix will be included in our next major product release. Unfortunately there is no work around to this problem, unless you are willing to query the symbols any other way than strictly by address.

Thank you very much for the bug report.

YongKang Zhu
--
VC++ CodeGen and Tools
Posted by Mikhail Izmestev on 2/9/2012 at 11:55 PM
same problem here, last Next call take hours.
It would be great to fix it.
Posted by MS-Moderator09 [Feedback Moderator] on 2/3/2012 at 12:20 AM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by MS-Moderator01 on 2/1/2012 at 8:44 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
xul.zip 2/1/2012 35.57 MB
dia-bug.cpp 2/1/2012 975 bytes