diff options
author | Greg Clayton <gclayton@apple.com> | 2010-12-15 20:50:06 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2010-12-15 20:50:06 +0000 |
commit | bdf4c6ac4f76b2ee32c848162a897c82c29ab499 (patch) | |
tree | e3d3dbd3bd17f62fc55fb571a17c207f815b46fd /lldb/source/Target/ThreadSpec.cpp | |
parent | 05b18f143f91b3b52234a6f31594461eebed413f (diff) | |
download | llvm-bdf4c6ac4f76b2ee32c848162a897c82c29ab499.zip llvm-bdf4c6ac4f76b2ee32c848162a897c82c29ab499.tar.gz llvm-bdf4c6ac4f76b2ee32c848162a897c82c29ab499.tar.bz2 |
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>!
llvm-svn: 121896
Diffstat (limited to 'lldb/source/Target/ThreadSpec.cpp')
-rw-r--r-- | lldb/source/Target/ThreadSpec.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Target/ThreadSpec.cpp b/lldb/source/Target/ThreadSpec.cpp index e296558..07abf59 100644 --- a/lldb/source/Target/ThreadSpec.cpp +++ b/lldb/source/Target/ThreadSpec.cpp @@ -14,7 +14,7 @@ using namespace lldb; 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 @@ ThreadSpec::ThreadPassesBasicTests (Thread *thread) const 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 @@ ThreadSpec::GetDescription (Stream *s, lldb::DescriptionLevel level) const 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(); |