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
This commit is contained in:
Greg Clayton
2010-12-15 20:50:06 +00:00
parent 05b18f143f
commit bdf4c6ac4f
2 changed files with 6 additions and 6 deletions

View File

@@ -310,7 +310,7 @@ SBBreakpoint::SetThreadIndex (uint32_t index)
uint32_t
SBBreakpoint::GetThreadIndex() const
{
uint32_t thread_idx = 0;
uint32_t thread_idx = UINT32_MAX;
if (m_opaque_sp)
{
const ThreadSpec *thread_spec = m_opaque_sp->GetOptions()->GetThreadSpec();
@@ -319,9 +319,9 @@ SBBreakpoint::GetThreadIndex() const
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::GetThreadIndex () => %u", m_opaque_sp.get(), index);
log->Printf ("SBBreakpoint(%p)::GetThreadIndex () => %u", m_opaque_sp.get(), thread_idx);
return 0;
return UINT32_MAX;
}