summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/SBAddress.cpp2
-rw-r--r--lldb/source/API/SBBreakpoint.cpp32
-rw-r--r--lldb/source/API/SBBreakpointLocation.cpp4
-rw-r--r--lldb/source/API/SBBroadcaster.cpp10
-rw-r--r--lldb/source/API/SBCommandInterpreter.cpp14
-rw-r--r--lldb/source/API/SBCommandReturnObject.cpp4
-rw-r--r--lldb/source/API/SBCommunication.cpp22
-rw-r--r--lldb/source/API/SBCompileUnit.cpp4
-rw-r--r--lldb/source/API/SBDebugger.cpp34
-rw-r--r--lldb/source/API/SBError.cpp8
-rw-r--r--lldb/source/API/SBEvent.cpp6
-rw-r--r--lldb/source/API/SBFileSpec.cpp12
-rw-r--r--lldb/source/API/SBFrame.cpp46
-rw-r--r--lldb/source/API/SBFunction.cpp4
-rw-r--r--lldb/source/API/SBHostOS.cpp2
-rw-r--r--lldb/source/API/SBInputReader.cpp8
-rw-r--r--lldb/source/API/SBLineEntry.cpp8
-rw-r--r--lldb/source/API/SBListener.cpp6
-rw-r--r--lldb/source/API/SBModule.cpp4
-rw-r--r--lldb/source/API/SBProcess.cpp46
-rw-r--r--lldb/source/API/SBSymbol.cpp4
-rw-r--r--lldb/source/API/SBSymbolContext.cpp8
-rw-r--r--lldb/source/API/SBTarget.cpp30
-rw-r--r--lldb/source/API/SBThread.cpp26
-rw-r--r--lldb/source/API/SBType.cpp2
-rw-r--r--lldb/source/API/SBValue.cpp32
-rw-r--r--lldb/source/API/SBValueList.cpp8
27 files changed, 193 insertions, 193 deletions
diff --git a/lldb/source/API/SBAddress.cpp b/lldb/source/API/SBAddress.cpp
index 618a2f54905..7a7702a0430 100644
--- a/lldb/source/API/SBAddress.cpp
+++ b/lldb/source/API/SBAddress.cpp
@@ -87,7 +87,7 @@ SBAddress::GetFileAddress () const
lldb::addr_t
SBAddress::GetLoadAddress (const SBTarget &target) const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (m_opaque_ap.get())
{
diff --git a/lldb/source/API/SBBreakpoint.cpp b/lldb/source/API/SBBreakpoint.cpp
index 5791b20edc5..280697370fd 100644
--- a/lldb/source/API/SBBreakpoint.cpp
+++ b/lldb/source/API/SBBreakpoint.cpp
@@ -95,7 +95,7 @@ SBBreakpoint::operator = (const SBBreakpoint& rhs)
break_id_t
SBBreakpoint::GetID () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (m_opaque_sp)
{
@@ -195,7 +195,7 @@ SBBreakpoint::GetLocationAtIndex (uint32_t index)
void
SBBreakpoint::SetEnabled (bool enable)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::SetEnabled (enabled=%i)", m_opaque_sp.get(), enable);
@@ -216,7 +216,7 @@ SBBreakpoint::IsEnabled ()
void
SBBreakpoint::SetIgnoreCount (uint32_t count)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::SetIgnoreCount (count=%u)", m_opaque_sp.get(), count);
@@ -244,7 +244,7 @@ SBBreakpoint::GetHitCount () const
if (m_opaque_sp)
count = m_opaque_sp->GetHitCount();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::GetHitCount () => %u", m_opaque_sp.get(), count);
@@ -258,7 +258,7 @@ SBBreakpoint::GetIgnoreCount () const
if (m_opaque_sp)
count = m_opaque_sp->GetIgnoreCount();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::GetIgnoreCount () => %u", m_opaque_sp.get(), count);
@@ -270,7 +270,7 @@ SBBreakpoint::SetThreadID (tid_t tid)
{
if (m_opaque_sp)
m_opaque_sp->SetThreadID (tid);
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::SetThreadID (tid=0x%4.4x)", m_opaque_sp.get(), tid);
@@ -283,7 +283,7 @@ SBBreakpoint::GetThreadID ()
if (m_opaque_sp)
tid = m_opaque_sp->GetThreadID();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::GetThreadID () => 0x%4.4x", m_opaque_sp.get(), tid);
return tid;
@@ -292,7 +292,7 @@ SBBreakpoint::GetThreadID ()
void
SBBreakpoint::SetThreadIndex (uint32_t index)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::SetThreadIndex (%u)", m_opaque_sp.get(), index);
if (m_opaque_sp)
@@ -309,7 +309,7 @@ SBBreakpoint::GetThreadIndex() const
if (thread_spec == NULL)
thread_idx = thread_spec->GetIndex();
}
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::GetThreadIndex () => %u", m_opaque_sp.get(), index);
@@ -320,7 +320,7 @@ SBBreakpoint::GetThreadIndex() const
void
SBBreakpoint::SetThreadName (const char *thread_name)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::SetThreadName (%s)", m_opaque_sp.get(), thread_name);
@@ -338,7 +338,7 @@ SBBreakpoint::GetThreadName () const
if (thread_spec == NULL)
name = thread_spec->GetName();
}
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::GetThreadName () => %s", m_opaque_sp.get(), name);
@@ -348,7 +348,7 @@ SBBreakpoint::GetThreadName () const
void
SBBreakpoint::SetQueueName (const char *queue_name)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::SetQueueName (%s)", m_opaque_sp.get(), queue_name);
if (m_opaque_sp)
@@ -364,7 +364,7 @@ SBBreakpoint::GetQueueName () const
const ThreadSpec *thread_spec = m_opaque_sp->GetOptions()->GetThreadSpec();
name = thread_spec->GetQueueName();
}
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::GetQueueName () => %s", m_opaque_sp.get(), name);
@@ -377,7 +377,7 @@ SBBreakpoint::GetNumResolvedLocations() const
size_t num_resolved = 0;
if (m_opaque_sp)
num_resolved = m_opaque_sp->GetNumResolvedLocations();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::GetNumResolvedLocations () => %zu", m_opaque_sp.get(), num_resolved);
return num_resolved;
@@ -389,7 +389,7 @@ SBBreakpoint::GetNumLocations() const
size_t num_locs = 0;
if (m_opaque_sp)
num_locs = m_opaque_sp->GetNumLocations();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::GetNumLocations () => %zu", m_opaque_sp.get(), num_locs);
return num_locs;
@@ -450,7 +450,7 @@ SBBreakpoint::PrivateBreakpointHitCallback
void
SBBreakpoint::SetCallback (BreakpointHitCallback callback, void *baton)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::SetCallback (callback=%p, baton=%p)", m_opaque_sp.get(), callback, baton);
diff --git a/lldb/source/API/SBBreakpointLocation.cpp b/lldb/source/API/SBBreakpointLocation.cpp
index ab75b4e39c2..e2240dfcd44 100644
--- a/lldb/source/API/SBBreakpointLocation.cpp
+++ b/lldb/source/API/SBBreakpointLocation.cpp
@@ -33,7 +33,7 @@ SBBreakpointLocation::SBBreakpointLocation () :
SBBreakpointLocation::SBBreakpointLocation (const lldb::BreakpointLocationSP &break_loc_sp) :
m_opaque_sp (break_loc_sp)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
@@ -244,7 +244,7 @@ SBBreakpointLocation::GetDescription (DescriptionLevel level, SBStream &descript
SBBreakpoint
SBBreakpointLocation::GetBreakpoint ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
//if (log)
// log->Printf ("SBBreakpointLocation::GetBreakpoint ()");
diff --git a/lldb/source/API/SBBroadcaster.cpp b/lldb/source/API/SBBroadcaster.cpp
index 9978d825313..35f7bffde08 100644
--- a/lldb/source/API/SBBroadcaster.cpp
+++ b/lldb/source/API/SBBroadcaster.cpp
@@ -30,7 +30,7 @@ SBBroadcaster::SBBroadcaster (const char *name) :
m_opaque_ptr (NULL)
{
m_opaque_ptr = m_opaque_sp.get();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE));
if (log)
log->Printf ("SBBroadcaster::SBBroadcaster (name=\"%s\") => SBBroadcaster(%p)",
@@ -41,7 +41,7 @@ SBBroadcaster::SBBroadcaster (lldb_private::Broadcaster *broadcaster, bool owns)
m_opaque_sp (owns ? broadcaster : NULL),
m_opaque_ptr (broadcaster)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE));
if (log)
log->Printf ("SBBroadcaster::SBBroadcaster (broadcaster=%p, bool owns=%i) => SBBroadcaster(%p)",
@@ -73,7 +73,7 @@ SBBroadcaster::~SBBroadcaster()
void
SBBroadcaster::BroadcastEventByType (uint32_t event_type, bool unique)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBroadcaster(%p)::BroadcastEventByType (event_type=0x%8.8x, unique=%i)", m_opaque_ptr, event_type, unique);
@@ -90,7 +90,7 @@ SBBroadcaster::BroadcastEventByType (uint32_t event_type, bool unique)
void
SBBroadcaster::BroadcastEvent (const SBEvent &event, bool unique)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBroadcaster(%p)::BroadcastEventByType (SBEvent(%p), unique=%i)", m_opaque_ptr, event.get(), unique);
@@ -108,7 +108,7 @@ SBBroadcaster::BroadcastEvent (const SBEvent &event, bool unique)
void
SBBroadcaster::AddInitialEventsToListener (const SBListener &listener, uint32_t requested_events)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBroadcaster(%p)::AddInitialEventsToListener (SBListener(%p), event_mask=0x%8.8x)", m_opaque_ptr, listener.get(), requested_events);
if (m_opaque_ptr)
diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp
index 3f467f72f48..8d748570a5d 100644
--- a/lldb/source/API/SBCommandInterpreter.cpp
+++ b/lldb/source/API/SBCommandInterpreter.cpp
@@ -33,7 +33,7 @@ using namespace lldb_private;
SBCommandInterpreter::SBCommandInterpreter (CommandInterpreter *interpreter) :
m_opaque_ptr (interpreter)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommandInterpreter::SBCommandInterpreter (interpreter=%p)"
@@ -82,7 +82,7 @@ SBCommandInterpreter::AliasExists (const char *cmd)
lldb::ReturnStatus
SBCommandInterpreter::HandleCommand (const char *command_line, SBCommandReturnObject &result, bool add_to_history)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommandInterpreter(%p)::HandleCommand (command=\"%s\", SBCommandReturnObject(%p), add_to_history=%i)",
@@ -168,7 +168,7 @@ SBCommandInterpreter::GetProcess ()
if (target)
process.SetProcess(target->GetProcessSP());
}
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommandInterpreter(%p)::GetProcess () => SBProcess(%p)",
@@ -187,7 +187,7 @@ SBCommandInterpreter::WriteToScriptInterpreter (const char *src)
ssize_t
SBCommandInterpreter::WriteToScriptInterpreter (const char *src, size_t src_len)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
ssize_t bytes_written = 0;
if (m_opaque_ptr && src && src[0])
@@ -236,7 +236,7 @@ SBCommandInterpreter::SourceInitFileInHomeDirectory (SBCommandReturnObject &resu
result->AppendError ("SBCommandInterpreter is not valid");
result->SetStatus (eReturnStatusFailed);
}
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommandInterpreter(%p)::SourceInitFileInHomeDirectory (&SBCommandReturnObject(%p))",
@@ -257,7 +257,7 @@ SBCommandInterpreter::SourceInitFileInCurrentWorkingDirectory (SBCommandReturnOb
result->AppendError ("SBCommandInterpreter is not valid");
result->SetStatus (eReturnStatusFailed);
}
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommandInterpreter(%p)::SourceInitFileInCurrentWorkingDirectory (&SBCommandReturnObject(%p))",
@@ -267,7 +267,7 @@ SBCommandInterpreter::SourceInitFileInCurrentWorkingDirectory (SBCommandReturnOb
SBBroadcaster
SBCommandInterpreter::GetBroadcaster ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBroadcaster broadcaster (m_opaque_ptr, false);
diff --git a/lldb/source/API/SBCommandReturnObject.cpp b/lldb/source/API/SBCommandReturnObject.cpp
index b9981fb2c96..69dcab68432 100644
--- a/lldb/source/API/SBCommandReturnObject.cpp
+++ b/lldb/source/API/SBCommandReturnObject.cpp
@@ -57,7 +57,7 @@ SBCommandReturnObject::IsValid() const
const char *
SBCommandReturnObject::GetOutput ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (m_opaque_ap.get())
{
@@ -77,7 +77,7 @@ SBCommandReturnObject::GetOutput ()
const char *
SBCommandReturnObject::GetError ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (m_opaque_ap.get())
{
diff --git a/lldb/source/API/SBCommunication.cpp b/lldb/source/API/SBCommunication.cpp
index fca4882f523..ac3042fd904 100644
--- a/lldb/source/API/SBCommunication.cpp
+++ b/lldb/source/API/SBCommunication.cpp
@@ -28,7 +28,7 @@ SBCommunication::SBCommunication(const char * broadcaster_name) :
m_opaque (new Communication (broadcaster_name)),
m_opaque_owned (true)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommunication::SBCommunication (broadcaster_name=\"%s\") => "
@@ -82,7 +82,7 @@ SBCommunication::Connect (const char *url)
ConnectionStatus
SBCommunication::AdoptFileDesriptor (int fd, bool owns_fd)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
ConnectionStatus status = eConnectionStatusNoConnection;
if (m_opaque)
@@ -110,7 +110,7 @@ SBCommunication::AdoptFileDesriptor (int fd, bool owns_fd)
ConnectionStatus
SBCommunication::Disconnect ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
ConnectionStatus status= eConnectionStatusNoConnection;
if (m_opaque)
@@ -126,7 +126,7 @@ SBCommunication::Disconnect ()
bool
SBCommunication::IsConnected () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool result = false;
if (m_opaque)
result = m_opaque->IsConnected ();
@@ -140,7 +140,7 @@ SBCommunication::IsConnected () const
size_t
SBCommunication::Read (void *dst, size_t dst_len, uint32_t timeout_usec, ConnectionStatus &status)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommunication(%p)::Read (dst=%p, dst_len=%zu, timeout_usec=%u, &status)...",
m_opaque, dst, dst_len, timeout_usec);
@@ -167,7 +167,7 @@ SBCommunication::Write (const void *src, size_t src_len, ConnectionStatus &statu
else
status = eConnectionStatusNoConnection;
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommunication(%p)::Write (src=%p, src_len=%zu, &status=%s) => %zu",
m_opaque, src, src_len, Communication::ConnectionStatusAsCString (status), bytes_written);
@@ -178,7 +178,7 @@ SBCommunication::Write (const void *src, size_t src_len, ConnectionStatus &statu
bool
SBCommunication::ReadThreadStart ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool success = false;
if (m_opaque)
@@ -195,7 +195,7 @@ SBCommunication::ReadThreadStart ()
bool
SBCommunication::ReadThreadStop ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommunication(%p)::ReadThreadStop ()...", m_opaque);
@@ -215,7 +215,7 @@ SBCommunication::ReadThreadIsRunning ()
bool result = false;
if (m_opaque)
result = m_opaque->ReadThreadIsRunning ();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommunication(%p)::ReadThreadIsRunning () => %i", m_opaque, result);
return result;
@@ -228,7 +228,7 @@ SBCommunication::SetReadThreadBytesReceivedCallback
void *callback_baton
)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool result = false;
if (m_opaque)
@@ -249,7 +249,7 @@ SBCommunication::GetBroadcaster ()
{
SBBroadcaster broadcaster (m_opaque, false);
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommunication(%p)::GetBroadcaster () => SBBroadcaster (%p)",
diff --git a/lldb/source/API/SBCompileUnit.cpp b/lldb/source/API/SBCompileUnit.cpp
index a103fc37124..5bc6b5b4b63 100644
--- a/lldb/source/API/SBCompileUnit.cpp
+++ b/lldb/source/API/SBCompileUnit.cpp
@@ -71,7 +71,7 @@ SBCompileUnit::GetNumLineEntries () const
SBLineEntry
SBCompileUnit::GetLineEntryAtIndex (uint32_t idx) const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBLineEntry sb_line_entry;
if (m_opaque_ptr)
@@ -99,7 +99,7 @@ SBCompileUnit::GetLineEntryAtIndex (uint32_t idx) const
uint32_t
SBCompileUnit::FindLineEntryIndex (uint32_t start_idx, uint32_t line, SBFileSpec *inline_file_spec) const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t index = UINT32_MAX;
if (m_opaque_ptr)
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index b8190b74d6b..1721d24264f 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -37,7 +37,7 @@ using namespace lldb_private;
void
SBDebugger::Initialize ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBDebugger::Initialize ()");
@@ -54,7 +54,7 @@ SBDebugger::Terminate ()
void
SBDebugger::Clear ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBDebugger(%p)::Clear ()", m_opaque_sp.get());
@@ -65,7 +65,7 @@ SBDebugger::Clear ()
SBDebugger
SBDebugger::Create()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBDebugger debugger;
debugger.reset(Debugger::CreateInstance());
@@ -130,7 +130,7 @@ SBDebugger::SkipLLDBInitFiles (bool b)
void
SBDebugger::SetInputFileHandle (FILE *fh, bool transfer_ownership)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBDebugger(%p)::SetInputFileHandle (fh=%p, transfer_ownership=%i)", m_opaque_sp.get(),
@@ -143,7 +143,7 @@ SBDebugger::SetInputFileHandle (FILE *fh, bool transfer_ownership)
void
SBDebugger::SetOutputFileHandle (FILE *fh, bool transfer_ownership)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
@@ -157,7 +157,7 @@ SBDebugger::SetOutputFileHandle (FILE *fh, bool transfer_ownership)
void
SBDebugger::SetErrorFileHandle (FILE *fh, bool transfer_ownership)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
@@ -195,7 +195,7 @@ SBDebugger::GetErrorFileHandle ()
SBCommandInterpreter
SBDebugger::GetCommandInterpreter ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBCommandInterpreter sb_interpreter;
if (m_opaque_sp)
@@ -243,7 +243,7 @@ SBDebugger::HandleCommand (const char *command)
SBListener
SBDebugger::GetListener ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBListener sb_listener;
if (m_opaque_sp)
@@ -432,7 +432,7 @@ SBDebugger::StateAsCString (lldb::StateType state)
bool
SBDebugger::StateIsRunningState (lldb::StateType state)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const bool result = lldb_private::StateIsRunningState (state);
if (log)
@@ -445,7 +445,7 @@ SBDebugger::StateIsRunningState (lldb::StateType state)
bool
SBDebugger::StateIsStoppedState (lldb::StateType state)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const bool result = lldb_private::StateIsStoppedState (state);
if (log)
@@ -471,7 +471,7 @@ SBDebugger::CreateTargetWithFileAndTargetTriple (const char *filename,
target.reset (target_sp);
}
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
log->Printf ("SBDebugger(%p)::CreateTargetWithFileAndTargetTriple (filename=\"%s\", triple=%s) => SBTarget(%p)",
@@ -484,7 +484,7 @@ SBDebugger::CreateTargetWithFileAndTargetTriple (const char *filename,
SBTarget
SBDebugger::CreateTargetWithFileAndArch (const char *filename, const char *archname)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBTarget target;
if (m_opaque_sp)
@@ -565,7 +565,7 @@ SBDebugger::CreateTarget (const char *filename)
target.reset (target_sp);
}
}
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
log->Printf ("SBDebugger(%p)::CreateTarget (filename=\"%s\") => SBTarget(%p)",
@@ -628,7 +628,7 @@ SBDebugger::GetNumTargets ()
SBTarget
SBDebugger::GetSelectedTarget ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBTarget sb_target;
if (m_opaque_sp)
@@ -648,7 +648,7 @@ SBDebugger::GetSelectedTarget ()
void
SBDebugger::DispatchInput (void *baton, const void *data, size_t data_len)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBDebugger(%p)::DispatchInput (baton=%p, data=\"%.*s\", size_t=%zu)", m_opaque_sp.get(),
@@ -661,7 +661,7 @@ SBDebugger::DispatchInput (void *baton, const void *data, size_t data_len)
void
SBDebugger::PushInputReader (SBInputReader &reader)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBDebugger(%p)::PushInputReader (SBInputReader(%p))", m_opaque_sp.get(), &reader);
@@ -768,7 +768,7 @@ SBDebugger::SetTerminalWidth (uint32_t term_width)
const char *
SBDebugger::GetPrompt() const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBDebugger(%p)::GetPrompt () => \"%s\"", m_opaque_sp.get(),
diff --git a/lldb/source/API/SBError.cpp b/lldb/source/API/SBError.cpp
index 2e01cfa8ccf..c8aa0cdd4bc 100644
--- a/lldb/source/API/SBError.cpp
+++ b/lldb/source/API/SBError.cpp
@@ -70,7 +70,7 @@ SBError::Clear ()
bool
SBError::Fail () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool ret_value = false;
if (m_opaque_ap.get())
@@ -85,7 +85,7 @@ SBError::Fail () const
bool
SBError::Success () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool ret_value = false;
if (m_opaque_ap.get())
ret_value = m_opaque_ap->Success();
@@ -99,7 +99,7 @@ SBError::Success () const
uint32_t
SBError::GetError () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t err = 0;
if (m_opaque_ap.get())
@@ -115,7 +115,7 @@ SBError::GetError () const
ErrorType
SBError::GetType () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
ErrorType err_type = eErrorTypeInvalid;
if (m_opaque_ap.get())
err_type = m_opaque_ap->GetType();
diff --git a/lldb/source/API/SBEvent.cpp b/lldb/source/API/SBEvent.cpp
index 9c7a39232a8..b2d2df073d6 100644
--- a/lldb/source/API/SBEvent.cpp
+++ b/lldb/source/API/SBEvent.cpp
@@ -75,7 +75,7 @@ SBEvent::GetDataFlavor ()
uint32_t
SBEvent::GetType () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const Event *lldb_event = get();
uint32_t event_type = 0;
@@ -123,7 +123,7 @@ SBEvent::BroadcasterMatchesRef (const SBBroadcaster &broadcaster)
success = lldb_event->BroadcasterIs (broadcaster.get());
// For logging, this gets a little chatty so only enable this when verbose logging is on
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE));
if (log)
log->Printf ("SBEvent(%p)::BroadcasterMatchesRef (SBBroadcaster(%p): %s) => %i",
get(),
@@ -187,7 +187,7 @@ SBEvent::IsValid() const
const char *
SBEvent::GetCStringFromEvent (const SBEvent &event)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBEvent(%p)::GetCStringFromEvent () => \"%s\"",
diff --git a/lldb/source/API/SBFileSpec.cpp b/lldb/source/API/SBFileSpec.cpp
index fc223405eb5..2786b480e68 100644
--- a/lldb/source/API/SBFileSpec.cpp
+++ b/lldb/source/API/SBFileSpec.cpp
@@ -25,7 +25,7 @@ SBFileSpec::SBFileSpec () :
SBFileSpec::SBFileSpec (const SBFileSpec &rhs) :
m_opaque_ap()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (rhs.m_opaque_ap.get())
m_opaque_ap.reset (new FileSpec (rhs.get()));
@@ -48,7 +48,7 @@ SBFileSpec::SBFileSpec (const char *path) :
SBFileSpec::SBFileSpec (const char *path, bool resolve) :
m_opaque_ap(new FileSpec (path, resolve))
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFileSpec::SBFileSpec (path=\"%s\", resolve=%i) => SBFileSpec(%p)", path,
@@ -79,7 +79,7 @@ SBFileSpec::IsValid() const
bool
SBFileSpec::Exists () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool result = false;
if (m_opaque_ap.get())
@@ -112,7 +112,7 @@ SBFileSpec::GetFilename() const
if (m_opaque_ap.get())
s = m_opaque_ap->GetFilename().AsCString();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (s)
@@ -130,7 +130,7 @@ SBFileSpec::GetDirectory() const
const char *s = NULL;
if (m_opaque_ap.get())
s = m_opaque_ap->GetDirectory().AsCString();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (s)
@@ -144,7 +144,7 @@ SBFileSpec::GetDirectory() const
uint32_t
SBFileSpec::GetPath (char *dst_path, size_t dst_len) const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t result = 0;
if (m_opaque_ap.get())
diff --git a/lldb/source/API/SBFrame.cpp b/lldb/source/API/SBFrame.cpp
index 9701ada371a..238464ebaf3 100644
--- a/lldb/source/API/SBFrame.cpp
+++ b/lldb/source/API/SBFrame.cpp
@@ -51,7 +51,7 @@ SBFrame::SBFrame () :
SBFrame::SBFrame (const lldb::StackFrameSP &lldb_object_sp) :
m_opaque_sp (lldb_object_sp)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
@@ -86,7 +86,7 @@ SBFrame::SetFrame (const lldb::StackFrameSP &lldb_object_sp)
{
void *old_ptr = m_opaque_sp.get();
m_opaque_sp = lldb_object_sp;
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
@@ -111,7 +111,7 @@ SBFrame::GetSymbolContext (uint32_t resolve_scope) const
if (m_opaque_sp)
sb_sym_ctx.SetSymbolContext(&m_opaque_sp->GetSymbolContext (resolve_scope));
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::GetSymbolContext (resolve_scope=0x%8.8x) => SBSymbolContext(%p)",
m_opaque_sp.get(), resolve_scope, sb_sym_ctx.get());
@@ -123,7 +123,7 @@ SBModule
SBFrame::GetModule () const
{
SBModule sb_module (m_opaque_sp->GetSymbolContext (eSymbolContextModule).module_sp);
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::GetModule () => SBModule(%p)",
m_opaque_sp.get(), sb_module.get());
@@ -136,7 +136,7 @@ SBFrame::GetCompileUnit () const
{
SBCompileUnit sb_comp_unit(m_opaque_sp->GetSymbolContext (eSymbolContextCompUnit).comp_unit);
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::GetModule () => SBCompileUnit(%p)",
m_opaque_sp.get(), sb_comp_unit.get());
@@ -149,7 +149,7 @@ SBFrame::GetFunction () const
{
SBFunction sb_function(m_opaque_sp->GetSymbolContext (eSymbolContextFunction).function);
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::GetFunction () => SBFunction(%p)",
m_opaque_sp.get(), sb_function.get());
@@ -161,7 +161,7 @@ SBSymbol
SBFrame::GetSymbol () const
{
SBSymbol sb_symbol(m_opaque_sp->GetSymbolContext (eSymbolContextSymbol).symbol);
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::GetSymbol () => SBSymbol(%p)",
m_opaque_sp.get(), sb_symbol.get());
@@ -172,7 +172,7 @@ SBBlock
SBFrame::GetBlock () const
{
SBBlock sb_block(m_opaque_sp->GetSymbolContext (eSymbolContextBlock).block);
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::GetBlock () => SBBlock(%p)",
m_opaque_sp.get(), sb_block.get());
@@ -183,7 +183,7 @@ SBBlock
SBFrame::GetFrameBlock () const
{
SBBlock sb_block(m_opaque_sp->GetFrameBlock ());
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::GetFrameBlock () => SBBlock(%p)",
m_opaque_sp.get(), sb_block.get());
@@ -194,7 +194,7 @@ SBLineEntry
SBFrame::GetLineEntry () const
{
SBLineEntry sb_line_entry(&m_opaque_sp->GetSymbolContext (eSymbolContextLineEntry).line_entry);
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::GetLineEntry () => SBLineEntry(%p)",
m_opaque_sp.get(), sb_line_entry.get());
@@ -206,7 +206,7 @@ SBFrame::GetFrameID () const
{
uint32_t frame_idx = m_opaque_sp ? m_opaque_sp->GetFrameIndex () : UINT32_MAX;
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::GetFrameID () => %u",
m_opaque_sp.get(), frame_idx);
@@ -221,7 +221,7 @@ SBFrame::GetPC () const
if (m_opaque_sp)
addr = m_opaque_sp->GetFrameCodeAddress().GetLoadAddress (&m_opaque_sp->GetThread().GetProcess().GetTarget());
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::GetPC () => 0x%llx", m_opaque_sp.get(), addr);
@@ -236,7 +236,7 @@ SBFrame::SetPC (lldb::addr_t new_pc)
if (m_opaque_sp)
ret_val = m_opaque_sp->GetRegisterContext()->SetPC (new_pc);
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::SetPC (new_pc=0x%llx) => %i",
m_opaque_sp.get(), new_pc, ret_val);
@@ -250,7 +250,7 @@ SBFrame::GetSP () const
addr_t addr = LLDB_INVALID_ADDRESS;
if (m_opaque_sp)
addr = m_opaque_sp->GetRegisterContext()->GetSP();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::GetSP () => 0x%llx", m_opaque_sp.get(), addr);
@@ -265,7 +265,7 @@ SBFrame::GetFP () const
if (m_opaque_sp)
addr = m_opaque_sp->GetRegisterContext()->GetFP();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::GetFP () => 0x%llx", m_opaque_sp.get(), addr);
return addr;
@@ -278,7 +278,7 @@ SBFrame::GetPCAddress () const
SBAddress sb_addr;
if (m_opaque_sp)
sb_addr.SetAddress (&m_opaque_sp->GetFrameCodeAddress());
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::GetPCAddress () => SBAddress(%p)", m_opaque_sp.get(), sb_addr.get());
return sb_addr;
@@ -322,7 +322,7 @@ SBFrame::LookupVar (const char *var_name)
if (var_sp)
*sb_value = ValueObjectSP (new ValueObjectVariable (var_sp));
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::LookupVar (name=\"%s\") => SBValue(%p)",
m_opaque_sp.get(), var_name, sb_value.get());
@@ -377,7 +377,7 @@ SBFrame::LookupVarInScope (const char *var_name, const char *scope)
if (var_sp)
*sb_value = ValueObjectSP (new ValueObjectVariable (var_sp));
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::LookupVarInScope (name=\"%s\", scope=%s) => SBValue(%p)",
m_opaque_sp.get(), var_name, scope, sb_value.get());
@@ -414,7 +414,7 @@ SBFrame::get() const
SBThread
SBFrame::GetThread () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
//if (log)
// log->Printf ("SBFrame::GetThread ()");
@@ -438,7 +438,7 @@ SBFrame::Disassemble () const
const char *disassembly = NULL;
if (m_opaque_sp)
disassembly = m_opaque_sp->Disassemble();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::Disassemble () => %s", m_opaque_sp.get(), disassembly);
@@ -453,7 +453,7 @@ SBFrame::GetVariables (bool arguments,
bool statics,
bool in_scope_only)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::GetVariables (arguments=%i, locals=%i, statics=%i, in_scope_only=%i)",
@@ -522,7 +522,7 @@ SBFrame::GetVariables (bool arguments,
lldb::SBValueList
SBFrame::GetRegisters ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBValueList value_list;
if (m_opaque_sp)
@@ -561,7 +561,7 @@ SBFrame::GetDescription (SBStream &description)
lldb::SBValue
SBFrame::EvaluateExpression (const char *expr)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
lldb::SBValue expr_result;
if (log)
diff --git a/lldb/source/API/SBFunction.cpp b/lldb/source/API/SBFunction.cpp
index 79b7543517b..d86e47d5969 100644
--- a/lldb/source/API/SBFunction.cpp
+++ b/lldb/source/API/SBFunction.cpp
@@ -62,7 +62,7 @@ SBFunction::GetName() const
if (m_opaque_ptr)
cstr = m_opaque_ptr->GetMangled().GetName().AsCString();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (cstr)
@@ -79,7 +79,7 @@ SBFunction::GetMangledName () const
const char *cstr = NULL;
if (m_opaque_ptr)
cstr = m_opaque_ptr->GetMangled().GetMangledName().AsCString();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (cstr)
diff --git a/lldb/source/API/SBHostOS.cpp b/lldb/source/API/SBHostOS.cpp
index 86cb66cccdb..d006f18cef4 100644
--- a/lldb/source/API/SBHostOS.cpp
+++ b/lldb/source/API/SBHostOS.cpp
@@ -35,7 +35,7 @@ SBHostOS::ThreadCreate
SBError *error_ptr
)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBHostOS::ThreadCreate (name=\"%s\", thread_function=%p, thread_arg=%p, error_ptr=%p)", name,
diff --git a/lldb/source/API/SBInputReader.cpp b/lldb/source/API/SBInputReader.cpp
index 98b03c1c0d0..2fe375023f1 100644
--- a/lldb/source/API/SBInputReader.cpp
+++ b/lldb/source/API/SBInputReader.cpp
@@ -33,7 +33,7 @@ SBInputReader::SBInputReader () :
SBInputReader::SBInputReader (const lldb::InputReaderSP &reader_sp) :
m_opaque_sp (reader_sp)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBInputReader::SBInputReader (reader_sp=%p) => SBInputReader(%p)", reader_sp.get(),
@@ -43,7 +43,7 @@ SBInputReader::SBInputReader (const lldb::InputReaderSP &reader_sp) :
SBInputReader::SBInputReader (const SBInputReader &rhs) :
m_opaque_sp (rhs.m_opaque_sp)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf("SBInputReader::SBInputReader (rhs.sp=%p) => SBInputReader(%p)",
@@ -84,7 +84,7 @@ SBInputReader::Initialize
bool echo
)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf("SBInputReader(%p)::Initialize (SBDebugger(%p), callback_function=%p, callback_baton=%p, "
@@ -194,7 +194,7 @@ SBInputReader::SetIsDone (bool value)
bool
SBInputReader::IsActive () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool ret_value = false;
if (m_opaque_sp)
diff --git a/lldb/source/API/SBLineEntry.cpp b/lldb/source/API/SBLineEntry.cpp
index 80bf84e6a3e..5187d584b7d 100644
--- a/lldb/source/API/SBLineEntry.cpp
+++ b/lldb/source/API/SBLineEntry.cpp
@@ -69,7 +69,7 @@ SBLineEntry::GetStartAddress () const
if (m_opaque_ap.get())
sb_address.SetAddress(&m_opaque_ap->range.GetBaseAddress());
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
StreamString sstr;
@@ -91,7 +91,7 @@ SBLineEntry::GetEndAddress () const
sb_address.SetAddress(&m_opaque_ap->range.GetBaseAddress());
sb_address.OffsetAddress(m_opaque_ap->range.GetByteSize());
}
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
StreamString sstr;
@@ -113,7 +113,7 @@ SBLineEntry::IsValid () const
SBFileSpec
SBLineEntry::GetFileSpec () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBFileSpec sb_file_spec;
if (m_opaque_ap.get() && m_opaque_ap->file)
@@ -133,7 +133,7 @@ SBLineEntry::GetFileSpec () const
uint32_t
SBLineEntry::GetLine () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t line = 0;
if (m_opaque_ap.get())
diff --git a/lldb/source/API/SBListener.cpp b/lldb/source/API/SBListener.cpp
index 00b98b260db..eb8a651a2e2 100644
--- a/lldb/source/API/SBListener.cpp
+++ b/lldb/source/API/SBListener.cpp
@@ -34,7 +34,7 @@ SBListener::SBListener (const char *name) :
{
m_opaque_ptr = m_opaque_sp.get();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBListener::SBListener (name=\"%s\") => SBListener(%p)",
@@ -93,7 +93,7 @@ SBListener::Clear ()
uint32_t
SBListener::StartListeningForEvents (const SBBroadcaster& broadcaster, uint32_t event_mask)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t acquired_event_mask = 0;
if (m_opaque_ptr && broadcaster.IsValid())
@@ -152,7 +152,7 @@ SBListener::StopListeningForEvents (const SBBroadcaster& broadcaster, uint32_t e
bool
SBListener::WaitForEvent (uint32_t timeout_secs, SBEvent &event)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (timeout_secs == UINT32_MAX)
diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp
index a631412c09b..7120e590daa 100644
--- a/lldb/source/API/SBModule.cpp
+++ b/lldb/source/API/SBModule.cpp
@@ -56,7 +56,7 @@ SBModule::IsValid () const
SBFileSpec
SBModule::GetFileSpec () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBFileSpec file_spec;
if (m_opaque_sp)
@@ -74,7 +74,7 @@ SBModule::GetFileSpec () const
const uint8_t *
SBModule::GetUUIDBytes () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const uint8_t *uuid_bytes = NULL;
if (m_opaque_sp)
diff --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp
index 8202a320c71..614c8dcaa01 100644
--- a/lldb/source/API/SBProcess.cpp
+++ b/lldb/source/API/SBProcess.cpp
@@ -99,7 +99,7 @@ SBProcess::IsValid() const
uint32_t
SBProcess::GetNumThreads ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t num_threads = 0;
if (m_opaque_sp)
@@ -117,7 +117,7 @@ SBProcess::GetNumThreads ()
SBThread
SBProcess::GetSelectedThread () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBThread sb_thread;
if (m_opaque_sp)
@@ -134,7 +134,7 @@ SBProcess::GetSelectedThread () const
SBTarget
SBProcess::GetTarget() const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBTarget sb_target;
if (m_opaque_sp)
@@ -150,7 +150,7 @@ SBProcess::GetTarget() const
size_t
SBProcess::PutSTDIN (const char *src, size_t src_len)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
size_t ret_val = 0;
if (m_opaque_sp != NULL)
@@ -179,7 +179,7 @@ SBProcess::GetSTDOUT (char *dst, size_t dst_len) const
bytes_read = m_opaque_sp->GetSTDOUT (dst, dst_len, error);
}
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetSTDOUT (dst=\"%.*s\", dst_len=%zu) => %zu",
m_opaque_sp.get(), (int) bytes_read, dst, dst_len, bytes_read);
@@ -197,7 +197,7 @@ SBProcess::GetSTDERR (char *dst, size_t dst_len) const
bytes_read = m_opaque_sp->GetSTDERR (dst, dst_len, error);
}
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetSTDERR (dst=\"%.*s\", dst_len=%zu) => %zu",
m_opaque_sp.get(), (int) bytes_read, dst, dst_len, bytes_read);
@@ -254,7 +254,7 @@ SBProcess::SetSelectedThread (const SBThread &thread)
bool
SBProcess::SetSelectedThreadByID (uint32_t tid)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool ret_val = false;
if (m_opaque_sp != NULL)
@@ -270,7 +270,7 @@ SBProcess::SetSelectedThreadByID (uint32_t tid)
SBThread
SBProcess::GetThreadAtIndex (size_t index)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBThread thread;
if (m_opaque_sp)
@@ -293,7 +293,7 @@ SBProcess::GetState ()
if (m_opaque_sp != NULL)
ret_val = m_opaque_sp->GetState();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetState () => %s",
m_opaque_sp.get(),
@@ -309,7 +309,7 @@ SBProcess::GetExitStatus ()
int exit_status = 0;
if (m_opaque_sp)
exit_status = m_opaque_sp->GetExitStatus ();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetExitStatus () => %i (0x%8.8x)",
m_opaque_sp.get(), exit_status, exit_status);
@@ -323,7 +323,7 @@ SBProcess::GetExitDescription ()
const char *exit_desc = NULL;
if (m_opaque_sp != NULL)
exit_desc = m_opaque_sp->GetExitDescription ();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetExitDescription () => %s",
m_opaque_sp.get(), exit_desc);
@@ -337,7 +337,7 @@ SBProcess::GetProcessID ()
if (m_opaque_sp)
ret_val = m_opaque_sp->GetID();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetProcessID () => %d", m_opaque_sp.get(), ret_val);
@@ -351,7 +351,7 @@ SBProcess::GetAddressByteSize () const
if (m_opaque_sp)
size = m_opaque_sp->GetAddressByteSize();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetAddressByteSize () => %d", m_opaque_sp.get(), size);
@@ -361,7 +361,7 @@ SBProcess::GetAddressByteSize () const
SBError
SBProcess::Continue ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::Continue ()...", m_opaque_sp.get());
@@ -403,7 +403,7 @@ SBProcess::Destroy ()
else
sb_error.SetErrorString ("SBProcess is invalid");
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
SBStream sstr;
@@ -425,7 +425,7 @@ SBProcess::Stop ()
else
sb_error.SetErrorString ("SBProcess is invalid");
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
SBStream sstr;
@@ -449,7 +449,7 @@ SBProcess::Kill ()
else
sb_error.SetErrorString ("SBProcess is invalid");
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
SBStream sstr;
@@ -514,7 +514,7 @@ SBProcess::Signal (int signo)
sb_error.SetError (m_opaque_sp->Signal (signo));
else
sb_error.SetErrorString ("SBProcess is invalid");
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
SBStream sstr;
@@ -535,7 +535,7 @@ SBProcess::GetThreadByID (tid_t tid)
if (m_opaque_sp)
sb_thread.SetThread (m_opaque_sp->GetThreadList().FindThreadByID ((tid_t) tid));
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
log->Printf ("SBProcess(%p)::GetThreadByID (tid=0x%4.4x) => SBThread (%p)",
@@ -550,7 +550,7 @@ SBProcess::GetThreadByID (tid_t tid)
StateType
SBProcess::GetStateFromEvent (const SBEvent &event)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
StateType ret_val = Process::ProcessEventData::GetStateFromEvent (event.get());
@@ -578,7 +578,7 @@ SBProcess::GetProcessFromEvent (const SBEvent &event)
SBBroadcaster
SBProcess::GetBroadcaster () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBroadcaster broadcaster(m_opaque_sp.get(), false);
@@ -598,7 +598,7 @@ SBProcess::operator->() const
size_t
SBProcess::ReadMemory (addr_t addr, void *dst, size_t dst_len, SBError &sb_error)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
size_t bytes_read = 0;
@@ -645,7 +645,7 @@ SBProcess::WriteMemory (addr_t addr, const void *src, size_t src_len, SBError &s
{
size_t bytes_written = 0;
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
log->Printf ("SBProcess(%p)::WriteMemory (addr=0x%llx, src=%p, dst_len=%zu, SBError (%p))...",
diff --git a/lldb/source/API/SBSymbol.cpp b/lldb/source/API/SBSymbol.cpp
index b8dc521636c..e8281a1b193 100644
--- a/lldb/source/API/SBSymbol.cpp
+++ b/lldb/source/API/SBSymbol.cpp
@@ -60,7 +60,7 @@ SBSymbol::GetName() const
if (m_opaque_ptr)
name = m_opaque_ptr->GetMangled().GetName().AsCString();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBSymbol(%p)::GetName () => \"%s\"", m_opaque_ptr, name ? name : "");
return name;
@@ -72,7 +72,7 @@ SBSymbol::GetMangledName () const
const char *name = NULL;
if (m_opaque_ptr)
name = m_opaque_ptr->GetMangled().GetMangledName().AsCString();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBSymbol(%p)::GetMangledName () => \"%s\"", m_opaque_ptr, name ? name : "");
diff --git a/lldb/source/API/SBSymbolContext.cpp b/lldb/source/API/SBSymbolContext.cpp
index 9d97f545d9a..76c607f7078 100644
--- a/lldb/source/API/SBSymbolContext.cpp
+++ b/lldb/source/API/SBSymbolContext.cpp
@@ -86,7 +86,7 @@ SBSymbolContext::IsValid () const
SBModule
SBSymbolContext::GetModule ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBModule sb_module;
if (m_opaque_ap.get())
@@ -112,7 +112,7 @@ SBSymbolContext::GetCompileUnit ()
SBFunction
SBSymbolContext::GetFunction ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Function *function = NULL;
@@ -137,7 +137,7 @@ SBSymbolContext::GetBlock ()
SBLineEntry
SBSymbolContext::GetLineEntry ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBLineEntry sb_line_entry;
if (m_opaque_ap.get())
@@ -155,7 +155,7 @@ SBSymbolContext::GetLineEntry ()
SBSymbol
SBSymbolContext::GetSymbol ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Symbol *symbol = NULL;
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 0154d601bbd..ad86ccf3f7f 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -93,7 +93,7 @@ SBTarget::GetProcess ()
if (m_opaque_sp)
sb_process.SetProcess (m_opaque_sp->GetProcessSP());
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
log->Printf ("SBTarget(%p)::GetProcess () => SBProcess(%p)",
@@ -123,7 +123,7 @@ SBTarget::CreateProcess ()
if (m_opaque_sp)
sb_process.SetProcess (m_opaque_sp->CreateProcess (m_opaque_sp->GetDebugger().GetListener()));
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
log->Printf ("SBTarget(%p)::CreateProcess () => SBProcess(%p)",
@@ -144,7 +144,7 @@ SBTarget::LaunchProcess
bool stop_at_entry
)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBTarget(%p)::LaunchProcess (argv=%p, envp=%p, tty=\"%s\", launch_flags=%d, stop_at_entry=%i)",
@@ -174,7 +174,7 @@ SBTarget::Launch
SBError &error
)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
@@ -333,7 +333,7 @@ SBTarget::GetExecutable ()
exe_file_spec.SetFileSpec (exe_module_sp->GetFileSpec());
}
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
log->Printf ("SBTarget(%p)::GetExecutable () => SBFileSpec(%p)",
@@ -392,7 +392,7 @@ SBTarget::BreakpointCreateByLocation (const char *file, uint32_t line)
SBBreakpoint
SBTarget::BreakpointCreateByLocation (const SBFileSpec &sb_file_spec, uint32_t line)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBreakpoint sb_bp;
if (m_opaque_sp.get() && line != 0)
@@ -418,7 +418,7 @@ SBTarget::BreakpointCreateByLocation (const SBFileSpec &sb_file_spec, uint32_t l
SBBreakpoint
SBTarget::BreakpointCreateByName (const char *symbol_name, const char *module_name)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBreakpoint sb_bp;
if (m_opaque_sp.get() && symbol_name && symbol_name[0])
@@ -446,7 +446,7 @@ SBTarget::BreakpointCreateByName (const char *symbol_name, const char *module_na
SBBreakpoint
SBTarget::BreakpointCreateByRegex (const char *symbol_name_regex, const char *module_name)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBreakpoint sb_bp;
if (m_opaque_sp.get() && symbol_name_regex && symbol_name_regex[0])
@@ -479,7 +479,7 @@ SBTarget::BreakpointCreateByRegex (const char *symbol_name_regex, const char *mo
SBBreakpoint
SBTarget::BreakpointCreateByAddress (addr_t address)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBreakpoint sb_bp;
if (m_opaque_sp.get())
@@ -496,7 +496,7 @@ SBTarget::BreakpointCreateByAddress (addr_t address)
SBBreakpoint
SBTarget::FindBreakpointByID (break_id_t bp_id)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBreakpoint sb_breakpoint;
if (m_opaque_sp && bp_id != LLDB_INVALID_BREAK_ID)
@@ -531,7 +531,7 @@ SBTarget::GetBreakpointAtIndex (uint32_t idx) const
bool
SBTarget::BreakpointDelete (break_id_t bp_id)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool result = false;
if (m_opaque_sp)
@@ -582,7 +582,7 @@ SBTarget::DeleteAllBreakpoints ()
uint32_t
SBTarget::GetNumModules () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t num = 0;
if (m_opaque_sp)
@@ -597,7 +597,7 @@ SBTarget::GetNumModules () const
void
SBTarget::Clear ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBTarget(%p)::Clear ()", m_opaque_sp.get());
@@ -618,7 +618,7 @@ SBTarget::FindModule (const SBFileSpec &sb_file_spec)
SBModule
SBTarget::GetModuleAtIndex (uint32_t idx)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBModule sb_module;
if (m_opaque_sp)
@@ -637,7 +637,7 @@ SBTarget::GetModuleAtIndex (uint32_t idx)
SBBroadcaster
SBTarget::GetBroadcaster () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBroadcaster broadcaster(m_opaque_sp.get(), false);
diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp
index ca356244d78..9470a8b7110 100644
--- a/lldb/source/API/SBThread.cpp
+++ b/lldb/source/API/SBThread.cpp
@@ -91,7 +91,7 @@ SBThread::Clear ()
StopReason
SBThread::GetStopReason()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
StopReason reason = eStopReasonInvalid;
if (m_opaque_sp)
@@ -111,7 +111,7 @@ SBThread::GetStopReason()
size_t
SBThread::GetStopDescription (char *dst, size_t dst_len)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (m_opaque_sp)
{
@@ -218,7 +218,7 @@ SBThread::SetThread (const ThreadSP& lldb_object_sp)
lldb::tid_t
SBThread::GetThreadID () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
lldb::tid_t id = LLDB_INVALID_THREAD_ID;
if (m_opaque_sp)
@@ -244,7 +244,7 @@ SBThread::GetName () const
if (m_opaque_sp)
name = m_opaque_sp->GetName();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBThread(%p)::GetName () => %s", m_opaque_sp.get(), name ? name : "NULL");
@@ -258,7 +258,7 @@ SBThread::GetQueueName () const
if (m_opaque_sp)
name = m_opaque_sp->GetQueueName();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBThread(%p)::GetQueueName () => %s", m_opaque_sp.get(), name ? name : "NULL");
@@ -269,7 +269,7 @@ SBThread::GetQueueName () const
void
SBThread::StepOver (lldb::RunMode stop_other_threads)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBThread(%p)::StepOver (stop_other_threads='%s')", m_opaque_sp.get(),
@@ -318,7 +318,7 @@ SBThread::StepOver (lldb::RunMode stop_other_threads)
void
SBThread::StepInto (lldb::RunMode stop_other_threads)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBThread(%p)::StepInto (stop_other_threads='%s')", m_opaque_sp.get(),
@@ -365,7 +365,7 @@ SBThread::StepInto (lldb::RunMode stop_other_threads)
void
SBThread::StepOut ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBThread(%p)::StepOut ()", m_opaque_sp.get());
@@ -393,7 +393,7 @@ SBThread::StepOut ()
void
SBThread::StepInstruction (bool step_over)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBThread(%p)::StepInstruction (step_over=%i)", m_opaque_sp.get(), step_over);
@@ -417,7 +417,7 @@ SBThread::StepInstruction (bool step_over)
void
SBThread::RunToAddress (lldb::addr_t addr)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBThread(%p)::RunToAddress (addr=0x%llx)", m_opaque_sp.get(), addr);
@@ -455,7 +455,7 @@ SBThread::GetProcess ()
process.SetProcess(m_opaque_sp->GetProcess().GetTarget().GetProcessSP());
}
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
SBStream sstr;
@@ -470,7 +470,7 @@ SBThread::GetProcess ()
uint32_t
SBThread::GetNumFrames ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t num_frames = 0;
if (m_opaque_sp)
@@ -485,7 +485,7 @@ SBThread::GetNumFrames ()
SBFrame
SBThread::GetFrameAtIndex (uint32_t idx)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBFrame sb_frame;
if (m_opaque_sp)
diff --git a/lldb/source/API/SBType.cpp b/lldb/source/API/SBType.cpp
index 271049d3d65..4f9559b5b3c 100644
--- a/lldb/source/API/SBType.cpp
+++ b/lldb/source/API/SBType.cpp
@@ -21,7 +21,7 @@ using namespace lldb_private;
bool
SBType::IsPointerType (void *opaque_type)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
//if (log)
// log->Printf ("SBType::IsPointerType (%p)", opaque_type);
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp
index a4b3db2cc14..538324cb25a 100644
--- a/lldb/source/API/SBValue.cpp
+++ b/lldb/source/API/SBValue.cpp
@@ -89,7 +89,7 @@ SBValue::GetName()
if (m_opaque_sp)
name = m_opaque_sp->GetName().GetCString();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (name)
@@ -107,7 +107,7 @@ SBValue::GetTypeName ()
const char *name = NULL;
if (m_opaque_sp)
name = m_opaque_sp->GetTypeName().GetCString();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (name)
@@ -127,7 +127,7 @@ SBValue::GetByteSize ()
if (m_opaque_sp)
result = m_opaque_sp->GetByteSize();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::GetByteSize () => %zu", m_opaque_sp.get(), result);
@@ -142,7 +142,7 @@ SBValue::IsInScope (const SBFrame &frame)
if (m_opaque_sp)
result = m_opaque_sp->IsInScope (frame.get());
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::IsInScope () => %i", m_opaque_sp.get(), result);
@@ -155,7 +155,7 @@ SBValue::GetValue (const SBFrame &frame)
const char *cstr = NULL;
if ( m_opaque_sp)
cstr = m_opaque_sp->GetValueAsCString (frame.get());
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (cstr)
@@ -173,7 +173,7 @@ SBValue::GetValueType ()
ValueType result = eValueTypeInvalid;
if (m_opaque_sp)
result = m_opaque_sp->GetValueType();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
switch (result)
@@ -198,7 +198,7 @@ SBValue::GetObjectDescription (const SBFrame &frame)
const char *cstr = NULL;
if ( m_opaque_sp)
cstr = m_opaque_sp->GetObjectDescription (frame.get());
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (cstr)
@@ -215,7 +215,7 @@ SBValue::GetValueDidChange (const SBFrame &frame)
bool result = false;
if (m_opaque_sp)
result = m_opaque_sp->GetValueDidChange (frame.get());
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::GetValueDidChange (SBFrame(%p)) => %i", m_opaque_sp.get(), frame.get(), result);
@@ -228,7 +228,7 @@ SBValue::GetSummary (const SBFrame &frame)
const char *cstr = NULL;
if (m_opaque_sp)
cstr = m_opaque_sp->GetSummaryAsCString(frame.get());
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (cstr)
@@ -245,7 +245,7 @@ SBValue::GetLocation (const SBFrame &frame)
const char *cstr = NULL;
if (m_opaque_sp)
cstr = m_opaque_sp->GetLocationAsCString(frame.get());
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (cstr)
@@ -276,7 +276,7 @@ SBValue::GetChildAtIndex (uint32_t idx)
}
SBValue sb_value (child_sp);
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::GetChildAtIndex (%u) => SBValue(%p)", m_opaque_sp.get(), idx, sb_value.get());
@@ -289,7 +289,7 @@ SBValue::GetIndexOfChildWithName (const char *name)
uint32_t idx = UINT32_MAX;
if (m_opaque_sp)
idx = m_opaque_sp->GetIndexOfChildWithName (ConstString(name));
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (idx == UINT32_MAX)
@@ -313,7 +313,7 @@ SBValue::GetChildMemberWithName (const char *name)
SBValue sb_value (child_sp);
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::GetChildMemberWithName (name=\"%s\") => SBValue(%p)", m_opaque_sp.get(), name, sb_value.get());
@@ -329,7 +329,7 @@ SBValue::GetNumChildren ()
if (m_opaque_sp)
num_children = m_opaque_sp->GetNumChildren();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::GetNumChildren () => %u", m_opaque_sp.get(), num_children);
@@ -357,7 +357,7 @@ SBValue::Dereference ()
if (m_opaque_sp->IsPointerType())
sb_value = GetChildAtIndex(0);
}
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::Dereference () => SBValue(%p)", m_opaque_sp.get(), sb_value.get());
@@ -372,7 +372,7 @@ SBValue::TypeIsPointerType ()
if (m_opaque_sp)
is_ptr_type = m_opaque_sp->IsPointerType();
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::TypeIsPointerType () => %i", m_opaque_sp.get(), is_ptr_type);
diff --git a/lldb/source/API/SBValueList.cpp b/lldb/source/API/SBValueList.cpp
index 9f911b757e3..b83d5671723 100644
--- a/lldb/source/API/SBValueList.cpp
+++ b/lldb/source/API/SBValueList.cpp
@@ -27,7 +27,7 @@ SBValueList::SBValueList () :
SBValueList::SBValueList (const SBValueList &rhs) :
m_opaque_ap ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (rhs.IsValid())
m_opaque_ap.reset (new lldb_private::ValueObjectList (*rhs));
@@ -51,7 +51,7 @@ SBValueList::SBValueList (const SBValueList &rhs) :
SBValueList::SBValueList (const lldb_private::ValueObjectList *lldb_object_ptr) :
m_opaque_ap ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (lldb_object_ptr)
m_opaque_ap.reset (new lldb_private::ValueObjectList (*lldb_object_ptr));
@@ -144,7 +144,7 @@ SBValueList::Append (lldb::ValueObjectSP& val_obj_sp)
SBValue
SBValueList::GetValueAtIndex (uint32_t idx) const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
//if (log)
// log->Printf ("SBValueList::GetValueAtIndex (uint32_t idx) idx = %d", idx);
@@ -167,7 +167,7 @@ SBValueList::GetValueAtIndex (uint32_t idx) const
uint32_t
SBValueList::GetSize () const
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
//if (log)
// log->Printf ("SBValueList::GetSize ()");
OpenPOWER on IntegriCloud