<rdar://problem/13521159>

LLDB is crashing when logging is enabled from lldb-perf-clang. This has to do with the global destructor chain as the process and its threads are being torn down.

All logging channels now make one and only one instance that is kept in a global pointer which is never freed. This guarantees that logging can correctly continue as the process tears itself down.

llvm-svn: 178191
This commit is contained in:
Greg Clayton 2013-03-27 23:08:40 +00:00
parent ccc266559f
commit 5160ce5c72
155 changed files with 1008 additions and 1001 deletions

View file

@ -61,10 +61,10 @@ public:
// Callback definitions for abstracted plug-in log access.
//------------------------------------------------------------------
typedef void (*DisableCallback) (const char **categories, Stream *feedback_strm);
typedef lldb::LogSP (*EnableCallback) (lldb::StreamSP &log_stream_sp,
uint32_t log_options,
const char **categories,
Stream *feedback_strm);
typedef Log * (*EnableCallback) (lldb::StreamSP &log_stream_sp,
uint32_t log_options,
const char **categories,
Stream *feedback_strm);
typedef void (*ListCategoriesCallback) (Stream *strm);
struct Callbacks
@ -119,7 +119,7 @@ public:
//------------------------------------------------------------------
Log ();
Log (lldb::StreamSP &stream_sp);
Log (const lldb::StreamSP &stream_sp);
~Log ();
@ -177,6 +177,12 @@ public:
bool
GetDebug() const;
void
SetStream (const lldb::StreamSP &stream_sp)
{
m_stream_sp = stream_sp;
}
protected:
//------------------------------------------------------------------
// Member variables
@ -218,7 +224,7 @@ public:
ListCategories (Stream *strm) = 0;
protected:
lldb::LogSP m_log_sp;
std::unique_ptr<Log> m_log_ap;
private:
DISALLOW_COPY_AND_ASSIGN (LogChannel);

View file

@ -156,8 +156,7 @@ public:
Dump (Stream *s) const;
void
LogUUIDAndPaths (lldb::LogSP &log_sp,
const char *prefix_cstr);
LogUUIDAndPaths (Log *log, const char *prefix_cstr);
Mutex &
GetMutex () const

View file

@ -34,8 +34,6 @@
#include "lldb/Target/StackFrame.h"
#include "lldb/Target/TargetList.h"
using lldb::LogSP;
namespace lldb_private {
// this file (and its. cpp) contain the low-level implementation of LLDB Data Visualization
@ -471,7 +469,7 @@ protected:
MapValueType& entry,
uint32_t& reason)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
// for bitfields, append size to the typename so one can custom format them
StreamString sstring;
sstring.Printf("%s:%d",typeName.AsCString(),valobj.GetBitfieldBitSize());
@ -496,7 +494,7 @@ protected:
bool Get_ObjC (ValueObject& valobj,
MapValueType& entry)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
lldb::ProcessSP process_sp = valobj.GetProcessSP();
ObjCLanguageRuntime* runtime = process_sp->GetObjCLanguageRuntime();
if (runtime == NULL)
@ -533,7 +531,7 @@ protected:
lldb::DynamicValueType use_dynamic,
uint32_t& reason)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
if (type.isNull())
{
@ -649,7 +647,7 @@ protected:
lldb::DynamicValueType use_dynamic,
uint32_t& reason)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
if (Get_Impl (valobj,type,entry,use_dynamic,reason))
return true;

View file

@ -31,7 +31,7 @@ public:
const char *GetCString();
void ToSTDERR();
void ToLog(lldb::LogSP &log, const char *prefix);
void ToLog(Log *log, const char *prefix);
void ToStream(lldb::StreamSP &stream);
private:
std::string m_dump;

View file

@ -451,7 +451,7 @@ private:
{
}
void dump (lldb::LogSP log);
void dump (Log *log);
};
//----------------------------------------------------------------------

View file

@ -24,7 +24,7 @@ namespace lldb_private {
class ClangASTMetrics
{
public:
static void DumpCounters (lldb::LogSP log);
static void DumpCounters (Log *log);
static void ClearLocalCounters ()
{
local_counters = { 0, 0, 0, 0, 0, 0 };
@ -80,7 +80,7 @@ private:
static Counters global_counters;
static Counters local_counters;
static void DumpCounters (lldb::LogSP log, Counters &counters);
static void DumpCounters (Log *log, Counters &counters);
};
class ClangASTImporter

View file

@ -306,7 +306,6 @@ namespace lldb {
typedef STD_SHARED_PTR(lldb_private::LanguageRuntime) LanguageRuntimeSP;
typedef STD_SHARED_PTR(lldb_private::LineTable) LineTableSP;
typedef STD_SHARED_PTR(lldb_private::Listener) ListenerSP;
typedef STD_SHARED_PTR(lldb_private::Log) LogSP;
typedef STD_SHARED_PTR(lldb_private::LogChannel) LogChannelSP;
typedef STD_SHARED_PTR(lldb_private::Module) ModuleSP;
typedef STD_WEAK_PTR( lldb_private::Module) ModuleWP;
@ -324,7 +323,6 @@ namespace lldb {
typedef STD_SHARED_PTR(lldb_private::OptionValueFormat) OptionValueFormatSP;
typedef STD_SHARED_PTR(lldb_private::OptionValuePathMappings) OptionValuePathMappingsSP;
typedef STD_SHARED_PTR(lldb_private::OptionValueProperties) OptionValuePropertiesSP;
// typedef STD_WEAK_PTR( lldb_private::OptionValueProperties) OptionValuePropertiesWP;
typedef STD_SHARED_PTR(lldb_private::OptionValueRegex) OptionValueRegexSP;
typedef STD_SHARED_PTR(lldb_private::OptionValueSInt64) OptionValueSInt64SP;
typedef STD_SHARED_PTR(lldb_private::OptionValueString) OptionValueStringSP;

View file

@ -63,10 +63,10 @@ LogIfAllCategoriesSet (uint32_t mask, const char *format, ...);
void
LogIfAnyCategoriesSet (uint32_t mask, const char *format, ...);
lldb::LogSP
Log *
GetLogIfAllCategoriesSet (uint32_t mask);
lldb::LogSP
Log *
GetLogIfAnyCategoriesSet (uint32_t mask);
uint32_t
@ -78,7 +78,7 @@ IsLogVerbose ();
void
DisableLog (const char **categories, Stream *feedback_strm);
lldb::LogSP
Log *
EnableLog (lldb::StreamSP &log_stream_sp, uint32_t log_options, const char **categories, Stream *feedback_strm);
void

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0450"
LastUpgradeVersion = "0500"
version = "1.8">
<BuildAction
parallelizeBuildables = "NO"
@ -56,7 +56,6 @@
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
enableOpenGLFrameCaptureMode = "0"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0450"
LastUpgradeVersion = "0500"
version = "1.8">
<BuildAction
parallelizeBuildables = "NO"
@ -47,7 +47,6 @@
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
enableOpenGLFrameCaptureMode = "0"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0450"
LastUpgradeVersion = "0500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@ -38,7 +38,6 @@
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
enableOpenGLFrameCaptureMode = "0"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0450"
LastUpgradeVersion = "0500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@ -38,7 +38,6 @@
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
enableOpenGLFrameCaptureMode = "0"
allowLocationSimulation = "YES">
<PathRunnable
FilePath = "/Users/moi/Library/Developer/Xcode/DerivedData/Xcode-ezhudafllefyhcfivqaeslnymjsj/Build/Products/Debug/LLDB.framework/XPCServices/com.apple.lldb.launcherXPCService.xpc/Contents/MacOS/com.apple.lldb.launcherXPCService">

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0450"
LastUpgradeVersion = "0500"
version = "1.3">
<BuildAction
parallelizeBuildables = "NO"

View file

@ -115,7 +115,7 @@ SBAddress::GetFileAddress () const
lldb::addr_t
SBAddress::GetLoadAddress (const SBTarget &target) const
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
lldb::addr_t addr = LLDB_INVALID_ADDRESS;
TargetSP target_sp (target.GetSP());

View file

@ -103,7 +103,7 @@ SBBreakpoint::operator == (const lldb::SBBreakpoint& rhs)
break_id_t
SBBreakpoint::GetID () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
break_id_t break_id = LLDB_INVALID_BREAK_ID;
if (m_opaque_sp)
@ -210,7 +210,7 @@ SBBreakpoint::GetLocationAtIndex (uint32_t index)
void
SBBreakpoint::SetEnabled (bool enable)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::SetEnabled (enabled=%i)", m_opaque_sp.get(), enable);
@ -237,7 +237,7 @@ SBBreakpoint::IsEnabled ()
void
SBBreakpoint::SetOneShot (bool one_shot)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::SetOneShot (one_shot=%i)", m_opaque_sp.get(), one_shot);
@ -276,7 +276,7 @@ SBBreakpoint::IsInternal ()
void
SBBreakpoint::SetIgnoreCount (uint32_t count)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::SetIgnoreCount (count=%u)", m_opaque_sp.get(), count);
@ -319,7 +319,7 @@ SBBreakpoint::GetHitCount () const
count = m_opaque_sp->GetHitCount();
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::GetHitCount () => %u", m_opaque_sp.get(), count);
@ -336,7 +336,7 @@ SBBreakpoint::GetIgnoreCount () const
count = m_opaque_sp->GetIgnoreCount();
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::GetIgnoreCount () => %u", m_opaque_sp.get(), count);
@ -351,7 +351,7 @@ SBBreakpoint::SetThreadID (tid_t tid)
Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
m_opaque_sp->SetThreadID (tid);
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
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);
@ -367,7 +367,7 @@ SBBreakpoint::GetThreadID ()
tid = m_opaque_sp->GetThreadID();
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::GetThreadID () => 0x%4.4" PRIx64, m_opaque_sp.get(), tid);
return tid;
@ -376,7 +376,7 @@ SBBreakpoint::GetThreadID ()
void
SBBreakpoint::SetThreadIndex (uint32_t index)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::SetThreadIndex (%u)", m_opaque_sp.get(), index);
if (m_opaque_sp)
@ -397,7 +397,7 @@ SBBreakpoint::GetThreadIndex() const
if (thread_spec != NULL)
thread_idx = thread_spec->GetIndex();
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::GetThreadIndex () => %u", m_opaque_sp.get(), thread_idx);
@ -408,7 +408,7 @@ SBBreakpoint::GetThreadIndex() const
void
SBBreakpoint::SetThreadName (const char *thread_name)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::SetThreadName (%s)", m_opaque_sp.get(), thread_name);
@ -430,7 +430,7 @@ SBBreakpoint::GetThreadName () const
if (thread_spec != NULL)
name = thread_spec->GetName();
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::GetThreadName () => %s", m_opaque_sp.get(), name);
@ -440,7 +440,7 @@ SBBreakpoint::GetThreadName () const
void
SBBreakpoint::SetQueueName (const char *queue_name)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *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)
@ -461,7 +461,7 @@ SBBreakpoint::GetQueueName () const
if (thread_spec)
name = thread_spec->GetQueueName();
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::GetQueueName () => %s", m_opaque_sp.get(), name);
@ -477,7 +477,7 @@ SBBreakpoint::GetNumResolvedLocations() const
Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
num_resolved = m_opaque_sp->GetNumResolvedLocations();
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::GetNumResolvedLocations () => %" PRIu64, m_opaque_sp.get(), (uint64_t)num_resolved);
return num_resolved;
@ -492,7 +492,7 @@ SBBreakpoint::GetNumLocations() const
Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
num_locs = m_opaque_sp->GetNumLocations();
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBreakpoint(%p)::GetNumLocations () => %" PRIu64, m_opaque_sp.get(), (uint64_t)num_locs);
return num_locs;
@ -557,7 +557,7 @@ SBBreakpoint::PrivateBreakpointHitCallback
void
SBBreakpoint::SetCallback (BreakpointHitCallback callback, void *baton)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
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);

View file

@ -36,7 +36,7 @@ SBBreakpointLocation::SBBreakpointLocation () :
SBBreakpointLocation::SBBreakpointLocation (const lldb::BreakpointLocationSP &break_loc_sp) :
m_opaque_sp (break_loc_sp)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
@ -296,7 +296,7 @@ SBBreakpointLocation::GetID ()
SBBreakpoint
SBBreakpointLocation::GetBreakpoint ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
//if (log)
// log->Printf ("SBBreakpointLocation::GetBreakpoint ()");

View file

@ -29,7 +29,7 @@ SBBroadcaster::SBBroadcaster (const char *name) :
m_opaque_ptr (NULL)
{
m_opaque_ptr = m_opaque_sp.get();
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE));
if (log)
log->Printf ("SBBroadcaster::SBBroadcaster (name=\"%s\") => SBBroadcaster(%p)",
@ -40,7 +40,7 @@ SBBroadcaster::SBBroadcaster (lldb_private::Broadcaster *broadcaster, bool owns)
m_opaque_sp (owns ? broadcaster : NULL),
m_opaque_ptr (broadcaster)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE));
if (log)
log->Printf ("SBBroadcaster::SBBroadcaster (broadcaster=%p, bool owns=%i) => SBBroadcaster(%p)",
@ -72,7 +72,7 @@ SBBroadcaster::~SBBroadcaster()
void
SBBroadcaster::BroadcastEventByType (uint32_t event_type, bool unique)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *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);
@ -89,7 +89,7 @@ SBBroadcaster::BroadcastEventByType (uint32_t event_type, bool unique)
void
SBBroadcaster::BroadcastEvent (const SBEvent &event, bool unique)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBBroadcaster(%p)::BroadcastEventByType (SBEvent(%p), unique=%i)", m_opaque_ptr, event.get(), unique);
@ -107,7 +107,7 @@ SBBroadcaster::BroadcastEvent (const SBEvent &event, bool unique)
void
SBBroadcaster::AddInitialEventsToListener (const SBListener &listener, uint32_t requested_events)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *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)

View file

@ -61,7 +61,7 @@ protected:
SBCommandInterpreter::SBCommandInterpreter (CommandInterpreter *interpreter) :
m_opaque_ptr (interpreter)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommandInterpreter::SBCommandInterpreter (interpreter=%p)"
@ -110,7 +110,7 @@ SBCommandInterpreter::AliasExists (const char *cmd)
lldb::ReturnStatus
SBCommandInterpreter::HandleCommand (const char *command_line, SBCommandReturnObject &result, bool add_to_history)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommandInterpreter(%p)::HandleCommand (command=\"%s\", SBCommandReturnObject(%p), add_to_history=%i)",
@ -148,7 +148,7 @@ SBCommandInterpreter::HandleCompletion (const char *current_line,
int max_return_elements,
SBStringList &matches)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
int num_completions = 0;
// Sanity check the arguments that are passed in:
@ -233,7 +233,7 @@ SBCommandInterpreter::GetProcess ()
sb_process.SetSP(process_sp);
}
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommandInterpreter(%p)::GetProcess () => SBProcess(%p)",
@ -249,7 +249,7 @@ SBCommandInterpreter::GetDebugger ()
SBDebugger sb_debugger;
if (m_opaque_ptr)
sb_debugger.reset(m_opaque_ptr->GetDebugger().shared_from_this());
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommandInterpreter(%p)::GetDebugger () => SBDebugger(%p)",
@ -295,7 +295,7 @@ SBCommandInterpreter::SourceInitFileInHomeDirectory (SBCommandReturnObject &resu
result->AppendError ("SBCommandInterpreter is not valid");
result->SetStatus (eReturnStatusFailed);
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommandInterpreter(%p)::SourceInitFileInHomeDirectory (&SBCommandReturnObject(%p))",
@ -320,7 +320,7 @@ SBCommandInterpreter::SourceInitFileInCurrentWorkingDirectory (SBCommandReturnOb
result->AppendError ("SBCommandInterpreter is not valid");
result->SetStatus (eReturnStatusFailed);
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommandInterpreter(%p)::SourceInitFileInCurrentWorkingDirectory (&SBCommandReturnObject(%p))",
@ -330,7 +330,7 @@ SBCommandInterpreter::SourceInitFileInCurrentWorkingDirectory (SBCommandReturnOb
SBBroadcaster
SBCommandInterpreter::GetBroadcaster ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBroadcaster broadcaster (m_opaque_ptr, false);

View file

@ -68,7 +68,7 @@ SBCommandReturnObject::IsValid() const
const char *
SBCommandReturnObject::GetOutput ()
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (m_opaque_ap.get())
{
@ -88,7 +88,7 @@ SBCommandReturnObject::GetOutput ()
const char *
SBCommandReturnObject::GetError ()
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (m_opaque_ap.get())
{

View file

@ -28,7 +28,7 @@ SBCommunication::SBCommunication(const char * broadcaster_name) :
m_opaque (new Communication (broadcaster_name)),
m_opaque_owned (true)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommunication::SBCommunication (broadcaster_name=\"%s\") => "
@ -79,7 +79,7 @@ SBCommunication::Connect (const char *url)
ConnectionStatus
SBCommunication::AdoptFileDesriptor (int fd, bool owns_fd)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
ConnectionStatus status = eConnectionStatusNoConnection;
if (m_opaque)
@ -107,7 +107,7 @@ SBCommunication::AdoptFileDesriptor (int fd, bool owns_fd)
ConnectionStatus
SBCommunication::Disconnect ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
ConnectionStatus status= eConnectionStatusNoConnection;
if (m_opaque)
@ -123,7 +123,7 @@ SBCommunication::Disconnect ()
bool
SBCommunication::IsConnected () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool result = false;
if (m_opaque)
result = m_opaque->IsConnected ();
@ -137,7 +137,7 @@ SBCommunication::IsConnected () const
size_t
SBCommunication::Read (void *dst, size_t dst_len, uint32_t timeout_usec, ConnectionStatus &status)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommunication(%p)::Read (dst=%p, dst_len=%" PRIu64 ", timeout_usec=%u, &status)...",
m_opaque,
@ -171,7 +171,7 @@ SBCommunication::Write (const void *src, size_t src_len, ConnectionStatus &statu
else
status = eConnectionStatusNoConnection;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommunication(%p)::Write (src=%p, src_len=%" PRIu64 ", &status=%s) => %" PRIu64,
m_opaque, src, (uint64_t)src_len, Communication::ConnectionStatusAsCString (status), (uint64_t)bytes_written);
@ -182,7 +182,7 @@ SBCommunication::Write (const void *src, size_t src_len, ConnectionStatus &statu
bool
SBCommunication::ReadThreadStart ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool success = false;
if (m_opaque)
@ -199,7 +199,7 @@ SBCommunication::ReadThreadStart ()
bool
SBCommunication::ReadThreadStop ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommunication(%p)::ReadThreadStop ()...", m_opaque);
@ -219,7 +219,7 @@ SBCommunication::ReadThreadIsRunning ()
bool result = false;
if (m_opaque)
result = m_opaque->ReadThreadIsRunning ();
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommunication(%p)::ReadThreadIsRunning () => %i", m_opaque, result);
return result;
@ -232,7 +232,7 @@ SBCommunication::SetReadThreadBytesReceivedCallback
void *callback_baton
)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool result = false;
if (m_opaque)
@ -253,7 +253,7 @@ SBCommunication::GetBroadcaster ()
{
SBBroadcaster broadcaster (m_opaque, false);
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBCommunication(%p)::GetBroadcaster () => SBBroadcaster (%p)",

View file

@ -71,7 +71,7 @@ SBCompileUnit::GetNumLineEntries () const
SBLineEntry
SBCompileUnit::GetLineEntryAtIndex (uint32_t idx) const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBLineEntry sb_line_entry;
if (m_opaque_ptr)
@ -106,7 +106,7 @@ SBCompileUnit::FindLineEntryIndex (uint32_t start_idx, uint32_t line, SBFileSpec
uint32_t
SBCompileUnit::FindLineEntryIndex (uint32_t start_idx, uint32_t line, SBFileSpec *inline_file_spec, bool exact) const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t index = UINT32_MAX;
if (m_opaque_ptr)
@ -157,7 +157,7 @@ SBCompileUnit::GetNumSupportFiles () const
SBFileSpec
SBCompileUnit::GetSupportFileAtIndex (uint32_t idx) const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBFileSpec sb_file_spec;
if (m_opaque_ptr)

View file

@ -86,7 +86,7 @@ SBData::IsValid()
uint8_t
SBData::GetAddressByteSize ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint8_t value = 0;
if (m_opaque_sp.get())
value = m_opaque_sp->GetAddressByteSize();
@ -99,7 +99,7 @@ SBData::GetAddressByteSize ()
void
SBData::SetAddressByteSize (uint8_t addr_byte_size)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (m_opaque_sp.get())
m_opaque_sp->SetAddressByteSize(addr_byte_size);
if (log)
@ -116,7 +116,7 @@ SBData::Clear ()
size_t
SBData::GetByteSize ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
size_t value = 0;
if (m_opaque_sp.get())
value = m_opaque_sp->GetByteSize();
@ -129,7 +129,7 @@ SBData::GetByteSize ()
lldb::ByteOrder
SBData::GetByteOrder ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
lldb::ByteOrder value = eByteOrderInvalid;
if (m_opaque_sp.get())
value = m_opaque_sp->GetByteOrder();
@ -142,7 +142,7 @@ SBData::GetByteOrder ()
void
SBData::SetByteOrder (lldb::ByteOrder endian)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (m_opaque_sp.get())
m_opaque_sp->SetByteOrder(endian);
if (log)
@ -153,7 +153,7 @@ SBData::SetByteOrder (lldb::ByteOrder endian)
float
SBData::GetFloat (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
float value = 0;
if (!m_opaque_sp.get())
{
@ -175,7 +175,7 @@ SBData::GetFloat (lldb::SBError& error, lldb::offset_t offset)
double
SBData::GetDouble (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
double value = 0;
if (!m_opaque_sp.get())
{
@ -197,7 +197,7 @@ SBData::GetDouble (lldb::SBError& error, lldb::offset_t offset)
long double
SBData::GetLongDouble (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
long double value = 0;
if (!m_opaque_sp.get())
{
@ -219,7 +219,7 @@ SBData::GetLongDouble (lldb::SBError& error, lldb::offset_t offset)
lldb::addr_t
SBData::GetAddress (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
lldb::addr_t value = 0;
if (!m_opaque_sp.get())
{
@ -241,7 +241,7 @@ SBData::GetAddress (lldb::SBError& error, lldb::offset_t offset)
uint8_t
SBData::GetUnsignedInt8 (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint8_t value = 0;
if (!m_opaque_sp.get())
{
@ -263,7 +263,7 @@ SBData::GetUnsignedInt8 (lldb::SBError& error, lldb::offset_t offset)
uint16_t
SBData::GetUnsignedInt16 (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint16_t value = 0;
if (!m_opaque_sp.get())
{
@ -285,7 +285,7 @@ SBData::GetUnsignedInt16 (lldb::SBError& error, lldb::offset_t offset)
uint32_t
SBData::GetUnsignedInt32 (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t value = 0;
if (!m_opaque_sp.get())
{
@ -307,7 +307,7 @@ SBData::GetUnsignedInt32 (lldb::SBError& error, lldb::offset_t offset)
uint64_t
SBData::GetUnsignedInt64 (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint64_t value = 0;
if (!m_opaque_sp.get())
{
@ -329,7 +329,7 @@ SBData::GetUnsignedInt64 (lldb::SBError& error, lldb::offset_t offset)
int8_t
SBData::GetSignedInt8 (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
int8_t value = 0;
if (!m_opaque_sp.get())
{
@ -351,7 +351,7 @@ SBData::GetSignedInt8 (lldb::SBError& error, lldb::offset_t offset)
int16_t
SBData::GetSignedInt16 (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
int16_t value = 0;
if (!m_opaque_sp.get())
{
@ -373,7 +373,7 @@ SBData::GetSignedInt16 (lldb::SBError& error, lldb::offset_t offset)
int32_t
SBData::GetSignedInt32 (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
int32_t value = 0;
if (!m_opaque_sp.get())
{
@ -395,7 +395,7 @@ SBData::GetSignedInt32 (lldb::SBError& error, lldb::offset_t offset)
int64_t
SBData::GetSignedInt64 (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
int64_t value = 0;
if (!m_opaque_sp.get())
{
@ -417,7 +417,7 @@ SBData::GetSignedInt64 (lldb::SBError& error, lldb::offset_t offset)
const char*
SBData::GetString (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const char* value = 0;
if (!m_opaque_sp.get())
{
@ -465,7 +465,7 @@ SBData::ReadRawData (lldb::SBError& error,
void *buf,
size_t size)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
void* ok = NULL;
if (!m_opaque_sp.get())
{
@ -491,7 +491,7 @@ SBData::SetData (lldb::SBError& error,
lldb::ByteOrder endian,
uint8_t addr_size)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (!m_opaque_sp.get())
m_opaque_sp.reset(new DataExtractor(buf, size, endian, addr_size));
else
@ -504,7 +504,7 @@ SBData::SetData (lldb::SBError& error,
bool
SBData::Append (const SBData& rhs)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool value = false;
if (m_opaque_sp.get() && rhs.m_opaque_sp.get())
value = m_opaque_sp.get()->Append(*rhs.m_opaque_sp);
@ -613,7 +613,7 @@ SBData::CreateDataFromDoubleArray (lldb::ByteOrder endian, uint32_t addr_byte_si
bool
SBData::SetDataFromCString (const char* data)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (!data)
{
@ -642,7 +642,7 @@ SBData::SetDataFromCString (const char* data)
bool
SBData::SetDataFromUInt64Array (uint64_t* array, size_t array_len)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (!array || array_len == 0)
{
@ -671,7 +671,7 @@ SBData::SetDataFromUInt64Array (uint64_t* array, size_t array_len)
bool
SBData::SetDataFromUInt32Array (uint32_t* array, size_t array_len)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (!array || array_len == 0)
{
@ -700,7 +700,7 @@ SBData::SetDataFromUInt32Array (uint32_t* array, size_t array_len)
bool
SBData::SetDataFromSInt64Array (int64_t* array, size_t array_len)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (!array || array_len == 0)
{
@ -729,7 +729,7 @@ SBData::SetDataFromSInt64Array (int64_t* array, size_t array_len)
bool
SBData::SetDataFromSInt32Array (int32_t* array, size_t array_len)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (!array || array_len == 0)
{
@ -758,7 +758,7 @@ SBData::SetDataFromSInt32Array (int32_t* array, size_t array_len)
bool
SBData::SetDataFromDoubleArray (double* array, size_t array_len)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (!array || array_len == 0)
{

View file

@ -50,7 +50,7 @@ using namespace lldb_private;
void
SBDebugger::Initialize ()
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBDebugger::Initialize ()");
@ -69,7 +69,7 @@ SBDebugger::Terminate ()
void
SBDebugger::Clear ()
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBDebugger(%p)::Clear ()", m_opaque_sp.get());
@ -96,7 +96,7 @@ SBDebugger
SBDebugger::Create(bool source_init_files, lldb::LogOutputCallback callback, void *baton)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBDebugger debugger;
debugger.reset(Debugger::CreateInstance(callback, baton));
@ -127,7 +127,7 @@ SBDebugger::Create(bool source_init_files, lldb::LogOutputCallback callback, voi
void
SBDebugger::Destroy (SBDebugger &debugger)
{
LogSP log (GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log (GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
@ -149,7 +149,7 @@ SBDebugger::MemoryPressureDetected ()
// non-mandatory. We have seen deadlocks with this function when called
// so we need to safeguard against this until we can determine what is
// causing the deadlocks.
LogSP log (GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log (GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const bool mandatory = false;
if (log)
@ -231,7 +231,7 @@ SBDebugger::SkipAppInitFiles (bool b)
void
SBDebugger::SetInputFileHandle (FILE *fh, bool transfer_ownership)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBDebugger(%p)::SetInputFileHandle (fh=%p, transfer_ownership=%i)", m_opaque_sp.get(),
@ -244,7 +244,7 @@ SBDebugger::SetInputFileHandle (FILE *fh, bool transfer_ownership)
void
SBDebugger::SetOutputFileHandle (FILE *fh, bool transfer_ownership)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
@ -258,7 +258,7 @@ SBDebugger::SetOutputFileHandle (FILE *fh, bool transfer_ownership)
void
SBDebugger::SetErrorFileHandle (FILE *fh, bool transfer_ownership)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
@ -310,7 +310,7 @@ SBDebugger::RestoreInputTerminalState()
SBCommandInterpreter
SBDebugger::GetCommandInterpreter ()
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBCommandInterpreter sb_interpreter;
if (m_opaque_sp)
@ -364,7 +364,7 @@ SBDebugger::HandleCommand (const char *command)
SBListener
SBDebugger::GetListener ()
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBListener sb_listener;
if (m_opaque_sp)
@ -492,7 +492,7 @@ SBDebugger::StateAsCString (StateType state)
bool
SBDebugger::StateIsRunningState (StateType state)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const bool result = lldb_private::StateIsRunningState (state);
if (log)
@ -505,7 +505,7 @@ SBDebugger::StateIsRunningState (StateType state)
bool
SBDebugger::StateIsStoppedState (StateType state)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const bool result = lldb_private::StateIsStoppedState (state, false);
if (log)
@ -545,7 +545,7 @@ SBDebugger::CreateTarget (const char *filename,
sb_error.SetErrorString("invalid target");
}
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
log->Printf ("SBDebugger(%p)::CreateTarget (filename=\"%s\", triple=%s, platform_name=%s, add_dependent_modules=%u, error=%s) => SBTarget(%p)",
@ -579,7 +579,7 @@ SBDebugger::CreateTargetWithFileAndTargetTriple (const char *filename,
sb_target.SetSP (target_sp);
}
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
log->Printf ("SBDebugger(%p)::CreateTargetWithFileAndTargetTriple (filename=\"%s\", triple=%s) => SBTarget(%p)",
@ -592,7 +592,7 @@ SBDebugger::CreateTargetWithFileAndTargetTriple (const char *filename,
SBTarget
SBDebugger::CreateTargetWithFileAndArch (const char *filename, const char *arch_cstr)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBTarget sb_target;
TargetSP target_sp;
@ -649,7 +649,7 @@ SBDebugger::CreateTarget (const char *filename)
sb_target.SetSP (target_sp);
}
}
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
log->Printf ("SBDebugger(%p)::CreateTarget (filename=\"%s\") => SBTarget(%p)",
@ -676,7 +676,7 @@ SBDebugger::DeleteTarget (lldb::SBTarget &target)
}
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
log->Printf ("SBDebugger(%p)::DeleteTarget (SBTarget(%p)) => %i", m_opaque_sp.get(), target.m_opaque_sp.get(), result);
@ -763,7 +763,7 @@ SBDebugger::GetNumTargets ()
SBTarget
SBDebugger::GetSelectedTarget ()
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBTarget sb_target;
TargetSP target_sp;
@ -788,7 +788,7 @@ SBDebugger::GetSelectedTarget ()
void
SBDebugger::SetSelectedTarget (SBTarget &sb_target)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
TargetSP target_sp (sb_target.GetSP());
if (m_opaque_sp)
@ -813,7 +813,7 @@ SBDebugger::DispatchInput (void* baton, const void *data, size_t data_len)
void
SBDebugger::DispatchInput (const void *data, size_t data_len)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBDebugger(%p)::DispatchInput (data=\"%.*s\", size_t=%" PRIu64 ")",
@ -843,7 +843,7 @@ SBDebugger::DispatchInputEndOfFile ()
bool
SBDebugger::InputReaderIsTopReader (const lldb::SBInputReader &reader)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBDebugger(%p)::InputReaderIsTopReader (SBInputReader(%p))", m_opaque_sp.get(), &reader);
@ -861,7 +861,7 @@ SBDebugger::InputReaderIsTopReader (const lldb::SBInputReader &reader)
void
SBDebugger::PushInputReader (SBInputReader &reader)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBDebugger(%p)::PushInputReader (SBInputReader(%p))", m_opaque_sp.get(), &reader);
@ -880,7 +880,7 @@ SBDebugger::PushInputReader (SBInputReader &reader)
void
SBDebugger::NotifyTopInputReader (InputReaderAction notification)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBDebugger(%p)::NotifyTopInputReader (%d)", m_opaque_sp.get(), notification);
@ -1004,7 +1004,7 @@ SBDebugger::SetTerminalWidth (uint32_t term_width)
const char *
SBDebugger::GetPrompt() const
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBDebugger(%p)::GetPrompt () => \"%s\"", m_opaque_sp.get(),

View file

@ -73,7 +73,7 @@ SBDeclaration::IsValid () const
SBFileSpec
SBDeclaration::GetFileSpec () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBFileSpec sb_file_spec;
if (m_opaque_ap.get() && m_opaque_ap->GetFile())
@ -93,7 +93,7 @@ SBDeclaration::GetFileSpec () const
uint32_t
SBDeclaration::GetLine () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t line = 0;
if (m_opaque_ap.get())

View file

@ -70,7 +70,7 @@ SBError::Clear ()
bool
SBError::Fail () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *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
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool ret_value = true;
if (m_opaque_ap.get())
ret_value = m_opaque_ap->Success();
@ -99,7 +99,7 @@ SBError::Success () const
uint32_t
SBError::GetError () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *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
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
ErrorType err_type = eErrorTypeInvalid;
if (m_opaque_ap.get())
err_type = m_opaque_ap->GetType();

View file

@ -81,7 +81,7 @@ SBEvent::GetDataFlavor ()
uint32_t
SBEvent::GetType () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const Event *lldb_event = get();
uint32_t event_type = 0;
@ -139,7 +139,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
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE));
if (log)
log->Printf ("SBEvent(%p)::BroadcasterMatchesRef (SBBroadcaster(%p): %s) => %i",
get(),
@ -203,7 +203,7 @@ SBEvent::IsValid() const
const char *
SBEvent::GetCStringFromEvent (const SBEvent &event)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBEvent(%p)::GetCStringFromEvent () => \"%s\"",

View file

@ -28,7 +28,7 @@ SBFileSpec::SBFileSpec () :
SBFileSpec::SBFileSpec (const SBFileSpec &rhs) :
m_opaque_ap()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (rhs.m_opaque_ap.get())
m_opaque_ap.reset (new FileSpec (rhs.get()));
@ -51,7 +51,7 @@ SBFileSpec::SBFileSpec (const char *path) :
SBFileSpec::SBFileSpec (const char *path, bool resolve) :
m_opaque_ap(new FileSpec (path, resolve))
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFileSpec::SBFileSpec (path=\"%s\", resolve=%i) => SBFileSpec(%p)", path,
@ -82,7 +82,7 @@ SBFileSpec::IsValid() const
bool
SBFileSpec::Exists () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool result = false;
if (m_opaque_ap.get())
@ -115,7 +115,7 @@ SBFileSpec::GetFilename() const
if (m_opaque_ap.get())
s = m_opaque_ap->GetFilename().AsCString();
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (s)
@ -133,7 +133,7 @@ SBFileSpec::GetDirectory() const
const char *s = NULL;
if (m_opaque_ap.get())
s = m_opaque_ap->GetDirectory().AsCString();
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (s)
@ -147,7 +147,7 @@ SBFileSpec::GetDirectory() const
uint32_t
SBFileSpec::GetPath (char *dst_path, size_t dst_len) const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t result = 0;
if (m_opaque_ap.get())

View file

@ -30,7 +30,7 @@ SBFileSpecList::SBFileSpecList () :
SBFileSpecList::SBFileSpecList (const SBFileSpecList &rhs) :
m_opaque_ap()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (rhs.m_opaque_ap.get())
m_opaque_ap.reset (new FileSpecList (*(rhs.get())));

View file

@ -57,7 +57,7 @@ SBFrame::SBFrame () :
SBFrame::SBFrame (const StackFrameSP &lldb_object_sp) :
m_opaque_sp (new ExecutionContextRef (lldb_object_sp))
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
@ -109,7 +109,7 @@ SBFrame::IsValid() const
SBSymbolContext
SBFrame::GetSymbolContext (uint32_t resolve_scope) const
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBSymbolContext sb_sym_ctx;
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -150,7 +150,7 @@ SBFrame::GetSymbolContext (uint32_t resolve_scope) const
SBModule
SBFrame::GetModule () const
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBModule sb_module;
ModuleSP module_sp;
Mutex::Locker api_locker;
@ -193,7 +193,7 @@ SBFrame::GetModule () const
SBCompileUnit
SBFrame::GetCompileUnit () const
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBCompileUnit sb_comp_unit;
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -233,7 +233,7 @@ SBFrame::GetCompileUnit () const
SBFunction
SBFrame::GetFunction () const
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBFunction sb_function;
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -273,7 +273,7 @@ SBFrame::GetFunction () const
SBSymbol
SBFrame::GetSymbol () const
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBSymbol sb_symbol;
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -312,7 +312,7 @@ SBFrame::GetSymbol () const
SBBlock
SBFrame::GetBlock () const
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBlock sb_block;
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -357,7 +357,7 @@ SBFrame::GetFrameBlock () const
StackFrame *frame = NULL;
Target *target = exe_ctx.GetTargetPtr();
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Process *process = exe_ctx.GetProcessPtr();
if (target && process)
{
@ -390,7 +390,7 @@ SBFrame::GetFrameBlock () const
SBLineEntry
SBFrame::GetLineEntry () const
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBLineEntry sb_line_entry;
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -436,7 +436,7 @@ SBFrame::GetFrameID () const
if (frame)
frame_idx = frame->GetFrameIndex ();
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBFrame(%p)::GetFrameID () => %u",
frame, frame_idx);
@ -446,7 +446,7 @@ SBFrame::GetFrameID () const
addr_t
SBFrame::GetPC () const
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
addr_t addr = LLDB_INVALID_ADDRESS;
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -486,7 +486,7 @@ SBFrame::GetPC () const
bool
SBFrame::SetPC (addr_t new_pc)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool ret_val = false;
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -527,7 +527,7 @@ SBFrame::SetPC (addr_t new_pc)
addr_t
SBFrame::GetSP () const
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
addr_t addr = LLDB_INVALID_ADDRESS;
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -567,7 +567,7 @@ SBFrame::GetSP () const
addr_t
SBFrame::GetFP () const
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
addr_t addr = LLDB_INVALID_ADDRESS;
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -607,7 +607,7 @@ SBFrame::GetFP () const
SBAddress
SBFrame::GetPCAddress () const
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBAddress sb_addr;
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -668,7 +668,7 @@ SBFrame::GetValueForVariablePath (const char *var_path, DynamicValueType use_dyn
{
SBValue sb_value;
Mutex::Locker api_locker;
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (var_path == NULL || var_path[0] == '\0')
{
if (log)
@ -732,7 +732,7 @@ SBFrame::FindVariable (const char *name)
SBValue
SBFrame::FindVariable (const char *name, lldb::DynamicValueType use_dynamic)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
VariableSP var_sp;
SBValue sb_value;
@ -820,7 +820,7 @@ SBFrame::FindValue (const char *name, ValueType value_type)
SBValue
SBFrame::FindValue (const char *name, ValueType value_type, lldb::DynamicValueType use_dynamic)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBValue sb_value;
if (name == NULL || name[0] == '\0')
@ -987,7 +987,7 @@ SBFrame::operator != (const SBFrame &rhs) const
SBThread
SBFrame::GetThread () const
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
ExecutionContext exe_ctx(m_opaque_sp.get());
ThreadSP thread_sp (exe_ctx.GetThreadSP());
@ -1009,7 +1009,7 @@ SBFrame::GetThread () const
const char *
SBFrame::Disassemble () const
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const char *disassembly = NULL;
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -1072,7 +1072,7 @@ SBFrame::GetVariables (bool arguments,
bool in_scope_only,
lldb::DynamicValueType use_dynamic)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBValueList value_list;
Mutex::Locker api_locker;
@ -1168,7 +1168,7 @@ SBFrame::GetVariables (bool arguments,
SBValueList
SBFrame::GetRegisters ()
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBValueList value_list;
Mutex::Locker api_locker;
@ -1217,7 +1217,7 @@ SBFrame::GetRegisters ()
bool
SBFrame::GetDescription (SBStream &description)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Stream &strm = description.ref();
Mutex::Locker api_locker;
@ -1294,9 +1294,9 @@ SBFrame::EvaluateExpression (const char *expr, lldb::DynamicValueType fetch_dyna
lldb::SBValue
SBFrame::EvaluateExpression (const char *expr, const SBExpressionOptions &options)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
LogSP expr_log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *expr_log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
ExecutionResults exe_results = eExecutionSetupError;
SBValue expr_result;
@ -1376,7 +1376,7 @@ SBFrame::EvaluateExpression (const char *expr, const SBExpressionOptions &option
bool
SBFrame::IsInlined()
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
ExecutionContext exe_ctx(m_opaque_sp.get());
StackFrame *frame = NULL;
Target *target = exe_ctx.GetTargetPtr();
@ -1413,7 +1413,7 @@ SBFrame::IsInlined()
const char *
SBFrame::GetFunctionName()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const char *name = NULL;
ExecutionContext exe_ctx(m_opaque_sp.get());
StackFrame *frame = NULL;

View file

@ -62,7 +62,7 @@ SBFunction::GetName() const
if (m_opaque_ptr)
cstr = m_opaque_ptr->GetMangled().GetName().AsCString();
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *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();
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (cstr)

View file

@ -47,7 +47,7 @@ SBHostOS::ThreadCreate
SBError *error_ptr
)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *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,

View file

@ -33,7 +33,7 @@ SBInputReader::SBInputReader () :
SBInputReader::SBInputReader (const lldb::InputReaderSP &reader_sp) :
m_opaque_sp (reader_sp)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *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)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *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
)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *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
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool ret_value = false;
if (m_opaque_sp)

View file

@ -71,7 +71,7 @@ SBLineEntry::GetStartAddress () const
if (m_opaque_ap.get())
sb_address.SetAddress(&m_opaque_ap->range.GetBaseAddress());
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
StreamString sstr;
@ -94,7 +94,7 @@ SBLineEntry::GetEndAddress () const
sb_address.SetAddress(&m_opaque_ap->range.GetBaseAddress());
sb_address.OffsetAddress(m_opaque_ap->range.GetByteSize());
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
StreamString sstr;
@ -117,7 +117,7 @@ SBLineEntry::IsValid () const
SBFileSpec
SBLineEntry::GetFileSpec () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBFileSpec sb_file_spec;
if (m_opaque_ap.get() && m_opaque_ap->file)
@ -137,7 +137,7 @@ SBLineEntry::GetFileSpec () const
uint32_t
SBLineEntry::GetLine () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t line = 0;
if (m_opaque_ap.get())

View file

@ -38,7 +38,7 @@ SBListener::SBListener (const char *name) :
{
m_opaque_ptr = m_opaque_sp.get();
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBListener::SBListener (name=\"%s\") => SBListener(%p)",
@ -131,7 +131,7 @@ SBListener::StopListeningForEventClass (SBDebugger &debugger,
uint32_t
SBListener::StartListeningForEvents (const SBBroadcaster& broadcaster, uint32_t event_mask)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t acquired_event_mask = 0;
if (m_opaque_ptr && broadcaster.IsValid())
@ -190,7 +190,7 @@ SBListener::StopListeningForEvents (const SBBroadcaster& broadcaster, uint32_t e
bool
SBListener::WaitForEvent (uint32_t timeout_secs, SBEvent &event)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (timeout_secs == UINT32_MAX)

View file

@ -88,7 +88,7 @@ SBModule::Clear()
SBFileSpec
SBModule::GetFileSpec () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBFileSpec file_spec;
ModuleSP module_sp (GetSP ());
@ -107,7 +107,7 @@ SBModule::GetFileSpec () const
lldb::SBFileSpec
SBModule::GetPlatformFileSpec () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBFileSpec file_spec;
ModuleSP module_sp (GetSP ());
@ -128,7 +128,7 @@ bool
SBModule::SetPlatformFileSpec (const lldb::SBFileSpec &platform_file)
{
bool result = false;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
ModuleSP module_sp (GetSP ());
if (module_sp)
@ -155,7 +155,7 @@ SBModule::SetPlatformFileSpec (const lldb::SBFileSpec &platform_file)
const uint8_t *
SBModule::GetUUIDBytes () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const uint8_t *uuid_bytes = NULL;
ModuleSP module_sp (GetSP ());
@ -180,7 +180,7 @@ SBModule::GetUUIDBytes () const
const char *
SBModule::GetUUIDString () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
static char uuid_string[80];
const char * uuid_c_string = NULL;

View file

@ -143,7 +143,7 @@ SBProcess::RemoteLaunch (char const **argv,
bool stop_at_entry,
lldb::SBError& error)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log) {
log->Printf ("SBProcess(%p)::RemoteLaunch (argv=%p, envp=%p, stdin=%s, stdout=%s, stderr=%s, working-dir=%s, launch_flags=0x%x, stop_at_entry=%i, &error (%p))...",
m_opaque_wp.lock().get(),
@ -222,7 +222,7 @@ SBProcess::RemoteAttachToProcessWithID (lldb::pid_t pid, lldb::SBError& error)
error.SetErrorString ("unable to attach pid");
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log) {
SBStream sstr;
error.GetDescription (sstr);
@ -236,7 +236,7 @@ SBProcess::RemoteAttachToProcessWithID (lldb::pid_t pid, lldb::SBError& error)
uint32_t
SBProcess::GetNumThreads ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t num_threads = 0;
ProcessSP process_sp(GetSP());
@ -258,7 +258,7 @@ SBProcess::GetNumThreads ()
SBThread
SBProcess::GetSelectedThread () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBThread sb_thread;
ThreadSP thread_sp;
@ -281,7 +281,7 @@ SBProcess::GetSelectedThread () const
SBThread
SBProcess::CreateOSPluginThread (lldb::tid_t tid, lldb::addr_t context)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBThread sb_thread;
ThreadSP thread_sp;
@ -302,7 +302,7 @@ SBProcess::CreateOSPluginThread (lldb::tid_t tid, lldb::addr_t context)
SBTarget
SBProcess::GetTarget() const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBTarget sb_target;
TargetSP target_sp;
@ -323,7 +323,7 @@ SBProcess::GetTarget() const
size_t
SBProcess::PutSTDIN (const char *src, size_t src_len)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
size_t ret_val = 0;
ProcessSP process_sp(GetSP());
@ -354,7 +354,7 @@ SBProcess::GetSTDOUT (char *dst, size_t dst_len) const
bytes_read = process_sp->GetSTDOUT (dst, dst_len, error);
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetSTDOUT (dst=\"%.*s\", dst_len=%" PRIu64 ") => %" PRIu64,
process_sp.get(),
@ -377,7 +377,7 @@ SBProcess::GetSTDERR (char *dst, size_t dst_len) const
bytes_read = process_sp->GetSTDERR (dst, dst_len, error);
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetSTDERR (dst=\"%.*s\", dst_len=%" PRIu64 ") => %" PRIu64,
process_sp.get(),
@ -400,7 +400,7 @@ SBProcess::GetAsyncProfileData(char *dst, size_t dst_len) const
bytes_read = process_sp->GetAsyncProfileData (dst, dst_len, error);
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetProfileData (dst=\"%.*s\", dst_len=%" PRIu64 ") => %" PRIu64,
process_sp.get(),
@ -467,7 +467,7 @@ SBProcess::SetSelectedThread (const SBThread &thread)
bool
SBProcess::SetSelectedThreadByID (lldb::tid_t tid)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool ret_val = false;
ProcessSP process_sp(GetSP());
@ -487,7 +487,7 @@ SBProcess::SetSelectedThreadByID (lldb::tid_t tid)
bool
SBProcess::SetSelectedThreadByIndexID (uint32_t index_id)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool ret_val = false;
ProcessSP process_sp(GetSP());
@ -507,7 +507,7 @@ SBProcess::SetSelectedThreadByIndexID (uint32_t index_id)
SBThread
SBProcess::GetThreadAtIndex (size_t index)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBThread sb_thread;
ThreadSP thread_sp;
@ -557,7 +557,7 @@ SBProcess::GetState ()
ret_val = process_sp->GetState();
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetState () => %s",
process_sp.get(),
@ -577,7 +577,7 @@ SBProcess::GetExitStatus ()
Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex());
exit_status = process_sp->GetExitStatus ();
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetExitStatus () => %i (0x%8.8x)",
process_sp.get(), exit_status, exit_status);
@ -595,7 +595,7 @@ SBProcess::GetExitDescription ()
Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex());
exit_desc = process_sp->GetExitDescription ();
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetExitDescription () => %s",
process_sp.get(), exit_desc);
@ -610,7 +610,7 @@ SBProcess::GetProcessID ()
if (process_sp)
ret_val = process_sp->GetID();
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetProcessID () => %" PRIu64, process_sp.get(), ret_val);
@ -624,7 +624,7 @@ SBProcess::GetUniqueID()
ProcessSP process_sp(GetSP());
if (process_sp)
ret_val = process_sp->GetUniqueID();
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetUniqueID () => %" PRIu32, process_sp.get(), ret_val);
return ret_val;
@ -638,7 +638,7 @@ SBProcess::GetByteOrder () const
if (process_sp)
byteOrder = process_sp->GetTarget().GetArchitecture().GetByteOrder();
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetByteOrder () => %d", process_sp.get(), byteOrder);
@ -653,7 +653,7 @@ SBProcess::GetAddressByteSize () const
if (process_sp)
size = process_sp->GetTarget().GetArchitecture().GetAddressByteSize();
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetAddressByteSize () => %d", process_sp.get(), size);
@ -663,7 +663,7 @@ SBProcess::GetAddressByteSize () const
SBError
SBProcess::Continue ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBError sb_error;
ProcessSP process_sp(GetSP());
@ -714,7 +714,7 @@ SBProcess::Destroy ()
else
sb_error.SetErrorString ("SBProcess is invalid");
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
SBStream sstr;
@ -742,7 +742,7 @@ SBProcess::Stop ()
else
sb_error.SetErrorString ("SBProcess is invalid");
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
SBStream sstr;
@ -769,7 +769,7 @@ SBProcess::Kill ()
else
sb_error.SetErrorString ("SBProcess is invalid");
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
SBStream sstr;
@ -811,7 +811,7 @@ SBProcess::Signal (int signo)
}
else
sb_error.SetErrorString ("SBProcess is invalid");
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
SBStream sstr;
@ -850,7 +850,7 @@ SBProcess::GetThreadByID (tid_t tid)
sb_thread.SetThread (thread_sp);
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
log->Printf ("SBProcess(%p)::GetThreadByID (tid=0x%4.4" PRIx64 ") => SBThread (%p)",
@ -877,7 +877,7 @@ SBProcess::GetThreadByIndexID (uint32_t index_id)
sb_thread.SetThread (thread_sp);
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
log->Printf ("SBProcess(%p)::GetThreadByID (tid=0x%x) => SBThread (%p)",
@ -892,7 +892,7 @@ SBProcess::GetThreadByIndexID (uint32_t index_id)
StateType
SBProcess::GetStateFromEvent (const SBEvent &event)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
StateType ret_val = Process::ProcessEventData::GetStateFromEvent (event.get());
@ -937,7 +937,7 @@ SBProcess::EventIsProcessEvent (const SBEvent &event)
SBBroadcaster
SBProcess::GetBroadcaster () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
ProcessSP process_sp(GetSP());
@ -959,7 +959,7 @@ SBProcess::GetBroadcasterClass ()
size_t
SBProcess::ReadMemory (addr_t addr, void *dst, size_t dst_len, SBError &sb_error)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
size_t bytes_read = 0;
@ -1027,7 +1027,7 @@ SBProcess::ReadCStringFromMemory (addr_t addr, void *buf, size_t size, lldb::SBE
}
else
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::ReadCStringFromMemory() => error: process is running", process_sp.get());
sb_error.SetErrorString("process is running");
@ -1055,7 +1055,7 @@ SBProcess::ReadUnsignedFromMemory (addr_t addr, uint32_t byte_size, lldb::SBErro
}
else
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::ReadUnsignedFromMemory() => error: process is running", process_sp.get());
sb_error.SetErrorString("process is running");
@ -1083,7 +1083,7 @@ SBProcess::ReadPointerFromMemory (addr_t addr, lldb::SBError &sb_error)
}
else
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::ReadPointerFromMemory() => error: process is running", process_sp.get());
sb_error.SetErrorString("process is running");
@ -1101,7 +1101,7 @@ SBProcess::WriteMemory (addr_t addr, const void *src, size_t src_len, SBError &s
{
size_t bytes_written = 0;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
ProcessSP process_sp(GetSP());
@ -1179,7 +1179,7 @@ SBProcess::GetDescription (SBStream &description)
uint32_t
SBProcess::GetNumSupportedHardwareWatchpoints (lldb::SBError &sb_error) const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t num = 0;
ProcessSP process_sp(GetSP());
@ -1212,7 +1212,7 @@ SBProcess::LoadImage (lldb::SBFileSpec &sb_image_spec, lldb::SBError &sb_error)
}
else
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::LoadImage() => error: process is running", process_sp.get());
sb_error.SetErrorString("process is running");
@ -1236,7 +1236,7 @@ SBProcess::UnloadImage (uint32_t image_token)
}
else
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::UnloadImage() => error: process is running", process_sp.get());
sb_error.SetErrorString("process is running");

View file

@ -65,7 +65,7 @@ SBSymbol::GetName() const
if (m_opaque_ptr)
name = m_opaque_ptr->GetMangled().GetName().AsCString();
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBSymbol(%p)::GetName () => \"%s\"", m_opaque_ptr, name ? name : "");
return name;
@ -77,7 +77,7 @@ SBSymbol::GetMangledName () const
const char *name = NULL;
if (m_opaque_ptr)
name = m_opaque_ptr->GetMangled().GetMangledName().AsCString();
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBSymbol(%p)::GetMangledName () => \"%s\"", m_opaque_ptr, name ? name : "");

View file

@ -87,7 +87,7 @@ SBSymbolContext::IsValid () const
SBModule
SBSymbolContext::GetModule ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBModule sb_module;
ModuleSP module_sp;
@ -117,7 +117,7 @@ SBSymbolContext::GetCompileUnit ()
SBFunction
SBSymbolContext::GetFunction ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Function *function = NULL;
@ -142,7 +142,7 @@ SBSymbolContext::GetBlock ()
SBLineEntry
SBSymbolContext::GetLineEntry ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBLineEntry sb_line_entry;
if (m_opaque_ap.get())
@ -160,7 +160,7 @@ SBSymbolContext::GetLineEntry ()
SBSymbol
SBSymbolContext::GetSymbol ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Symbol *symbol = NULL;

View file

@ -536,7 +536,7 @@ SBTarget::GetProcess ()
sb_process.SetSP (process_sp);
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
log->Printf ("SBTarget(%p)::GetProcess () => SBProcess(%p)",
@ -618,7 +618,7 @@ SBTarget::Launch
lldb::SBError& error
)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBProcess sb_process;
ProcessSP process_sp;
@ -743,7 +743,7 @@ SBTarget::Launch
SBProcess
SBTarget::Launch (SBLaunchInfo &sb_launch_info, SBError& error)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBProcess sb_process;
ProcessSP process_sp;
@ -843,7 +843,7 @@ SBTarget::Launch (SBLaunchInfo &sb_launch_info, SBError& error)
lldb::SBProcess
SBTarget::Attach (SBAttachInfo &sb_attach_info, SBError& error)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBProcess sb_process;
ProcessSP process_sp;
@ -959,7 +959,7 @@ SBTarget::AttachToProcessWithID
SBError& error // An error explaining what went wrong if attach fails
)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBProcess sb_process;
ProcessSP process_sp;
@ -1057,7 +1057,7 @@ SBTarget::AttachToProcessWithName
SBError& error // An error explaining what went wrong if attach fails
)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBProcess sb_process;
ProcessSP process_sp;
@ -1146,7 +1146,7 @@ SBTarget::ConnectRemote
SBError& error
)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBProcess sb_process;
ProcessSP process_sp;
@ -1202,7 +1202,7 @@ SBTarget::GetExecutable ()
exe_file_spec.SetFileSpec (exe_module->GetFileSpec());
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
log->Printf ("SBTarget(%p)::GetExecutable () => SBFileSpec(%p)",
@ -1278,7 +1278,7 @@ SBTarget::BreakpointCreateByLocation (const char *file, uint32_t line)
SBBreakpoint
SBTarget::BreakpointCreateByLocation (const SBFileSpec &sb_file_spec, uint32_t line)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
@ -1312,7 +1312,7 @@ SBTarget::BreakpointCreateByLocation (const SBFileSpec &sb_file_spec, uint32_t l
SBBreakpoint
SBTarget::BreakpointCreateByName (const char *symbol_name, const char *module_name)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
@ -1358,7 +1358,7 @@ SBTarget::BreakpointCreateByName (const char *symbol_name,
const SBFileSpecList &module_list,
const SBFileSpecList &comp_unit_list)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
@ -1391,7 +1391,7 @@ SBTarget::BreakpointCreateByNames (const char *symbol_names[],
const SBFileSpecList &module_list,
const SBFileSpecList &comp_unit_list)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
@ -1434,7 +1434,7 @@ SBTarget::BreakpointCreateByNames (const char *symbol_names[],
SBBreakpoint
SBTarget::BreakpointCreateByRegex (const char *symbol_name_regex, const char *module_name)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
@ -1472,7 +1472,7 @@ SBTarget::BreakpointCreateByRegex (const char *symbol_name_regex,
const SBFileSpecList &module_list,
const SBFileSpecList &comp_unit_list)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
@ -1498,7 +1498,7 @@ SBTarget::BreakpointCreateByRegex (const char *symbol_name_regex,
SBBreakpoint
SBTarget::BreakpointCreateByAddress (addr_t address)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
@ -1519,7 +1519,7 @@ SBTarget::BreakpointCreateByAddress (addr_t address)
lldb::SBBreakpoint
SBTarget::BreakpointCreateBySourceRegex (const char *source_regex, const lldb::SBFileSpec &source_file, const char *module_name)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
@ -1559,7 +1559,7 @@ SBTarget::BreakpointCreateBySourceRegex (const char *source_regex,
const SBFileSpecList &module_list,
const lldb::SBFileSpecList &source_file_list)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
@ -1584,7 +1584,7 @@ SBTarget::BreakpointCreateForException (lldb::LanguageType language,
bool catch_bp,
bool throw_bp)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
@ -1635,7 +1635,7 @@ SBTarget::GetBreakpointAtIndex (uint32_t idx) const
bool
SBTarget::BreakpointDelete (break_id_t bp_id)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool result = false;
TargetSP target_sp(GetSP());
@ -1656,7 +1656,7 @@ SBTarget::BreakpointDelete (break_id_t bp_id)
SBBreakpoint
SBTarget::FindBreakpointByID (break_id_t bp_id)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBBreakpoint sb_breakpoint;
TargetSP target_sp(GetSP());
@ -1742,7 +1742,7 @@ SBTarget::GetWatchpointAtIndex (uint32_t idx) const
bool
SBTarget::DeleteWatchpoint (watch_id_t wp_id)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool result = false;
TargetSP target_sp(GetSP());
@ -1765,7 +1765,7 @@ SBTarget::DeleteWatchpoint (watch_id_t wp_id)
SBWatchpoint
SBTarget::FindWatchpointByID (lldb::watch_id_t wp_id)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBWatchpoint sb_watchpoint;
lldb::WatchpointSP watchpoint_sp;
@ -1791,7 +1791,7 @@ SBTarget::FindWatchpointByID (lldb::watch_id_t wp_id)
lldb::SBWatchpoint
SBTarget::WatchAddress (lldb::addr_t addr, size_t size, bool read, bool write, SBError &error)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBWatchpoint sb_watchpoint;
lldb::WatchpointSP watchpoint_sp;
@ -1919,7 +1919,7 @@ SBTarget::AddModule (lldb::SBModule &module)
uint32_t
SBTarget::GetNumModules () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t num = 0;
TargetSP target_sp(GetSP());
@ -1938,7 +1938,7 @@ SBTarget::GetNumModules () const
void
SBTarget::Clear ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBTarget(%p)::Clear ()", m_opaque_sp.get());
@ -1999,7 +1999,7 @@ SBTarget::GetAddressByteSize()
SBModule
SBTarget::GetModuleAtIndex (uint32_t idx)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBModule sb_module;
ModuleSP module_sp;
@ -2033,7 +2033,7 @@ SBTarget::RemoveModule (lldb::SBModule module)
SBBroadcaster
SBTarget::GetBroadcaster () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
TargetSP target_sp(GetSP());
SBBroadcaster broadcaster(target_sp.get(), false);
@ -2540,8 +2540,8 @@ SBTarget::FindSymbols (const char *name, lldb::SymbolType symbol_type)
lldb::SBValue
SBTarget::EvaluateExpression (const char *expr, const SBExpressionOptions &options)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
LogSP expr_log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log * expr_log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
SBValue expr_result;
ExecutionResults exe_results = eExecutionSetupError;
ValueObjectSP expr_value_sp;

View file

@ -102,7 +102,7 @@ SBThread::Clear ()
StopReason
SBThread::GetStopReason()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
StopReason reason = eStopReasonInvalid;
Mutex::Locker api_locker;
@ -179,7 +179,7 @@ SBThread::GetStopReasonDataCount ()
}
else
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBThread(%p)::GetStopReasonDataCount() => error: process is running", exe_ctx.GetThreadPtr());
}
@ -253,7 +253,7 @@ SBThread::GetStopReasonDataAtIndex (uint32_t idx)
}
else
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBThread(%p)::GetStopReasonDataAtIndex() => error: process is running", exe_ctx.GetThreadPtr());
}
@ -264,7 +264,7 @@ SBThread::GetStopReasonDataAtIndex (uint32_t idx)
size_t
SBThread::GetStopDescription (char *dst, size_t dst_len)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -380,7 +380,7 @@ SBThread::GetStopDescription (char *dst, size_t dst_len)
}
else
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBThread(%p)::GetStopDescription() => error: process is running", exe_ctx.GetThreadPtr());
}
@ -393,7 +393,7 @@ SBThread::GetStopDescription (char *dst, size_t dst_len)
SBValue
SBThread::GetStopReturnValue ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
ValueObjectSP return_valobj_sp;
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -453,7 +453,7 @@ SBThread::GetIndexID () const
const char *
SBThread::GetName () const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const char *name = NULL;
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -485,7 +485,7 @@ SBThread::GetQueueName () const
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (exe_ctx.HasThreadScope())
{
Process::StopLocker stop_locker;
@ -551,7 +551,7 @@ SBThread::ResumeNewPlan (ExecutionContext &exe_ctx, ThreadPlan *new_plan)
void
SBThread::StepOver (lldb::RunMode stop_other_threads)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -600,7 +600,7 @@ SBThread::StepInto (lldb::RunMode stop_other_threads)
void
SBThread::StepInto (const char *target_name, lldb::RunMode stop_other_threads)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -645,7 +645,7 @@ SBThread::StepInto (const char *target_name, lldb::RunMode stop_other_threads)
void
SBThread::StepOut ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -677,7 +677,7 @@ SBThread::StepOut ()
void
SBThread::StepOutOfFrame (lldb::SBFrame &sb_frame)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -712,7 +712,7 @@ SBThread::StepOutOfFrame (lldb::SBFrame &sb_frame)
void
SBThread::StepInstruction (bool step_over)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -735,7 +735,7 @@ SBThread::StepInstruction (bool step_over)
void
SBThread::RunToAddress (lldb::addr_t addr)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -766,7 +766,7 @@ SBThread::StepOverUntil (lldb::SBFrame &sb_frame,
uint32_t line)
{
SBError sb_error;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
char path[PATH_MAX];
Mutex::Locker api_locker;
@ -913,7 +913,7 @@ SBThread::ReturnFromFrame (SBFrame &frame, SBValue &return_value)
{
SBError sb_error;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@ -935,7 +935,7 @@ SBThread::ReturnFromFrame (SBFrame &frame, SBValue &return_value)
bool
SBThread::Suspend()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
ExecutionContext exe_ctx (m_opaque_sp.get());
bool result = false;
if (exe_ctx.HasThreadScope())
@ -960,7 +960,7 @@ SBThread::Suspend()
bool
SBThread::Resume ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
ExecutionContext exe_ctx (m_opaque_sp.get());
bool result = false;
if (exe_ctx.HasThreadScope())
@ -1002,7 +1002,7 @@ SBThread::GetProcess ()
sb_process.SetSP (exe_ctx.GetProcessSP());
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
SBStream frame_desc_strm;
@ -1017,7 +1017,7 @@ SBThread::GetProcess ()
uint32_t
SBThread::GetNumFrames ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t num_frames = 0;
Mutex::Locker api_locker;
@ -1046,7 +1046,7 @@ SBThread::GetNumFrames ()
SBFrame
SBThread::GetFrameAtIndex (uint32_t idx)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBFrame sb_frame;
StackFrameSP frame_sp;
@ -1082,7 +1082,7 @@ SBThread::GetFrameAtIndex (uint32_t idx)
lldb::SBFrame
SBThread::GetSelectedFrame ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBFrame sb_frame;
StackFrameSP frame_sp;
@ -1118,7 +1118,7 @@ SBThread::GetSelectedFrame ()
lldb::SBFrame
SBThread::SetSelectedFrame (uint32_t idx)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBFrame sb_frame;
StackFrameSP frame_sp;

View file

@ -534,7 +534,7 @@ SBTypeList::~SBTypeList()
bool
SBType::IsPointerType (void *opaque_type)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool ret_value = ClangASTContext::IsPointerType (opaque_type);

View file

@ -220,7 +220,7 @@ SBValue::GetName()
if (value_sp)
name = value_sp->GetName().GetCString();
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (name)
@ -235,7 +235,7 @@ SBValue::GetName()
const char *
SBValue::GetTypeName ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const char *name = NULL;
lldb::ValueObjectSP value_sp(GetSP());
if (value_sp)
@ -275,7 +275,7 @@ SBValue::GetTypeName ()
size_t
SBValue::GetByteSize ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
size_t result = 0;
lldb::ValueObjectSP value_sp(GetSP());
@ -324,7 +324,7 @@ SBValue::IsInScope ()
}
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::IsInScope () => %i", value_sp.get(), result);
@ -334,7 +334,7 @@ SBValue::IsInScope ()
const char *
SBValue::GetValue ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const char *cstr = NULL;
lldb::ValueObjectSP value_sp(GetSP());
@ -375,7 +375,7 @@ SBValue::GetValueType ()
lldb::ValueObjectSP value_sp(GetSP());
if (value_sp)
result = value_sp->GetValueType();
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
switch (result)
@ -396,7 +396,7 @@ SBValue::GetValueType ()
const char *
SBValue::GetObjectDescription ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const char *cstr = NULL;
lldb::ValueObjectSP value_sp(GetSP());
if (value_sp)
@ -431,7 +431,7 @@ SBValue::GetObjectDescription ()
SBType
SBValue::GetType()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBType sb_type;
lldb::ValueObjectSP value_sp(GetSP());
TypeImplSP type_sp;
@ -468,7 +468,7 @@ SBValue::GetType()
bool
SBValue::GetValueDidChange ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool result = false;
lldb::ValueObjectSP value_sp(GetSP());
if (value_sp)
@ -500,7 +500,7 @@ SBValue::GetValueDidChange ()
const char *
SBValue::GetSummary ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const char *cstr = NULL;
lldb::ValueObjectSP value_sp(GetSP());
if (value_sp)
@ -536,7 +536,7 @@ SBValue::GetSummary ()
const char *
SBValue::GetLocation ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const char *cstr = NULL;
lldb::ValueObjectSP value_sp(GetSP());
if (value_sp)
@ -581,7 +581,7 @@ SBValue::SetValueFromCString (const char *value_str, lldb::SBError& error)
{
bool success = false;
lldb::ValueObjectSP value_sp(GetSP());
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (value_sp)
{
ProcessSP process_sp(value_sp->GetProcessSP());
@ -618,7 +618,7 @@ SBValue::GetTypeFormat ()
Process::StopLocker stop_locker;
if (process_sp && !stop_locker.TryLock(&process_sp->GetRunLock()))
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::GetTypeFormat() => error: process is running", value_sp.get());
}
@ -652,7 +652,7 @@ SBValue::GetTypeSummary ()
Process::StopLocker stop_locker;
if (process_sp && !stop_locker.TryLock(&process_sp->GetRunLock()))
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::GetTypeSummary() => error: process is running", value_sp.get());
}
@ -686,7 +686,7 @@ SBValue::GetTypeFilter ()
Process::StopLocker stop_locker;
if (process_sp && !stop_locker.TryLock(&process_sp->GetRunLock()))
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::GetTypeFilter() => error: process is running", value_sp.get());
}
@ -724,7 +724,7 @@ SBValue::GetTypeSynthetic ()
Process::StopLocker stop_locker;
if (process_sp && !stop_locker.TryLock(&process_sp->GetRunLock()))
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::GetTypeSynthetic() => error: process is running", value_sp.get());
}
@ -763,7 +763,7 @@ SBValue::CreateChildAtOffset (const char *name, uint32_t offset, SBType type)
Process::StopLocker stop_locker;
if (process_sp && !stop_locker.TryLock(&process_sp->GetRunLock()))
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::CreateChildAtOffset() => error: process is running", value_sp.get());
}
@ -784,7 +784,7 @@ SBValue::CreateChildAtOffset (const char *name, uint32_t offset, SBType type)
}
}
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (new_value_sp)
@ -820,7 +820,7 @@ SBValue::CreateValueFromExpression (const char *name, const char* expression)
lldb::SBValue
SBValue::CreateValueFromExpression (const char *name, const char *expression, SBExpressionOptions &options)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
lldb::SBValue sb_value;
lldb::ValueObjectSP value_sp(GetSP());
lldb::ValueObjectSP new_value_sp;
@ -905,7 +905,7 @@ SBValue::CreateValueFromAddress(const char* name, lldb::addr_t address, SBType s
sb_value.SetSP(new_value_sp);
}
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (new_value_sp)
@ -935,7 +935,7 @@ SBValue::CreateValueFromData (const char* name, SBData data, SBType type)
new_value_sp->SetAddressTypeOfChildren(eAddressTypeLoad);
sb_value.SetSP(new_value_sp);
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (new_value_sp)
@ -965,7 +965,7 @@ SBValue
SBValue::GetChildAtIndex (uint32_t idx, lldb::DynamicValueType use_dynamic, bool can_create_synthetic)
{
lldb::ValueObjectSP child_sp;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
lldb::ValueObjectSP value_sp(GetSP());
if (value_sp)
@ -1024,7 +1024,7 @@ SBValue::GetIndexOfChildWithName (const char *name)
idx = value_sp->GetIndexOfChildWithName (ConstString(name));
}
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (idx == UINT32_MAX)
@ -1059,7 +1059,7 @@ SBValue::GetChildMemberWithName (const char *name, lldb::DynamicValueType use_dy
lldb::ValueObjectSP child_sp;
const ConstString str_name (name);
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
lldb::ValueObjectSP value_sp(GetSP());
if (value_sp)
@ -1192,7 +1192,7 @@ SBValue::IsSynthetic ()
lldb::SBValue
SBValue::GetValueForExpressionPath(const char* expr_path)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
lldb::ValueObjectSP child_sp;
lldb::ValueObjectSP value_sp(GetSP());
if (value_sp)
@ -1236,7 +1236,7 @@ SBValue::GetValueAsSigned(SBError& error, int64_t fail_value)
Process::StopLocker stop_locker;
if (process_sp && !stop_locker.TryLock(&process_sp->GetRunLock()))
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::GetValueAsSigned() => error: process is running", value_sp.get());
error.SetErrorString("process is running");
@ -1272,7 +1272,7 @@ SBValue::GetValueAsUnsigned(SBError& error, uint64_t fail_value)
Process::StopLocker stop_locker;
if (process_sp && !stop_locker.TryLock(&process_sp->GetRunLock()))
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::GetValueAsUnsigned() => error: process is running", value_sp.get());
error.SetErrorString("process is running");
@ -1307,7 +1307,7 @@ SBValue::GetValueAsSigned(int64_t fail_value)
Process::StopLocker stop_locker;
if (process_sp && !stop_locker.TryLock(&process_sp->GetRunLock()))
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::GetValueAsSigned() => error: process is running", value_sp.get());
}
@ -1336,7 +1336,7 @@ SBValue::GetValueAsUnsigned(uint64_t fail_value)
Process::StopLocker stop_locker;
if (process_sp && !stop_locker.TryLock(&process_sp->GetRunLock()))
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::GetValueAsUnsigned() => error: process is running", value_sp.get());
}
@ -1358,7 +1358,7 @@ SBValue::GetValueAsUnsigned(uint64_t fail_value)
bool
SBValue::MightHaveChildren ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
bool has_children = false;
lldb::ValueObjectSP value_sp(GetSP());
if (value_sp)
@ -1374,7 +1374,7 @@ SBValue::GetNumChildren ()
{
uint32_t num_children = 0;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
lldb::ValueObjectSP value_sp(GetSP());
if (value_sp)
{
@ -1420,7 +1420,7 @@ SBValue::Dereference ()
sb_value = value_sp->Dereference (error);
}
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::Dereference () => SBValue(%p)", value_sp.get(), value_sp.get());
@ -1444,7 +1444,7 @@ SBValue::TypeIsPointerType ()
}
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::TypeIsPointerType () => %i", value_sp.get(), is_ptr_type);
@ -1480,7 +1480,7 @@ SBValue::GetTarget()
target_sp = value_sp->GetTargetSP();
sb_target.SetSP (target_sp);
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (target_sp.get() == NULL)
@ -1503,7 +1503,7 @@ SBValue::GetProcess()
if (process_sp)
sb_process.SetSP (process_sp);
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (process_sp.get() == NULL)
@ -1525,7 +1525,7 @@ SBValue::GetThread()
thread_sp = value_sp->GetThreadSP();
sb_thread.SetThread(thread_sp);
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (thread_sp.get() == NULL)
@ -1547,7 +1547,7 @@ SBValue::GetFrame()
frame_sp = value_sp->GetFrameSP();
sb_frame.SetFrameSP (frame_sp);
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (frame_sp.get() == NULL)
@ -1670,7 +1670,7 @@ SBValue::GetDescription (SBStream &description)
Process::StopLocker stop_locker;
if (process_sp && !stop_locker.TryLock(&process_sp->GetRunLock()))
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::GetDescription() => error: process is running", value_sp.get());
}
@ -1717,7 +1717,7 @@ SBValue::AddressOf()
sb_value.SetSP(value_sp->AddressOf (error),GetPreferDynamicValue(), GetPreferSyntheticValue());
}
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::AddressOf () => SBValue(%p)", value_sp.get(), value_sp.get());
@ -1754,7 +1754,7 @@ SBValue::GetLoadAddress()
value = LLDB_INVALID_ADDRESS;
}
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::GetLoadAddress () => (%" PRIu64 ")", value_sp.get(), value);
@ -1791,7 +1791,7 @@ SBValue::GetAddress()
}
}
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::GetAddress () => (%s,%" PRIu64 ")", value_sp.get(),
(addr.GetSection() ? addr.GetSection()->GetName().GetCString() : "NULL"),
@ -1803,7 +1803,7 @@ lldb::SBData
SBValue::GetPointeeData (uint32_t item_idx,
uint32_t item_count)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
lldb::SBData sb_data;
lldb::ValueObjectSP value_sp(GetSP());
if (value_sp)
@ -1841,7 +1841,7 @@ SBValue::GetPointeeData (uint32_t item_idx,
lldb::SBData
SBValue::GetData ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
lldb::SBData sb_data;
lldb::ValueObjectSP value_sp(GetSP());
if (value_sp)
@ -1903,7 +1903,7 @@ SBValue::Watch (bool resolve_location, bool read, bool write, SBError &error)
Process::StopLocker stop_locker;
if (process_sp && !stop_locker.TryLock(&process_sp->GetRunLock()))
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBValue(%p)::Watch() => error: process is running", value_sp.get());
return sb_watchpoint;

View file

@ -94,7 +94,7 @@ SBValueList::SBValueList () :
SBValueList::SBValueList (const SBValueList &rhs) :
m_opaque_ap ()
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (rhs.IsValid())
m_opaque_ap.reset (new ValueListImpl (*rhs));
@ -110,7 +110,7 @@ SBValueList::SBValueList (const SBValueList &rhs) :
SBValueList::SBValueList (const ValueListImpl *lldb_object_ptr) :
m_opaque_ap ()
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (lldb_object_ptr)
m_opaque_ap.reset (new ValueListImpl (*lldb_object_ptr));
@ -207,7 +207,7 @@ SBValueList::Append (const lldb::SBValueList& value_list)
SBValue
SBValueList::GetValueAtIndex (uint32_t idx) const
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
//if (log)
// log->Printf ("SBValueList::GetValueAtIndex (uint32_t idx) idx = %d", idx);
@ -230,7 +230,7 @@ SBValueList::GetValueAtIndex (uint32_t idx) const
uint32_t
SBValueList::GetSize () const
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
//if (log)
// log->Printf ("SBValueList::GetSize ()");

View file

@ -35,7 +35,7 @@ SBWatchpoint::SBWatchpoint () :
SBWatchpoint::SBWatchpoint (const lldb::WatchpointSP &wp_sp) :
m_opaque_sp (wp_sp)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
@ -67,7 +67,7 @@ SBWatchpoint::~SBWatchpoint ()
watch_id_t
SBWatchpoint::GetID ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
watch_id_t watch_id = LLDB_INVALID_WATCH_ID;
lldb::WatchpointSP watchpoint_sp(GetSP());
@ -183,7 +183,7 @@ SBWatchpoint::GetHitCount ()
count = watchpoint_sp->GetHitCount();
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBWatchpoint(%p)::GetHitCount () => %u", watchpoint_sp.get(), count);

View file

@ -393,7 +393,7 @@ Breakpoint::ModulesChanged (ModuleList &module_list, bool load, bool delete_loca
if (!break_loc->ResolveBreakpointSite())
{
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
Log *log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
if (log)
log->Printf ("Warning: could not set breakpoint site for breakpoint location %d of breakpoint %d.\n",
break_loc->GetID(), GetID());

View file

@ -322,7 +322,7 @@ bool
BreakpointLocation::ShouldStop (StoppointCallbackContext *context)
{
bool should_stop = true;
LogSP log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS);
Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS);
IncrementHitCount();
@ -378,7 +378,7 @@ BreakpointLocation::ResolveBreakpointSite ()
if (new_id == LLDB_INVALID_BREAK_ID)
{
LogSP log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS);
Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS);
if (log)
log->Warning ("Tried to add breakpoint site at 0x%" PRIx64 " but it was already present.\n",
m_address.GetOpcodeLoadAddress (&m_owner.GetTarget()));

View file

@ -83,7 +83,7 @@ BreakpointResolverAddress::SearchCallback
{
StreamString s;
bp_loc_sp->GetDescription(&s, lldb::eDescriptionLevelVerbose);
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
if (log)
log->Printf ("Added location: %s\n", s.GetData());
}

View file

@ -59,7 +59,7 @@ BreakpointResolverFileLine::SearchCallback
SymbolContextList sc_list;
assert (m_breakpoint != NULL);
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
// There is a tricky bit here. You can have two compilation units that #include the same file, and
// in one of them the function at m_line_number is used (and so code and a line entry for it is generated) but in the

View file

@ -55,7 +55,7 @@ BreakpointResolverFileRegex::SearchCallback
if (!context.target_sp)
return eCallbackReturnContinue;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
CompileUnit *cu = context.comp_unit;
FileSpec cu_file_spec = *(static_cast<FileSpec *>(cu));

View file

@ -47,7 +47,7 @@ BreakpointResolverName::BreakpointResolverName
{
if (!m_regex.Compile (func_name))
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
if (log)
log->Warning ("function name regexp: \"%s\" did not compile.", func_name);
@ -163,7 +163,7 @@ BreakpointResolverName::SearchCallback
Address break_addr;
assert (m_breakpoint != NULL);
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
if (m_class_name)
{

View file

@ -52,7 +52,7 @@ AddressResolverFileLine::SearchCallback
uint32_t sc_list_size;
CompileUnit *cu = context.comp_unit;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
sc_list_size = cu->ResolveSymbolContext (m_file_spec, m_line_number, m_inlines, false, eSymbolContextEverything,
sc_list);

View file

@ -37,7 +37,7 @@ AddressResolverName::AddressResolverName
{
if (!m_regex.Compile (m_func_name.AsCString()))
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
if (log)
log->Warning ("function name regexp: \"%s\" did not compile.", m_func_name.AsCString());
@ -98,7 +98,7 @@ AddressResolverName::SearchCallback
SymbolContext sc;
Address func_addr;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
if (m_class_name)
{

View file

@ -29,7 +29,7 @@ Broadcaster::Broadcaster (BroadcasterManager *manager, const char *name) :
m_hijacking_masks(),
m_manager (manager)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
if (log)
log->Printf ("%p Broadcaster::Broadcaster(\"%s\")", this, m_broadcaster_name.AsCString());
@ -37,7 +37,7 @@ Broadcaster::Broadcaster (BroadcasterManager *manager, const char *name) :
Broadcaster::~Broadcaster()
{
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
Log *log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
if (log)
log->Printf ("%p Broadcaster::~Broadcaster(\"%s\")", this, m_broadcaster_name.AsCString());
@ -236,7 +236,7 @@ Broadcaster::PrivateBroadcastEvent (EventSP &event_sp, bool unique)
hijacking_listener = NULL;
}
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EVENTS));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EVENTS));
if (log)
{
StreamString event_description;
@ -294,7 +294,7 @@ Broadcaster::HijackBroadcaster (Listener *listener, uint32_t event_mask)
{
Mutex::Locker event_types_locker(m_listeners_mutex);
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EVENTS));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EVENTS));
if (log)
{
log->Printf ("%p Broadcaster(\"%s\")::HijackBroadcaster (listener(\"%s\")=%p)",
@ -313,7 +313,7 @@ Broadcaster::RestoreBroadcaster ()
{
Mutex::Locker event_types_locker(m_listeners_mutex);
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EVENTS));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EVENTS));
if (log)
{
Listener *listener = m_hijacking_listeners.back();

View file

@ -338,7 +338,7 @@ Communication::ReadThread (void *p)
{
Communication *comm = (Communication *)p;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_COMMUNICATION));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_COMMUNICATION));
if (log)
log->Printf ("%p Communication::ReadThread () thread starting...", p);
@ -377,10 +377,10 @@ Communication::ReadThread (void *p)
case eConnectionStatusError: // Check GetError() for details
case eConnectionStatusTimedOut: // Request timed out
if (log)
error.LogIfError(log.get(),
"%p Communication::ReadFromConnection () => status = %s",
p,
Communication::ConnectionStatusAsCString (status));
error.LogIfError (log,
"%p Communication::ReadFromConnection () => status = %s",
p,
Communication::ConnectionStatusAsCString (status));
break;
}
}

View file

@ -90,7 +90,7 @@ ConnectionFileDescriptor::ConnectionFileDescriptor () :
m_mutex (Mutex::eMutexTypeRecursive),
m_shutting_down (false)
{
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION | LIBLLDB_LOG_OBJECT));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION | LIBLLDB_LOG_OBJECT));
if (log)
log->Printf ("%p ConnectionFileDescriptor::ConnectionFileDescriptor ()", this);
}
@ -109,7 +109,7 @@ ConnectionFileDescriptor::ConnectionFileDescriptor (int fd, bool owns_fd) :
m_mutex (Mutex::eMutexTypeRecursive),
m_shutting_down (false)
{
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION | LIBLLDB_LOG_OBJECT));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION | LIBLLDB_LOG_OBJECT));
if (log)
log->Printf ("%p ConnectionFileDescriptor::ConnectionFileDescriptor (fd = %i, owns_fd = %i)", this, fd, owns_fd);
OpenCommandPipe ();
@ -118,7 +118,7 @@ ConnectionFileDescriptor::ConnectionFileDescriptor (int fd, bool owns_fd) :
ConnectionFileDescriptor::~ConnectionFileDescriptor ()
{
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION | LIBLLDB_LOG_OBJECT));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION | LIBLLDB_LOG_OBJECT));
if (log)
log->Printf ("%p ConnectionFileDescriptor::~ConnectionFileDescriptor ()", this);
Disconnect (NULL);
@ -130,7 +130,7 @@ ConnectionFileDescriptor::OpenCommandPipe ()
{
CloseCommandPipe();
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
// Make the command file descriptor here:
int filedes[2];
int result = pipe (filedes);
@ -174,7 +174,7 @@ ConnectionStatus
ConnectionFileDescriptor::Connect (const char *s, Error *error_ptr)
{
Mutex::Locker locker (m_mutex);
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
if (log)
log->Printf ("%p ConnectionFileDescriptor::Connect (url = '%s')", this, s);
@ -295,7 +295,7 @@ ConnectionFileDescriptor::Connect (const char *s, Error *error_ptr)
ConnectionStatus
ConnectionFileDescriptor::Disconnect (Error *error_ptr)
{
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
if (log)
log->Printf ("%p ConnectionFileDescriptor::Disconnect ()", this);
@ -370,7 +370,7 @@ ConnectionFileDescriptor::Read (void *dst,
ConnectionStatus &status,
Error *error_ptr)
{
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
if (log)
log->Printf ("%p ConnectionFileDescriptor::Read () ::read (fd = %i, dst = %p, dst_len = %" PRIu64 ")...",
this, m_fd_recv, dst, (uint64_t)dst_len);
@ -482,7 +482,7 @@ ConnectionFileDescriptor::Read (void *dst,
size_t
ConnectionFileDescriptor::Write (const void *src, size_t src_len, ConnectionStatus &status, Error *error_ptr)
{
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
if (log)
log->Printf ("%p ConnectionFileDescriptor::Write (src = %p, src_len = %" PRIu64 ")", this, src, (uint64_t)src_len);
@ -620,7 +620,7 @@ ConnectionFileDescriptor::BytesAvailable (uint32_t timeout_usec, Error *error_pt
// Don't need to take the mutex here separately since we are only called from Read. If we
// ever get used more generally we will need to lock here as well.
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
if (log)
log->Printf("%p ConnectionFileDescriptor::BytesAvailable (timeout_usec = %u)", this, timeout_usec);
struct timeval *tv_ptr;
@ -770,7 +770,7 @@ ConnectionFileDescriptor::BytesAvailable (uint32_t timeout_usec, Error *error_pt
// Don't need to take the mutex here separately since we are only called from Read. If we
// ever get used more generally we will need to lock here as well.
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
if (log)
log->Printf("%p ConnectionFileDescriptor::BytesAvailable (timeout_usec = %u)", this, timeout_usec);
struct timeval *tv_ptr;
@ -927,7 +927,7 @@ ConnectionFileDescriptor::BytesAvailable (uint32_t timeout_usec, Error *error_pt
// Don't need to take the mutex here separately since we are only called from Read. If we
// ever get used more generally we will need to lock here as well.
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
if (log)
log->Printf("%p ConnectionFileDescriptor::BytesAvailable (timeout_usec = %u)", this, timeout_usec);
int timeout_msec = 0;
@ -1068,7 +1068,7 @@ ConnectionFileDescriptor::Close (int& fd, Error *error_ptr)
// can get into the close scope below
if (fd >= 0)
{
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
if (log)
log->Printf ("%p ConnectionFileDescriptor::Close (fd = %i)", this,fd);
@ -1177,7 +1177,7 @@ ConnectionFileDescriptor::NamedSocketConnect (const char *socket_name, Error *er
ConnectionStatus
ConnectionFileDescriptor::SocketListen (uint16_t listen_port_num, Error *error_ptr)
{
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
if (log)
log->Printf ("%p ConnectionFileDescriptor::SocketListen (port = %i)", this, listen_port_num);
@ -1240,7 +1240,7 @@ ConnectionFileDescriptor::SocketListen (uint16_t listen_port_num, Error *error_p
ConnectionStatus
ConnectionFileDescriptor::ConnectTCP (const char *host_and_port, Error *error_ptr)
{
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
if (log)
log->Printf ("%p ConnectionFileDescriptor::ConnectTCP (host/port = %s)", this, host_and_port);
Disconnect (NULL);
@ -1314,7 +1314,7 @@ ConnectionFileDescriptor::ConnectTCP (const char *host_and_port, Error *error_pt
ConnectionStatus
ConnectionFileDescriptor::ConnectUDP (const char *host_and_port, Error *error_ptr)
{
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
if (log)
log->Printf ("%p ConnectionFileDescriptor::ConnectUDP (host/port = %s)", this, host_and_port);
Disconnect (NULL);

View file

@ -83,7 +83,7 @@ DataBufferMemoryMap::Clear()
{
if (m_mmap_addr != NULL)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_MMAP));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_MMAP));
if (log)
log->Printf("DataBufferMemoryMap::Clear() m_mmap_addr = %p, m_mmap_size = %zu", m_mmap_addr, m_mmap_size);
::munmap((void *)m_mmap_addr, m_mmap_size);
@ -110,7 +110,7 @@ DataBufferMemoryMap::MemoryMapFromFileSpec (const FileSpec* filespec,
{
if (filespec != NULL)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_MMAP));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_MMAP));
if (log)
{
log->Printf("DataBufferMemoryMap::MemoryMapFromFileSpec(file=\"%s/%s\", offset=0x%" PRIx64 ", length=0x%" PRIx64 ", writeable=%i",
@ -164,7 +164,7 @@ DataBufferMemoryMap::MemoryMapFromFileDescriptor (int fd,
Clear();
if (fd >= 0)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_MMAP|LIBLLDB_LOG_VERBOSE));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_MMAP|LIBLLDB_LOG_VERBOSE));
if (log)
{
log->Printf("DataBufferMemoryMap::MemoryMapFromFileSpec(fd=%i, offset=0x%" PRIx64 ", length=0x%" PRIx64 ", writeable=%i, fd_is_file=%i)",

View file

@ -1117,7 +1117,7 @@ ScanFormatDescriptor (const char* var_name_begin,
Format* custom_format,
ValueObject::ValueObjectRepresentationStyle* val_obj_display)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
*percent_position = ::strchr(var_name_begin,'%');
if (!*percent_position || *percent_position > var_name_end)
{
@ -1184,7 +1184,7 @@ ScanBracketedRange (const char* var_name_begin,
int64_t* index_lower,
int64_t* index_higher)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
*open_bracket_position = ::strchr(var_name_begin,'[');
if (*open_bracket_position && *open_bracket_position < var_name_final)
{
@ -1241,7 +1241,7 @@ ExpandIndexedExpression (ValueObject* valobj,
StackFrame* frame,
bool deref_pointer)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
const char* ptr_deref_format = "[%d]";
std::string ptr_deref_buffer(10,0);
::sprintf(&ptr_deref_buffer[0], ptr_deref_format, index);
@ -1290,7 +1290,7 @@ Debugger::FormatPrompt
ValueObject* realvalobj = NULL; // makes it super-easy to parse pointers
bool success = true;
const char *p;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
for (p = format; *p != '\0'; ++p)
{
if (realvalobj)

View file

@ -32,14 +32,14 @@ Listener::Listener(const char *name) :
m_events_mutex (Mutex::eMutexTypeRecursive),
m_cond_wait()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
if (log)
log->Printf ("%p Listener::Listener('%s')", this, m_name.c_str());
}
Listener::~Listener()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
Mutex::Locker locker (m_broadcasters_mutex);
size_t num_managers = m_broadcaster_managers.size();
@ -84,7 +84,7 @@ Listener::StartListeningForEvents (Broadcaster* broadcaster, uint32_t event_mask
{
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EVENTS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EVENTS));
if (log)
log->Printf ("%p Listener::StartListeningForEvents (broadcaster = %p, mask = 0x%8.8x) acquired_mask = 0x%8.8x for %s",
this,
@ -113,7 +113,7 @@ Listener::StartListeningForEvents (Broadcaster* broadcaster, uint32_t event_mask
uint32_t acquired_mask = broadcaster->AddListener (this, event_mask);
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EVENTS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EVENTS));
if (log)
log->Printf ("%p Listener::StartListeningForEvents (broadcaster = %p, mask = 0x%8.8x, callback = %p, user_data = %p) acquired_mask = 0x%8.8x for %s",
this, broadcaster, event_mask, callback, callback_user_data, acquired_mask, m_name.c_str());
@ -183,7 +183,7 @@ Listener::BroadcasterManagerWillDestruct (BroadcasterManager *manager)
void
Listener::AddEvent (EventSP &event_sp)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EVENTS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EVENTS));
if (log)
log->Printf ("%p Listener('%s')::AddEvent (event_sp = {%p})", this, m_name.c_str(), event_sp.get());
@ -270,7 +270,7 @@ Listener::FindNextEventInternal
EventSP &event_sp,
bool remove)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EVENTS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EVENTS));
Mutex::Locker lock(m_events_mutex);
@ -400,7 +400,7 @@ Listener::WaitForEventsInternal
EventSP &event_sp
)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EVENTS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EVENTS));
bool timed_out = false;
if (log)

View file

@ -41,7 +41,7 @@ Log::Log () :
{
}
Log::Log (StreamSP &stream_sp) :
Log::Log (const StreamSP &stream_sp) :
m_stream_sp(stream_sp),
m_options(0),
m_mask_bits(0)
@ -517,7 +517,7 @@ LogChannel::FindPlugin (const char *plugin_name)
}
LogChannel::LogChannel () :
m_log_sp ()
m_log_ap ()
{
}

View file

@ -152,7 +152,7 @@ Module::Module (const ModuleSpec &module_spec) :
GetModuleCollection().push_back(this);
}
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_OBJECT|LIBLLDB_LOG_MODULES));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_OBJECT|LIBLLDB_LOG_MODULES));
if (log)
log->Printf ("%p Module::Module((%s) '%s/%s%s%s%s')",
this,
@ -197,7 +197,7 @@ Module::Module(const FileSpec& file_spec,
if (object_name)
m_object_name = *object_name;
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_OBJECT|LIBLLDB_LOG_MODULES));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_OBJECT|LIBLLDB_LOG_MODULES));
if (log)
log->Printf ("%p Module::Module((%s) '%s/%s%s%s%s')",
this,
@ -220,7 +220,7 @@ Module::~Module()
assert (pos != end);
modules.erase(pos);
}
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_OBJECT|LIBLLDB_LOG_MODULES));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_OBJECT|LIBLLDB_LOG_MODULES));
if (log)
log->Printf ("%p Module::~Module((%s) '%s/%s%s%s%s')",
this,

View file

@ -596,9 +596,9 @@ ModuleList::Dump(Stream *s) const
}
void
ModuleList::LogUUIDAndPaths (LogSP &log_sp, const char *prefix_cstr)
ModuleList::LogUUIDAndPaths (Log *log, const char *prefix_cstr)
{
if (log_sp)
if (log)
{
Mutex::Locker locker(m_modules_mutex);
char uuid_cstr[256];
@ -608,13 +608,13 @@ ModuleList::LogUUIDAndPaths (LogSP &log_sp, const char *prefix_cstr)
Module *module = pos->get();
module->GetUUID().GetAsCString (uuid_cstr, sizeof(uuid_cstr));
const FileSpec &module_file_spec = module->GetFileSpec();
log_sp->Printf ("%s[%u] %s (%s) \"%s/%s\"",
prefix_cstr ? prefix_cstr : "",
(uint32_t)std::distance (begin, pos),
uuid_cstr,
module->GetArchitecture().GetArchitectureName(),
module_file_spec.GetDirectory().GetCString(),
module_file_spec.GetFilename().GetCString());
log->Printf ("%s[%u] %s (%s) \"%s/%s\"",
prefix_cstr ? prefix_cstr : "",
(uint32_t)std::distance (begin, pos),
uuid_cstr,
module->GetArchitecture().GetArchitectureName(),
module_file_spec.GetDirectory().GetCString(),
module_file_spec.GetFilename().GetCString());
}
}
}
@ -791,7 +791,7 @@ ModuleList::GetSharedModule
if (old_module_sp_ptr && !old_module_sp_ptr->get())
*old_module_sp_ptr = module_sp;
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_MODULES));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_MODULES));
if (log)
log->Printf("module changed: %p, removing from global module list", module_sp.get());

View file

@ -229,7 +229,7 @@ ValueObject::UpdateValueIfNeeded (bool update_format)
bool
ValueObject::UpdateFormatsIfNeeded()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
if (log)
log->Printf("[%s %p] checking for FormatManager revisions. ValueObject rev: %d - Global rev: %d",
GetName().GetCString(),

View file

@ -202,7 +202,7 @@ ValueObjectDynamicValue::UpdateValue ()
Value old_value(m_value);
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
bool has_changed_type = false;

View file

@ -341,7 +341,7 @@ FormatManager::GetSummaryFormat (ValueObject& valobj,
{
TypeSummaryImplSP retval;
#if USE_CACHE
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
ConstString valobj_type(GetTypeForCache(valobj, use_dynamic));
if (valobj_type)
{
@ -376,7 +376,7 @@ FormatManager::GetSyntheticChildren (ValueObject& valobj,
{
SyntheticChildrenSP retval;
#if USE_CACHE
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
ConstString valobj_type(GetTypeForCache(valobj, use_dynamic));
if (valobj_type)
{

View file

@ -185,7 +185,7 @@ TypeCategoryMap::GetSummaryFormat (ValueObject& valobj,
uint32_t reason_why;
ActiveCategoriesIterator begin, end = m_active_categories.end();
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
for (begin = m_active_categories.begin(); begin != end; begin++)
{
@ -213,7 +213,7 @@ TypeCategoryMap::GetSyntheticChildren (ValueObject& valobj,
ActiveCategoriesIterator begin, end = m_active_categories.end();
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
for (begin = m_active_categories.begin(); begin != end; begin++)
{

View file

@ -89,7 +89,7 @@ void ASTDumper::ToSTDERR()
fprintf(stderr, "%s\n", m_dump.c_str());
}
void ASTDumper::ToLog(lldb::LogSP &log, const char *prefix)
void ASTDumper::ToLog(Log *log, const char *prefix)
{
size_t len = m_dump.length() + 1;

View file

@ -60,7 +60,7 @@ ASTResultSynthesizer::Initialize(ASTContext &Context)
void
ASTResultSynthesizer::TransformTopLevelDecl(Decl* D)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (NamedDecl *named_decl = dyn_cast<NamedDecl>(D))
{
@ -129,7 +129,7 @@ ASTResultSynthesizer::HandleTopLevelDecl(DeclGroupRef D)
bool
ASTResultSynthesizer::SynthesizeFunctionResult (FunctionDecl *FunDecl)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (!m_sema)
return false;
@ -175,7 +175,7 @@ ASTResultSynthesizer::SynthesizeFunctionResult (FunctionDecl *FunDecl)
bool
ASTResultSynthesizer::SynthesizeObjCMethodResult (ObjCMethodDecl *MethodDecl)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (!m_sema)
return false;
@ -224,7 +224,7 @@ bool
ASTResultSynthesizer::SynthesizeBodyResult (CompoundStmt *Body,
DeclContext *DC)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
ASTContext &Ctx(*m_ast_context);
@ -452,7 +452,7 @@ ASTResultSynthesizer::MaybeRecordPersistentType(TypeDecl *D)
if (name.size() == 0 || name[0] != '$')
return;
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
ConstString name_cs(name.str().c_str());

View file

@ -169,7 +169,7 @@ ClangASTSource::FindExternalVisibleDeclsByName
void
ClangASTSource::CompleteType (TagDecl *tag_decl)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
static unsigned int invocation_id = 0;
unsigned int current_id = invocation_id++;
@ -306,7 +306,7 @@ ClangASTSource::CompleteType (TagDecl *tag_decl)
void
ClangASTSource::CompleteType (clang::ObjCInterfaceDecl *interface_decl)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log)
{
@ -370,7 +370,7 @@ ClangASTSource::FindExternalLexicalDecls (const DeclContext *decl_context,
{
ClangASTMetrics::RegisterLexicalQuery();
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
const Decl *context_decl = dyn_cast<Decl>(decl_context);
@ -487,7 +487,7 @@ ClangASTSource::FindExternalVisibleDecls (NameSearchContext &context)
const ConstString name(context.m_decl_name.getAsString().c_str());
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
static unsigned int invocation_id = 0;
unsigned int current_id = invocation_id++;
@ -578,7 +578,7 @@ ClangASTSource::FindExternalVisibleDecls (NameSearchContext &context,
{
assert (m_ast_context);
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
SymbolContextList sc_list;
@ -886,7 +886,7 @@ FindObjCMethodDeclsWithOrigin (unsigned int current_id,
if (!copied_method_decl)
return false;
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log)
{
@ -902,7 +902,7 @@ FindObjCMethodDeclsWithOrigin (unsigned int current_id,
void
ClangASTSource::FindObjCMethodDecls (NameSearchContext &context)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
static unsigned int invocation_id = 0;
unsigned int current_id = invocation_id++;
@ -1189,7 +1189,7 @@ FindObjCPropertyAndIvarDeclsWithOrigin (unsigned int current_id,
ClangASTImporter *ast_importer,
DeclFromUser<const ObjCInterfaceDecl> &origin_iface_decl)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (origin_iface_decl.IsInvalid())
return false;
@ -1242,7 +1242,7 @@ FindObjCPropertyAndIvarDeclsWithOrigin (unsigned int current_id,
void
ClangASTSource::FindObjCPropertyAndIvarDecls (NameSearchContext &context)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
static unsigned int invocation_id = 0;
unsigned int current_id = invocation_id++;
@ -1440,7 +1440,7 @@ ClangASTSource::layoutRecordType(const RecordDecl *record,
static unsigned int invocation_id = 0;
unsigned int current_id = invocation_id++;
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log)
{
@ -1562,7 +1562,7 @@ ClangASTSource::CompleteNamespaceMap (ClangASTImporter::NamespaceMapSP &namespac
static unsigned int invocation_id = 0;
unsigned int current_id = invocation_id++;
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log)
{
@ -1657,8 +1657,6 @@ ClangASTSource::AddNamespace (NameSearchContext &context, ClangASTImporter::Name
if (!namespace_decls)
return NULL;
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
const ClangNamespaceDecl &namespace_decl = namespace_decls->begin()->second;
Decl *copied_decl = m_ast_importer->CopyDecl(m_ast_context, namespace_decl.GetASTContext(), namespace_decl.GetNamespaceDecl());
@ -1773,7 +1771,7 @@ NameSearchContext::AddFunDecl (void *type)
}
else
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
log->Printf("Function type wasn't a FunctionProtoType");
}

View file

@ -113,7 +113,7 @@ ClangExpressionDeclMap::WillParse(ExecutionContext &exe_ctx)
void
ClangExpressionDeclMap::DidParse()
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log)
ClangASTMetrics::DumpCounters(log);
@ -216,7 +216,7 @@ ClangExpressionDeclMap::BuildIntegerVariable (const ConstString &name,
if (!user_type.GetOpaqueQualType())
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log)
log->Printf("ClangExpressionDeclMap::BuildIntegerVariable - Couldn't export the type for a constant integer result");
@ -289,7 +289,7 @@ ClangExpressionDeclMap::BuildCastVariable (const ConstString &name,
{
assert (m_parser_vars.get());
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
ExecutionContext &exe_ctx = m_parser_vars->m_exe_ctx;
Target *target = exe_ctx.GetTargetPtr();
@ -455,7 +455,7 @@ ClangExpressionDeclMap::AddPersistentVariable
{
assert (m_parser_vars.get());
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
ExecutionContext &exe_ctx = m_parser_vars->m_exe_ctx;
Target *target = exe_ctx.GetTargetPtr();
if (target == NULL)
@ -533,7 +533,7 @@ ClangExpressionDeclMap::AddValueToStruct
assert (m_struct_vars.get());
assert (m_parser_vars.get());
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
m_struct_vars->m_struct_laid_out = false;
@ -740,7 +740,7 @@ ClangExpressionDeclMap::GetFunctionAddress
{
assert (m_parser_vars.get());
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
ExecutionContext &exe_ctx = m_parser_vars->m_exe_ctx;
Target *target = exe_ctx.GetTargetPtr();
// Back out in all cases where we're not fully initialized
@ -1522,7 +1522,7 @@ ClangExpressionDeclMap::DoMaterialize
assert (m_struct_vars.get());
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (!m_struct_vars->m_struct_laid_out)
{
@ -1682,7 +1682,7 @@ ClangExpressionDeclMap::DoMaterializeOnePersistentVariable
Error &err
)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (!var_sp)
{
@ -1961,7 +1961,7 @@ ClangExpressionDeclMap::DoMaterializeOneVariable
Error &err
)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Target *target = m_parser_vars->m_exe_ctx.GetTargetPtr();
Process *process = m_parser_vars->m_exe_ctx.GetProcessPtr();
StackFrame *frame = m_parser_vars->m_exe_ctx.GetFramePtr();
@ -2428,7 +2428,7 @@ ClangExpressionDeclMap::FindVariableInScope
bool object_pointer
)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
ValueObjectSP valobj;
VariableSP var_sp;
@ -2631,7 +2631,7 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context)
const ConstString name(context.m_decl_name.getAsString().c_str());
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (GetImportInProgress())
{
@ -2707,7 +2707,7 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context,
{
assert (m_ast_context);
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
SymbolContextList sc_list;
@ -3240,7 +3240,7 @@ ClangExpressionDeclMap::GetVariableValue
TypeFromParser *parser_type
)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Type *var_type = var->GetType();
@ -3369,7 +3369,7 @@ ClangExpressionDeclMap::AddOneVariable (NameSearchContext &context, VariableSP v
{
assert (m_parser_vars.get());
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
TypeFromUser ut;
TypeFromParser pt;
@ -3431,7 +3431,7 @@ ClangExpressionDeclMap::AddOneVariable(NameSearchContext &context,
ClangExpressionVariableSP &pvar_sp,
unsigned int current_id)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
TypeFromUser user_type (pvar_sp->GetTypeFromUser());
@ -3470,7 +3470,7 @@ ClangExpressionDeclMap::AddOneGenericVariable(NameSearchContext &context,
{
assert(m_parser_vars.get());
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Target *target = m_parser_vars->m_exe_ctx.GetTargetPtr();
@ -3524,7 +3524,7 @@ ClangExpressionDeclMap::AddOneGenericVariable(NameSearchContext &context,
bool
ClangExpressionDeclMap::ResolveUnknownTypes()
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Target *target = m_parser_vars->m_exe_ctx.GetTargetPtr();
ASTContext *scratch_ast_context = target->GetScratchClangASTContext()->getASTContext();
@ -3588,7 +3588,7 @@ ClangExpressionDeclMap::AddOneRegister (NameSearchContext &context,
const RegisterInfo *reg_info,
unsigned int current_id)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
void *ast_type = ClangASTContext::GetBuiltinTypeForEncodingAndBitSize(m_ast_context,
reg_info->encoding,
@ -3636,7 +3636,7 @@ ClangExpressionDeclMap::AddOneFunction (NameSearchContext &context,
{
assert (m_parser_vars.get());
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
NamedDecl *fun_decl = NULL;
std::auto_ptr<Value> fun_location(new Value);
@ -3764,7 +3764,7 @@ ClangExpressionDeclMap::CopyClassType(TypeFromUser &ut,
if (!copied_type)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log)
log->Printf("ClangExpressionDeclMap::CopyClassType - Couldn't import the type");
@ -3820,7 +3820,7 @@ ClangExpressionDeclMap::AddOneType(NameSearchContext &context,
if (!copied_type)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log)
log->Printf("ClangExpressionDeclMap::AddOneType - Couldn't import the type");

View file

@ -468,7 +468,7 @@ ClangExpressionParser::PrepareForExecution (lldb::addr_t &func_addr,
{
func_addr = LLDB_INVALID_ADDRESS;
func_end = LLDB_INVALID_ADDRESS;
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
std::auto_ptr<llvm::ExecutionEngine> execution_engine_ap;

View file

@ -214,7 +214,7 @@ ClangFunction::CompileFunction (Stream &errors)
m_wrapper_function_text.append (args_list_buffer);
m_wrapper_function_text.append (");\n}\n");
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log)
log->Printf ("Expression: \n\n%s\n\n", m_wrapper_function_text.c_str());
@ -388,7 +388,7 @@ ClangFunction::InsertFunction (ExecutionContext &exe_ctx, lldb::addr_t &args_add
if (!WriteFunctionArguments(exe_ctx, args_addr_ref, errors))
return false;
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (log)
log->Printf ("Call Address: 0x%" PRIx64 " Struct Address: 0x%" PRIx64 ".\n", m_jit_start_addr, args_addr_ref);
@ -406,7 +406,7 @@ ClangFunction::GetThreadPlanToCallFunction (ExecutionContext &exe_ctx,
lldb::addr_t *this_arg,
lldb::addr_t *cmd_arg)
{
lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | LIBLLDB_LOG_STEP));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | LIBLLDB_LOG_STEP));
if (log)
log->Printf("-- [ClangFunction::GetThreadPlanToCallFunction] Creating thread plan to call function --");
@ -444,7 +444,7 @@ ClangFunction::FetchFunctionResults (ExecutionContext &exe_ctx, lldb::addr_t arg
// FIXME: Create our ThreadPlanCallFunction with the return ClangASTType, and then use GetReturnValueObject
// to fetch the value. That way we can fetch any values we need.
lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | LIBLLDB_LOG_STEP));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | LIBLLDB_LOG_STEP));
if (log)
log->Printf("-- [ClangFunction::FetchFunctionResults] Fetching function results --");
@ -526,7 +526,7 @@ ClangFunction::ExecuteFunction (
Stream &errors,
lldb::addr_t *this_arg)
{
lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | LIBLLDB_LOG_STEP));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | LIBLLDB_LOG_STEP));
if (log)
log->Printf("== [ClangFunction::ExecuteFunction] Executing function ==");

View file

@ -106,7 +106,7 @@ ClangUserExpression::ASTTransformer (clang::ASTConsumer *passthrough)
void
ClangUserExpression::ScanContext(ExecutionContext &exe_ctx, Error &err)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log)
log->Printf("ClangUserExpression::ScanContext()");
@ -372,7 +372,7 @@ ClangUserExpression::Parse (Stream &error_stream,
lldb_private::ExecutionPolicy execution_policy,
bool keep_result_in_memory)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Error err;
@ -492,7 +492,7 @@ ClangUserExpression::PrepareToExecuteJITExpression (Stream &error_stream,
lldb::addr_t &object_ptr,
lldb::addr_t &cmd_ptr)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb::TargetSP target;
lldb::ProcessSP process;
@ -627,7 +627,7 @@ ClangUserExpression::FinalizeJITExecution (Stream &error_stream,
{
Error expr_error;
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log)
{
@ -674,7 +674,7 @@ ClangUserExpression::Execute (Stream &error_stream,
{
// The expression log is quite verbose, and if you're just tracking the execution of the
// expression, it's quite convenient to have these logs come out with the STEP log as well.
lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | LIBLLDB_LOG_STEP));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | LIBLLDB_LOG_STEP));
if (m_jit_start_addr != LLDB_INVALID_ADDRESS)
{
@ -815,7 +815,7 @@ ClangUserExpression::EvaluateWithError (ExecutionContext &exe_ctx,
bool run_others,
uint32_t timeout_usec)
{
lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | LIBLLDB_LOG_STEP));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | LIBLLDB_LOG_STEP));
ExecutionResults execution_results = eExecutionSetupError;

View file

@ -68,8 +68,6 @@ bool
ClangUtilityFunction::Install (Stream &error_stream,
ExecutionContext &exe_ctx)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (m_jit_start_addr != LLDB_INVALID_ADDRESS)
{
error_stream.PutCString("error: already installed\n");

View file

@ -1331,7 +1331,7 @@ DWARFExpression::Evaluate
error_ptr->SetErrorString ("Invalid offset and/or length for opcodes buffer.");
return false;
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
while (opcodes.ValidOffset(offset) && offset < end_offset)

View file

@ -356,7 +356,7 @@ public:
private:
bool InstrumentInstruction(llvm::Instruction *inst)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log)
log->Printf("Instrumenting load/store instruction: %s\n",
@ -497,7 +497,7 @@ private:
bool InspectInstruction(llvm::Instruction &i)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
CallInst *call_inst = dyn_cast<CallInst>(&i);
@ -604,7 +604,7 @@ IRDynamicChecks::~IRDynamicChecks()
bool
IRDynamicChecks::runOnModule(llvm::Module &M)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
llvm::Function* function = M.getFunction(StringRef(m_func_name.c_str()));

View file

@ -45,7 +45,7 @@ IRExecutionUnit::WriteNow (const uint8_t *bytes,
size_t size,
Error &error)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
auto iter = m_allocations.insert(m_allocations.end(), Allocation());
@ -107,7 +107,7 @@ IRExecutionUnit::WriteNow (const uint8_t *bytes,
void
IRExecutionUnit::FreeNow (lldb::addr_t allocation)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (allocation == LLDB_INVALID_ADDRESS)
return;
@ -134,7 +134,7 @@ Error
IRExecutionUnit::DisassembleFunction (Stream &stream,
lldb::ProcessSP &process_wp)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
ExecutionContext exe_ctx(process_wp);
@ -226,7 +226,7 @@ IRExecutionUnit::DisassembleFunction (Stream &stream,
if (log)
{
log->Printf("Function data has contents:");
extractor.PutToLog (log.get(),
extractor.PutToLog (log,
0,
extractor.GetByteSize(),
func_remote_addr,
@ -271,7 +271,6 @@ IRExecutionUnit::GetRunnableInfo(Error &error,
lldb::addr_t &func_addr,
lldb::addr_t &func_end)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb::ProcessSP process_sp(m_process_wp.lock());
func_addr = LLDB_INVALID_ADDRESS;
@ -305,7 +304,7 @@ IRExecutionUnit::GetRunnableInfo(Error &error,
m_did_jit = true;
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
std::string error_string;
@ -480,7 +479,7 @@ IRExecutionUnit::MemoryManager::allocateStub(const llvm::GlobalValue* F,
unsigned StubSize,
unsigned Alignment)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
uint8_t *return_value = m_default_mm_ap->allocateStub(F, StubSize, Alignment);
@ -513,7 +512,7 @@ IRExecutionUnit::MemoryManager::endFunctionBody(const llvm::Function *F,
uint8_t *
IRExecutionUnit::MemoryManager::allocateSpace(intptr_t Size, unsigned Alignment)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
uint8_t *return_value = m_default_mm_ap->allocateSpace(Size, Alignment);
@ -540,7 +539,7 @@ IRExecutionUnit::MemoryManager::allocateCodeSection(uintptr_t Size,
unsigned Alignment,
unsigned SectionID)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
uint8_t *return_value = m_default_mm_ap->allocateCodeSection(Size, Alignment, SectionID);
@ -570,7 +569,7 @@ IRExecutionUnit::MemoryManager::allocateDataSection(uintptr_t Size,
unsigned SectionID,
bool IsReadOnly)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
uint8_t *return_value = m_default_mm_ap->allocateDataSection(Size, Alignment, SectionID, IsReadOnly);
@ -597,7 +596,7 @@ uint8_t *
IRExecutionUnit::MemoryManager::allocateGlobal(uintptr_t Size,
unsigned Alignment)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
uint8_t *return_value = m_default_mm_ap->allocateGlobal(Size, Alignment);
@ -676,7 +675,7 @@ IRExecutionUnit::GetRemoteRangeForLocal (lldb::addr_t local_address)
bool
IRExecutionUnit::CommitAllocations (lldb::ProcessSP &process_sp)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
bool ret = true;
@ -749,7 +748,7 @@ IRExecutionUnit::ReportAllocations (llvm::ExecutionEngine &engine)
bool
IRExecutionUnit::WriteData (lldb::ProcessSP &process_sp)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
for (Allocation &allocation : m_allocations)
{
@ -779,7 +778,7 @@ IRExecutionUnit::WriteData (lldb::ProcessSP &process_sp)
}
void
IRExecutionUnit::Allocation::dump (lldb::LogSP log)
IRExecutionUnit::Allocation::dump (Log *log)
{
if (!log)
return;

View file

@ -123,8 +123,6 @@ IRForTarget::~IRForTarget()
bool
IRForTarget::FixFunctionLinkage(llvm::Function &llvm_function)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
llvm_function.setLinkage(GlobalValue::ExternalLinkage);
std::string name = llvm_function.getName().str();
@ -199,7 +197,7 @@ IRForTarget::GetFunctionAddress (llvm::Function *fun,
lldb_private::ConstString &name,
Constant **&value_ptr)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
fun_addr = LLDB_INVALID_ADDRESS;
name.Clear();
@ -330,8 +328,6 @@ IRForTarget::RegisterFunctionMetadata(LLVMContext &context,
llvm::Value *function_ptr,
const char *name)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
for (Value::use_iterator i = function_ptr->use_begin(), e = function_ptr->use_end();
i != e;
++i)
@ -359,7 +355,7 @@ bool
IRForTarget::ResolveFunctionPointers(llvm::Module &llvm_module,
llvm::Function &llvm_function)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
for (llvm::Module::iterator fi = llvm_module.begin();
fi != llvm_module.end();
@ -405,8 +401,6 @@ IRForTarget::ResolveFunctionPointers(llvm::Module &llvm_module,
clang::NamedDecl *
IRForTarget::DeclForGlobal (const GlobalValue *global_val, Module *module)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
NamedMDNode *named_metadata = module->getNamedMetadata("clang.global.decl.ptrs");
if (!named_metadata)
@ -474,7 +468,7 @@ IRForTarget::MaybeSetConstantResult (llvm::Constant *initializer,
void
IRForTarget::MaybeSetCastResult (lldb_private::TypeFromParser type)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (!m_result_store)
return;
@ -543,7 +537,7 @@ IRForTarget::MaybeSetCastResult (lldb_private::TypeFromParser type)
bool
IRForTarget::CreateResultVariable (llvm::Function &llvm_function)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (!m_resolve_vars)
return true;
@ -826,7 +820,7 @@ IRForTarget::CreateResultVariable (llvm::Function &llvm_function)
}
#if 0
static void DebugUsers(lldb::LogSP &log, Value *value, uint8_t depth)
static void DebugUsers(Log *log, Value *value, uint8_t depth)
{
if (!depth)
return;
@ -855,7 +849,7 @@ IRForTarget::RewriteObjCConstString (llvm::GlobalVariable *ns_str,
llvm::GlobalVariable *cstr,
Instruction *FirstEntryInstruction)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Type *ns_str_ty = ns_str->getType();
@ -968,7 +962,7 @@ IRForTarget::RewriteObjCConstString (llvm::GlobalVariable *ns_str,
bool
IRForTarget::RewriteObjCConstStrings(Function &llvm_function)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
ValueSymbolTable& value_symbol_table = m_module->getValueSymbolTable();
@ -1211,7 +1205,7 @@ static bool IsObjCSelectorRef (Value *value)
bool
IRForTarget::RewriteObjCSelector (Instruction* selector_load)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
LoadInst *load = dyn_cast<LoadInst>(selector_load);
@ -1327,7 +1321,7 @@ IRForTarget::RewriteObjCSelector (Instruction* selector_load)
bool
IRForTarget::RewriteObjCSelectors (BasicBlock &basic_block)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
BasicBlock::iterator ii;
@ -1372,7 +1366,7 @@ IRForTarget::RewriteObjCSelectors (BasicBlock &basic_block)
bool
IRForTarget::RewritePersistentAlloc (llvm::Instruction *persistent_alloc)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
AllocaInst *alloc = dyn_cast<AllocaInst>(persistent_alloc);
@ -1443,7 +1437,7 @@ IRForTarget::RewritePersistentAllocs(llvm::BasicBlock &basic_block)
if (!m_resolve_vars)
return true;
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
BasicBlock::iterator ii;
@ -1508,7 +1502,7 @@ IRForTarget::MaterializeInitializer (uint8_t *data, Constant *initializer)
if (!initializer)
return true;
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log && log->GetVerbose())
log->Printf(" MaterializeInitializer(%p, %s)", data, PrintValue(initializer).c_str());
@ -1611,7 +1605,7 @@ IRForTarget::MaterializeInternalVariable (GlobalVariable *global_variable)
bool
IRForTarget::MaybeHandleVariable (Value *llvm_value_ptr)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log)
log->Printf("MaybeHandleVariable (%s)", PrintValue(llvm_value_ptr).c_str());
@ -1728,7 +1722,7 @@ IRForTarget::MaybeHandleVariable (Value *llvm_value_ptr)
bool
IRForTarget::HandleSymbol (Value *symbol)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::ConstString name(symbol->getName().str().c_str());
@ -1764,7 +1758,7 @@ IRForTarget::HandleSymbol (Value *symbol)
bool
IRForTarget::MaybeHandleCallArguments (CallInst *Old)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log)
log->Printf("MaybeHandleCallArguments(%s)", PrintValue(Old).c_str());
@ -1786,7 +1780,7 @@ IRForTarget::MaybeHandleCallArguments (CallInst *Old)
bool
IRForTarget::HandleObjCClass(Value *classlist_reference)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
GlobalVariable *global_variable = dyn_cast<GlobalVariable>(classlist_reference);
@ -1918,7 +1912,7 @@ IRForTarget::ResolveCalls(BasicBlock &basic_block)
bool
IRForTarget::ResolveExternals (Function &llvm_function)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
for (Module::global_iterator global = m_module->global_begin(), end = m_module->global_end();
global != end;
@ -1977,7 +1971,7 @@ IRForTarget::ResolveExternals (Function &llvm_function)
bool
IRForTarget::ReplaceStrings ()
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
typedef std::map <GlobalVariable *, size_t> OffsetsTy;
@ -2098,7 +2092,7 @@ IRForTarget::ReplaceStrings ()
bool
IRForTarget::ReplaceStaticLiterals (llvm::BasicBlock &basic_block)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
typedef SmallVector <Value*, 2> ConstantList;
typedef SmallVector <llvm::Instruction*, 2> UserList;
@ -2312,7 +2306,7 @@ IRForTarget::RemoveGuards(BasicBlock &basic_block)
bool
IRForTarget::UnfoldConstant(Constant *old_constant, Value *new_constant, Instruction *first_entry_inst)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Value::use_iterator ui;
@ -2418,7 +2412,7 @@ IRForTarget::ReplaceVariables (Function &llvm_function)
if (!m_resolve_vars)
return true;
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
m_decl_map->DoStructLayout();
@ -2592,11 +2586,8 @@ IRForTarget::ReplaceVariables (Function &llvm_function)
}
llvm::Constant *
IRForTarget::BuildRelocation(llvm::Type *type,
uint64_t offset)
IRForTarget::BuildRelocation(llvm::Type *type, uint64_t offset)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
IntegerType *intptr_ty = Type::getIntNTy(m_module->getContext(),
(m_module->getPointerSize() == Module::Pointer64) ? 64 : 32);
@ -2617,7 +2608,7 @@ IRForTarget::BuildRelocation(llvm::Type *type,
bool
IRForTarget::CompleteDataAllocation ()
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (!m_data_allocator.GetStream().GetSize())
return true;
@ -2651,7 +2642,7 @@ IRForTarget::CompleteDataAllocation ()
bool
IRForTarget::StripAllGVs (Module &llvm_module)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
std::vector<GlobalVariable *> global_vars;
std::set<GlobalVariable *>erased_vars;
@ -2701,7 +2692,7 @@ IRForTarget::StripAllGVs (Module &llvm_module)
bool
IRForTarget::runOnModule (Module &llvm_module)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
m_module = &llvm_module;
m_target_data.reset(new DataLayout(m_module));

View file

@ -639,7 +639,7 @@ public:
// resides. This is an IR-level variable.
do
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Value resolved_value;
lldb_private::ClangExpressionVariable::FlagType flags = 0;
@ -984,7 +984,7 @@ bool
IRInterpreter::supportsFunction (Function &llvm_function,
lldb_private::Error &err)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
for (Function::iterator bbi = llvm_function.begin(), bbe = llvm_function.end();
bbi != bbe;
@ -1080,7 +1080,7 @@ IRInterpreter::runOnFunction (lldb::ClangExpressionVariableSP &result,
Module &llvm_module,
lldb_private::Error &err)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
lldb_private::ClangExpressionDeclMap::TargetInfo target_info = m_decl_map.GetTargetInfo();

View file

@ -135,7 +135,7 @@ private:
static void *
MonitorChildProcessThreadFunction (void *arg)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
const char *function = __FUNCTION__;
if (log)
log->Printf ("%s (arg = %p) thread starting...", function, arg);
@ -552,7 +552,7 @@ ThreadCreateTrampoline (thread_arg_t arg)
thread_func_t thread_fptr = info->thread_fptr;
thread_arg_t thread_arg = info->thread_arg;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));
if (log)
log->Printf("thread created");

View file

@ -681,7 +681,7 @@ Host::OpenFileInExternalEditor (const FileSpec &file_spec, uint32_t line_no)
uint32_t reserved2; // must be zero
} BabelAESelInfo;
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_HOST));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_HOST));
char file_path[PATH_MAX];
file_spec.GetPath(file_path, PATH_MAX);
CFCString file_cfstr (file_path, kCFStringEncodingUTF8);
@ -1301,7 +1301,7 @@ static Error
getXPCAuthorization (ProcessLaunchInfo &launch_info)
{
Error error;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_HOST | LIBLLDB_LOG_PROCESS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_HOST | LIBLLDB_LOG_PROCESS));
if ((launch_info.GetUserID() == 0) && !authorizationRef)
{
@ -1312,7 +1312,7 @@ getXPCAuthorization (ProcessLaunchInfo &launch_info)
error.SetErrorString("Can't create authorizationRef.");
if (log)
{
error.PutToLog(log.get(), "%s", error.AsCString());
error.PutToLog(log, "%s", error.AsCString());
}
return error;
}
@ -1353,7 +1353,7 @@ getXPCAuthorization (ProcessLaunchInfo &launch_info)
error.SetErrorStringWithFormat("Launching as root needs root authorization.");
if (log)
{
error.PutToLog(log.get(), "%s", error.AsCString());
error.PutToLog(log, "%s", error.AsCString());
}
if (authorizationRef)
@ -1376,7 +1376,7 @@ LaunchProcessXPC (const char *exe_path, ProcessLaunchInfo &launch_info, ::pid_t
if (error.Fail())
return error;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_HOST | LIBLLDB_LOG_PROCESS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_HOST | LIBLLDB_LOG_PROCESS));
uid_t requested_uid = launch_info.GetUserID();
const char *xpc_service = nil;
@ -1398,7 +1398,7 @@ LaunchProcessXPC (const char *exe_path, ProcessLaunchInfo &launch_info, ::pid_t
error.SetErrorStringWithFormat("Launching root via XPC needs to externalize authorization reference.");
if (log)
{
error.PutToLog(log.get(), "%s", error.AsCString());
error.PutToLog(log, "%s", error.AsCString());
}
return error;
}
@ -1410,7 +1410,7 @@ LaunchProcessXPC (const char *exe_path, ProcessLaunchInfo &launch_info, ::pid_t
error.SetErrorStringWithFormat("Launching via XPC is only currently available for either the login user or root.");
if (log)
{
error.PutToLog(log.get(), "%s", error.AsCString());
error.PutToLog(log, "%s", error.AsCString());
}
return error;
}
@ -1470,7 +1470,7 @@ LaunchProcessXPC (const char *exe_path, ProcessLaunchInfo &launch_info, ::pid_t
error.SetErrorStringWithFormat("Problems with launching via XPC. Error type : %i, code : %i", errorType, errorCode);
if (log)
{
error.PutToLog(log.get(), "%s", error.AsCString());
error.PutToLog(log, "%s", error.AsCString());
}
if (authorizationRef)
@ -1486,7 +1486,7 @@ LaunchProcessXPC (const char *exe_path, ProcessLaunchInfo &launch_info, ::pid_t
error.SetErrorStringWithFormat("Problems with launching via XPC. XPC error : %s", xpc_dictionary_get_string(reply, XPC_ERROR_KEY_DESCRIPTION));
if (log)
{
error.PutToLog(log.get(), "%s", error.AsCString());
error.PutToLog(log, "%s", error.AsCString());
}
}
@ -1501,13 +1501,13 @@ static Error
LaunchProcessPosixSpawn (const char *exe_path, ProcessLaunchInfo &launch_info, ::pid_t &pid)
{
Error error;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_HOST | LIBLLDB_LOG_PROCESS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_HOST | LIBLLDB_LOG_PROCESS));
posix_spawnattr_t attr;
error.SetError( ::posix_spawnattr_init (&attr), eErrorTypePOSIX);
if (error.Fail() || log)
error.PutToLog(log.get(), "::posix_spawnattr_init ( &attr )");
error.PutToLog(log, "::posix_spawnattr_init ( &attr )");
if (error.Fail())
return error;
@ -1525,7 +1525,7 @@ LaunchProcessPosixSpawn (const char *exe_path, ProcessLaunchInfo &launch_info, :
short flags = GetPosixspawnFlags(launch_info);
error.SetError( ::posix_spawnattr_setflags (&attr, flags), eErrorTypePOSIX);
if (error.Fail() || log)
error.PutToLog(log.get(), "::posix_spawnattr_setflags ( &attr, flags=0x%8.8x )", flags);
error.PutToLog(log, "::posix_spawnattr_setflags ( &attr, flags=0x%8.8x )", flags);
if (error.Fail())
return error;
@ -1543,7 +1543,7 @@ LaunchProcessPosixSpawn (const char *exe_path, ProcessLaunchInfo &launch_info, :
size_t ocount = 0;
error.SetError( ::posix_spawnattr_setbinpref_np (&attr, 1, &cpu, &ocount), eErrorTypePOSIX);
if (error.Fail() || log)
error.PutToLog(log.get(), "::posix_spawnattr_setbinpref_np ( &attr, 1, cpu_type = 0x%8.8x, count => %llu )", cpu, (uint64_t)ocount);
error.PutToLog(log, "::posix_spawnattr_setbinpref_np ( &attr, 1, cpu_type = 0x%8.8x, count => %llu )", cpu, (uint64_t)ocount);
if (error.Fail() || ocount != 1)
return error;
@ -1586,7 +1586,7 @@ LaunchProcessPosixSpawn (const char *exe_path, ProcessLaunchInfo &launch_info, :
posix_spawn_file_actions_t file_actions;
error.SetError( ::posix_spawn_file_actions_init (&file_actions), eErrorTypePOSIX);
if (error.Fail() || log)
error.PutToLog(log.get(), "::posix_spawn_file_actions_init ( &file_actions )");
error.PutToLog(log, "::posix_spawn_file_actions_init ( &file_actions )");
if (error.Fail())
return error;
@ -1601,7 +1601,7 @@ LaunchProcessPosixSpawn (const char *exe_path, ProcessLaunchInfo &launch_info, :
{
if (!ProcessLaunchInfo::FileAction::AddPosixSpawnFileAction (&file_actions,
launch_file_action,
log.get(),
log,
error))
return error;
}
@ -1617,7 +1617,7 @@ LaunchProcessPosixSpawn (const char *exe_path, ProcessLaunchInfo &launch_info, :
if (error.Fail() || log)
{
error.PutToLog(log.get(), "::posix_spawnp ( pid => %i, path = '%s', file_actions = %p, attr = %p, argv = %p, envp = %p )",
error.PutToLog(log, "::posix_spawnp ( pid => %i, path = '%s', file_actions = %p, attr = %p, argv = %p, envp = %p )",
pid,
exe_path,
&file_actions,
@ -1644,7 +1644,7 @@ LaunchProcessPosixSpawn (const char *exe_path, ProcessLaunchInfo &launch_info, :
if (error.Fail() || log)
{
error.PutToLog(log.get(), "::posix_spawnp ( pid => %i, path = '%s', file_actions = NULL, attr = %p, argv = %p, envp = %p )",
error.PutToLog(log, "::posix_spawnp ( pid => %i, path = '%s', file_actions = NULL, attr = %p, argv = %p, envp = %p )",
pid,
exe_path,
&attr,
@ -1790,7 +1790,7 @@ Host::StartMonitoringChildProcess (Host::MonitorChildProcessCallback callback,
if (monitor_signals)
mask |= DISPATCH_PROC_SIGNAL;
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_HOST | LIBLLDB_LOG_PROCESS));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_HOST | LIBLLDB_LOG_PROCESS));
dispatch_source_t source = ::dispatch_source_create (DISPATCH_SOURCE_TYPE_PROC,

View file

@ -1441,7 +1441,7 @@ CommandInterpreter::HandleCommand (const char *command_line,
std::string command_string (command_line);
std::string original_command_string (command_line);
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_COMMANDS));
Log *log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_COMMANDS));
Host::SetCrashDescriptionWithFormat ("HandleCommand(command = \"%s\")", command_line);
// Make a scoped cleanup object that will clear the crash description string
@ -2588,7 +2588,7 @@ CommandInterpreter::GetScriptInterpreter (bool can_create)
static Mutex g_interpreter_mutex(Mutex::eMutexTypeRecursive);
Mutex::Locker interpreter_lock(g_interpreter_mutex);
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
if (log)
log->Printf("Initializing the ScriptInterpreter now\n");

View file

@ -157,7 +157,7 @@ ScriptInterpreterPython::Locker::Locker (ScriptInterpreterPython *py_interpreter
bool
ScriptInterpreterPython::Locker::DoAcquireLock()
{
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SCRIPT | LIBLLDB_LOG_VERBOSE));
Log *log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SCRIPT | LIBLLDB_LOG_VERBOSE));
m_GILState = PyGILState_Ensure();
if (log)
log->Printf("Ensured PyGILState. Previous state = %slocked\n", m_GILState == PyGILState_UNLOCKED ? "un" : "");
@ -175,7 +175,7 @@ ScriptInterpreterPython::Locker::DoInitSession(bool init_lldb_globals)
bool
ScriptInterpreterPython::Locker::DoFreeLock()
{
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SCRIPT | LIBLLDB_LOG_VERBOSE));
Log *log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SCRIPT | LIBLLDB_LOG_VERBOSE));
if (log)
log->Printf("Releasing PyGILState. Returning to state = %slocked\n", m_GILState == PyGILState_UNLOCKED ? "un" : "");
PyGILState_Release(m_GILState);
@ -267,7 +267,7 @@ ScriptInterpreterPython::PythonInputReaderManager::InputReaderCallback (void *ba
size_t bytes_len)
{
lldb::thread_t embedded_interpreter_thread;
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SCRIPT));
Log *log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SCRIPT));
if (baton == NULL)
return 0;
@ -583,7 +583,7 @@ ScriptInterpreterPython::RestoreTerminalState ()
void
ScriptInterpreterPython::LeaveSession ()
{
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SCRIPT));
Log *log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SCRIPT));
if (log)
log->PutCString("ScriptInterpreterPython::LeaveSession()");
@ -616,7 +616,7 @@ ScriptInterpreterPython::EnterSession (bool init_lldb_globals)
{
// If we have already entered the session, without having officially 'left' it, then there is no need to
// 'enter' it again.
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SCRIPT));
Log *log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SCRIPT));
if (m_session_is_active)
{
if (log)
@ -833,7 +833,7 @@ ScriptInterpreterPython::InputReaderCallback
)
{
lldb::thread_t embedded_interpreter_thread;
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SCRIPT));
Log *log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SCRIPT));
if (baton == NULL)
return 0;
@ -2266,7 +2266,7 @@ ScriptInterpreterPython::RunEmbeddedPythonInterpreter (lldb::thread_arg_t baton)
{
ScriptInterpreterPython *script_interpreter = (ScriptInterpreterPython *) baton;
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SCRIPT));
Log *log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SCRIPT));
if (log)
log->Printf ("%p ScriptInterpreterPython::RunEmbeddedPythonInterpreter () thread starting...", baton);
@ -2846,7 +2846,7 @@ ScriptInterpreterPython::InitializePrivate ()
stdin_tty_state.Save(STDIN_FILENO, false);
PyGILState_STATE gstate;
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SCRIPT | LIBLLDB_LOG_VERBOSE));
Log *log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SCRIPT | LIBLLDB_LOG_VERBOSE));
bool threads_already_initialized = false;
if (PyEval_ThreadsInitialized ()) {
gstate = PyGILState_Ensure ();

View file

@ -315,7 +315,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
addr_t *arg5_ptr,
addr_t *arg6_ptr) const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log)
log->Printf("ABISysV_x86_64::PrepareTrivialCall\n(\n thread = %p\n sp = 0x%" PRIx64 "\n func_addr = 0x%" PRIx64 "\n return_addr = 0x%" PRIx64 "\n arg1_ptr = %p (0x%" PRIx64 ")\n arg2_ptr = %p (0x%" PRIx64 ")\n arg3_ptr = %p (0x%" PRIx64 ")\n)",

View file

@ -1082,14 +1082,14 @@ DynamicLoaderDarwinKernel::BreakpointHit (StoppointCallbackContext *context,
user_id_t break_id,
user_id_t break_loc_id)
{
LogSP log(GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
Log *log(GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
if (log)
log->Printf ("DynamicLoaderDarwinKernel::BreakpointHit (...)\n");
ReadAllKextSummaries ();
if (log)
PutToLog(log.get());
PutToLog(log);
return GetStopWhenImagesChange();
}
@ -1156,7 +1156,7 @@ bool
DynamicLoaderDarwinKernel::ParseKextSummaries (const Address &kext_summary_addr, uint32_t count)
{
KextImageInfo::collection kext_summaries;
LogSP log(GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
Log *log(GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
if (log)
log->Printf ("Kexts-changed breakpoint hit, there are %d kexts currently.\n", count);
@ -1287,7 +1287,7 @@ DynamicLoaderDarwinKernel::ParseKextSummaries (const Address &kext_summary_addr,
s->Printf (".");
if (log)
kext_summaries[new_kext].PutToLog (log.get());
kext_summaries[new_kext].PutToLog (log);
}
}
m_process->GetTarget().ModulesDidLoad (loaded_module_list);
@ -1381,8 +1381,6 @@ DynamicLoaderDarwinKernel::ReadKextSummaries (const Address &kext_summary_addr,
bool
DynamicLoaderDarwinKernel::ReadAllKextSummaries ()
{
LogSP log(GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
Mutex::Locker locker(m_mutex);
if (ReadKextSummaryHeader ())
@ -1537,7 +1535,7 @@ ThreadPlanSP
DynamicLoaderDarwinKernel::GetStepThroughTrampolinePlan (Thread &thread, bool stop_others)
{
ThreadPlanSP thread_plan_sp;
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (log)
log->Printf ("Could not find symbol for step through.");
return thread_plan_sp;

View file

@ -788,7 +788,7 @@ bool
DynamicLoaderMacOSXDYLD::AddModulesUsingImageInfosAddress (lldb::addr_t image_infos_addr, uint32_t image_infos_count)
{
DYLDImageInfo::collection image_infos;
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
if (log)
log->Printf ("Adding %d modules.\n", image_infos_count);
@ -813,7 +813,7 @@ DynamicLoaderMacOSXDYLD::AddModulesUsingImageInfos (DYLDImageInfo::collection &i
{
// Now add these images to the main list.
ModuleList loaded_module_list;
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
Target &target = m_process->GetTarget();
ModuleList& target_images = target.GetImages();
@ -822,7 +822,7 @@ DynamicLoaderMacOSXDYLD::AddModulesUsingImageInfos (DYLDImageInfo::collection &i
if (log)
{
log->Printf ("Adding new image at address=0x%16.16" PRIx64 ".", image_infos[idx].address);
image_infos[idx].PutToLog (log.get());
image_infos[idx].PutToLog (log);
}
m_dyld_image_infos.push_back(image_infos[idx]);
@ -917,7 +917,7 @@ bool
DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress (lldb::addr_t image_infos_addr, uint32_t image_infos_count)
{
DYLDImageInfo::collection image_infos;
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
Mutex::Locker locker(m_mutex);
if (m_process->GetStopID() == m_dyld_image_infos_stop_id)
@ -940,7 +940,7 @@ DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress (lldb::addr_t image
if (log)
{
log->Printf ("Removing module at address=0x%16.16" PRIx64 ".", image_infos[idx].address);
image_infos[idx].PutToLog (log.get());
image_infos[idx].PutToLog (log);
}
// Remove this image_infos from the m_all_image_infos. We do the comparision by address
@ -973,7 +973,7 @@ DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress (lldb::addr_t image
if (log)
{
log->Printf ("Could not find module for unloading info entry:");
image_infos[idx].PutToLog(log.get());
image_infos[idx].PutToLog(log);
}
}
@ -989,7 +989,7 @@ DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress (lldb::addr_t image
if (log)
{
log->Printf ("Could not find image_info entry for unloading image:");
image_infos[idx].PutToLog(log.get());
image_infos[idx].PutToLog(log);
}
}
}
@ -1059,7 +1059,7 @@ DynamicLoaderMacOSXDYLD::ReadImageInfos (lldb::addr_t image_infos_addr,
bool
DynamicLoaderMacOSXDYLD::InitializeFromAllImageInfos ()
{
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
Mutex::Locker locker(m_mutex);
if (m_process->GetStopID() == m_dyld_image_infos_stop_id
@ -1304,7 +1304,6 @@ DynamicLoaderMacOSXDYLD::UpdateImageInfosHeaderAndLoadCommands(DYLDImageInfo::co
bool update_executable)
{
uint32_t exe_idx = UINT32_MAX;
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
// Read any UUID values that we can get
for (uint32_t i = 0; i < infos_count; i++)
{
@ -1592,7 +1591,7 @@ DynamicLoaderMacOSXDYLD::GetStepThroughTrampolinePlan (Thread &thread, bool stop
StackFrame *current_frame = thread.GetStackFrameAtIndex(0).get();
const SymbolContext &current_context = current_frame->GetSymbolContext(eSymbolContextSymbol);
Symbol *current_symbol = current_context.symbol;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (current_symbol != NULL)
{

View file

@ -84,7 +84,7 @@ AuxVector::AuxVector(Process *process)
: m_process(process)
{
DataExtractor data;
LogSP log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
data.SetData(GetAuxvData());
data.SetByteOrder(m_process->GetByteOrder());
@ -109,7 +109,7 @@ AuxVector::FindEntry(EntryType type) const
}
void
AuxVector::DumpToLog(LogSP log) const
AuxVector::DumpToLog(Log *log) const
{
if (!log)
return;

View file

@ -81,7 +81,7 @@ public:
GetEntryName(EntryType type);
void
DumpToLog(lldb::LogSP log) const;
DumpToLog(lldb_private::Log *log) const;
private:
lldb_private::Process *m_process;

View file

@ -295,7 +295,7 @@ DYLDRendezvous::ReadSOEntryFromMemory(lldb::addr_t addr, SOEntry &entry)
}
void
DYLDRendezvous::DumpToLog(LogSP log) const
DYLDRendezvous::DumpToLog(Log *log) const
{
int state = GetState();

View file

@ -111,7 +111,7 @@ public:
ModulesDidUnload() const { return !m_removed_soentries.empty(); }
void
DumpToLog(lldb::LogSP log) const;
DumpToLog(lldb_private::Log *log) const;
/// @brief Constants describing the state of the rendezvous.
///

View file

@ -111,7 +111,7 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value,
const char *name = symbol->GetMangled().GetDemangledName().AsCString();
if (strstr(name, vtable_demangled_prefix) == name)
{
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
Log *log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
if (log)
log->Printf ("0x%16.16" PRIx64 ": static-type = '%s' has vtable symbol '%s'\n",
original_ptr,

View file

@ -366,7 +366,7 @@ AppleObjCRuntimeV1::UpdateISAToDescriptorMapIfNeeded()
// map, wether it was successful or not.
m_isa_to_descriptor_stop_id = process->GetStopID();
lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
ProcessSP process_sp = process->shared_from_this();

View file

@ -1638,7 +1638,7 @@ AppleObjCRuntimeV2::GetClassDescriptor (ValueObject& valobj)
objc_class_sp = ObjCLanguageRuntime::GetClassDescriptor (isa);
if (isa && !objc_class_sp)
{
lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
if (log)
log->Printf("0x%" PRIx64 ": AppleObjCRuntimeV2::GetClassDescriptor() ISA was not in class descriptor cache 0x%" PRIx64,
isa_pointer,
@ -1685,7 +1685,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapDynamic(RemoteNXMapTable &hash_table
if (process == NULL)
return false;
lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
ExecutionContext exe_ctx;
@ -1892,7 +1892,7 @@ AppleObjCRuntimeV2::ParseClassInfoArray (const DataExtractor &data, uint32_t num
// uint32_t hash;
// } __attribute__((__packed__));
lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
// Iterate through all ClassInfo structures
lldb::offset_t offset = 0;
@ -1932,7 +1932,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapSharedCache()
if (process == NULL)
return false;
lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
ExecutionContext exe_ctx;
@ -2141,7 +2141,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapSharedCache()
bool
AppleObjCRuntimeV2::UpdateISAToDescriptorMapFromMemory (RemoteNXMapTable &hash_table)
{
lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
Process *process = GetProcess();

View file

@ -560,7 +560,7 @@ AppleObjCTrampolineHandler::AppleObjCVTables::ReadRegions (lldb::addr_t region_a
if (!m_process_sp)
return false;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
// We aren't starting at the trampoline symbol.
InitializeVTableSymbols ();
@ -711,7 +711,7 @@ AppleObjCTrampolineHandler::SetupDispatchFunction (Thread &thread, ValueList &di
ExecutionContext exe_ctx (thread.shared_from_this());
Address impl_code_address;
StreamString errors;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
lldb::addr_t args_addr = LLDB_INVALID_ADDRESS;
// Scope for mutex locker:
@ -865,7 +865,7 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan (Thread &thread, bool sto
if (found_it)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
// We are decoding a method dispatch.
// First job is to pull the arguments out:

View file

@ -37,7 +37,7 @@ public:
static unsigned int invocation_id = 0;
unsigned int current_id = invocation_id++;
lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
if (log)
{
@ -85,7 +85,7 @@ public:
static unsigned int invocation_id = 0;
unsigned int current_id = invocation_id++;
lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
if (log)
{
@ -115,7 +115,7 @@ public:
static unsigned int invocation_id = 0;
unsigned int current_id = invocation_id++;
lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
if (log)
{
@ -326,8 +326,6 @@ public:
clang::ObjCMethodDecl *BuildMethod (clang::ObjCInterfaceDecl *interface_decl, const char *name, bool instance)
{
lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
if (!m_is_valid || m_type_vector.size() < 3)
return NULL;
@ -498,7 +496,7 @@ private:
bool
AppleObjCTypeVendor::FinishDecl(clang::ObjCInterfaceDecl *interface_decl)
{
lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
ClangASTMetadata *metadata = m_external_source->GetMetadata(interface_decl);
ObjCLanguageRuntime::ObjCISA objc_isa = 0;
@ -594,7 +592,7 @@ AppleObjCTypeVendor::FindTypes (const ConstString &name,
static unsigned int invocation_id = 0;
unsigned int current_id = invocation_id++;
lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
if (log)
log->Printf("AppleObjCTypeVendor::FindTypes [%u] ('%s', %s, %u, )",

View file

@ -173,7 +173,7 @@ AppleThreadPlanStepThroughObjCTrampoline::ShouldStop (Event *event_ptr)
lldb::addr_t target_addr = target_addr_value.GetScalar().ULongLong();
Address target_so_addr;
target_so_addr.SetOpcodeLoadAddress(target_addr, exc_ctx.GetTargetPtr());
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (target_addr == 0)
{
if (log)

View file

@ -1231,7 +1231,7 @@ ObjectFileMachO::ParseSymtab (bool minimize)
lldb::offset_t offset = MachHeaderSizeFromMagic(m_header.magic);
uint32_t i;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SYMBOLS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SYMBOLS));
for (i=0; i<m_header.ncmds; ++i)
{
@ -1252,28 +1252,28 @@ ObjectFileMachO::ParseSymtab (bool minimize)
if (symtab_load_command.symoff == 0)
{
if (log)
module_sp->LogMessage(log.get(), "LC_SYMTAB.symoff == 0");
module_sp->LogMessage(log, "LC_SYMTAB.symoff == 0");
return 0;
}
if (symtab_load_command.stroff == 0)
{
if (log)
module_sp->LogMessage(log.get(), "LC_SYMTAB.stroff == 0");
module_sp->LogMessage(log, "LC_SYMTAB.stroff == 0");
return 0;
}
if (symtab_load_command.nsyms == 0)
{
if (log)
module_sp->LogMessage(log.get(), "LC_SYMTAB.nsyms == 0");
module_sp->LogMessage(log, "LC_SYMTAB.nsyms == 0");
return 0;
}
if (symtab_load_command.strsize == 0)
{
if (log)
module_sp->LogMessage(log.get(), "LC_SYMTAB.strsize == 0");
module_sp->LogMessage(log, "LC_SYMTAB.strsize == 0");
return 0;
}
break;
@ -1411,7 +1411,7 @@ ObjectFileMachO::ParseSymtab (bool minimize)
if (nlist_data.GetByteSize() == 0)
{
if (log)
module_sp->LogMessage(log.get(), "failed to read nlist data");
module_sp->LogMessage(log, "failed to read nlist data");
return 0;
}
@ -1424,14 +1424,14 @@ ObjectFileMachO::ParseSymtab (bool minimize)
if (strtab_addr == LLDB_INVALID_ADDRESS)
{
if (log)
module_sp->LogMessage(log.get(), "failed to locate the strtab in memory");
module_sp->LogMessage(log, "failed to locate the strtab in memory");
return 0;
}
}
else
{
if (log)
module_sp->LogMessage(log.get(), "failed to read strtab data");
module_sp->LogMessage(log, "failed to read strtab data");
return 0;
}
}

View file

@ -132,7 +132,7 @@ OperatingSystemPython::GetDynamicRegisterInfo ()
{
if (!m_interpreter || !m_python_object_sp)
return NULL;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
log->Printf ("OperatingSystemPython::GetDynamicRegisterInfo() fetching thread register definitions from python for pid %" PRIu64, m_process->GetID());
@ -175,7 +175,7 @@ OperatingSystemPython::UpdateThreadList (ThreadList &old_thread_list, ThreadList
if (!m_interpreter || !m_python_object_sp)
return false;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
// First thing we have to do is get the API lock, and the run lock. We're going to change the thread
// content of the process, and we're going to use python, which requires the API lock to do it.
@ -267,7 +267,7 @@ OperatingSystemPython::CreateRegisterContextForThread (Thread *thread, addr_t re
Target &target = m_process->GetTarget();
Mutex::Locker api_locker (target.GetAPIMutex());
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));
if (reg_data_addr != LLDB_INVALID_ADDRESS)
{
@ -316,7 +316,7 @@ OperatingSystemPython::CreateThreadStopReason (lldb_private::Thread *thread)
lldb::ThreadSP
OperatingSystemPython::CreateThread (lldb::tid_t tid, addr_t context)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));
if (log)
log->Printf ("OperatingSystemPython::CreateThread (tid = 0x%" PRIx64 ", context = 0x%" PRIx64 ") fetching register data from python", tid, context);

View file

@ -102,7 +102,7 @@ CommunicationKDP::SendRequestAndGetReply (const CommandType command,
{
if (IsRunning())
{
LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PACKETS));
Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PACKETS));
if (log)
{
PacketStreamType log_strm;
@ -153,7 +153,7 @@ CommunicationKDP::SendRequestPacketNoLock (const PacketStreamType &request_packe
const char *packet_data = request_packet.GetData();
const size_t packet_size = request_packet.GetSize();
LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PACKETS));
Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PACKETS));
if (log)
{
PacketStreamType log_strm;
@ -202,7 +202,7 @@ CommunicationKDP::WaitForPacketWithTimeoutMicroSecondsNoLock (DataExtractor &pac
uint8_t buffer[8192];
Error error;
LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PACKETS | KDP_LOG_VERBOSE));
Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PACKETS | KDP_LOG_VERBOSE));
// Check for a packet from our cache first without trying any reading...
if (CheckForPacket (NULL, 0, packet))
@ -257,7 +257,7 @@ CommunicationKDP::CheckForPacket (const uint8_t *src, size_t src_len, DataExtrac
// Put the packet data into the buffer in a thread safe fashion
Mutex::Locker locker(m_bytes_mutex);
LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PACKETS));
Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PACKETS));
if (src && src_len > 0)
{

View file

@ -333,7 +333,7 @@ ProcessKDP::DoAttachToProcessWithName (const char *process_name, bool wait_for_l
void
ProcessKDP::DidAttach ()
{
LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PROCESS));
Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PROCESS));
if (log)
log->Printf ("ProcessKDP::DidAttach()");
if (GetID() != LLDB_INVALID_PROCESS_ID)
@ -366,7 +366,7 @@ Error
ProcessKDP::DoResume ()
{
Error error;
LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PROCESS));
Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PROCESS));
// Only start the async thread if we try to do any process control
if (!IS_VALID_LLDB_HOST_THREAD(m_async_thread))
StartAsyncThread ();
@ -445,7 +445,7 @@ bool
ProcessKDP::UpdateThreadList (ThreadList &old_thread_list, ThreadList &new_thread_list)
{
// locker will keep a mutex locked until it goes out of scope
LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_THREAD));
Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_THREAD));
if (log && log->GetMask().Test(KDP_LOG_VERBOSE))
log->Printf ("ProcessKDP::%s (pid = %" PRIu64 ")", __FUNCTION__, GetID());
@ -490,7 +490,7 @@ Error
ProcessKDP::DoDetach()
{
Error error;
LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
if (log)
log->Printf ("ProcessKDP::DoDetach()");
@ -695,7 +695,7 @@ ProcessKDP::Initialize()
bool
ProcessKDP::StartAsyncThread ()
{
LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
if (log)
log->Printf ("ProcessKDP::StartAsyncThread ()");
@ -710,7 +710,7 @@ ProcessKDP::StartAsyncThread ()
void
ProcessKDP::StopAsyncThread ()
{
LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
if (log)
log->Printf ("ProcessKDP::StopAsyncThread ()");
@ -733,7 +733,7 @@ ProcessKDP::AsyncThread (void *arg)
const lldb::pid_t pid = process->GetID();
LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PROCESS));
Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PROCESS));
if (log)
log->Printf ("ProcessKDP::AsyncThread (arg = %p, pid = %" PRIu64 ") thread starting...", arg, pid);

View file

@ -22,22 +22,25 @@ using namespace lldb_private;
// control access to our static g_log_sp by hiding it in a singleton function
// that will construct the static g_lob_sp the first time this function is
// called.
static LogSP &
static bool g_log_enabled = false;
static Log * g_log = NULL;
static Log *
GetLog ()
{
static LogSP g_log_sp;
return g_log_sp;
if (!g_log_enabled)
return NULL;
return g_log;
}
LogSP
Log *
ProcessKDPLog::GetLogIfAllCategoriesSet (uint32_t mask)
{
LogSP log(GetLog ());
Log *log(GetLog ());
if (log && mask)
{
uint32_t log_mask = log->GetMask().Get();
if ((log_mask & mask) != mask)
return LogSP();
return NULL;
}
return log;
}
@ -45,7 +48,7 @@ ProcessKDPLog::GetLogIfAllCategoriesSet (uint32_t mask)
void
ProcessKDPLog::DisableLog (const char **categories, Stream *feedback_strm)
{
LogSP log (GetLog ());
Log *log (GetLog ());
if (log)
{
uint32_t flag_bits = 0;
@ -81,33 +84,33 @@ ProcessKDPLog::DisableLog (const char **categories, Stream *feedback_strm)
}
}
log->GetMask().Reset (flag_bits);
if (flag_bits == 0)
GetLog ().reset();
else
log->GetMask().Reset (flag_bits);
g_log_enabled = false;
}
return;
}
LogSP
Log *
ProcessKDPLog::EnableLog (StreamSP &log_stream_sp, uint32_t log_options, const char **categories, Stream *feedback_strm)
{
// Try see if there already is a log - that way we can reuse its settings.
// We could reuse the log in toto, but we don't know that the stream is the same.
uint32_t flag_bits = 0;
LogSP log(GetLog ());
if (log)
flag_bits = log->GetMask().Get();
if (g_log)
flag_bits = g_log->GetMask().Get();
// Now make a new log with this stream if one was provided
if (log_stream_sp)
{
log.reset (new Log(log_stream_sp));
GetLog () = log;
if (g_log)
g_log->SetStream(log_stream_sp);
else
g_log = new Log(log_stream_sp);
}
if (log)
if (g_log)
{
bool got_unknown_category = false;
for (size_t i=0; categories[i] != NULL; ++i)
@ -140,10 +143,11 @@ ProcessKDPLog::EnableLog (StreamSP &log_stream_sp, uint32_t log_options, const c
}
if (flag_bits == 0)
flag_bits = KDP_LOG_DEFAULT;
log->GetMask().Reset(flag_bits);
log->GetOptions().Reset(log_options);
g_log->GetMask().Reset(flag_bits);
g_log->GetOptions().Reset(log_options);
}
return log;
g_log_enabled = true;
return g_log;
}
void
@ -170,7 +174,7 @@ ProcessKDPLog::ListLogCategories (Stream *strm)
void
ProcessKDPLog::LogIf (uint32_t mask, const char *format, ...)
{
LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (mask));
Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (mask));
if (log)
{
va_list args;

Some files were not shown because too many files have changed in this diff Show more