return E_FAIL;
ToRelease<ICorDebugValue> pArrayElement;
- return pArrayVal->GetElement(indices.size(), indices.data(), ppResultValue);
+ return pArrayVal->GetElement(static_cast<uint32_t>(indices.size()), indices.data(), ppResultValue);
}
IfFailRet(WalkMembers(pInputValue, pThread, pILFrame, [&](
static mdTypeDef GetTypeTokenForName(IMetaDataImport *pMD, mdTypeDef tkEnclosingClass, const std::string &name)
{
mdTypeDef typeToken = mdTypeDefNil;
- pMD->FindTypeDefByName(to_utf16(name).c_str(), tkEnclosingClass, &typeToken);
+ pMD->FindTypeDefByName(reinterpret_cast<LPCWSTR>(to_utf16(name).c_str()), tkEnclosingClass, &typeToken);
return typeToken;
}
CorElementType et = isValueType ? ELEMENT_TYPE_VALUETYPE : ELEMENT_TYPE_CLASS;
ToRelease<ICorDebugType> pType;
- IfFailRet(pClass2->GetParameterizedType(et, types.size(), (ICorDebugType **)types.data(), &pType));
+ IfFailRet(pClass2->GetParameterizedType(et, static_cast<uint32_t>(types.size()), (ICorDebugType **)types.data(), &pType));
*ppType = pType.Detach();
if (ppModule)
else if (strstr(argv[i], "--server=") == argv[i])
{
char *err;
- serverPort = strtoul(argv[i] + strlen("--server="), &err, 10);
+ serverPort = static_cast<uint16_t>(strtoul(argv[i] + strlen("--server="), &err, 10));
if (*err != 0)
{
fprintf(stderr, "Error: Missing process id\n");
m_clrPath.clear();
HANDLE resumeHandle; // Fake thread handle for the process resume
- IfFailRet(g_dbgshim.CreateProcessForLaunch(const_cast<LPWSTR>(to_utf16(ss.str()).c_str()),
+
+ IfFailRet(g_dbgshim.CreateProcessForLaunch(reinterpret_cast<LPWSTR>(const_cast<WCHAR*>(to_utf16(ss.str()).c_str())),
/* Suspend process */ TRUE,
/* Current environment */ NULL,
/* Current working directory */ NULL,
DWORD dwLength;
IfFailRet(g_dbgshim.CreateVersionStringFromModule(
pid,
- to_utf16(m_clrPath).c_str(),
+ reinterpret_cast<LPCWSTR>(to_utf16(m_clrPath).c_str()),
pBuffer,
_countof(pBuffer),
&dwLength));
for (auto &p : points)
{
- if (p.offset < ilOffset)
+ if (p.offset < static_cast<int32_t>(ilOffset))
{
nearestPoint = p;
continue;
return E_FAIL;
}
-HRESULT SymbolReader::GetStepRangesFromIP(ULONG64 ip, mdMethodDef MethodToken, ULONG32 *ilStartOffset, ULONG32 *ilEndOffset)
+HRESULT SymbolReader::GetStepRangesFromIP(ULONG32 ip, mdMethodDef MethodToken, ULONG32 *ilStartOffset, ULONG32 *ilEndOffset)
{
HRESULT Status = S_OK;
HRESULT GetLineByILOffset(mdMethodDef MethodToken, ULONG64 IlOffset, ULONG *pLinenum, WCHAR* pwszFileName, ULONG cchFileName);
HRESULT GetNamedLocalVariableAndScope(ICorDebugILFrame * pILFrame, mdMethodDef methodToken, ULONG localIndex, WCHAR* paramName, ULONG paramNameLen, ICorDebugValue **ppValue, ULONG32* pIlStart, ULONG32* pIlEnd);
HRESULT ResolveSequencePoint(const char *filename, ULONG32 lineNumber, TADDR mod, mdMethodDef* pToken, ULONG32* pIlOffset);
- HRESULT GetStepRangesFromIP(ULONG64 ip, mdMethodDef MethodToken, ULONG32 *ilStartOffset, ULONG32 *ilEndOffset);
+ HRESULT GetStepRangesFromIP(ULONG32 ip, mdMethodDef MethodToken, ULONG32 *ilStartOffset, ULONG32 *ilEndOffset);
HRESULT GetSequencePoints(mdMethodDef methodToken, std::vector<SequencePoint> &points);
};
IfFailRet(pEval2->CallParameterizedFunction(
pFunc,
- typeParams.size(),
+ static_cast<uint32_t>(typeParams.size()),
(ICorDebugType **)typeParams.data(),
pArgValue ? 1 : 0,
pArgValue ? &pArgValue : nullptr
IfFailRet(pEval2->NewParameterizedObjectNoConstructor(
pClass,
- typeParams.size(),
+ static_cast<uint32_t>(typeParams.size()),
(ICorDebugType **)typeParams.data()
));
IfFailRet(pEval2->CallParameterizedFunction(
pFunc,
- typeParams.size(),
+ static_cast<uint32_t>(typeParams.size()),
(ICorDebugType **)typeParams.data(),
1,
&pValue
static void IncIndicies(std::vector<ULONG32> &ind, const std::vector<ULONG32> &dims)
{
- int i = ind.size() - 1;
+ int i = static_cast<int32_t>(ind.size()) - 1;
while (i >= 0)
{