mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
If DIA can't find Function symbol, retry with PublicSymbol. Closes #364
* I don't see any docs on why a function wouldn't be reported as a function, but instead as a public symbol, but this seems to be the case and it fixes some problems where symbols aren't located. Oh well.
This commit is contained in:
+14
-2
@@ -51,6 +51,7 @@ struct IDiaEnumDebugStreams;
|
||||
enum SymTagEnum
|
||||
{
|
||||
SymTagFunction = 5,
|
||||
SymTagPublicSymbol = 10,
|
||||
};
|
||||
|
||||
struct IDiaSourceFile : public IUnknown
|
||||
@@ -529,14 +530,25 @@ AddrInfo GetAddr(wstring req)
|
||||
|
||||
if(module > 0 && module < modules.size())
|
||||
{
|
||||
SymTagEnum tag = SymTagFunction;
|
||||
IDiaSymbol *pFunc = NULL;
|
||||
HRESULT hr = modules[module].pSession->findSymbolByVA(addr, SymTagFunction, &pFunc);
|
||||
HRESULT hr = modules[module].pSession->findSymbolByVA(addr, tag, &pFunc);
|
||||
|
||||
if(hr != S_OK)
|
||||
{
|
||||
if(pFunc)
|
||||
pFunc->Release();
|
||||
return ret;
|
||||
|
||||
// try again looking for public symbols
|
||||
tag = SymTagPublicSymbol;
|
||||
hr = modules[module].pSession->findSymbolByVA(addr, tag, &pFunc);
|
||||
|
||||
if(hr != S_OK)
|
||||
{
|
||||
if(pFunc)
|
||||
pFunc->Release();
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
DWORD opts = 0;
|
||||
|
||||
Reference in New Issue
Block a user