Fixed an error where the thread index was being returned as zero in "uint32_t SBBreakpoint::GetThreadIndex() const" even when it isn't specified. It should be UINT32_MAX to indicate there is no thread index set for the breakpoint (the breakpoint isn't thread specific). Also fixed the ThreadSpec.cpp to use UINT32_MAX instead of -1. Fixed the logging Printf statement in "uint32_t SBBreakpoint::GetThreadIndex() const" to not print the address of the "index" function from <string.h>!
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121896 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/ThreadSpec.cpp b/source/Target/ThreadSpec.cpp
index e296558..07abf59 100644
--- a/source/Target/ThreadSpec.cpp
+++ b/source/Target/ThreadSpec.cpp
@@ -14,7 +14,7 @@
using namespace lldb_private;
ThreadSpec::ThreadSpec() :
- m_index (-1),
+ m_index (UINT32_MAX),
m_tid (LLDB_INVALID_THREAD_ID),
m_name(),
m_queue_name ()
@@ -83,7 +83,7 @@
bool
ThreadSpec::HasSpecification() const
{
- return (m_index != -1 || m_tid != LLDB_INVALID_THREAD_ID || !m_name.empty() || !m_queue_name.empty());
+ return (m_index != UINT32_MAX || m_tid != LLDB_INVALID_THREAD_ID || !m_name.empty() || !m_queue_name.empty());
}
void
ThreadSpec::GetDescription (Stream *s, lldb::DescriptionLevel level) const
@@ -106,7 +106,7 @@
if (GetTID() != LLDB_INVALID_THREAD_ID)
s->Printf("tid: 0x%llx ", GetTID());
- if (GetIndex() != -1)
+ if (GetIndex() != UINT32_MAX)
s->Printf("index: %d ", GetIndex());
const char *name = GetName();