diff options
Diffstat (limited to 'lldb/source/API/SBBreakpoint.cpp')
-rw-r--r-- | lldb/source/API/SBBreakpoint.cpp | 78 |
1 files changed, 52 insertions, 26 deletions
diff --git a/lldb/source/API/SBBreakpoint.cpp b/lldb/source/API/SBBreakpoint.cpp index 2c9cd12f18e..eb379ab12ce 100644 --- a/lldb/source/API/SBBreakpoint.cpp +++ b/lldb/source/API/SBBreakpoint.cpp @@ -124,9 +124,11 @@ SBBreakpoint::GetID () const if (log) { if (break_id == LLDB_INVALID_BREAK_ID) - log->Printf ("SBBreakpoint(%p)::GetID () => LLDB_INVALID_BREAK_ID", m_opaque_sp.get()); + log->Printf ("SBBreakpoint(%p)::GetID () => LLDB_INVALID_BREAK_ID", + static_cast<void*>(m_opaque_sp.get())); else - log->Printf ("SBBreakpoint(%p)::GetID () => %u", m_opaque_sp.get(), break_id); + log->Printf ("SBBreakpoint(%p)::GetID () => %u", + static_cast<void*>(m_opaque_sp.get()), break_id); } return break_id; @@ -225,7 +227,8 @@ SBBreakpoint::SetEnabled (bool enable) Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) - log->Printf ("SBBreakpoint(%p)::SetEnabled (enabled=%i)", m_opaque_sp.get(), enable); + log->Printf ("SBBreakpoint(%p)::SetEnabled (enabled=%i)", + static_cast<void*>(m_opaque_sp.get()), enable); if (m_opaque_sp) { @@ -252,7 +255,8 @@ SBBreakpoint::SetOneShot (bool one_shot) Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) - log->Printf ("SBBreakpoint(%p)::SetOneShot (one_shot=%i)", m_opaque_sp.get(), one_shot); + log->Printf ("SBBreakpoint(%p)::SetOneShot (one_shot=%i)", + static_cast<void*>(m_opaque_sp.get()), one_shot); if (m_opaque_sp) { @@ -291,8 +295,9 @@ SBBreakpoint::SetIgnoreCount (uint32_t count) Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) - log->Printf ("SBBreakpoint(%p)::SetIgnoreCount (count=%u)", m_opaque_sp.get(), count); - + log->Printf ("SBBreakpoint(%p)::SetIgnoreCount (count=%u)", + static_cast<void*>(m_opaque_sp.get()), count); + if (m_opaque_sp) { Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex()); @@ -333,7 +338,8 @@ SBBreakpoint::GetHitCount () const Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) - log->Printf ("SBBreakpoint(%p)::GetHitCount () => %u", m_opaque_sp.get(), count); + log->Printf ("SBBreakpoint(%p)::GetHitCount () => %u", + static_cast<void*>(m_opaque_sp.get()), count); return count; } @@ -350,7 +356,8 @@ SBBreakpoint::GetIgnoreCount () const Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) - log->Printf ("SBBreakpoint(%p)::GetIgnoreCount () => %u", m_opaque_sp.get(), count); + log->Printf ("SBBreakpoint(%p)::GetIgnoreCount () => %u", + static_cast<void*>(m_opaque_sp.get()), count); return count; } @@ -365,7 +372,8 @@ SBBreakpoint::SetThreadID (tid_t tid) } Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) - log->Printf ("SBBreakpoint(%p)::SetThreadID (tid=0x%4.4" PRIx64 ")", m_opaque_sp.get(), tid); + log->Printf ("SBBreakpoint(%p)::SetThreadID (tid=0x%4.4" PRIx64 ")", + static_cast<void*>(m_opaque_sp.get()), tid); } @@ -381,7 +389,8 @@ SBBreakpoint::GetThreadID () Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) - log->Printf ("SBBreakpoint(%p)::GetThreadID () => 0x%4.4" PRIx64, m_opaque_sp.get(), tid); + log->Printf ("SBBreakpoint(%p)::GetThreadID () => 0x%4.4" PRIx64, + static_cast<void*>(m_opaque_sp.get()), tid); return tid; } @@ -390,7 +399,8 @@ SBBreakpoint::SetThreadIndex (uint32_t index) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) - log->Printf ("SBBreakpoint(%p)::SetThreadIndex (%u)", m_opaque_sp.get(), index); + log->Printf ("SBBreakpoint(%p)::SetThreadIndex (%u)", + static_cast<void*>(m_opaque_sp.get()), index); if (m_opaque_sp) { Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex()); @@ -411,18 +421,19 @@ SBBreakpoint::GetThreadIndex() const } Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) - log->Printf ("SBBreakpoint(%p)::GetThreadIndex () => %u", m_opaque_sp.get(), thread_idx); + log->Printf ("SBBreakpoint(%p)::GetThreadIndex () => %u", + static_cast<void*>(m_opaque_sp.get()), thread_idx); return thread_idx; } - void SBBreakpoint::SetThreadName (const char *thread_name) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) - log->Printf ("SBBreakpoint(%p)::SetThreadName (%s)", m_opaque_sp.get(), thread_name); + log->Printf ("SBBreakpoint(%p)::SetThreadName (%s)", + static_cast<void*>(m_opaque_sp.get()), thread_name); if (m_opaque_sp) { @@ -444,7 +455,8 @@ SBBreakpoint::GetThreadName () const } Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) - log->Printf ("SBBreakpoint(%p)::GetThreadName () => %s", m_opaque_sp.get(), name); + log->Printf ("SBBreakpoint(%p)::GetThreadName () => %s", + static_cast<void*>(m_opaque_sp.get()), name); return name; } @@ -454,7 +466,8 @@ SBBreakpoint::SetQueueName (const char *queue_name) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) - log->Printf ("SBBreakpoint(%p)::SetQueueName (%s)", m_opaque_sp.get(), queue_name); + log->Printf ("SBBreakpoint(%p)::SetQueueName (%s)", + static_cast<void*>(m_opaque_sp.get()), queue_name); if (m_opaque_sp) { Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex()); @@ -475,7 +488,8 @@ SBBreakpoint::GetQueueName () const } Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) - log->Printf ("SBBreakpoint(%p)::GetQueueName () => %s", m_opaque_sp.get(), name); + log->Printf ("SBBreakpoint(%p)::GetQueueName () => %s", + static_cast<void*>(m_opaque_sp.get()), name); return name; } @@ -491,7 +505,9 @@ SBBreakpoint::GetNumResolvedLocations() const } Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) - log->Printf ("SBBreakpoint(%p)::GetNumResolvedLocations () => %" PRIu64, m_opaque_sp.get(), (uint64_t)num_resolved); + log->Printf ("SBBreakpoint(%p)::GetNumResolvedLocations () => %" PRIu64, + static_cast<void*>(m_opaque_sp.get()), + static_cast<uint64_t>(num_resolved)); return num_resolved; } @@ -506,7 +522,9 @@ SBBreakpoint::GetNumLocations() const } Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) - log->Printf ("SBBreakpoint(%p)::GetNumLocations () => %" PRIu64, m_opaque_sp.get(), (uint64_t)num_locs); + log->Printf ("SBBreakpoint(%p)::GetNumLocations () => %" PRIu64, + static_cast<void*>(m_opaque_sp.get()), + static_cast<uint64_t>(num_locs)); return num_locs; } @@ -570,9 +588,14 @@ void SBBreakpoint::SetCallback (BreakpointHitCallback callback, void *baton) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - + if (log) - log->Printf ("SBBreakpoint(%p)::SetCallback (callback=%p, baton=%p)", m_opaque_sp.get(), callback, baton); + { + void *pointer = &callback; + log->Printf ("SBBreakpoint(%p)::SetCallback (callback=%p, baton=%p)", + static_cast<void*>(m_opaque_sp.get()), + *static_cast<void**>(&pointer), static_cast<void*>(baton)); + } if (m_opaque_sp) { @@ -586,9 +609,11 @@ void SBBreakpoint::SetScriptCallbackFunction (const char *callback_function_name) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - + if (log) - log->Printf ("SBBreakpoint(%p)::SetScriptCallbackFunction (callback=%s)", m_opaque_sp.get(), callback_function_name); + log->Printf ("SBBreakpoint(%p)::SetScriptCallbackFunction (callback=%s)", + static_cast<void*>(m_opaque_sp.get()), + callback_function_name); if (m_opaque_sp) { @@ -603,9 +628,10 @@ SBError SBBreakpoint::SetScriptCallbackBody (const char *callback_body_text) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - + if (log) - log->Printf ("SBBreakpoint(%p)::SetScriptCallbackBody: callback body:\n%s)", m_opaque_sp.get(), callback_body_text); + log->Printf ("SBBreakpoint(%p)::SetScriptCallbackBody: callback body:\n%s)", + static_cast<void*>(m_opaque_sp.get()), callback_body_text); SBError sb_error; if (m_opaque_sp) @@ -618,7 +644,7 @@ SBBreakpoint::SetScriptCallbackBody (const char *callback_body_text) } else sb_error.SetErrorString("invalid breakpoint"); - + return sb_error; } |