summaryrefslogtreecommitdiff
path: root/src/ToolBox
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2019-04-18 10:27:27 +0200
committerGitHub <noreply@github.com>2019-04-18 10:27:27 +0200
commit837ac49c1ac46729df88ddb4a5d73ade6cc55cfc (patch)
tree56c5e8792fcecfe9d09fa0b183e89944c2dc0dd4 /src/ToolBox
parent52aff202cd382c233d903d432da06deffaa21868 (diff)
parent034c81b00c101ab1654b9592274ce0a0a9ee312b (diff)
downloadcoreclr-837ac49c1ac46729df88ddb4a5d73ade6cc55cfc.tar.gz
coreclr-837ac49c1ac46729df88ddb4a5d73ade6cc55cfc.tar.bz2
coreclr-837ac49c1ac46729df88ddb4a5d73ade6cc55cfc.zip
Merge pull request #23934 from franksinankaya/gcc_cleanup_18
Integer Conversion Issues from GCC
Diffstat (limited to 'src/ToolBox')
-rw-r--r--src/ToolBox/SOS/lldbplugin/services.cpp16
-rw-r--r--src/ToolBox/SOS/lldbplugin/setsostidcommand.cpp6
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)