MCPcopy Create free account
hub / github.com/baldurk/renderdoc / LookupModule

Function LookupModule

renderdoc/os/win32/win32_callstack.cpp:122–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122rdcstr LookupModule(const rdcstr &modName, GUID guid, DWORD age)
123{
124 rdcstr ret = modName;
125
126 rdcstr pdbName = get_basename(ret);
127
128 if(pdbName.find(".pdb") == -1 && pdbName.find(".PDB") == -1)
129 {
130 if(pdbName.contains('.'))
131 pdbName = strip_extension(pdbName) + ".pdb";
132 }
133
134 if(dynSymFindFileInPathW != NULL)
135 {
136 rdcwstr sympath = GetSymSearchPath();
137
138 wchar_t path[MAX_PATH + 1] = {0};
139 BOOL found = dynSymFindFileInPathW(GetCurrentProcess(), sympath.c_str(),
140 StringFormat::UTF82Wide(pdbName).c_str(), &guid, age, 0,
141 SSRVOPT_GUIDPTR, path, NULL, NULL);
142 DWORD err = GetLastError();
143 (void)err; // for debugging only
144
145 if(found == TRUE && path[0] != 0)
146 ret = StringFormat::Wide2UTF8(path);
147 }
148
149 return ret;
150}
151
152rdcwstr msdiapath = L"msdia140.dll";
153

Callers 1

Calls 8

get_basenameFunction · 0.85
strip_extensionFunction · 0.85
GetSymSearchPathFunction · 0.85
UTF82WideFunction · 0.70
Wide2UTF8Function · 0.70
findMethod · 0.45
containsMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected