diff options
author | Sinan Kaya <sinan.kaya@microsoft.com> | 2019-04-12 05:57:37 +0000 |
---|---|---|
committer | Sinan Kaya <sinan.kaya@microsoft.com> | 2019-04-16 04:36:01 +0000 |
commit | 034c81b00c101ab1654b9592274ce0a0a9ee312b (patch) | |
tree | 823b1b319c2b60df82ee6231232b99c01d2e558b /src/ToolBox | |
parent | 2a46c2580580b31d7fa18ea381d2aa838f31d025 (diff) | |
download | coreclr-034c81b00c101ab1654b9592274ce0a0a9ee312b.tar.gz coreclr-034c81b00c101ab1654b9592274ce0a0a9ee312b.tar.bz2 coreclr-034c81b00c101ab1654b9592274ce0a0a9ee312b.zip |
Conversion issues
Diffstat (limited to 'src/ToolBox')
-rw-r--r-- | src/ToolBox/SOS/lldbplugin/services.cpp | 16 | ||||
-rw-r--r-- | src/ToolBox/SOS/lldbplugin/setsostidcommand.cpp | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/ToolBox/SOS/lldbplugin/services.cpp b/src/ToolBox/SOS/lldbplugin/services.cpp index f5ec14d08d..aeca020842 100644 --- a/src/ToolBox/SOS/lldbplugin/services.cpp +++ b/src/ToolBox/SOS/lldbplugin/services.cpp @@ -10,8 +10,8 @@ #define CONVERT_FROM_SIGN_EXTENDED(offset) ((ULONG_PTR)(offset)) -ULONG g_currentThreadIndex = -1; -ULONG g_currentThreadSystemId = -1; +ULONG g_currentThreadIndex = (ULONG)-1; +ULONG g_currentThreadSystemId = (ULONG)-1; char *g_coreclrDirectory; LLDBServices::LLDBServices(lldb::SBDebugger &debugger, lldb::SBCommandReturnObject &returnObject, lldb::SBProcess *process, lldb::SBThread *thread) : @@ -587,7 +587,7 @@ LLDBServices::Disassemble( size = instruction.GetByteSize(); data = instruction.GetData(target); - for (int i = 0; i < size && bufferSize > 0; i++) + for (ULONG i = 0; i < size && bufferSize > 0; i++) { byte = data.GetUnsignedInt8(error, i); if (error.Fail()) @@ -689,7 +689,7 @@ LLDBServices::GetContextStackTrace( } frame = thread.GetFrameAtIndex(0); - for (int i = 0; i < thread.GetNumFrames(); i++) + for (uint32_t i = 0; i < thread.GetNumFrames(); i++) { if (!frame.IsValid() || (cFrames > framesSize) || ((char *)currentContext > ((char *)frameContexts + frameContextsSize))) { @@ -1367,7 +1367,7 @@ LLDBServices::GetCurrentThreadId( // This is allow the a valid current TID to be returned to // workaround a bug in lldb on core dumps. - if (g_currentThreadIndex != -1) + if (g_currentThreadIndex != (ULONG)-1) { *id = g_currentThreadIndex; return S_OK; @@ -1413,7 +1413,7 @@ LLDBServices::GetCurrentThreadSystemId( // This is allow the a valid current TID to be returned to // workaround a bug in lldb on core dumps. - if (g_currentThreadSystemId != -1) + if (g_currentThreadSystemId != (ULONG)-1) { *sysId = g_currentThreadSystemId; return S_OK; @@ -1447,7 +1447,7 @@ LLDBServices::GetThreadIdBySystemId( // If we have a "fake" thread OS (system) id and a fake thread index, // we need to return fake thread index. - if (g_currentThreadSystemId == sysId && g_currentThreadIndex != -1) + if (g_currentThreadSystemId == sysId && g_currentThreadIndex != (ULONG)-1) { id = g_currentThreadIndex; } @@ -1495,7 +1495,7 @@ LLDBServices::GetThreadContextById( // If we have a "fake" thread OS (system) id and a fake thread index, // use the fake thread index to get the context. - if (g_currentThreadSystemId == threadID && g_currentThreadIndex != -1) + if (g_currentThreadSystemId == threadID && g_currentThreadIndex != (ULONG)-1) { thread = process.GetThreadByIndexID(g_currentThreadIndex); } diff --git a/src/ToolBox/SOS/lldbplugin/setsostidcommand.cpp b/src/ToolBox/SOS/lldbplugin/setsostidcommand.cpp index c7d6a1ba25..67911e4d10 100644 --- a/src/ToolBox/SOS/lldbplugin/setsostidcommand.cpp +++ b/src/ToolBox/SOS/lldbplugin/setsostidcommand.cpp @@ -23,7 +23,7 @@ public: { if (arguments[0] == NULL) { - if (g_currentThreadSystemId == -1 || g_currentThreadIndex == -1) + if (g_currentThreadSystemId == (ULONG)-1 || g_currentThreadIndex == (ULONG)-1) { result.Printf("sos OS tid not mapped\n"); } @@ -33,8 +33,8 @@ public: } } else if (strcmp(arguments[0], "-clear") == 0) { - g_currentThreadIndex = -1; - g_currentThreadSystemId = -1; + g_currentThreadIndex = (ULONG)-1; + g_currentThreadSystemId = (ULONG)-1; result.Printf("Cleared sos OS tid/index\n"); } else if (arguments[1] == NULL) |