{
return E_OUTOFMEMORY;
}
- if (SUCCEEDED(getLineByILOffsetDelegate(szModuleName, MethodToken, IlOffset, pLinenum, &wszFileName)))
+ if (getLineByILOffsetDelegate(szModuleName, MethodToken, IlOffset, pLinenum, &wszFileName) == TRUE)
{
WideCharToMultiByte(CP_ACP, 0, wszFileName, (int) (_wcslen(wszFileName) + 1),
lpszFileName, cbFileName, NULL, NULL);
*pLinenum = -1;
Status = E_FAIL;
}
-
+ }
+ else
+ {
+ Status = E_FAIL;
}
SysFreeString(wszFileName);
WideCharToMultiByte(CP_ACP, 0, pModuleName, (int) (_wcslen(pModuleName) + 1),
m_szModuleName, mdNameLen, NULL, NULL);
- return !loadSymbolsForModuleDelegate(m_szModuleName);
+ if (loadSymbolsForModuleDelegate(m_szModuleName) == FALSE)
+ return E_FAIL;
+ return Status;
#endif // FEATURE_PAL
}
{
return E_OUTOFMEMORY;
}
- int ret = getLocalVariableNameDelegate(m_szModuleName, methodToken,
- localIndex, &wszParamName);
- if (ret)
+ if (getLocalVariableNameDelegate(m_szModuleName, methodToken, localIndex, &wszParamName) == FALSE)
{
- wcscpy_s(paramName, _wcslen(wszParamName) + 1, wszParamName);
- paramNameLen = _wcslen(paramName);
SysFreeString(wszParamName);
-
- if (SUCCEEDED(pILFrame->GetLocalVariable(localIndex, ppValue)) && (*ppValue != NULL))
- {
- return S_OK;
- }
- else
- {
- *ppValue = NULL;
- return E_FAIL;
- }
+ return E_FAIL;
}
+ wcscpy_s(paramName, _wcslen(wszParamName) + 1, wszParamName);
+ paramNameLen = _wcslen(paramName);
SysFreeString(wszParamName);
- return E_FAIL;
+
+ if (SUCCEEDED(pILFrame->GetLocalVariable(localIndex, ppValue)) && (*ppValue != NULL))
+ {
+ return S_OK;
+ }
+ else
+ {
+ *ppValue = NULL;
+ return E_FAIL;
+ }
#else
if(pScope == NULL)
FileNameForModule(mod, FileNameW);
WideCharToMultiByte(CP_ACP, 0, FileNameW, (int) (_wcslen(FileNameW) + 1), FileName, MAX_LONGPATH, NULL, NULL);
- Status = resolveSequencePointDelegate(FileName, szName, lineNumber, pToken, pIlOffset);
-
- return Status;
+ if (resolveSequencePointDelegate(FileName, szName, lineNumber, pToken, pIlOffset) == FALSE)
+ return E_FAIL;
+ return S_OK;
#endif // FEATURE_PAL
}
#endif // !FEATURE_PAL
#ifdef FEATURE_PAL
-typedef int (*ResolveSequencePointDelegate)(const char*, const char*, unsigned int, unsigned int*, unsigned int*);
-typedef int (*LoadSymbolsForModuleDelegate)(const char*);
-typedef int (*GetLocalVariableName)(const char*, int, int, BSTR*);
-typedef int (*GetLineByILOffsetDelegate)(const char*, mdMethodDef, ULONG64, ULONG *, BSTR*);
+typedef BOOL (*ResolveSequencePointDelegate)(const char*, const char*, unsigned int, unsigned int*, unsigned int*);
+typedef BOOL (*LoadSymbolsForModuleDelegate)(const char*);
+typedef BOOL (*GetLocalVariableName)(const char*, int, int, BSTR*);
+typedef BOOL (*GetLineByILOffsetDelegate)(const char*, mdMethodDef, ULONG64, ULONG *, BSTR*);
static const char *SymbolReaderDllName = "System.Diagnostics.Debug.SymbolReader";
static const char *SymbolReaderClassName = "System.Diagnostics.Debug.SymbolReader.SymbolReader";
#endif //FEATURE_PAL