diff options
Diffstat (limited to 'lldb/source/Target')
-rw-r--r-- | lldb/source/Target/ObjCLanguageRuntime.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Target/Process.cpp | 32 | ||||
-rw-r--r-- | lldb/source/Target/SectionLoadList.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Target/StopInfo.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Target/Target.cpp | 18 | ||||
-rw-r--r-- | lldb/source/Target/Thread.cpp | 16 | ||||
-rw-r--r-- | lldb/source/Target/ThreadList.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlan.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanCallFunction.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanRunToAddress.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanStepInRange.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanStepInstruction.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanStepOut.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanStepOverRange.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanStepRange.cpp | 10 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanStepThrough.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanStepUntil.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanTestCondition.cpp | 5 |
19 files changed, 62 insertions, 64 deletions
diff --git a/lldb/source/Target/ObjCLanguageRuntime.cpp b/lldb/source/Target/ObjCLanguageRuntime.cpp index 3c09a0c4008..bc6e8a0629b 100644 --- a/lldb/source/Target/ObjCLanguageRuntime.cpp +++ b/lldb/source/Target/ObjCLanguageRuntime.cpp @@ -33,7 +33,7 @@ ObjCLanguageRuntime::ObjCLanguageRuntime (Process *process) : void ObjCLanguageRuntime::AddToMethodCache (lldb::addr_t class_addr, lldb::addr_t selector, lldb::addr_t impl_addr) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (log) { log->Printf ("Caching: class 0x%llx selector 0x%llx implementation 0x%llx.", class_addr, selector, impl_addr); diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index d544a4f61ba..3a09bcd43e3 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -89,7 +89,7 @@ Process::Process(Target &target, Listener &listener) : { UpdateInstanceName(); - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT)); if (log) log->Printf ("%p Process::Process()", this); @@ -118,7 +118,7 @@ Process::Process(Target &target, Listener &listener) : //---------------------------------------------------------------------- Process::~Process() { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT)); if (log) log->Printf ("%p Process::~Process()", this); StopPrivateStateThread(); @@ -243,7 +243,7 @@ Process::RestoreProcessEvents () StateType Process::WaitForStateChangedEvents (const TimeValue *timeout, EventSP &event_sp) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS)); if (log) log->Printf ("Process::%s (timeout = %p, event_sp)...", __FUNCTION__, timeout); @@ -267,7 +267,7 @@ Process::WaitForStateChangedEvents (const TimeValue *timeout, EventSP &event_sp) Event * Process::PeekAtStateChangedEvents () { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS)); if (log) log->Printf ("Process::%s...", __FUNCTION__); @@ -296,7 +296,7 @@ Process::PeekAtStateChangedEvents () StateType Process::WaitForStateChangedEventsPrivate (const TimeValue *timeout, EventSP &event_sp) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS)); if (log) log->Printf ("Process::%s (timeout = %p, event_sp)...", __FUNCTION__, timeout); @@ -320,7 +320,7 @@ Process::WaitForStateChangedEventsPrivate (const TimeValue *timeout, EventSP &ev bool Process::WaitForEventsPrivate (const TimeValue *timeout, EventSP &event_sp, bool control_only) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS)); if (log) log->Printf ("Process::%s (timeout = %p, event_sp)...", __FUNCTION__, timeout); @@ -415,7 +415,7 @@ Process::GetState() void Process::SetPublicState (StateType new_state) { - Log *log = lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STATE); + LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STATE)); if (log) log->Printf("Process::SetPublicState (%s)", StateAsCString(new_state)); m_public_state.SetValue (new_state); @@ -430,7 +430,7 @@ Process::GetPrivateState () void Process::SetPrivateState (StateType new_state) { - Log *log = lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STATE); + LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STATE)); bool state_changed = false; if (log) @@ -811,7 +811,7 @@ Process::EnableSoftwareBreakpoint (BreakpointSite *bp_site) { Error error; assert (bp_site != NULL); - Log *log = lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_BREAKPOINTS); + LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_BREAKPOINTS)); const addr_t bp_addr = bp_site->GetLoadAddress(); if (log) log->Printf ("Process::EnableSoftwareBreakpoint (site_id = %d) addr = 0x%llx", bp_site->GetID(), (uint64_t)bp_addr); @@ -888,7 +888,7 @@ Process::DisableSoftwareBreakpoint (BreakpointSite *bp_site) { Error error; assert (bp_site != NULL); - Log *log = lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_BREAKPOINTS); + LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_BREAKPOINTS)); addr_t bp_addr = bp_site->GetLoadAddress(); lldb::user_id_t breakID = bp_site->GetID(); if (log) @@ -1389,7 +1389,7 @@ Process::Attach (const char *process_name, bool wait_for_launch) Error Process::Resume () { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS)); if (log) log->Printf("Process::Resume() m_stop_id = %u", m_stop_id); @@ -1513,7 +1513,7 @@ Process::ShouldBroadcastEvent (Event *event_ptr) { const StateType state = Process::ProcessEventData::GetStateFromEvent (event_ptr); bool return_value = true; - Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EVENTS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EVENTS)); switch (state) { @@ -1632,7 +1632,7 @@ Process::GetThreadList () const bool Process::StartPrivateStateThread () { - Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EVENTS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EVENTS)); if (log) log->Printf ("Process::%s ( )", __FUNCTION__); @@ -1664,7 +1664,7 @@ Process::StopPrivateStateThread () void Process::ControlPrivateStateThread (uint32_t signal) { - Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EVENTS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EVENTS)); assert (signal == eBroadcastInternalStateControlStop || signal == eBroadcastInternalStateControlPause || @@ -1701,7 +1701,7 @@ Process::ControlPrivateStateThread (uint32_t signal) void Process::HandlePrivateEvent (EventSP &event_sp) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS)); const StateType internal_state = Process::ProcessEventData::GetStateFromEvent(event_sp.get()); // See if we should broadcast this state to external clients? const bool should_broadcast = ShouldBroadcastEvent (event_sp.get()); @@ -1740,7 +1740,7 @@ Process::RunPrivateStateThread () bool control_only = false; m_private_state_control_wait.SetValue (false, eBroadcastNever); - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS)); if (log) log->Printf ("Process::%s (arg = %p, pid = %i) thread starting...", __FUNCTION__, this, GetID()); diff --git a/lldb/source/Target/SectionLoadList.cpp b/lldb/source/Target/SectionLoadList.cpp index 0467ed54131..fc806a55cb9 100644 --- a/lldb/source/Target/SectionLoadList.cpp +++ b/lldb/source/Target/SectionLoadList.cpp @@ -50,7 +50,7 @@ SectionLoadList::GetSectionLoadAddress (const Section *section) const bool SectionLoadList::SetSectionLoadAddress (const Section *section, addr_t load_addr) { - Log *log = lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER | LIBLLDB_LOG_VERBOSE); + LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER | LIBLLDB_LOG_VERBOSE)); if (log) log->Printf ("SectionLoadList::%s (section = %p (%s.%s), load_addr = 0x%16.16llx)", @@ -76,7 +76,7 @@ SectionLoadList::SetSectionLoadAddress (const Section *section, addr_t load_addr size_t SectionLoadList::SetSectionUnloaded (const Section *section) { - Log *log = lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER | LIBLLDB_LOG_VERBOSE); + LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER | LIBLLDB_LOG_VERBOSE)); if (log) log->Printf ("SectionLoadList::%s (section = %p (%s.%s))", @@ -99,7 +99,7 @@ SectionLoadList::SetSectionUnloaded (const Section *section) bool SectionLoadList::SetSectionUnloaded (const Section *section, addr_t load_addr) { - Log *log = lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER | LIBLLDB_LOG_VERBOSE); + LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER | LIBLLDB_LOG_VERBOSE)); if (log) log->Printf ("SectionLoadList::%s (section = %p (%s.%s), load_addr = 0x%16.16llx)", diff --git a/lldb/source/Target/StopInfo.cpp b/lldb/source/Target/StopInfo.cpp index 877988f5812..63d5817d4c3 100644 --- a/lldb/source/Target/StopInfo.cpp +++ b/lldb/source/Target/StopInfo.cpp @@ -93,7 +93,7 @@ public: } else { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS)); if (log) log->Printf ("Process::%s could not find breakpoint site id: %lld...", __FUNCTION__, m_value); @@ -127,7 +127,7 @@ public: } else { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS)); if (log) log->Printf ("Process::%s could not find breakpoint site id: %lld...", __FUNCTION__, m_value); diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index 08b0e771fa6..5464b297392 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -52,7 +52,7 @@ Target::Target(Debugger &debugger) : SetEventName (eBroadcastBitModulesLoaded, "modules-loaded"); SetEventName (eBroadcastBitModulesUnloaded, "modules-unloaded"); - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT)); if (log) log->Printf ("%p Target::Target()", this); } @@ -62,7 +62,7 @@ Target::Target(Debugger &debugger) : //---------------------------------------------------------------------- Target::~Target() { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT)); if (log) log->Printf ("%p Target::~Target()", this); DeleteCurrentProcess (); @@ -252,7 +252,7 @@ Target::CreateBreakpoint (SearchFilterSP &filter_sp, BreakpointResolverSP &resol else m_breakpoint_list.Add (bp_sp, true); - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS)); if (log) { StreamString s; @@ -274,7 +274,7 @@ Target::CreateBreakpoint (SearchFilterSP &filter_sp, BreakpointResolverSP &resol void Target::RemoveAllBreakpoints (bool internal_also) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS)); if (log) log->Printf ("Target::%s (internal_also = %s)\n", __FUNCTION__, internal_also ? "yes" : "no"); @@ -288,7 +288,7 @@ Target::RemoveAllBreakpoints (bool internal_also) void Target::DisableAllBreakpoints (bool internal_also) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS)); if (log) log->Printf ("Target::%s (internal_also = %s)\n", __FUNCTION__, internal_also ? "yes" : "no"); @@ -300,7 +300,7 @@ Target::DisableAllBreakpoints (bool internal_also) void Target::EnableAllBreakpoints (bool internal_also) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS)); if (log) log->Printf ("Target::%s (internal_also = %s)\n", __FUNCTION__, internal_also ? "yes" : "no"); @@ -312,7 +312,7 @@ Target::EnableAllBreakpoints (bool internal_also) bool Target::RemoveBreakpointByID (break_id_t break_id) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS)); if (log) log->Printf ("Target::%s (break_id = %i, internal = %s)\n", __FUNCTION__, break_id, LLDB_BREAK_ID_IS_INTERNAL (break_id) ? "yes" : "no"); @@ -334,7 +334,7 @@ Target::RemoveBreakpointByID (break_id_t break_id) bool Target::DisableBreakpointByID (break_id_t break_id) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS)); if (log) log->Printf ("Target::%s (break_id = %i, internal = %s)\n", __FUNCTION__, break_id, LLDB_BREAK_ID_IS_INTERNAL (break_id) ? "yes" : "no"); @@ -355,7 +355,7 @@ Target::DisableBreakpointByID (break_id_t break_id) bool Target::EnableBreakpointByID (break_id_t break_id) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS)); if (log) log->Printf ("Target::%s (break_id = %i, internal = %s)\n", __FUNCTION__, diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp index 231dc033210..1ca9a9d70e7 100644 --- a/lldb/source/Target/Thread.cpp +++ b/lldb/source/Target/Thread.cpp @@ -57,7 +57,7 @@ Thread::Thread (Process &process, lldb::tid_t tid) : m_unwinder_ap () { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT)); if (log) log->Printf ("%p Thread::Thread(tid = 0x%4.4x)", this, GetID()); @@ -68,7 +68,7 @@ Thread::Thread (Process &process, lldb::tid_t tid) : Thread::~Thread() { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT)); if (log) log->Printf ("%p Thread::~Thread(tid = 0x%4.4x)", this, GetID()); } @@ -220,7 +220,7 @@ Thread::ShouldStop (Event* event_ptr) ThreadPlan *current_plan = GetCurrentPlan(); bool should_stop = true; - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (log) { StreamString s; @@ -291,7 +291,7 @@ Vote Thread::ShouldReportStop (Event* event_ptr) { StateType thread_state = GetResumeState (); - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (thread_state == eStateSuspended || thread_state == eStateInvalid) { @@ -350,7 +350,7 @@ Thread::PushPlan (ThreadPlanSP &thread_plan_sp) thread_plan_sp->DidPush(); - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (log) { StreamString s; @@ -365,7 +365,7 @@ Thread::PushPlan (ThreadPlanSP &thread_plan_sp) void Thread::PopPlan () { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (m_plan_stack.empty()) return; @@ -492,7 +492,7 @@ Thread::QueueThreadPlan (ThreadPlanSP &thread_plan_sp, bool abort_other_plans) void Thread::DiscardThreadPlansUpToPlan (lldb::ThreadPlanSP &up_to_plan_sp) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (log) { log->Printf("Discarding thread plans for thread tid = 0x%4.4x, up to %p", GetID(), up_to_plan_sp.get()); @@ -533,7 +533,7 @@ Thread::DiscardThreadPlansUpToPlan (lldb::ThreadPlanSP &up_to_plan_sp) void Thread::DiscardThreadPlans(bool force) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (log) { log->Printf("Discarding thread plans for thread (tid = 0x%4.4x, force %d)", GetID(), force); diff --git a/lldb/source/Target/ThreadList.cpp b/lldb/source/Target/ThreadList.cpp index 6fa9f297281..a4004ea9ee2 100644 --- a/lldb/source/Target/ThreadList.cpp +++ b/lldb/source/Target/ThreadList.cpp @@ -179,7 +179,7 @@ ThreadList::ShouldStop (Event *event_ptr) // Running events should never stop, obviously... - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); bool should_stop = false; m_process->UpdateThreadListIfNeeded(); @@ -251,7 +251,7 @@ ThreadList::ShouldReportStop (Event *event_ptr) m_process->UpdateThreadListIfNeeded(); collection::iterator pos, end = m_threads.end(); - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (log) log->Printf ("%s %zu threads", __FUNCTION__, m_threads.size()); diff --git a/lldb/source/Target/ThreadPlan.cpp b/lldb/source/Target/ThreadPlan.cpp index dc701b9e83b..38cf7a49ea9 100644 --- a/lldb/source/Target/ThreadPlan.cpp +++ b/lldb/source/Target/ThreadPlan.cpp @@ -89,7 +89,7 @@ ThreadPlan::MischiefManaged () Vote ThreadPlan::ShouldReportStop (Event *event_ptr) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (m_stop_vote == eVoteNoOpinion) { @@ -135,7 +135,7 @@ ThreadPlan::WillResume (StateType resume_state, bool current_plan) { if (current_plan) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (log) { diff --git a/lldb/source/Target/ThreadPlanCallFunction.cpp b/lldb/source/Target/ThreadPlanCallFunction.cpp index 85de672a63d..8db2d2b82d2 100644 --- a/lldb/source/Target/ThreadPlanCallFunction.cpp +++ b/lldb/source/Target/ThreadPlanCallFunction.cpp @@ -245,7 +245,7 @@ ThreadPlanCallFunction::ShouldStop (Event *event_ptr) { if (PlanExplainsStop()) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (log) { @@ -320,7 +320,7 @@ ThreadPlanCallFunction::MischiefManaged () { if (IsPlanComplete()) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (log) log->Printf("Completed call function plan."); diff --git a/lldb/source/Target/ThreadPlanRunToAddress.cpp b/lldb/source/Target/ThreadPlanRunToAddress.cpp index 5560f45122e..66595857c6a 100644 --- a/lldb/source/Target/ThreadPlanRunToAddress.cpp +++ b/lldb/source/Target/ThreadPlanRunToAddress.cpp @@ -215,7 +215,7 @@ ThreadPlanRunToAddress::WillStop () bool ThreadPlanRunToAddress::MischiefManaged () { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (AtOurAddress()) { diff --git a/lldb/source/Target/ThreadPlanStepInRange.cpp b/lldb/source/Target/ThreadPlanStepInRange.cpp index c19477c605e..9ee8b5621cb 100644 --- a/lldb/source/Target/ThreadPlanStepInRange.cpp +++ b/lldb/source/Target/ThreadPlanStepInRange.cpp @@ -69,7 +69,7 @@ ThreadPlanStepInRange::GetDescription (Stream *s, lldb::DescriptionLevel level) bool ThreadPlanStepInRange::ShouldStop (Event *event_ptr) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); m_no_more_plans = false; if (log) @@ -245,7 +245,7 @@ ThreadPlanStepInRange::DefaultShouldStopHereCallback (ThreadPlan *current_plan, { bool should_step_out = false; StackFrame *frame = current_plan->GetThread().GetStackFrameAtIndex(0).get(); - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (flags.Test(eAvoidNoDebug)) { diff --git a/lldb/source/Target/ThreadPlanStepInstruction.cpp b/lldb/source/Target/ThreadPlanStepInstruction.cpp index a171f1ae4b1..142e7cc30b9 100644 --- a/lldb/source/Target/ThreadPlanStepInstruction.cpp +++ b/lldb/source/Target/ThreadPlanStepInstruction.cpp @@ -101,7 +101,7 @@ ThreadPlanStepInstruction::ShouldStop (Event *event_ptr) { if (m_step_over) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (m_thread.GetStackFrameCount() <= m_stack_depth) { if (m_thread.GetRegisterContext()->GetPC(0) != m_instruction_addr) @@ -178,7 +178,7 @@ ThreadPlanStepInstruction::MischiefManaged () { if (IsPlanComplete()) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (log) log->Printf("Completed single instruction step plan."); ThreadPlan::MischiefManaged (); diff --git a/lldb/source/Target/ThreadPlanStepOut.cpp b/lldb/source/Target/ThreadPlanStepOut.cpp index b37c4a5f9a0..bbe16e53f65 100644 --- a/lldb/source/Target/ThreadPlanStepOut.cpp +++ b/lldb/source/Target/ThreadPlanStepOut.cpp @@ -207,7 +207,7 @@ ThreadPlanStepOut::MischiefManaged () // reason and we're now stopping for some other reason altogether, then we're done // with this step out operation. - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (log) log->Printf("Completed step out plan."); m_thread.GetProcess().GetTarget().RemoveBreakpointByID (m_return_bp_id); diff --git a/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp b/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp index 9f5b1ceeca8..9dbe3cc4318 100644 --- a/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp +++ b/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp @@ -118,7 +118,7 @@ ThreadPlanStepOverBreakpoint::MischiefManaged () } else { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (log) log->Printf("Completed step over breakpoint plan."); // Otherwise, re-enable the breakpoint we were stepping over, and we're done. diff --git a/lldb/source/Target/ThreadPlanStepOverRange.cpp b/lldb/source/Target/ThreadPlanStepOverRange.cpp index 731232c33a3..5b37290ecb3 100644 --- a/lldb/source/Target/ThreadPlanStepOverRange.cpp +++ b/lldb/source/Target/ThreadPlanStepOverRange.cpp @@ -24,6 +24,7 @@ #include "lldb/Target/ThreadPlanStepThrough.h" using namespace lldb_private; +using namespace lldb; //---------------------------------------------------------------------- @@ -63,7 +64,7 @@ ThreadPlanStepOverRange::GetDescription (Stream *s, lldb::DescriptionLevel level bool ThreadPlanStepOverRange::ShouldStop (Event *event_ptr) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (log) { diff --git a/lldb/source/Target/ThreadPlanStepRange.cpp b/lldb/source/Target/ThreadPlanStepRange.cpp index 2b0c0c74d83..9551e0fdbab 100644 --- a/lldb/source/Target/ThreadPlanStepRange.cpp +++ b/lldb/source/Target/ThreadPlanStepRange.cpp @@ -84,7 +84,7 @@ ThreadPlanStepRange::PlanExplainsStop () Vote ThreadPlanStepRange::ShouldReportStop (Event *event_ptr) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); const Vote vote = IsPlanComplete() ? eVoteYes : eVoteNo; if (log) @@ -95,7 +95,7 @@ ThreadPlanStepRange::ShouldReportStop (Event *event_ptr) bool ThreadPlanStepRange::InRange () { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); bool ret_value = false; lldb::addr_t pc_load_addr = m_thread.GetRegisterContext()->GetPC(); @@ -158,7 +158,7 @@ ThreadPlanStepRange::InSymbol() bool ThreadPlanStepRange::FrameIsYounger () { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); // FIXME: Might be better to do this by storing the FrameID we started in and seeing if that is still above // us on the stack. Counting the whole stack could be expensive. @@ -187,7 +187,7 @@ ThreadPlanStepRange::FrameIsYounger () bool ThreadPlanStepRange::FrameIsOlder () { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); uint32_t current_depth = m_thread.GetStackFrameCount(); if (current_depth == m_stack_depth) { @@ -254,7 +254,7 @@ ThreadPlanStepRange::MischiefManaged () if (done) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (log) log->Printf("Completed step through range plan."); ThreadPlan::MischiefManaged (); diff --git a/lldb/source/Target/ThreadPlanStepThrough.cpp b/lldb/source/Target/ThreadPlanStepThrough.cpp index 5aaa984b8ba..16e0b894b3b 100644 --- a/lldb/source/Target/ThreadPlanStepThrough.cpp +++ b/lldb/source/Target/ThreadPlanStepThrough.cpp @@ -117,7 +117,7 @@ ThreadPlanStepThrough::WillStop () bool ThreadPlanStepThrough::MischiefManaged () { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); // Stop if we're happy with the place we've landed... diff --git a/lldb/source/Target/ThreadPlanStepUntil.cpp b/lldb/source/Target/ThreadPlanStepUntil.cpp index 94a0e77c2f0..f02a63a5c0f 100644 --- a/lldb/source/Target/ThreadPlanStepUntil.cpp +++ b/lldb/source/Target/ThreadPlanStepUntil.cpp @@ -347,7 +347,7 @@ ThreadPlanStepUntil::MischiefManaged () bool done = false; if (IsPlanComplete()) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (log) log->Printf("Completed step until plan."); diff --git a/lldb/source/Target/ThreadPlanTestCondition.cpp b/lldb/source/Target/ThreadPlanTestCondition.cpp index 68d4a8af9d6..888de0c70e4 100644 --- a/lldb/source/Target/ThreadPlanTestCondition.cpp +++ b/lldb/source/Target/ThreadPlanTestCondition.cpp @@ -70,7 +70,7 @@ ThreadPlanTestCondition::GetDescription (Stream *s, lldb::DescriptionLevel level bool ThreadPlanTestCondition::ShouldStop (Event *event_ptr) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (m_thread.IsThreadPlanDone(m_expression_plan_sp.get())) { ClangExpressionVariable *expr_result = NULL; @@ -89,13 +89,11 @@ ThreadPlanTestCondition::ShouldStop (Event *event_ptr) else m_did_stop = true; } - log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); if (log) log->Printf("Condition successfully evaluated, result is %s.\n", m_did_stop ? "true" : "false"); } else { - log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); if (log) log->Printf("Failed to get a result from the expression, error: \"%s\"\n", error_stream.GetData()); m_did_stop = true; @@ -103,7 +101,6 @@ ThreadPlanTestCondition::ShouldStop (Event *event_ptr) } else if (m_exe_ctx.thread->WasThreadPlanDiscarded (m_expression_plan_sp.get())) { - log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); if (log) log->Printf("ExecuteExpression thread plan was discarded.\n"); m_did_stop = true; |