[Lldb-commits] [lldb] r280751 - *** This commit represents a complete reformatting of the LLDB source code

Kate Stone via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 6 13:58:36 PDT 2016


Modified: lldb/trunk/include/lldb/Target/Thread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Thread.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Thread.h (original)
+++ lldb/trunk/include/lldb/Target/Thread.h Tue Sep  6 15:57:50 2016
@@ -19,7 +19,6 @@
 
 // Other libraries and framework includes
 // Project includes
-#include "lldb/lldb-private.h"
 #include "lldb/Core/Broadcaster.h"
 #include "lldb/Core/Event.h"
 #include "lldb/Core/StructuredData.h"
@@ -28,1452 +27,1320 @@
 #include "lldb/Target/ExecutionContextScope.h"
 #include "lldb/Target/RegisterCheckpoint.h"
 #include "lldb/Target/StackFrameList.h"
+#include "lldb/lldb-private.h"
 
 #define LLDB_THREAD_MAX_STOP_EXC_DATA 8
 
 namespace lldb_private {
 
-class ThreadProperties : public Properties
-{
+class ThreadProperties : public Properties {
 public:
-    ThreadProperties(bool is_global);
-    
-    ~ThreadProperties() override;
-    
-    //------------------------------------------------------------------
-    /// The regular expression returned determines symbols that this
-    /// thread won't stop in during "step-in" operations.
-    ///
-    /// @return
-    ///    A pointer to a regular expression to compare against symbols,
-    ///    or nullptr if all symbols are allowed.
-    ///
-    //------------------------------------------------------------------
-    const RegularExpression *
-    GetSymbolsToAvoidRegexp();
-    
-    FileSpecList &
-    GetLibrariesToAvoid() const;
-    
-    bool
-    GetTraceEnabledState() const;
-    
-    bool
-    GetStepInAvoidsNoDebug () const;
-    
-    bool
-    GetStepOutAvoidsNoDebug () const;
-};
-
-typedef std::shared_ptr<ThreadProperties> ThreadPropertiesSP;
-
-class Thread :
-    public std::enable_shared_from_this<Thread>,
-    public ThreadProperties,
-    public UserID,
-    public ExecutionContextScope,
-    public Broadcaster
-{
-public:
-    //------------------------------------------------------------------
-    /// Broadcaster event bits definitions.
-    //------------------------------------------------------------------
-    enum
-    {
-        eBroadcastBitStackChanged           = (1 << 0),
-        eBroadcastBitThreadSuspended        = (1 << 1),
-        eBroadcastBitThreadResumed          = (1 << 2),
-        eBroadcastBitSelectedFrameChanged   = (1 << 3),
-        eBroadcastBitThreadSelected         = (1 << 4)
-    };
-
-    static ConstString &GetStaticBroadcasterClass ();
-    
-    ConstString &GetBroadcasterClass() const override
-    {
-        return GetStaticBroadcasterClass();
-    }
-    
-    class ThreadEventData :
-        public EventData
-    {
-    public:
-        ThreadEventData (const lldb::ThreadSP thread_sp);
-        
-        ThreadEventData (const lldb::ThreadSP thread_sp, const StackID &stack_id);
-        
-        ThreadEventData();
-        
-        ~ThreadEventData() override;
-        
-        static const ConstString &
-        GetFlavorString ();
-
-        const ConstString &
-        GetFlavor() const override
-        {
-            return ThreadEventData::GetFlavorString ();
-        }
-        
-        void
-        Dump(Stream *s) const override;
-    
-        static const ThreadEventData *
-        GetEventDataFromEvent (const Event *event_ptr);
-        
-        static lldb::ThreadSP
-        GetThreadFromEvent (const Event *event_ptr);
-        
-        static StackID
-        GetStackIDFromEvent (const Event *event_ptr);
-        
-        static lldb::StackFrameSP
-        GetStackFrameFromEvent (const Event *event_ptr);
-        
-        lldb::ThreadSP
-        GetThread () const
-        {
-            return m_thread_sp;
-        }
-        
-        StackID
-        GetStackID () const
-        {
-            return m_stack_id;
-        }
-    
-    private:
-        lldb::ThreadSP m_thread_sp;
-        StackID        m_stack_id;
-
-        DISALLOW_COPY_AND_ASSIGN (ThreadEventData);
-    };
-
-    struct ThreadStateCheckpoint
-    {
-        uint32_t           orig_stop_id;  // Dunno if I need this yet but it is an interesting bit of data.
-        lldb::StopInfoSP   stop_info_sp;  // You have to restore the stop info or you might continue with the wrong signals.
-        lldb::RegisterCheckpointSP register_backup_sp;  // You need to restore the registers, of course...
-        uint32_t           current_inlined_depth;
-        lldb::addr_t       current_inlined_pc;
-    };
-
-    //------------------------------------------------------------------
-    /// Constructor
-    ///
-    /// @param [in] process
-    ///
-    /// @param [in] tid
-    ///
-    /// @param [in] use_invalid_index_id
-    ///     Optional parameter, defaults to false.  The only subclass that
-    ///     is likely to set use_invalid_index_id == true is the HistoryThread
-    ///     class.  In that case, the Thread we are constructing represents
-    ///     a thread from earlier in the program execution.  We may have the 
-    ///     tid of the original thread that they represent but we don't want 
-    ///     to reuse the IndexID of that thread, or create a new one.  If a
-    ///     client wants to know the original thread's IndexID, they should use
-    ///     Thread::GetExtendedBacktraceOriginatingIndexID().
-    //------------------------------------------------------------------
-    Thread (Process &process, lldb::tid_t tid, bool use_invalid_index_id = false);
-
-    ~Thread() override;
-
-    static void
-    SettingsInitialize ();
-
-    static void
-    SettingsTerminate ();
-
-    static const ThreadPropertiesSP &
-    GetGlobalProperties();
-
-    lldb::ProcessSP
-    GetProcess() const
-    {
-        return m_process_wp.lock(); 
-    }
-
-    int
-    GetResumeSignal () const
-    {
-        return m_resume_signal;
-    }
-
-    void
-    SetResumeSignal (int signal)
-    {
-        m_resume_signal = signal;
-    }
-
-    lldb::StateType
-    GetState() const;
-
-    void
-    SetState (lldb::StateType state);
-
-    //------------------------------------------------------------------
-    /// Sets the USER resume state for this thread.  If you set a thread to suspended with
-    /// this API, it won't take part in any of the arbitration for ShouldResume, and will stay
-    /// suspended even when other threads do get to run.
-    ///
-    /// N.B. This is not the state that is used internally by thread plans to implement
-    /// staying on one thread while stepping over a breakpoint, etc.  The is the
-    /// TemporaryResume state, and if you are implementing some bit of strategy in the stepping
-    /// machinery you should be using that state and not the user resume state.
-    ///
-    /// If you are just preparing all threads to run, you should not override the threads that are
-    /// marked as suspended by the debugger.  In that case, pass override_suspend = false.  If you want
-    /// to force the thread to run (e.g. the "thread continue" command, or are resetting the state
-    /// (e.g. in SBThread::Resume()), then pass true to override_suspend.
-    /// @return
-    ///    The User resume state for this thread.
-    //------------------------------------------------------------------
-    void
-    SetResumeState (lldb::StateType state, bool override_suspend = false)
-    {
-        if (m_resume_state == lldb::eStateSuspended && !override_suspend)
-            return;
-        m_resume_state = state;
-    }
-
-    //------------------------------------------------------------------
-    /// Gets the USER resume state for this thread.  This is not the same as what
-    /// this thread is going to do for any particular step, however if this thread
-    /// returns eStateSuspended, then the process control logic will never allow this
-    /// thread to run.
-    ///
-    /// @return
-    ///    The User resume state for this thread.
-    //------------------------------------------------------------------
-    lldb::StateType
-    GetResumeState () const
-    {
-        return m_resume_state;
-    }
-    
-    // This function is called on all the threads before "ShouldResume" and
-    // "WillResume" in case a thread needs to change its state before the
-    // ThreadList polls all the threads to figure out which ones actually
-    // will get to run and how.
-    void
-    SetupForResume ();
-    
-    // Do not override this function, it is for thread plan logic only
-    bool
-    ShouldResume (lldb::StateType resume_state);
-
-    // Override this to do platform specific tasks before resume.
-    virtual void
-    WillResume (lldb::StateType resume_state)
-    {
-    }
-
-    // This clears generic thread state after a resume.  If you subclass this,
-    // be sure to call it.
-    virtual void
-    DidResume ();
-
-    // This notifies the thread when a private stop occurs.
-    virtual void
-    DidStop ();
-
-    virtual void
-    RefreshStateAfterStop() = 0;
-
-    void
-    WillStop ();
-
-    bool
-    ShouldStop (Event *event_ptr);
-
-    Vote
-    ShouldReportStop (Event *event_ptr);
-    
-    Vote
-    ShouldReportRun (Event *event_ptr);
-    
-    void
-    Flush ();
-
-    // Return whether this thread matches the specification in ThreadSpec.  This is a virtual
-    // method because at some point we may extend the thread spec with a platform specific
-    // dictionary of attributes, which then only the platform specific Thread implementation
-    // would know how to match.  For now, this just calls through to the ThreadSpec's 
-    // ThreadPassesBasicTests method.
-    virtual bool
-    MatchesSpec (const ThreadSpec *spec);
-
-    lldb::StopInfoSP
-    GetStopInfo ();
-
-    lldb::StopReason
-    GetStopReason();
-
-    bool
-    StopInfoIsUpToDate() const;
-
-    // This sets the stop reason to a "blank" stop reason, so you can call functions on the thread
-    // without having the called function run with whatever stop reason you stopped with.
-    void
-    SetStopInfoToNothing();
-    
-    bool
-    ThreadStoppedForAReason ();
-
-    static const char *
-    RunModeAsCString (lldb::RunMode mode);
-
-    static const char *
-    StopReasonAsCString (lldb::StopReason reason);
-
-    virtual const char *
-    GetInfo ()
-    {
-        return nullptr;
-    }
-
-    //------------------------------------------------------------------
-    /// Retrieve a dictionary of information about this thread 
-    ///
-    /// On Mac OS X systems there may be voucher information.
-    /// The top level dictionary returned will have an "activity" key and the
-    /// value of the activity is a dictionary.  Keys in that dictionary will 
-    /// be "name" and "id", among others.
-    /// There may also be "trace_messages" (an array) with each entry in that array
-    /// being a dictionary (keys include "message" with the text of the trace
-    /// message).
-    //------------------------------------------------------------------
-    StructuredData::ObjectSP
-    GetExtendedInfo ()
-    {
-        if (m_extended_info_fetched == false)
-        {
-            m_extended_info = FetchThreadExtendedInfo ();
-            m_extended_info_fetched = true;
-        }
-        return m_extended_info;
-    }
-
-    virtual const char *
-    GetName ()
-    {
-        return nullptr;
-    }
-
-    virtual void
-    SetName (const char *name)
-    {
-    }
-
-    //------------------------------------------------------------------
-    /// Whether this thread can be associated with a libdispatch queue
-    /// 
-    /// The Thread may know if it is associated with a libdispatch queue,
-    /// it may know definitively that it is NOT associated with a libdispatch
-    /// queue, or it may be unknown whether it is associated with a libdispatch
-    /// queue.  
-    ///
-    /// @return
-    ///     eLazyBoolNo if this thread is definitely not associated with a
-    ///     libdispatch queue (e.g. on a non-Darwin system where GCD aka 
-    ///     libdispatch is not available).
-    ///
-    ///     eLazyBoolYes this thread is associated with a libdispatch queue.
-    ///
-    ///     eLazyBoolCalculate this thread may be associated with a libdispatch 
-    ///     queue but the thread doesn't know one way or the other.
-    //------------------------------------------------------------------
-    virtual lldb_private::LazyBool
-    GetAssociatedWithLibdispatchQueue ()
-    {
-        return eLazyBoolNo;
-    }
-
-    virtual void
-    SetAssociatedWithLibdispatchQueue (lldb_private::LazyBool associated_with_libdispatch_queue)
-    {
-    }
-
-    //------------------------------------------------------------------
-    /// Retrieve the Queue ID for the queue currently using this Thread
-    ///
-    /// If this Thread is doing work on behalf of a libdispatch/GCD queue,
-    /// retrieve the QueueID.
-    ///
-    /// This is a unique identifier for the libdispatch/GCD queue in a 
-    /// process.  Often starting at 1 for the initial system-created 
-    /// queues and incrementing, a QueueID will not be reused for a
-    /// different queue during the lifetime of a process.
-    ///
-    /// @return
-    ///     A QueueID if the Thread subclass implements this, else
-    ///     LLDB_INVALID_QUEUE_ID.
-    //------------------------------------------------------------------
-    virtual lldb::queue_id_t
-    GetQueueID ()
-    {
-        return LLDB_INVALID_QUEUE_ID;
-    }
-
-    virtual void
-    SetQueueID (lldb::queue_id_t new_val)
-    {
-    }
-
-    //------------------------------------------------------------------
-    /// Retrieve the Queue name for the queue currently using this Thread
-    ///
-    /// If this Thread is doing work on behalf of a libdispatch/GCD queue,
-    /// retrieve the Queue name.
-    ///
-    /// @return
-    ///     The Queue name, if the Thread subclass implements this, else
-    ///     nullptr.
-    //------------------------------------------------------------------
-    virtual const char *
-    GetQueueName ()
-    {
-        return nullptr;
-    }
-
-    virtual void
-    SetQueueName (const char *name)
-    {
-    }
-
-    //------------------------------------------------------------------
-    /// Retrieve the Queue kind for the queue currently using this Thread
-    ///
-    /// If this Thread is doing work on behalf of a libdispatch/GCD queue,
-    /// retrieve the Queue kind - either eQueueKindSerial or 
-    /// eQueueKindConcurrent, indicating that this queue processes work
-    /// items serially or concurrently.
-    ///
-    /// @return
-    ///     The Queue kind, if the Thread subclass implements this, else
-    ///     eQueueKindUnknown.
-    //------------------------------------------------------------------
-    virtual lldb::QueueKind
-    GetQueueKind ()
-    {
-        return lldb::eQueueKindUnknown;
-    }
-
-    virtual void
-    SetQueueKind (lldb::QueueKind kind)
-    {
-    }
+  ThreadProperties(bool is_global);
 
-    //------------------------------------------------------------------
-    /// Retrieve the Queue for this thread, if any.
-    ///
-    /// @return
-    ///     A QueueSP for the queue that is currently associated with this 
-    ///     thread.
-    ///     An empty shared pointer indicates that this thread is not
-    ///     associated with a queue, or libdispatch queues are not 
-    ///     supported on this target.
-    //------------------------------------------------------------------
-    virtual lldb::QueueSP
-    GetQueue ()
-    {
-        return lldb::QueueSP();
-    }
-
-    //------------------------------------------------------------------
-    /// Retrieve the address of the libdispatch_queue_t struct for queue
-    /// currently using this Thread
-    ///
-    /// If this Thread is doing work on behalf of a libdispatch/GCD queue,
-    /// retrieve the address of the libdispatch_queue_t structure describing
-    /// the queue.
-    ///
-    /// This address may be reused for different queues later in the Process
-    /// lifetime and should not be used to identify a queue uniquely.  Use
-    /// the GetQueueID() call for that.
-    ///
-    /// @return
-    ///     The Queue's libdispatch_queue_t address if the Thread subclass
-    ///     implements this, else LLDB_INVALID_ADDRESS.
-    //------------------------------------------------------------------
-    virtual lldb::addr_t
-    GetQueueLibdispatchQueueAddress ()
-    {
-        return LLDB_INVALID_ADDRESS;
-    }
-
-    virtual void
-    SetQueueLibdispatchQueueAddress (lldb::addr_t dispatch_queue_t)
-    {
-    }
-
-    //------------------------------------------------------------------
-    /// Whether this Thread already has all the Queue information cached or not
-    ///
-    /// A Thread may be associated with a libdispatch work Queue at a given
-    /// public stop event.  If so, the thread can satisify requests like
-    /// GetQueueLibdispatchQueueAddress, GetQueueKind, GetQueueName, and GetQueueID
-    /// either from information from the remote debug stub when it is initially
-    /// created, or it can query the SystemRuntime for that information.
-    ///
-    /// This method allows the SystemRuntime to discover if a thread has this
-    /// information already, instead of calling the thread to get the information
-    /// and having the thread call the SystemRuntime again.
-    //------------------------------------------------------------------
-    virtual bool
-    ThreadHasQueueInformation () const
-    {
-        return false;
-    }
-
-    virtual uint32_t
-    GetStackFrameCount()
-    {
-        return GetStackFrameList()->GetNumFrames();
-    }
-
-    virtual lldb::StackFrameSP
-    GetStackFrameAtIndex (uint32_t idx)
-    {
-        return GetStackFrameList()->GetFrameAtIndex(idx);
-    }
-    
-    virtual lldb::StackFrameSP
-    GetFrameWithConcreteFrameIndex (uint32_t unwind_idx);
-    
-    bool
-    DecrementCurrentInlinedDepth()
-    {
-        return GetStackFrameList()->DecrementCurrentInlinedDepth();
-    }
-    
-    uint32_t
-    GetCurrentInlinedDepth()
-    {
-        return GetStackFrameList()->GetCurrentInlinedDepth();
-    }
-    
-    Error
-    ReturnFromFrameWithIndex (uint32_t frame_idx, lldb::ValueObjectSP return_value_sp, bool broadcast = false);
-    
-    Error
-    ReturnFromFrame (lldb::StackFrameSP frame_sp, lldb::ValueObjectSP return_value_sp, bool broadcast = false);
-
-    Error
-    JumpToLine(const FileSpec &file, uint32_t line, bool can_leave_function, std::string *warnings = nullptr);
-
-    virtual lldb::StackFrameSP
-    GetFrameWithStackID (const StackID &stack_id)
-    {
-        if (stack_id.IsValid())
-            return GetStackFrameList()->GetFrameWithStackID (stack_id);
-        return lldb::StackFrameSP();
-    }
-
-    uint32_t
-    GetSelectedFrameIndex ()
-    {
-        return GetStackFrameList()->GetSelectedFrameIndex();
-    }
-
-    lldb::StackFrameSP
-    GetSelectedFrame ();
-
-    uint32_t
-    SetSelectedFrame (lldb_private::StackFrame *frame, bool broadcast = false);
-
-    bool
-    SetSelectedFrameByIndex (uint32_t frame_idx, bool broadcast = false);
-
-    bool
-    SetSelectedFrameByIndexNoisily (uint32_t frame_idx, Stream &output_stream);
-
-    void
-    SetDefaultFileAndLineToSelectedFrame()
-    {
-        GetStackFrameList()->SetDefaultFileAndLineToSelectedFrame();
-    }
-
-    virtual lldb::RegisterContextSP
-    GetRegisterContext () = 0;
+  ~ThreadProperties() override;
 
-    virtual lldb::RegisterContextSP
-    CreateRegisterContextForFrame (StackFrame *frame) = 0;
-    
-    virtual void
-    ClearStackFrames ();
-
-    virtual bool
-    SetBackingThread (const lldb::ThreadSP &thread_sp)
-    {
-        return false;
-    }
-    
-    virtual lldb::ThreadSP
-    GetBackingThread () const
-    {
-        return lldb::ThreadSP();
-    }
-
-    virtual void
-    ClearBackingThread ()
-    {
-        // Subclasses can use this function if a thread is actually backed by
-        // another thread. This is currently used for the OperatingSystem plug-ins
-        // where they might have a thread that is in memory, yet its registers
-        // are available through the lldb_private::Thread subclass for the current
-        // lldb_private::Process class. Since each time the process stops the backing
-        // threads for memory threads can change, we need a way to clear the backing
-        // thread for all memory threads each time we stop.
-    }
-
-    void
-    DumpUsingSettingsFormat (Stream &strm, uint32_t frame_idx);
+  //------------------------------------------------------------------
+  /// The regular expression returned determines symbols that this
+  /// thread won't stop in during "step-in" operations.
+  ///
+  /// @return
+  ///    A pointer to a regular expression to compare against symbols,
+  ///    or nullptr if all symbols are allowed.
+  ///
+  //------------------------------------------------------------------
+  const RegularExpression *GetSymbolsToAvoidRegexp();
 
-    bool
-    GetDescription (Stream &s, lldb::DescriptionLevel level, bool print_json_thread, bool print_json_stopinfo);
+  FileSpecList &GetLibrariesToAvoid() const;
 
-    //------------------------------------------------------------------
-    /// Default implementation for stepping into.
-    ///
-    /// This function is designed to be used by commands where the
-    /// process is publicly stopped.
-    ///
-    /// @param[in] source_step
-    ///     If true and the frame has debug info, then do a source level
-    ///     step in, else do a single instruction step in.
-    ///
-    /// @param[in] step_in_avoids_code_without_debug_info
-    ///     If \a true, then avoid stepping into code that doesn't have
-    ///     debug info, else step into any code regardless of whether it
-    ///     has debug info.
-    ///
-    /// @param[in] step_out_avoids_code_without_debug_info
-    ///     If \a true, then if you step out to code with no debug info, keep
-    ///     stepping out till you get to code with debug info.
-    ///
-    /// @return
-    ///     An error that describes anything that went wrong
-    //------------------------------------------------------------------
-    virtual Error
-    StepIn (bool source_step,
-            LazyBool step_in_avoids_code_without_debug_info = eLazyBoolCalculate,
-            LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
-
-    //------------------------------------------------------------------
-    /// Default implementation for stepping over.
-    ///
-    /// This function is designed to be used by commands where the
-    /// process is publicly stopped.
-    ///
-    /// @param[in] source_step
-    ///     If true and the frame has debug info, then do a source level
-    ///     step over, else do a single instruction step over.
-    ///
-    /// @return
-    ///     An error that describes anything that went wrong
-    //------------------------------------------------------------------
-    virtual Error
-    StepOver (bool source_step,
-              LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
-
-    //------------------------------------------------------------------
-    /// Default implementation for stepping out.
-    ///
-    /// This function is designed to be used by commands where the
-    /// process is publicly stopped.
-    ///
-    /// @return
-    ///     An error that describes anything that went wrong
-    //------------------------------------------------------------------
-    virtual Error
-    StepOut ();
-
-    //------------------------------------------------------------------
-    /// Retrieves the per-thread data area.
-    /// Most OSs maintain a per-thread pointer (e.g. the FS register on
-    /// x64), which we return the value of here.
-    ///
-    /// @return
-    ///     LLDB_INVALID_ADDRESS if not supported, otherwise the thread
-    ///     pointer value.
-    //------------------------------------------------------------------
-    virtual lldb::addr_t
-    GetThreadPointer ();
-
-    //------------------------------------------------------------------
-    /// Retrieves the per-module TLS block for a thread.
-    ///
-    /// @param[in] module
-    ///     The module to query TLS data for.
-    ///
-    /// @param[in] tls_file_addr
-    ///     The thread local address in module
-    /// @return
-    ///     If the thread has TLS data allocated for the
-    ///     module, the address of the TLS block. Otherwise
-    ///     LLDB_INVALID_ADDRESS is returned.
-    //------------------------------------------------------------------
-    virtual lldb::addr_t
-    GetThreadLocalData(const lldb::ModuleSP module, lldb::addr_t tls_file_addr);
-
-    //------------------------------------------------------------------
-    /// Check whether this thread is safe to run functions
-    ///
-    /// The SystemRuntime may know of certain thread states (functions in 
-    /// process of execution, for instance) which can make it unsafe for 
-    /// functions to be called.
-    ///
-    /// @return
-    ///     True if it is safe to call functions on this thread.
-    ///     False if function calls should be avoided on this thread.
-    //------------------------------------------------------------------
-    virtual bool
-    SafeToCallFunctions ();
-
-    //------------------------------------------------------------------
-    // Thread Plan Providers:
-    // This section provides the basic thread plans that the Process control
-    // machinery uses to run the target.  ThreadPlan.h provides more details on
-    // how this mechanism works.
-    // The thread provides accessors to a set of plans that perform basic operations.
-    // The idea is that particular Platform plugins can override these methods to
-    // provide the implementation of these basic operations appropriate to their
-    // environment.
-    //
-    // NB: All the QueueThreadPlanXXX providers return Shared Pointers to
-    // Thread plans.  This is useful so that you can modify the plans after
-    // creation in ways specific to that plan type.  Also, it is often necessary for
-    // ThreadPlans that utilize other ThreadPlans to implement their task to keep a shared
-    // pointer to the sub-plan.
-    // But besides that, the shared pointers should only be held onto by entities who live no longer
-    // than the thread containing the ThreadPlan.
-    // FIXME: If this becomes a problem, we can make a version that just returns a pointer,
-    // which it is clearly unsafe to hold onto, and a shared pointer version, and only allow
-    // ThreadPlan and Co. to use the latter.  That is made more annoying to do because there's
-    // no elegant way to friend a method to all sub-classes of a given class.
-    //
-    //------------------------------------------------------------------
-
-    //------------------------------------------------------------------
-    /// Queues the base plan for a thread.
-    /// The version returned by Process does some things that are useful,
-    /// like handle breakpoints and signals, so if you return a plugin specific
-    /// one you probably want to call through to the Process one for anything
-    /// your plugin doesn't explicitly handle.
-    ///
-    /// @param[in] abort_other_plans
-    ///    \b true if we discard the currently queued plans and replace them with this one.
-    ///    Otherwise this plan will go on the end of the plan stack.
-    ///
-    /// @return
-    ///     A shared pointer to the newly queued thread plan, or nullptr if the plan could not be queued.
-    //------------------------------------------------------------------
-    virtual lldb::ThreadPlanSP
-    QueueFundamentalPlan (bool abort_other_plans);
-
-    //------------------------------------------------------------------
-    /// Queues the plan used to step one instruction from the current PC of \a thread.
-    ///
-    /// @param[in] step_over
-    ///    \b true if we step over calls to functions, false if we step in.
-    ///
-    /// @param[in] abort_other_plans
-    ///    \b true if we discard the currently queued plans and replace them with this one.
-    ///    Otherwise this plan will go on the end of the plan stack.
-    ///
-    /// @param[in] stop_other_threads
-    ///    \b true if we will stop other threads while we single step this one.
-    ///
-    /// @return
-    ///     A shared pointer to the newly queued thread plan, or nullptr if the plan could not be queued.
-    //------------------------------------------------------------------
-    virtual lldb::ThreadPlanSP
-    QueueThreadPlanForStepSingleInstruction (bool step_over,
-                                             bool abort_other_plans,
-                                             bool stop_other_threads);
-
-    //------------------------------------------------------------------
-    /// Queues the plan used to step through an address range, stepping  over
-    /// function calls.
-    ///
-    /// @param[in] abort_other_plans
-    ///    \b true if we discard the currently queued plans and replace them with this one.
-    ///    Otherwise this plan will go on the end of the plan stack.
-    ///
-    /// @param[in] type
-    ///    Type of step to do, only eStepTypeInto and eStepTypeOver are supported by this plan.
-    ///
-    /// @param[in] range
-    ///    The address range to step through.
-    ///
-    /// @param[in] addr_context
-    ///    When dealing with stepping through inlined functions the current PC is not enough information to know
-    ///    what "step" means.  For instance a series of nested inline functions might start at the same address.
-    //     The \a addr_context provides the current symbol context the step
-    ///    is supposed to be out of.
-    //   FIXME: Currently unused.
-    ///
-    /// @param[in] stop_other_threads
-    ///    \b true if we will stop other threads while we single step this one.
-    ///
-    /// @param[in] step_out_avoids_code_without_debug_info
-    ///    If eLazyBoolYes, if the step over steps out it will continue to step out till it comes to a frame with debug info.
-    ///    If eLazyBoolCalculate, we will consult the default set in the thread.
-    ///
-    /// @return
-    ///     A shared pointer to the newly queued thread plan, or nullptr if the plan could not be queued.
-    //------------------------------------------------------------------
-    virtual lldb::ThreadPlanSP
-    QueueThreadPlanForStepOverRange (bool abort_other_plans,
-                                     const AddressRange &range,
-                                     const SymbolContext &addr_context,
-                                     lldb::RunMode stop_other_threads,
-                                     LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
-
-    // Helper function that takes a LineEntry to step, insted of an AddressRange.  This may combine multiple
-    // LineEntries of the same source line number to step over a longer address range in a single operation.
-    virtual lldb::ThreadPlanSP
-    QueueThreadPlanForStepOverRange (bool abort_other_plans,
-                                     const LineEntry &line_entry,
-                                     const SymbolContext &addr_context,
-                                     lldb::RunMode stop_other_threads,
-                                     LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
-
-    //------------------------------------------------------------------
-    /// Queues the plan used to step through an address range, stepping into functions.
-    ///
-    /// @param[in] abort_other_plans
-    ///    \b true if we discard the currently queued plans and replace them with this one.
-    ///    Otherwise this plan will go on the end of the plan stack.
-    ///
-    /// @param[in] type
-    ///    Type of step to do, only eStepTypeInto and eStepTypeOver are supported by this plan.
-    ///
-    /// @param[in] range
-    ///    The address range to step through.
-    ///
-    /// @param[in] addr_context
-    ///    When dealing with stepping through inlined functions the current PC is not enough information to know
-    ///    what "step" means.  For instance a series of nested inline functions might start at the same address.
-    //     The \a addr_context provides the current symbol context the step
-    ///    is supposed to be out of.
-    //   FIXME: Currently unused.
-    ///
-    /// @param[in] step_in_target
-    ///    Name if function we are trying to step into.  We will step out if we don't land in that function.
-    ///
-    /// @param[in] stop_other_threads
-    ///    \b true if we will stop other threads while we single step this one.
-    ///
-    /// @param[in] step_in_avoids_code_without_debug_info
-    ///    If eLazyBoolYes we will step out if we step into code with no debug info.
-    ///    If eLazyBoolCalculate we will consult the default set in the thread.
-    ///
-    /// @param[in] step_out_avoids_code_without_debug_info
-    ///    If eLazyBoolYes, if the step over steps out it will continue to step out till it comes to a frame with debug info.
-    ///    If eLazyBoolCalculate, it will consult the default set in the thread.
-    ///
-    /// @return
-    ///     A shared pointer to the newly queued thread plan, or nullptr if the plan could not be queued.
-    //------------------------------------------------------------------
-    virtual lldb::ThreadPlanSP
-    QueueThreadPlanForStepInRange (bool abort_other_plans,
-                                   const AddressRange &range,
-                                   const SymbolContext &addr_context,
-                                   const char *step_in_target,
-                                   lldb::RunMode stop_other_threads,
-                                   LazyBool step_in_avoids_code_without_debug_info = eLazyBoolCalculate,
-                                   LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
-
-    // Helper function that takes a LineEntry to step, insted of an AddressRange.  This may combine multiple
-    // LineEntries of the same source line number to step over a longer address range in a single operation.
-    virtual lldb::ThreadPlanSP
-    QueueThreadPlanForStepInRange (bool abort_other_plans,
-                                   const LineEntry &line_entry,
-                                   const SymbolContext &addr_context,
-                                   const char *step_in_target,
-                                   lldb::RunMode stop_other_threads,
-                                   LazyBool step_in_avoids_code_without_debug_info = eLazyBoolCalculate,
-                                   LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
-
-    //------------------------------------------------------------------
-    /// Queue the plan used to step out of the function at the current PC of
-    /// \a thread.
-    ///
-    /// @param[in] abort_other_plans
-    ///    \b true if we discard the currently queued plans and replace them with this one.
-    ///    Otherwise this plan will go on the end of the plan stack.
-    ///
-    /// @param[in] addr_context
-    ///    When dealing with stepping through inlined functions the current PC is not enough information to know
-    ///    what "step" means.  For instance a series of nested inline functions might start at the same address.
-    //     The \a addr_context provides the current symbol context the step
-    ///    is supposed to be out of.
-    //   FIXME: Currently unused.
-    ///
-    /// @param[in] first_insn
-    ///     \b true if this is the first instruction of a function.
-    ///
-    /// @param[in] stop_other_threads
-    ///    \b true if we will stop other threads while we single step this one.
-    ///
-    /// @param[in] stop_vote
-    /// @param[in] run_vote
-    ///    See standard meanings for the stop & run votes in ThreadPlan.h.
-    ///
-    /// @param[in] step_out_avoids_code_without_debug_info
-    ///    If eLazyBoolYes, if the step over steps out it will continue to step out till it comes to a frame with debug info.
-    ///    If eLazyBoolCalculate, it will consult the default set in the thread.
-    ///
-    /// @return
-    ///     A shared pointer to the newly queued thread plan, or nullptr if the plan could not be queued.
-    //------------------------------------------------------------------
-    virtual lldb::ThreadPlanSP
-    QueueThreadPlanForStepOut (bool abort_other_plans,
-                               SymbolContext *addr_context,
-                               bool first_insn,
-                               bool stop_other_threads,
-                               Vote stop_vote, // = eVoteYes,
-                               Vote run_vote, // = eVoteNoOpinion);
-                               uint32_t frame_idx,
-                               LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
-
-    //------------------------------------------------------------------
-    /// Queue the plan used to step out of the function at the current PC of
-    /// a thread.  This version does not consult the should stop here callback, and should only
-    /// be used by other thread plans when they need to retain control of the step out.
-    ///
-    /// @param[in] abort_other_plans
-    ///    \b true if we discard the currently queued plans and replace them with this one.
-    ///    Otherwise this plan will go on the end of the plan stack.
-    ///
-    /// @param[in] addr_context
-    ///    When dealing with stepping through inlined functions the current PC is not enough information to know
-    ///    what "step" means.  For instance a series of nested inline functions might start at the same address.
-    //     The \a addr_context provides the current symbol context the step
-    ///    is supposed to be out of.
-    //   FIXME: Currently unused.
-    ///
-    /// @param[in] first_insn
-    ///     \b true if this is the first instruction of a function.
-    ///
-    /// @param[in] stop_other_threads
-    ///    \b true if we will stop other threads while we single step this one.
-    ///
-    /// @param[in] stop_vote
-    /// @param[in] run_vote
-    ///    See standard meanings for the stop & run votes in ThreadPlan.h.
-    ///
-    /// @param[in] continue_to_next_branch
-    ///    Normally this will enqueue a plan that will put a breakpoint on the return address and continue
-    ///    to there.  If continue_to_next_branch is true, this is an operation not involving the user -- 
-    ///    e.g. stepping "next" in a source line and we instruction stepped into another function -- 
-    ///    so instead of putting a breakpoint on the return address, advance the breakpoint to the 
-    ///    end of the source line that is doing the call, or until the next flow control instruction.
-    ///    If the return value from the function call is to be retrieved / displayed to the user, you must stop
-    ///    on the return address.  The return value may be stored in volatile registers which are overwritten
-    ///    before the next branch instruction.
-    ///
-    /// @return
-    ///     A shared pointer to the newly queued thread plan, or nullptr if the plan could not be queued.
-    //------------------------------------------------------------------
-    virtual lldb::ThreadPlanSP
-    QueueThreadPlanForStepOutNoShouldStop (bool abort_other_plans,
-                                           SymbolContext *addr_context,
-                                           bool first_insn,
-                                           bool stop_other_threads,
-                                           Vote stop_vote, // = eVoteYes,
-                                           Vote run_vote, // = eVoteNoOpinion);
-                                           uint32_t frame_idx,
-                                           bool continue_to_next_branch = false);
-
-    //------------------------------------------------------------------
-    /// Gets the plan used to step through the code that steps from a function
-    /// call site at the current PC into the actual function call.
-    ///
-    ///
-    /// @param[in] return_stack_id
-    ///    The stack id that we will return to (by setting backstop breakpoints on the return
-    ///    address to that frame) if we fail to step through.
-    ///
-    /// @param[in] abort_other_plans
-    ///    \b true if we discard the currently queued plans and replace them with this one.
-    ///    Otherwise this plan will go on the end of the plan stack.
-    ///
-    /// @param[in] stop_other_threads
-    ///    \b true if we will stop other threads while we single step this one.
-    ///
-    /// @return
-    ///     A shared pointer to the newly queued thread plan, or nullptr if the plan could not be queued.
-    //------------------------------------------------------------------
-    virtual lldb::ThreadPlanSP
-    QueueThreadPlanForStepThrough (StackID &return_stack_id,
-                                   bool abort_other_plans,
-                                   bool stop_other_threads);
-
-    //------------------------------------------------------------------
-    /// Gets the plan used to continue from the current PC.
-    /// This is a simple plan, mostly useful as a backstop when you are continuing
-    /// for some particular purpose.
-    ///
-    /// @param[in] abort_other_plans
-    ///    \b true if we discard the currently queued plans and replace them with this one.
-    ///    Otherwise this plan will go on the end of the plan stack.
-    ///
-    /// @param[in] target_addr
-    ///    The address to which we're running.
-    ///
-    /// @param[in] stop_other_threads
-    ///    \b true if we will stop other threads while we single step this one.
-    ///
-    /// @return
-    ///     A shared pointer to the newly queued thread plan, or nullptr if the plan could not be queued.
-    //------------------------------------------------------------------
-    virtual lldb::ThreadPlanSP
-    QueueThreadPlanForRunToAddress (bool abort_other_plans,
-                                    Address &target_addr,
-                                    bool stop_other_threads);
-
-    virtual lldb::ThreadPlanSP
-    QueueThreadPlanForStepUntil (bool abort_other_plans,
-                                 lldb::addr_t *address_list,
-                                 size_t num_addresses,
-                                 bool stop_others,
-                                 uint32_t frame_idx);
-
-    virtual lldb::ThreadPlanSP
-    QueueThreadPlanForStepScripted (bool abort_other_plans,
-                                    const char *class_name,
-                                    bool stop_other_threads);
-
-    //------------------------------------------------------------------
-    // Thread Plan accessors:
-    //------------------------------------------------------------------
-
-    //------------------------------------------------------------------
-    /// Gets the plan which will execute next on the plan stack.
-    ///
-    /// @return
-    ///     A pointer to the next executed plan.
-    //------------------------------------------------------------------
-    ThreadPlan *
-    GetCurrentPlan ();
-    
-    //------------------------------------------------------------------
-    /// Unwinds the thread stack for the innermost expression plan currently
-    /// on the thread plan stack.
-    ///
-    /// @return
-    ///     An error if the thread plan could not be unwound.
-    //------------------------------------------------------------------
-
-    Error
-    UnwindInnermostExpression();
-
-    //------------------------------------------------------------------
-    /// Gets the outer-most plan that was popped off the plan stack in the
-    /// most recent stop.  Useful for printing the stop reason accurately.
-    ///
-    /// @return
-    ///     A pointer to the last completed plan.
-    //------------------------------------------------------------------
-    lldb::ThreadPlanSP
-    GetCompletedPlan ();
-
-    //------------------------------------------------------------------
-    /// Gets the outer-most return value from the completed plans
-    ///
-    /// @return
-    ///     A ValueObjectSP, either empty if there is no return value,
-    ///     or containing the return value.
-    //------------------------------------------------------------------
-    lldb::ValueObjectSP
-    GetReturnValueObject ();
-
-    //------------------------------------------------------------------
-    /// Gets the outer-most expression variable from the completed plans
-    ///
-    /// @return
-    ///     A ExpressionVariableSP, either empty if there is no
-    ///     plan completed an expression during the current stop
-    ///     or the expression variable that was made for the completed expression.
-    //------------------------------------------------------------------
-    lldb::ExpressionVariableSP
-    GetExpressionVariable ();
-
-    //------------------------------------------------------------------
-    ///  Checks whether the given plan is in the completed plans for this
-    ///  stop.
-    ///
-    /// @param[in] plan
-    ///     Pointer to the plan you're checking.
-    ///
-    /// @return
-    ///     Returns true if the input plan is in the completed plan stack,
-    ///     false otherwise.
-    //------------------------------------------------------------------
-    bool
-    IsThreadPlanDone (ThreadPlan *plan);
-
-    //------------------------------------------------------------------
-    ///  Checks whether the given plan is in the discarded plans for this
-    ///  stop.
-    ///
-    /// @param[in] plan
-    ///     Pointer to the plan you're checking.
-    ///
-    /// @return
-    ///     Returns true if the input plan is in the discarded plan stack,
-    ///     false otherwise.
-    //------------------------------------------------------------------
-    bool
-    WasThreadPlanDiscarded (ThreadPlan *plan);
-
-    //------------------------------------------------------------------
-    /// Queues a generic thread plan.
-    ///
-    /// @param[in] plan_sp
-    ///    The plan to queue.
-    ///
-    /// @param[in] abort_other_plans
-    ///    \b true if we discard the currently queued plans and replace them with this one.
-    ///    Otherwise this plan will go on the end of the plan stack.
-    ///
-    /// @return
-    ///     A pointer to the last completed plan.
-    //------------------------------------------------------------------
-    void
-    QueueThreadPlan (lldb::ThreadPlanSP &plan_sp, bool abort_other_plans);
-
-    //------------------------------------------------------------------
-    /// Discards the plans queued on the plan stack of the current thread.  This is
-    /// arbitrated by the "Master" ThreadPlans, using the "OkayToDiscard" call.
-    //  But if \a force is true, all thread plans are discarded.
-    //------------------------------------------------------------------
-    void
-    DiscardThreadPlans (bool force);
-
-    //------------------------------------------------------------------
-    /// Discards the plans queued on the plan stack of the current thread up to and
-    /// including up_to_plan_sp.
-    //
-    // @param[in] up_to_plan_sp
-    //   Discard all plans up to and including this one.
-    //------------------------------------------------------------------
-    void
-    DiscardThreadPlansUpToPlan (lldb::ThreadPlanSP &up_to_plan_sp);
-
-    void
-    DiscardThreadPlansUpToPlan (ThreadPlan *up_to_plan_ptr);
-
-    //------------------------------------------------------------------
-    /// Discards the plans queued on the plan stack of the current thread up to and
-    /// including the plan in that matches \a thread_index counting only
-    /// the non-Private plans.
-    ///
-    /// @param[in] up_to_plan_sp
-    ///   Discard all plans up to and including this user plan given by this index.
-    ///
-    /// @return
-    ///    \b true if there was a thread plan with that user index, \b false otherwise.
-    //------------------------------------------------------------------
-    bool
-    DiscardUserThreadPlansUpToIndex (uint32_t thread_index);
-    
-    //------------------------------------------------------------------
-    /// Prints the current plan stack.
-    ///
-    /// @param[in] s
-    ///    The stream to which to dump the plan stack info.
-    ///
-    //------------------------------------------------------------------
-    void
-    DumpThreadPlans (Stream *s,
-                     lldb::DescriptionLevel desc_level = lldb::eDescriptionLevelVerbose,
-                     bool include_internal = true,
-                     bool ignore_boring = false) const;
-    
-    virtual bool
-    CheckpointThreadState (ThreadStateCheckpoint &saved_state);
-    
-    virtual bool
-    RestoreRegisterStateFromCheckpoint (ThreadStateCheckpoint &saved_state);
-    
-    virtual bool
-    RestoreThreadStateFromCheckpoint (ThreadStateCheckpoint &saved_state);
-    
-    void
-    EnableTracer (bool value, bool single_step);
-    
-    void
-    SetTracer (lldb::ThreadPlanTracerSP &tracer_sp);
-
-    //------------------------------------------------------------------
-    // Get the thread index ID. The index ID that is guaranteed to not
-    // be re-used by a process. They start at 1 and increase with each
-    // new thread. This allows easy command line access by a unique ID
-    // that is easier to type than the actual system thread ID.
-    //------------------------------------------------------------------
-    uint32_t
-    GetIndexID () const;
-
-    //------------------------------------------------------------------
-    // Get the originating thread's index ID. 
-    // In the case of an "extended" thread -- a thread which represents
-    // the stack that enqueued/spawned work that is currently executing --
-    // we need to provide the IndexID of the thread that actually did
-    // this work.  We don't want to just masquerade as that thread's IndexID
-    // by using it in our own IndexID because that way leads to madness -
-    // but the driver program which is iterating over extended threads 
-    // may ask for the OriginatingThreadID to display that information
-    // to the user. 
-    // Normal threads will return the same thing as GetIndexID();
-    //------------------------------------------------------------------
-    virtual uint32_t
-    GetExtendedBacktraceOriginatingIndexID ()
-    {
-        return GetIndexID ();
-    }
+  bool GetTraceEnabledState() const;
 
-    //------------------------------------------------------------------
-    // The API ID is often the same as the Thread::GetID(), but not in
-    // all cases. Thread::GetID() is the user visible thread ID that
-    // clients would want to see. The API thread ID is the thread ID
-    // that is used when sending data to/from the debugging protocol.
-    //------------------------------------------------------------------
-    virtual lldb::user_id_t
-    GetProtocolID () const
-    {
-        return GetID();
-    }
-
-    //------------------------------------------------------------------
-    // lldb::ExecutionContextScope pure virtual functions
-    //------------------------------------------------------------------
-    lldb::TargetSP
-    CalculateTarget() override;
-    
-    lldb::ProcessSP
-    CalculateProcess() override;
-    
-    lldb::ThreadSP
-    CalculateThread() override;
-    
-    lldb::StackFrameSP
-    CalculateStackFrame() override;
-
-    void
-    CalculateExecutionContext(ExecutionContext &exe_ctx) override;
-    
-    lldb::StackFrameSP
-    GetStackFrameSPForStackFramePtr (StackFrame *stack_frame_ptr);
-    
-    size_t
-    GetStatus (Stream &strm, 
-               uint32_t start_frame, 
-               uint32_t num_frames,
-               uint32_t num_frames_with_source);
-
-    size_t
-    GetStackFrameStatus (Stream& strm,
-                         uint32_t first_frame,
-                         uint32_t num_frames,
-                         bool show_frame_info,
-                         uint32_t num_frames_with_source);
-
-    // We need a way to verify that even though we have a thread in a shared
-    // pointer that the object itself is still valid. Currently this won't be
-    // the case if DestroyThread() was called. DestroyThread is called when
-    // a thread has been removed from the Process' thread list.
-    bool
-    IsValid () const
-    {
-        return !m_destroy_called;
-    }
-
-    // Sets and returns a valid stop info based on the process stop ID and the
-    // current thread plan. If the thread stop ID does not match the process'
-    // stop ID, the private stop reason is not set and an invalid StopInfoSP may
-    // be returned.
-    //
-    // NOTE: This function must be called before the current thread plan is
-    // moved to the completed plan stack (in Thread::ShouldStop()).
-    //
-    // NOTE: If subclasses override this function, ensure they do not overwrite
-    // the m_actual_stop_info if it is valid.  The stop info may be a
-    // "checkpointed and restored" stop info, so if it is still around it is
-    // right even if you have not calculated this yourself, or if it disagrees
-    // with what you might have calculated.
-    virtual lldb::StopInfoSP
-    GetPrivateStopInfo ();
-
-    //----------------------------------------------------------------------
-    // Ask the thread subclass to set its stop info.
-    //
-    // Thread subclasses should call Thread::SetStopInfo(...) with the
-    // reason the thread stopped.
-    //
-    // @return
-    //      True if Thread::SetStopInfo(...) was called, false otherwise.
-    //----------------------------------------------------------------------
-    virtual bool
-    CalculateStopInfo () = 0;
-
-    //----------------------------------------------------------------------
-    // Gets the temporary resume state for a thread.
-    //
-    // This value gets set in each thread by complex debugger logic in
-    // Thread::ShouldResume() and an appropriate thread resume state will get
-    // set in each thread every time the process is resumed prior to calling
-    // Process::DoResume(). The lldb_private::Process subclass should adhere
-    // to the thread resume state request which will be one of:
-    //
-    //  eStateRunning   - thread will resume when process is resumed
-    //  eStateStepping  - thread should step 1 instruction and stop when process
-    //                    is resumed
-    //  eStateSuspended - thread should not execute any instructions when
-    //                    process is resumed
-    //----------------------------------------------------------------------
-    lldb::StateType
-    GetTemporaryResumeState() const
-    {
-        return m_temporary_resume_state;
-    }
+  bool GetStepInAvoidsNoDebug() const;
 
-    void
-    SetStopInfo (const lldb::StopInfoSP &stop_info_sp);
+  bool GetStepOutAvoidsNoDebug() const;
+};
 
-    void
-    SetShouldReportStop (Vote vote);
+typedef std::shared_ptr<ThreadProperties> ThreadPropertiesSP;
 
-    //----------------------------------------------------------------------
-    /// Sets the extended backtrace token for this thread
-    ///
-    /// Some Thread subclasses may maintain a token to help with providing
-    /// an extended backtrace.  The SystemRuntime plugin will set/request this.
-    ///
-    /// @param [in] token
-    //----------------------------------------------------------------------
-    virtual void
-    SetExtendedBacktraceToken (uint64_t token) { }
-
-    //----------------------------------------------------------------------
-    /// Gets the extended backtrace token for this thread
-    ///
-    /// Some Thread subclasses may maintain a token to help with providing
-    /// an extended backtrace.  The SystemRuntime plugin will set/request this.
-    ///
-    /// @return
-    ///     The token needed by the SystemRuntime to create an extended backtrace.
-    ///     LLDB_INVALID_ADDRESS is returned if no token is available.
-    //----------------------------------------------------------------------
-    virtual uint64_t
-    GetExtendedBacktraceToken ()
-    {
-        return LLDB_INVALID_ADDRESS;
-    }
+class Thread : public std::enable_shared_from_this<Thread>,
+               public ThreadProperties,
+               public UserID,
+               public ExecutionContextScope,
+               public Broadcaster {
+public:
+  //------------------------------------------------------------------
+  /// Broadcaster event bits definitions.
+  //------------------------------------------------------------------
+  enum {
+    eBroadcastBitStackChanged = (1 << 0),
+    eBroadcastBitThreadSuspended = (1 << 1),
+    eBroadcastBitThreadResumed = (1 << 2),
+    eBroadcastBitSelectedFrameChanged = (1 << 3),
+    eBroadcastBitThreadSelected = (1 << 4)
+  };
+
+  static ConstString &GetStaticBroadcasterClass();
+
+  ConstString &GetBroadcasterClass() const override {
+    return GetStaticBroadcasterClass();
+  }
+
+  class ThreadEventData : public EventData {
+  public:
+    ThreadEventData(const lldb::ThreadSP thread_sp);
+
+    ThreadEventData(const lldb::ThreadSP thread_sp, const StackID &stack_id);
+
+    ThreadEventData();
+
+    ~ThreadEventData() override;
+
+    static const ConstString &GetFlavorString();
+
+    const ConstString &GetFlavor() const override {
+      return ThreadEventData::GetFlavorString();
+    }
+
+    void Dump(Stream *s) const override;
+
+    static const ThreadEventData *GetEventDataFromEvent(const Event *event_ptr);
+
+    static lldb::ThreadSP GetThreadFromEvent(const Event *event_ptr);
+
+    static StackID GetStackIDFromEvent(const Event *event_ptr);
+
+    static lldb::StackFrameSP GetStackFrameFromEvent(const Event *event_ptr);
+
+    lldb::ThreadSP GetThread() const { return m_thread_sp; }
+
+    StackID GetStackID() const { return m_stack_id; }
+
+  private:
+    lldb::ThreadSP m_thread_sp;
+    StackID m_stack_id;
+
+    DISALLOW_COPY_AND_ASSIGN(ThreadEventData);
+  };
+
+  struct ThreadStateCheckpoint {
+    uint32_t orig_stop_id; // Dunno if I need this yet but it is an interesting
+                           // bit of data.
+    lldb::StopInfoSP stop_info_sp; // You have to restore the stop info or you
+                                   // might continue with the wrong signals.
+    lldb::RegisterCheckpointSP
+        register_backup_sp; // You need to restore the registers, of course...
+    uint32_t current_inlined_depth;
+    lldb::addr_t current_inlined_pc;
+  };
+
+  //------------------------------------------------------------------
+  /// Constructor
+  ///
+  /// @param [in] process
+  ///
+  /// @param [in] tid
+  ///
+  /// @param [in] use_invalid_index_id
+  ///     Optional parameter, defaults to false.  The only subclass that
+  ///     is likely to set use_invalid_index_id == true is the HistoryThread
+  ///     class.  In that case, the Thread we are constructing represents
+  ///     a thread from earlier in the program execution.  We may have the
+  ///     tid of the original thread that they represent but we don't want
+  ///     to reuse the IndexID of that thread, or create a new one.  If a
+  ///     client wants to know the original thread's IndexID, they should use
+  ///     Thread::GetExtendedBacktraceOriginatingIndexID().
+  //------------------------------------------------------------------
+  Thread(Process &process, lldb::tid_t tid, bool use_invalid_index_id = false);
+
+  ~Thread() override;
+
+  static void SettingsInitialize();
+
+  static void SettingsTerminate();
+
+  static const ThreadPropertiesSP &GetGlobalProperties();
+
+  lldb::ProcessSP GetProcess() const { return m_process_wp.lock(); }
+
+  int GetResumeSignal() const { return m_resume_signal; }
+
+  void SetResumeSignal(int signal) { m_resume_signal = signal; }
+
+  lldb::StateType GetState() const;
+
+  void SetState(lldb::StateType state);
+
+  //------------------------------------------------------------------
+  /// Sets the USER resume state for this thread.  If you set a thread to
+  /// suspended with
+  /// this API, it won't take part in any of the arbitration for ShouldResume,
+  /// and will stay
+  /// suspended even when other threads do get to run.
+  ///
+  /// N.B. This is not the state that is used internally by thread plans to
+  /// implement
+  /// staying on one thread while stepping over a breakpoint, etc.  The is the
+  /// TemporaryResume state, and if you are implementing some bit of strategy in
+  /// the stepping
+  /// machinery you should be using that state and not the user resume state.
+  ///
+  /// If you are just preparing all threads to run, you should not override the
+  /// threads that are
+  /// marked as suspended by the debugger.  In that case, pass override_suspend
+  /// = false.  If you want
+  /// to force the thread to run (e.g. the "thread continue" command, or are
+  /// resetting the state
+  /// (e.g. in SBThread::Resume()), then pass true to override_suspend.
+  /// @return
+  ///    The User resume state for this thread.
+  //------------------------------------------------------------------
+  void SetResumeState(lldb::StateType state, bool override_suspend = false) {
+    if (m_resume_state == lldb::eStateSuspended && !override_suspend)
+      return;
+    m_resume_state = state;
+  }
+
+  //------------------------------------------------------------------
+  /// Gets the USER resume state for this thread.  This is not the same as what
+  /// this thread is going to do for any particular step, however if this thread
+  /// returns eStateSuspended, then the process control logic will never allow
+  /// this
+  /// thread to run.
+  ///
+  /// @return
+  ///    The User resume state for this thread.
+  //------------------------------------------------------------------
+  lldb::StateType GetResumeState() const { return m_resume_state; }
+
+  // This function is called on all the threads before "ShouldResume" and
+  // "WillResume" in case a thread needs to change its state before the
+  // ThreadList polls all the threads to figure out which ones actually
+  // will get to run and how.
+  void SetupForResume();
+
+  // Do not override this function, it is for thread plan logic only
+  bool ShouldResume(lldb::StateType resume_state);
+
+  // Override this to do platform specific tasks before resume.
+  virtual void WillResume(lldb::StateType resume_state) {}
+
+  // This clears generic thread state after a resume.  If you subclass this,
+  // be sure to call it.
+  virtual void DidResume();
+
+  // This notifies the thread when a private stop occurs.
+  virtual void DidStop();
+
+  virtual void RefreshStateAfterStop() = 0;
+
+  void WillStop();
+
+  bool ShouldStop(Event *event_ptr);
+
+  Vote ShouldReportStop(Event *event_ptr);
+
+  Vote ShouldReportRun(Event *event_ptr);
+
+  void Flush();
+
+  // Return whether this thread matches the specification in ThreadSpec.  This
+  // is a virtual
+  // method because at some point we may extend the thread spec with a platform
+  // specific
+  // dictionary of attributes, which then only the platform specific Thread
+  // implementation
+  // would know how to match.  For now, this just calls through to the
+  // ThreadSpec's
+  // ThreadPassesBasicTests method.
+  virtual bool MatchesSpec(const ThreadSpec *spec);
+
+  lldb::StopInfoSP GetStopInfo();
+
+  lldb::StopReason GetStopReason();
+
+  bool StopInfoIsUpToDate() const;
+
+  // This sets the stop reason to a "blank" stop reason, so you can call
+  // functions on the thread
+  // without having the called function run with whatever stop reason you
+  // stopped with.
+  void SetStopInfoToNothing();
+
+  bool ThreadStoppedForAReason();
+
+  static const char *RunModeAsCString(lldb::RunMode mode);
+
+  static const char *StopReasonAsCString(lldb::StopReason reason);
+
+  virtual const char *GetInfo() { return nullptr; }
+
+  //------------------------------------------------------------------
+  /// Retrieve a dictionary of information about this thread
+  ///
+  /// On Mac OS X systems there may be voucher information.
+  /// The top level dictionary returned will have an "activity" key and the
+  /// value of the activity is a dictionary.  Keys in that dictionary will
+  /// be "name" and "id", among others.
+  /// There may also be "trace_messages" (an array) with each entry in that
+  /// array
+  /// being a dictionary (keys include "message" with the text of the trace
+  /// message).
+  //------------------------------------------------------------------
+  StructuredData::ObjectSP GetExtendedInfo() {
+    if (m_extended_info_fetched == false) {
+      m_extended_info = FetchThreadExtendedInfo();
+      m_extended_info_fetched = true;
+    }
+    return m_extended_info;
+  }
+
+  virtual const char *GetName() { return nullptr; }
+
+  virtual void SetName(const char *name) {}
+
+  //------------------------------------------------------------------
+  /// Whether this thread can be associated with a libdispatch queue
+  ///
+  /// The Thread may know if it is associated with a libdispatch queue,
+  /// it may know definitively that it is NOT associated with a libdispatch
+  /// queue, or it may be unknown whether it is associated with a libdispatch
+  /// queue.
+  ///
+  /// @return
+  ///     eLazyBoolNo if this thread is definitely not associated with a
+  ///     libdispatch queue (e.g. on a non-Darwin system where GCD aka
+  ///     libdispatch is not available).
+  ///
+  ///     eLazyBoolYes this thread is associated with a libdispatch queue.
+  ///
+  ///     eLazyBoolCalculate this thread may be associated with a libdispatch
+  ///     queue but the thread doesn't know one way or the other.
+  //------------------------------------------------------------------
+  virtual lldb_private::LazyBool GetAssociatedWithLibdispatchQueue() {
+    return eLazyBoolNo;
+  }
+
+  virtual void SetAssociatedWithLibdispatchQueue(
+      lldb_private::LazyBool associated_with_libdispatch_queue) {}
+
+  //------------------------------------------------------------------
+  /// Retrieve the Queue ID for the queue currently using this Thread
+  ///
+  /// If this Thread is doing work on behalf of a libdispatch/GCD queue,
+  /// retrieve the QueueID.
+  ///
+  /// This is a unique identifier for the libdispatch/GCD queue in a
+  /// process.  Often starting at 1 for the initial system-created
+  /// queues and incrementing, a QueueID will not be reused for a
+  /// different queue during the lifetime of a process.
+  ///
+  /// @return
+  ///     A QueueID if the Thread subclass implements this, else
+  ///     LLDB_INVALID_QUEUE_ID.
+  //------------------------------------------------------------------
+  virtual lldb::queue_id_t GetQueueID() { return LLDB_INVALID_QUEUE_ID; }
+
+  virtual void SetQueueID(lldb::queue_id_t new_val) {}
+
+  //------------------------------------------------------------------
+  /// Retrieve the Queue name for the queue currently using this Thread
+  ///
+  /// If this Thread is doing work on behalf of a libdispatch/GCD queue,
+  /// retrieve the Queue name.
+  ///
+  /// @return
+  ///     The Queue name, if the Thread subclass implements this, else
+  ///     nullptr.
+  //------------------------------------------------------------------
+  virtual const char *GetQueueName() { return nullptr; }
+
+  virtual void SetQueueName(const char *name) {}
+
+  //------------------------------------------------------------------
+  /// Retrieve the Queue kind for the queue currently using this Thread
+  ///
+  /// If this Thread is doing work on behalf of a libdispatch/GCD queue,
+  /// retrieve the Queue kind - either eQueueKindSerial or
+  /// eQueueKindConcurrent, indicating that this queue processes work
+  /// items serially or concurrently.
+  ///
+  /// @return
+  ///     The Queue kind, if the Thread subclass implements this, else
+  ///     eQueueKindUnknown.
+  //------------------------------------------------------------------
+  virtual lldb::QueueKind GetQueueKind() { return lldb::eQueueKindUnknown; }
+
+  virtual void SetQueueKind(lldb::QueueKind kind) {}
+
+  //------------------------------------------------------------------
+  /// Retrieve the Queue for this thread, if any.
+  ///
+  /// @return
+  ///     A QueueSP for the queue that is currently associated with this
+  ///     thread.
+  ///     An empty shared pointer indicates that this thread is not
+  ///     associated with a queue, or libdispatch queues are not
+  ///     supported on this target.
+  //------------------------------------------------------------------
+  virtual lldb::QueueSP GetQueue() { return lldb::QueueSP(); }
+
+  //------------------------------------------------------------------
+  /// Retrieve the address of the libdispatch_queue_t struct for queue
+  /// currently using this Thread
+  ///
+  /// If this Thread is doing work on behalf of a libdispatch/GCD queue,
+  /// retrieve the address of the libdispatch_queue_t structure describing
+  /// the queue.
+  ///
+  /// This address may be reused for different queues later in the Process
+  /// lifetime and should not be used to identify a queue uniquely.  Use
+  /// the GetQueueID() call for that.
+  ///
+  /// @return
+  ///     The Queue's libdispatch_queue_t address if the Thread subclass
+  ///     implements this, else LLDB_INVALID_ADDRESS.
+  //------------------------------------------------------------------
+  virtual lldb::addr_t GetQueueLibdispatchQueueAddress() {
+    return LLDB_INVALID_ADDRESS;
+  }
+
+  virtual void SetQueueLibdispatchQueueAddress(lldb::addr_t dispatch_queue_t) {}
+
+  //------------------------------------------------------------------
+  /// Whether this Thread already has all the Queue information cached or not
+  ///
+  /// A Thread may be associated with a libdispatch work Queue at a given
+  /// public stop event.  If so, the thread can satisify requests like
+  /// GetQueueLibdispatchQueueAddress, GetQueueKind, GetQueueName, and
+  /// GetQueueID
+  /// either from information from the remote debug stub when it is initially
+  /// created, or it can query the SystemRuntime for that information.
+  ///
+  /// This method allows the SystemRuntime to discover if a thread has this
+  /// information already, instead of calling the thread to get the information
+  /// and having the thread call the SystemRuntime again.
+  //------------------------------------------------------------------
+  virtual bool ThreadHasQueueInformation() const { return false; }
+
+  virtual uint32_t GetStackFrameCount() {
+    return GetStackFrameList()->GetNumFrames();
+  }
+
+  virtual lldb::StackFrameSP GetStackFrameAtIndex(uint32_t idx) {
+    return GetStackFrameList()->GetFrameAtIndex(idx);
+  }
+
+  virtual lldb::StackFrameSP
+  GetFrameWithConcreteFrameIndex(uint32_t unwind_idx);
+
+  bool DecrementCurrentInlinedDepth() {
+    return GetStackFrameList()->DecrementCurrentInlinedDepth();
+  }
+
+  uint32_t GetCurrentInlinedDepth() {
+    return GetStackFrameList()->GetCurrentInlinedDepth();
+  }
+
+  Error ReturnFromFrameWithIndex(uint32_t frame_idx,
+                                 lldb::ValueObjectSP return_value_sp,
+                                 bool broadcast = false);
+
+  Error ReturnFromFrame(lldb::StackFrameSP frame_sp,
+                        lldb::ValueObjectSP return_value_sp,
+                        bool broadcast = false);
+
+  Error JumpToLine(const FileSpec &file, uint32_t line, bool can_leave_function,
+                   std::string *warnings = nullptr);
+
+  virtual lldb::StackFrameSP GetFrameWithStackID(const StackID &stack_id) {
+    if (stack_id.IsValid())
+      return GetStackFrameList()->GetFrameWithStackID(stack_id);
+    return lldb::StackFrameSP();
+  }
+
+  uint32_t GetSelectedFrameIndex() {
+    return GetStackFrameList()->GetSelectedFrameIndex();
+  }
+
+  lldb::StackFrameSP GetSelectedFrame();
+
+  uint32_t SetSelectedFrame(lldb_private::StackFrame *frame,
+                            bool broadcast = false);
+
+  bool SetSelectedFrameByIndex(uint32_t frame_idx, bool broadcast = false);
+
+  bool SetSelectedFrameByIndexNoisily(uint32_t frame_idx,
+                                      Stream &output_stream);
+
+  void SetDefaultFileAndLineToSelectedFrame() {
+    GetStackFrameList()->SetDefaultFileAndLineToSelectedFrame();
+  }
+
+  virtual lldb::RegisterContextSP GetRegisterContext() = 0;
+
+  virtual lldb::RegisterContextSP
+  CreateRegisterContextForFrame(StackFrame *frame) = 0;
+
+  virtual void ClearStackFrames();
+
+  virtual bool SetBackingThread(const lldb::ThreadSP &thread_sp) {
+    return false;
+  }
+
+  virtual lldb::ThreadSP GetBackingThread() const { return lldb::ThreadSP(); }
+
+  virtual void ClearBackingThread() {
+    // Subclasses can use this function if a thread is actually backed by
+    // another thread. This is currently used for the OperatingSystem plug-ins
+    // where they might have a thread that is in memory, yet its registers
+    // are available through the lldb_private::Thread subclass for the current
+    // lldb_private::Process class. Since each time the process stops the
+    // backing
+    // threads for memory threads can change, we need a way to clear the backing
+    // thread for all memory threads each time we stop.
+  }
+
+  void DumpUsingSettingsFormat(Stream &strm, uint32_t frame_idx);
+
+  bool GetDescription(Stream &s, lldb::DescriptionLevel level,
+                      bool print_json_thread, bool print_json_stopinfo);
+
+  //------------------------------------------------------------------
+  /// Default implementation for stepping into.
+  ///
+  /// This function is designed to be used by commands where the
+  /// process is publicly stopped.
+  ///
+  /// @param[in] source_step
+  ///     If true and the frame has debug info, then do a source level
+  ///     step in, else do a single instruction step in.
+  ///
+  /// @param[in] step_in_avoids_code_without_debug_info
+  ///     If \a true, then avoid stepping into code that doesn't have
+  ///     debug info, else step into any code regardless of whether it
+  ///     has debug info.
+  ///
+  /// @param[in] step_out_avoids_code_without_debug_info
+  ///     If \a true, then if you step out to code with no debug info, keep
+  ///     stepping out till you get to code with debug info.
+  ///
+  /// @return
+  ///     An error that describes anything that went wrong
+  //------------------------------------------------------------------
+  virtual Error
+  StepIn(bool source_step,
+         LazyBool step_in_avoids_code_without_debug_info = eLazyBoolCalculate,
+         LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
+
+  //------------------------------------------------------------------
+  /// Default implementation for stepping over.
+  ///
+  /// This function is designed to be used by commands where the
+  /// process is publicly stopped.
+  ///
+  /// @param[in] source_step
+  ///     If true and the frame has debug info, then do a source level
+  ///     step over, else do a single instruction step over.
+  ///
+  /// @return
+  ///     An error that describes anything that went wrong
+  //------------------------------------------------------------------
+  virtual Error StepOver(
+      bool source_step,
+      LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
+
+  //------------------------------------------------------------------
+  /// Default implementation for stepping out.
+  ///
+  /// This function is designed to be used by commands where the
+  /// process is publicly stopped.
+  ///
+  /// @return
+  ///     An error that describes anything that went wrong
+  //------------------------------------------------------------------
+  virtual Error StepOut();
+
+  //------------------------------------------------------------------
+  /// Retrieves the per-thread data area.
+  /// Most OSs maintain a per-thread pointer (e.g. the FS register on
+  /// x64), which we return the value of here.
+  ///
+  /// @return
+  ///     LLDB_INVALID_ADDRESS if not supported, otherwise the thread
+  ///     pointer value.
+  //------------------------------------------------------------------
+  virtual lldb::addr_t GetThreadPointer();
+
+  //------------------------------------------------------------------
+  /// Retrieves the per-module TLS block for a thread.
+  ///
+  /// @param[in] module
+  ///     The module to query TLS data for.
+  ///
+  /// @param[in] tls_file_addr
+  ///     The thread local address in module
+  /// @return
+  ///     If the thread has TLS data allocated for the
+  ///     module, the address of the TLS block. Otherwise
+  ///     LLDB_INVALID_ADDRESS is returned.
+  //------------------------------------------------------------------
+  virtual lldb::addr_t GetThreadLocalData(const lldb::ModuleSP module,
+                                          lldb::addr_t tls_file_addr);
+
+  //------------------------------------------------------------------
+  /// Check whether this thread is safe to run functions
+  ///
+  /// The SystemRuntime may know of certain thread states (functions in
+  /// process of execution, for instance) which can make it unsafe for
+  /// functions to be called.
+  ///
+  /// @return
+  ///     True if it is safe to call functions on this thread.
+  ///     False if function calls should be avoided on this thread.
+  //------------------------------------------------------------------
+  virtual bool SafeToCallFunctions();
+
+  //------------------------------------------------------------------
+  // Thread Plan Providers:
+  // This section provides the basic thread plans that the Process control
+  // machinery uses to run the target.  ThreadPlan.h provides more details on
+  // how this mechanism works.
+  // The thread provides accessors to a set of plans that perform basic
+  // operations.
+  // The idea is that particular Platform plugins can override these methods to
+  // provide the implementation of these basic operations appropriate to their
+  // environment.
+  //
+  // NB: All the QueueThreadPlanXXX providers return Shared Pointers to
+  // Thread plans.  This is useful so that you can modify the plans after
+  // creation in ways specific to that plan type.  Also, it is often necessary
+  // for
+  // ThreadPlans that utilize other ThreadPlans to implement their task to keep
+  // a shared
+  // pointer to the sub-plan.
+  // But besides that, the shared pointers should only be held onto by entities
+  // who live no longer
+  // than the thread containing the ThreadPlan.
+  // FIXME: If this becomes a problem, we can make a version that just returns a
+  // pointer,
+  // which it is clearly unsafe to hold onto, and a shared pointer version, and
+  // only allow
+  // ThreadPlan and Co. to use the latter.  That is made more annoying to do
+  // because there's
+  // no elegant way to friend a method to all sub-classes of a given class.
+  //
+  //------------------------------------------------------------------
+
+  //------------------------------------------------------------------
+  /// Queues the base plan for a thread.
+  /// The version returned by Process does some things that are useful,
+  /// like handle breakpoints and signals, so if you return a plugin specific
+  /// one you probably want to call through to the Process one for anything
+  /// your plugin doesn't explicitly handle.
+  ///
+  /// @param[in] abort_other_plans
+  ///    \b true if we discard the currently queued plans and replace them with
+  ///    this one.
+  ///    Otherwise this plan will go on the end of the plan stack.
+  ///
+  /// @return
+  ///     A shared pointer to the newly queued thread plan, or nullptr if the
+  ///     plan could not be queued.
+  //------------------------------------------------------------------
+  virtual lldb::ThreadPlanSP QueueFundamentalPlan(bool abort_other_plans);
+
+  //------------------------------------------------------------------
+  /// Queues the plan used to step one instruction from the current PC of \a
+  /// thread.
+  ///
+  /// @param[in] step_over
+  ///    \b true if we step over calls to functions, false if we step in.
+  ///
+  /// @param[in] abort_other_plans
+  ///    \b true if we discard the currently queued plans and replace them with
+  ///    this one.
+  ///    Otherwise this plan will go on the end of the plan stack.
+  ///
+  /// @param[in] stop_other_threads
+  ///    \b true if we will stop other threads while we single step this one.
+  ///
+  /// @return
+  ///     A shared pointer to the newly queued thread plan, or nullptr if the
+  ///     plan could not be queued.
+  //------------------------------------------------------------------
+  virtual lldb::ThreadPlanSP QueueThreadPlanForStepSingleInstruction(
+      bool step_over, bool abort_other_plans, bool stop_other_threads);
+
+  //------------------------------------------------------------------
+  /// Queues the plan used to step through an address range, stepping  over
+  /// function calls.
+  ///
+  /// @param[in] abort_other_plans
+  ///    \b true if we discard the currently queued plans and replace them with
+  ///    this one.
+  ///    Otherwise this plan will go on the end of the plan stack.
+  ///
+  /// @param[in] type
+  ///    Type of step to do, only eStepTypeInto and eStepTypeOver are supported
+  ///    by this plan.
+  ///
+  /// @param[in] range
+  ///    The address range to step through.
+  ///
+  /// @param[in] addr_context
+  ///    When dealing with stepping through inlined functions the current PC is
+  ///    not enough information to know
+  ///    what "step" means.  For instance a series of nested inline functions
+  ///    might start at the same address.
+  //     The \a addr_context provides the current symbol context the step
+  ///    is supposed to be out of.
+  //   FIXME: Currently unused.
+  ///
+  /// @param[in] stop_other_threads
+  ///    \b true if we will stop other threads while we single step this one.
+  ///
+  /// @param[in] step_out_avoids_code_without_debug_info
+  ///    If eLazyBoolYes, if the step over steps out it will continue to step
+  ///    out till it comes to a frame with debug info.
+  ///    If eLazyBoolCalculate, we will consult the default set in the thread.
+  ///
+  /// @return
+  ///     A shared pointer to the newly queued thread plan, or nullptr if the
+  ///     plan could not be queued.
+  //------------------------------------------------------------------
+  virtual lldb::ThreadPlanSP QueueThreadPlanForStepOverRange(
+      bool abort_other_plans, const AddressRange &range,
+      const SymbolContext &addr_context, lldb::RunMode stop_other_threads,
+      LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
+
+  // Helper function that takes a LineEntry to step, insted of an AddressRange.
+  // This may combine multiple
+  // LineEntries of the same source line number to step over a longer address
+  // range in a single operation.
+  virtual lldb::ThreadPlanSP QueueThreadPlanForStepOverRange(
+      bool abort_other_plans, const LineEntry &line_entry,
+      const SymbolContext &addr_context, lldb::RunMode stop_other_threads,
+      LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
+
+  //------------------------------------------------------------------
+  /// Queues the plan used to step through an address range, stepping into
+  /// functions.
+  ///
+  /// @param[in] abort_other_plans
+  ///    \b true if we discard the currently queued plans and replace them with
+  ///    this one.
+  ///    Otherwise this plan will go on the end of the plan stack.
+  ///
+  /// @param[in] type
+  ///    Type of step to do, only eStepTypeInto and eStepTypeOver are supported
+  ///    by this plan.
+  ///
+  /// @param[in] range
+  ///    The address range to step through.
+  ///
+  /// @param[in] addr_context
+  ///    When dealing with stepping through inlined functions the current PC is
+  ///    not enough information to know
+  ///    what "step" means.  For instance a series of nested inline functions
+  ///    might start at the same address.
+  //     The \a addr_context provides the current symbol context the step
+  ///    is supposed to be out of.
+  //   FIXME: Currently unused.
+  ///
+  /// @param[in] step_in_target
+  ///    Name if function we are trying to step into.  We will step out if we
+  ///    don't land in that function.
+  ///
+  /// @param[in] stop_other_threads
+  ///    \b true if we will stop other threads while we single step this one.
+  ///
+  /// @param[in] step_in_avoids_code_without_debug_info
+  ///    If eLazyBoolYes we will step out if we step into code with no debug
+  ///    info.
+  ///    If eLazyBoolCalculate we will consult the default set in the thread.
+  ///
+  /// @param[in] step_out_avoids_code_without_debug_info
+  ///    If eLazyBoolYes, if the step over steps out it will continue to step
+  ///    out till it comes to a frame with debug info.
+  ///    If eLazyBoolCalculate, it will consult the default set in the thread.
+  ///
+  /// @return
+  ///     A shared pointer to the newly queued thread plan, or nullptr if the
+  ///     plan could not be queued.
+  //------------------------------------------------------------------
+  virtual lldb::ThreadPlanSP QueueThreadPlanForStepInRange(
+      bool abort_other_plans, const AddressRange &range,
+      const SymbolContext &addr_context, const char *step_in_target,
+      lldb::RunMode stop_other_threads,
+      LazyBool step_in_avoids_code_without_debug_info = eLazyBoolCalculate,
+      LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
+
+  // Helper function that takes a LineEntry to step, insted of an AddressRange.
+  // This may combine multiple
+  // LineEntries of the same source line number to step over a longer address
+  // range in a single operation.
+  virtual lldb::ThreadPlanSP QueueThreadPlanForStepInRange(
+      bool abort_other_plans, const LineEntry &line_entry,
+      const SymbolContext &addr_context, const char *step_in_target,
+      lldb::RunMode stop_other_threads,
+      LazyBool step_in_avoids_code_without_debug_info = eLazyBoolCalculate,
+      LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
+
+  //------------------------------------------------------------------
+  /// Queue the plan used to step out of the function at the current PC of
+  /// \a thread.
+  ///
+  /// @param[in] abort_other_plans
+  ///    \b true if we discard the currently queued plans and replace them with
+  ///    this one.
+  ///    Otherwise this plan will go on the end of the plan stack.
+  ///
+  /// @param[in] addr_context
+  ///    When dealing with stepping through inlined functions the current PC is
+  ///    not enough information to know
+  ///    what "step" means.  For instance a series of nested inline functions
+  ///    might start at the same address.
+  //     The \a addr_context provides the current symbol context the step
+  ///    is supposed to be out of.
+  //   FIXME: Currently unused.
+  ///
+  /// @param[in] first_insn
+  ///     \b true if this is the first instruction of a function.
+  ///
+  /// @param[in] stop_other_threads
+  ///    \b true if we will stop other threads while we single step this one.
+  ///
+  /// @param[in] stop_vote
+  /// @param[in] run_vote
+  ///    See standard meanings for the stop & run votes in ThreadPlan.h.
+  ///
+  /// @param[in] step_out_avoids_code_without_debug_info
+  ///    If eLazyBoolYes, if the step over steps out it will continue to step
+  ///    out till it comes to a frame with debug info.
+  ///    If eLazyBoolCalculate, it will consult the default set in the thread.
+  ///
+  /// @return
+  ///     A shared pointer to the newly queued thread plan, or nullptr if the
+  ///     plan could not be queued.
+  //------------------------------------------------------------------
+  virtual lldb::ThreadPlanSP QueueThreadPlanForStepOut(
+      bool abort_other_plans, SymbolContext *addr_context, bool first_insn,
+      bool stop_other_threads,
+      Vote stop_vote, // = eVoteYes,
+      Vote run_vote,  // = eVoteNoOpinion);
+      uint32_t frame_idx,
+      LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
+
+  //------------------------------------------------------------------
+  /// Queue the plan used to step out of the function at the current PC of
+  /// a thread.  This version does not consult the should stop here callback,
+  /// and should only
+  /// be used by other thread plans when they need to retain control of the step
+  /// out.
+  ///
+  /// @param[in] abort_other_plans
+  ///    \b true if we discard the currently queued plans and replace them with
+  ///    this one.
+  ///    Otherwise this plan will go on the end of the plan stack.
+  ///
+  /// @param[in] addr_context
+  ///    When dealing with stepping through inlined functions the current PC is
+  ///    not enough information to know
+  ///    what "step" means.  For instance a series of nested inline functions
+  ///    might start at the same address.
+  //     The \a addr_context provides the current symbol context the step
+  ///    is supposed to be out of.
+  //   FIXME: Currently unused.
+  ///
+  /// @param[in] first_insn
+  ///     \b true if this is the first instruction of a function.
+  ///
+  /// @param[in] stop_other_threads
+  ///    \b true if we will stop other threads while we single step this one.
+  ///
+  /// @param[in] stop_vote
+  /// @param[in] run_vote
+  ///    See standard meanings for the stop & run votes in ThreadPlan.h.
+  ///
+  /// @param[in] continue_to_next_branch
+  ///    Normally this will enqueue a plan that will put a breakpoint on the
+  ///    return address and continue
+  ///    to there.  If continue_to_next_branch is true, this is an operation not
+  ///    involving the user --
+  ///    e.g. stepping "next" in a source line and we instruction stepped into
+  ///    another function --
+  ///    so instead of putting a breakpoint on the return address, advance the
+  ///    breakpoint to the
+  ///    end of the source line that is doing the call, or until the next flow
+  ///    control instruction.
+  ///    If the return value from the function call is to be retrieved /
+  ///    displayed to the user, you must stop
+  ///    on the return address.  The return value may be stored in volatile
+  ///    registers which are overwritten
+  ///    before the next branch instruction.
+  ///
+  /// @return
+  ///     A shared pointer to the newly queued thread plan, or nullptr if the
+  ///     plan could not be queued.
+  //------------------------------------------------------------------
+  virtual lldb::ThreadPlanSP QueueThreadPlanForStepOutNoShouldStop(
+      bool abort_other_plans, SymbolContext *addr_context, bool first_insn,
+      bool stop_other_threads,
+      Vote stop_vote, // = eVoteYes,
+      Vote run_vote,  // = eVoteNoOpinion);
+      uint32_t frame_idx, bool continue_to_next_branch = false);
+
+  //------------------------------------------------------------------
+  /// Gets the plan used to step through the code that steps from a function
+  /// call site at the current PC into the actual function call.
+  ///
+  ///
+  /// @param[in] return_stack_id
+  ///    The stack id that we will return to (by setting backstop breakpoints on
+  ///    the return
+  ///    address to that frame) if we fail to step through.
+  ///
+  /// @param[in] abort_other_plans
+  ///    \b true if we discard the currently queued plans and replace them with
+  ///    this one.
+  ///    Otherwise this plan will go on the end of the plan stack.
+  ///
+  /// @param[in] stop_other_threads
+  ///    \b true if we will stop other threads while we single step this one.
+  ///
+  /// @return
+  ///     A shared pointer to the newly queued thread plan, or nullptr if the
+  ///     plan could not be queued.
+  //------------------------------------------------------------------
+  virtual lldb::ThreadPlanSP
+  QueueThreadPlanForStepThrough(StackID &return_stack_id,
+                                bool abort_other_plans,
+                                bool stop_other_threads);
+
+  //------------------------------------------------------------------
+  /// Gets the plan used to continue from the current PC.
+  /// This is a simple plan, mostly useful as a backstop when you are continuing
+  /// for some particular purpose.
+  ///
+  /// @param[in] abort_other_plans
+  ///    \b true if we discard the currently queued plans and replace them with
+  ///    this one.
+  ///    Otherwise this plan will go on the end of the plan stack.
+  ///
+  /// @param[in] target_addr
+  ///    The address to which we're running.
+  ///
+  /// @param[in] stop_other_threads
+  ///    \b true if we will stop other threads while we single step this one.
+  ///
+  /// @return
+  ///     A shared pointer to the newly queued thread plan, or nullptr if the
+  ///     plan could not be queued.
+  //------------------------------------------------------------------
+  virtual lldb::ThreadPlanSP
+  QueueThreadPlanForRunToAddress(bool abort_other_plans, Address &target_addr,
+                                 bool stop_other_threads);
+
+  virtual lldb::ThreadPlanSP
+  QueueThreadPlanForStepUntil(bool abort_other_plans,
+                              lldb::addr_t *address_list, size_t num_addresses,
+                              bool stop_others, uint32_t frame_idx);
+
+  virtual lldb::ThreadPlanSP
+  QueueThreadPlanForStepScripted(bool abort_other_plans, const char *class_name,
+                                 bool stop_other_threads);
+
+  //------------------------------------------------------------------
+  // Thread Plan accessors:
+  //------------------------------------------------------------------
+
+  //------------------------------------------------------------------
+  /// Gets the plan which will execute next on the plan stack.
+  ///
+  /// @return
+  ///     A pointer to the next executed plan.
+  //------------------------------------------------------------------
+  ThreadPlan *GetCurrentPlan();
+
+  //------------------------------------------------------------------
+  /// Unwinds the thread stack for the innermost expression plan currently
+  /// on the thread plan stack.
+  ///
+  /// @return
+  ///     An error if the thread plan could not be unwound.
+  //------------------------------------------------------------------
+
+  Error UnwindInnermostExpression();
+
+  //------------------------------------------------------------------
+  /// Gets the outer-most plan that was popped off the plan stack in the
+  /// most recent stop.  Useful for printing the stop reason accurately.
+  ///
+  /// @return
+  ///     A pointer to the last completed plan.
+  //------------------------------------------------------------------
+  lldb::ThreadPlanSP GetCompletedPlan();
+
+  //------------------------------------------------------------------
+  /// Gets the outer-most return value from the completed plans
+  ///
+  /// @return
+  ///     A ValueObjectSP, either empty if there is no return value,
+  ///     or containing the return value.
+  //------------------------------------------------------------------
+  lldb::ValueObjectSP GetReturnValueObject();
+
+  //------------------------------------------------------------------
+  /// Gets the outer-most expression variable from the completed plans
+  ///
+  /// @return
+  ///     A ExpressionVariableSP, either empty if there is no
+  ///     plan completed an expression during the current stop
+  ///     or the expression variable that was made for the completed expression.
+  //------------------------------------------------------------------
+  lldb::ExpressionVariableSP GetExpressionVariable();
+
+  //------------------------------------------------------------------
+  ///  Checks whether the given plan is in the completed plans for this
+  ///  stop.
+  ///
+  /// @param[in] plan
+  ///     Pointer to the plan you're checking.
+  ///
+  /// @return
+  ///     Returns true if the input plan is in the completed plan stack,
+  ///     false otherwise.
+  //------------------------------------------------------------------
+  bool IsThreadPlanDone(ThreadPlan *plan);
+
+  //------------------------------------------------------------------
+  ///  Checks whether the given plan is in the discarded plans for this
+  ///  stop.
+  ///
+  /// @param[in] plan
+  ///     Pointer to the plan you're checking.
+  ///
+  /// @return
+  ///     Returns true if the input plan is in the discarded plan stack,
+  ///     false otherwise.
+  //------------------------------------------------------------------
+  bool WasThreadPlanDiscarded(ThreadPlan *plan);
+
+  //------------------------------------------------------------------
+  /// Queues a generic thread plan.
+  ///
+  /// @param[in] plan_sp
+  ///    The plan to queue.
+  ///
+  /// @param[in] abort_other_plans
+  ///    \b true if we discard the currently queued plans and replace them with
+  ///    this one.
+  ///    Otherwise this plan will go on the end of the plan stack.
+  ///
+  /// @return
+  ///     A pointer to the last completed plan.
+  //------------------------------------------------------------------
+  void QueueThreadPlan(lldb::ThreadPlanSP &plan_sp, bool abort_other_plans);
+
+  //------------------------------------------------------------------
+  /// Discards the plans queued on the plan stack of the current thread.  This
+  /// is
+  /// arbitrated by the "Master" ThreadPlans, using the "OkayToDiscard" call.
+  //  But if \a force is true, all thread plans are discarded.
+  //------------------------------------------------------------------
+  void DiscardThreadPlans(bool force);
+
+  //------------------------------------------------------------------
+  /// Discards the plans queued on the plan stack of the current thread up to
+  /// and
+  /// including up_to_plan_sp.
+  //
+  // @param[in] up_to_plan_sp
+  //   Discard all plans up to and including this one.
+  //------------------------------------------------------------------
+  void DiscardThreadPlansUpToPlan(lldb::ThreadPlanSP &up_to_plan_sp);
+
+  void DiscardThreadPlansUpToPlan(ThreadPlan *up_to_plan_ptr);
+
+  //------------------------------------------------------------------
+  /// Discards the plans queued on the plan stack of the current thread up to
+  /// and
+  /// including the plan in that matches \a thread_index counting only
+  /// the non-Private plans.
+  ///
+  /// @param[in] up_to_plan_sp
+  ///   Discard all plans up to and including this user plan given by this
+  ///   index.
+  ///
+  /// @return
+  ///    \b true if there was a thread plan with that user index, \b false
+  ///    otherwise.
+  //------------------------------------------------------------------
+  bool DiscardUserThreadPlansUpToIndex(uint32_t thread_index);
+
+  //------------------------------------------------------------------
+  /// Prints the current plan stack.
+  ///
+  /// @param[in] s
+  ///    The stream to which to dump the plan stack info.
+  ///
+  //------------------------------------------------------------------
+  void DumpThreadPlans(
+      Stream *s,
+      lldb::DescriptionLevel desc_level = lldb::eDescriptionLevelVerbose,
+      bool include_internal = true, bool ignore_boring = false) const;
+
+  virtual bool CheckpointThreadState(ThreadStateCheckpoint &saved_state);
+
+  virtual bool
+  RestoreRegisterStateFromCheckpoint(ThreadStateCheckpoint &saved_state);
+
+  virtual bool
+  RestoreThreadStateFromCheckpoint(ThreadStateCheckpoint &saved_state);
+
+  void EnableTracer(bool value, bool single_step);
+
+  void SetTracer(lldb::ThreadPlanTracerSP &tracer_sp);
+
+  //------------------------------------------------------------------
+  // Get the thread index ID. The index ID that is guaranteed to not
+  // be re-used by a process. They start at 1 and increase with each
+  // new thread. This allows easy command line access by a unique ID
+  // that is easier to type than the actual system thread ID.
+  //------------------------------------------------------------------
+  uint32_t GetIndexID() const;
+
+  //------------------------------------------------------------------
+  // Get the originating thread's index ID.
+  // In the case of an "extended" thread -- a thread which represents
+  // the stack that enqueued/spawned work that is currently executing --
+  // we need to provide the IndexID of the thread that actually did
+  // this work.  We don't want to just masquerade as that thread's IndexID
+  // by using it in our own IndexID because that way leads to madness -
+  // but the driver program which is iterating over extended threads
+  // may ask for the OriginatingThreadID to display that information
+  // to the user.
+  // Normal threads will return the same thing as GetIndexID();
+  //------------------------------------------------------------------
+  virtual uint32_t GetExtendedBacktraceOriginatingIndexID() {
+    return GetIndexID();
+  }
+
+  //------------------------------------------------------------------
+  // The API ID is often the same as the Thread::GetID(), but not in
+  // all cases. Thread::GetID() is the user visible thread ID that
+  // clients would want to see. The API thread ID is the thread ID
+  // that is used when sending data to/from the debugging protocol.
+  //------------------------------------------------------------------
+  virtual lldb::user_id_t GetProtocolID() const { return GetID(); }
+
+  //------------------------------------------------------------------
+  // lldb::ExecutionContextScope pure virtual functions
+  //------------------------------------------------------------------
+  lldb::TargetSP CalculateTarget() override;
+
+  lldb::ProcessSP CalculateProcess() override;
+
+  lldb::ThreadSP CalculateThread() override;
+
+  lldb::StackFrameSP CalculateStackFrame() override;
+
+  void CalculateExecutionContext(ExecutionContext &exe_ctx) override;
+
+  lldb::StackFrameSP
+  GetStackFrameSPForStackFramePtr(StackFrame *stack_frame_ptr);
+
+  size_t GetStatus(Stream &strm, uint32_t start_frame, uint32_t num_frames,
+                   uint32_t num_frames_with_source);
+
+  size_t GetStackFrameStatus(Stream &strm, uint32_t first_frame,
+                             uint32_t num_frames, bool show_frame_info,
+                             uint32_t num_frames_with_source);
+
+  // We need a way to verify that even though we have a thread in a shared
+  // pointer that the object itself is still valid. Currently this won't be
+  // the case if DestroyThread() was called. DestroyThread is called when
+  // a thread has been removed from the Process' thread list.
+  bool IsValid() const { return !m_destroy_called; }
+
+  // Sets and returns a valid stop info based on the process stop ID and the
+  // current thread plan. If the thread stop ID does not match the process'
+  // stop ID, the private stop reason is not set and an invalid StopInfoSP may
+  // be returned.
+  //
+  // NOTE: This function must be called before the current thread plan is
+  // moved to the completed plan stack (in Thread::ShouldStop()).
+  //
+  // NOTE: If subclasses override this function, ensure they do not overwrite
+  // the m_actual_stop_info if it is valid.  The stop info may be a
+  // "checkpointed and restored" stop info, so if it is still around it is
+  // right even if you have not calculated this yourself, or if it disagrees
+  // with what you might have calculated.
+  virtual lldb::StopInfoSP GetPrivateStopInfo();
+
+  //----------------------------------------------------------------------
+  // Ask the thread subclass to set its stop info.
+  //
+  // Thread subclasses should call Thread::SetStopInfo(...) with the
+  // reason the thread stopped.
+  //
+  // @return
+  //      True if Thread::SetStopInfo(...) was called, false otherwise.
+  //----------------------------------------------------------------------
+  virtual bool CalculateStopInfo() = 0;
+
+  //----------------------------------------------------------------------
+  // Gets the temporary resume state for a thread.
+  //
+  // This value gets set in each thread by complex debugger logic in
+  // Thread::ShouldResume() and an appropriate thread resume state will get
+  // set in each thread every time the process is resumed prior to calling
+  // Process::DoResume(). The lldb_private::Process subclass should adhere
+  // to the thread resume state request which will be one of:
+  //
+  //  eStateRunning   - thread will resume when process is resumed
+  //  eStateStepping  - thread should step 1 instruction and stop when process
+  //                    is resumed
+  //  eStateSuspended - thread should not execute any instructions when
+  //                    process is resumed
+  //----------------------------------------------------------------------
+  lldb::StateType GetTemporaryResumeState() const {
+    return m_temporary_resume_state;
+  }
+
+  void SetStopInfo(const lldb::StopInfoSP &stop_info_sp);
+
+  void SetShouldReportStop(Vote vote);
+
+  //----------------------------------------------------------------------
+  /// Sets the extended backtrace token for this thread
+  ///
+  /// Some Thread subclasses may maintain a token to help with providing
+  /// an extended backtrace.  The SystemRuntime plugin will set/request this.
+  ///
+  /// @param [in] token
+  //----------------------------------------------------------------------
+  virtual void SetExtendedBacktraceToken(uint64_t token) {}
+
+  //----------------------------------------------------------------------
+  /// Gets the extended backtrace token for this thread
+  ///
+  /// Some Thread subclasses may maintain a token to help with providing
+  /// an extended backtrace.  The SystemRuntime plugin will set/request this.
+  ///
+  /// @return
+  ///     The token needed by the SystemRuntime to create an extended backtrace.
+  ///     LLDB_INVALID_ADDRESS is returned if no token is available.
+  //----------------------------------------------------------------------
+  virtual uint64_t GetExtendedBacktraceToken() { return LLDB_INVALID_ADDRESS; }
 
 protected:
-    friend class ThreadPlan;
-    friend class ThreadList;
-    friend class ThreadEventData;
-    friend class StackFrameList;
-    friend class StackFrame;
-    friend class OperatingSystem;
-    
-    // This is necessary to make sure thread assets get destroyed while the thread is still in good shape
-    // to call virtual thread methods.  This must be called by classes that derive from Thread in their destructor.
-    virtual void DestroyThread ();
-
-    void
-    PushPlan (lldb::ThreadPlanSP &plan_sp);
-
-    void
-    PopPlan ();
-
-    void
-    DiscardPlan ();
-
-    ThreadPlan *GetPreviousPlan (ThreadPlan *plan);
-
-    typedef std::vector<lldb::ThreadPlanSP> plan_stack;
-
-    virtual lldb_private::Unwind *
-    GetUnwinder ();
-
-    // Check to see whether the thread is still at the last breakpoint hit that stopped it.
-    virtual bool
-    IsStillAtLastBreakpointHit();
-
-    // Some threads are threads that are made up by OperatingSystem plugins that
-    // are threads that exist and are context switched out into memory. The
-    // OperatingSystem plug-in need a ways to know if a thread is "real" or made
-    // up.
-    virtual bool
-    IsOperatingSystemPluginThread () const
-    {
-        return false;
-    }
-    
-    // Subclasses that have a way to get an extended info dictionary for this thread should
-    // fill 
-    virtual lldb_private::StructuredData::ObjectSP
-    FetchThreadExtendedInfo ()
-    {
-        return StructuredData::ObjectSP();
-    }
+  friend class ThreadPlan;
+  friend class ThreadList;
+  friend class ThreadEventData;
+  friend class StackFrameList;
+  friend class StackFrame;
+  friend class OperatingSystem;
+
+  // This is necessary to make sure thread assets get destroyed while the thread
+  // is still in good shape
+  // to call virtual thread methods.  This must be called by classes that derive
+  // from Thread in their destructor.
+  virtual void DestroyThread();
+
+  void PushPlan(lldb::ThreadPlanSP &plan_sp);
+
+  void PopPlan();
+
+  void DiscardPlan();
+
+  ThreadPlan *GetPreviousPlan(ThreadPlan *plan);
+
+  typedef std::vector<lldb::ThreadPlanSP> plan_stack;
+
+  virtual lldb_private::Unwind *GetUnwinder();
+
+  // Check to see whether the thread is still at the last breakpoint hit that
+  // stopped it.
+  virtual bool IsStillAtLastBreakpointHit();
+
+  // Some threads are threads that are made up by OperatingSystem plugins that
+  // are threads that exist and are context switched out into memory. The
+  // OperatingSystem plug-in need a ways to know if a thread is "real" or made
+  // up.
+  virtual bool IsOperatingSystemPluginThread() const { return false; }
+
+  // Subclasses that have a way to get an extended info dictionary for this
+  // thread should
+  // fill
+  virtual lldb_private::StructuredData::ObjectSP FetchThreadExtendedInfo() {
+    return StructuredData::ObjectSP();
+  }
+
+  lldb::StackFrameListSP GetStackFrameList();
+
+  void SetTemporaryResumeState(lldb::StateType new_state) {
+    m_temporary_resume_state = new_state;
+  }
+
+  void FunctionOptimizationWarning(lldb_private::StackFrame *frame);
+
+  //------------------------------------------------------------------
+  // Classes that inherit from Process can see and modify these
+  //------------------------------------------------------------------
+  lldb::ProcessWP m_process_wp;    ///< The process that owns this thread.
+  lldb::StopInfoSP m_stop_info_sp; ///< The private stop reason for this thread
+  uint32_t m_stop_info_stop_id; // This is the stop id for which the StopInfo is
+                                // valid.  Can use this so you know that
+  // the thread's m_stop_info_sp is current and you don't have to fetch it again
+  uint32_t m_stop_info_override_stop_id; // The stop ID containing the last time
+                                         // the stop info was checked against
+                                         // the stop info override
+  const uint32_t m_index_id; ///< A unique 1 based index assigned to each thread
+                             ///for easy UI/command line access.
+  lldb::RegisterContextSP m_reg_context_sp; ///< The register context for this
+                                            ///thread's current register state.
+  lldb::StateType m_state;                  ///< The state of our process.
+  mutable std::recursive_mutex
+      m_state_mutex;       ///< Multithreaded protection for m_state.
+  plan_stack m_plan_stack; ///< The stack of plans this thread is executing.
+  plan_stack m_completed_plan_stack; ///< Plans that have been completed by this
+                                     ///stop.  They get deleted when the thread
+                                     ///resumes.
+  plan_stack m_discarded_plan_stack; ///< Plans that have been discarded by this
+                                     ///stop.  They get deleted when the thread
+                                     ///resumes.
+  mutable std::recursive_mutex
+      m_frame_mutex; ///< Multithreaded protection for m_state.
+  lldb::StackFrameListSP m_curr_frames_sp; ///< The stack frames that get lazily
+                                           ///populated after a thread stops.
+  lldb::StackFrameListSP m_prev_frames_sp; ///< The previous stack frames from
+                                           ///the last time this thread stopped.
+  int m_resume_signal; ///< The signal that should be used when continuing this
+                       ///thread.
+  lldb::StateType m_resume_state; ///< This state is used to force a thread to
+                                  ///be suspended from outside the ThreadPlan
+                                  ///logic.
+  lldb::StateType m_temporary_resume_state; ///< This state records what the
+                                            ///thread was told to do by the
+                                            ///thread plan logic for the current
+                                            ///resume.
+  /// It gets set in Thread::ShouldResume.
+  std::unique_ptr<lldb_private::Unwind> m_unwinder_ap;
+  bool m_destroy_called; // This is used internally to make sure derived Thread
+                         // classes call DestroyThread.
+  LazyBool m_override_should_notify;
 
-    lldb::StackFrameListSP
-    GetStackFrameList ();
-
-    void
-    SetTemporaryResumeState(lldb::StateType new_state)
-    {
-        m_temporary_resume_state = new_state;
-    }
-
-    void
-    FunctionOptimizationWarning (lldb_private::StackFrame *frame);
-
-    //------------------------------------------------------------------
-    // Classes that inherit from Process can see and modify these
-    //------------------------------------------------------------------
-    lldb::ProcessWP     m_process_wp;           ///< The process that owns this thread.
-    lldb::StopInfoSP    m_stop_info_sp;         ///< The private stop reason for this thread
-    uint32_t            m_stop_info_stop_id;    // This is the stop id for which the StopInfo is valid.  Can use this so you know that
-    // the thread's m_stop_info_sp is current and you don't have to fetch it again
-    uint32_t            m_stop_info_override_stop_id;    // The stop ID containing the last time the stop info was checked against the stop info override
-    const uint32_t      m_index_id;             ///< A unique 1 based index assigned to each thread for easy UI/command line access.
-    lldb::RegisterContextSP m_reg_context_sp;   ///< The register context for this thread's current register state.
-    lldb::StateType     m_state;                ///< The state of our process.
-    mutable std::recursive_mutex m_state_mutex; ///< Multithreaded protection for m_state.
-    plan_stack          m_plan_stack;           ///< The stack of plans this thread is executing.
-    plan_stack          m_completed_plan_stack; ///< Plans that have been completed by this stop.  They get deleted when the thread resumes.
-    plan_stack          m_discarded_plan_stack; ///< Plans that have been discarded by this stop.  They get deleted when the thread resumes.
-    mutable std::recursive_mutex m_frame_mutex; ///< Multithreaded protection for m_state.
-    lldb::StackFrameListSP m_curr_frames_sp;    ///< The stack frames that get lazily populated after a thread stops.
-    lldb::StackFrameListSP m_prev_frames_sp;    ///< The previous stack frames from the last time this thread stopped.
-    int                 m_resume_signal;        ///< The signal that should be used when continuing this thread.
-    lldb::StateType     m_resume_state;         ///< This state is used to force a thread to be suspended from outside the ThreadPlan logic.
-    lldb::StateType     m_temporary_resume_state; ///< This state records what the thread was told to do by the thread plan logic for the current resume.
-                                                  /// It gets set in Thread::ShouldResume.
-    std::unique_ptr<lldb_private::Unwind> m_unwinder_ap;
-    bool                m_destroy_called;       // This is used internally to make sure derived Thread classes call DestroyThread.
-    LazyBool            m_override_should_notify;
 private:
-    bool                m_extended_info_fetched;  // Have we tried to retrieve the m_extended_info for this thread?
-    StructuredData::ObjectSP m_extended_info;     // The extended info for this thread
+  bool m_extended_info_fetched; // Have we tried to retrieve the m_extended_info
+                                // for this thread?
+  StructuredData::ObjectSP m_extended_info; // The extended info for this thread
 
 private:
-    bool
-    PlanIsBasePlan (ThreadPlan *plan_ptr);
+  bool PlanIsBasePlan(ThreadPlan *plan_ptr);
+
+  void BroadcastSelectedFrameChange(StackID &new_frame_id);
 
-    void
-    BroadcastSelectedFrameChange(StackID &new_frame_id);
-    
-    DISALLOW_COPY_AND_ASSIGN (Thread);
+  DISALLOW_COPY_AND_ASSIGN(Thread);
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadCollection.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadCollection.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadCollection.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadCollection.h Tue Sep  6 15:57:50 2016
@@ -13,61 +13,48 @@
 #include <mutex>
 #include <vector>
 
-#include "lldb/lldb-private.h"
 #include "lldb/Utility/Iterable.h"
+#include "lldb/lldb-private.h"
 
 namespace lldb_private {
-    
-class ThreadCollection
-{
+
+class ThreadCollection {
 public:
-    typedef std::vector<lldb::ThreadSP> collection;
-    typedef LockingAdaptedIterable<collection, lldb::ThreadSP, vector_adapter, std::recursive_mutex> ThreadIterable;
+  typedef std::vector<lldb::ThreadSP> collection;
+  typedef LockingAdaptedIterable<collection, lldb::ThreadSP, vector_adapter,
+                                 std::recursive_mutex>
+      ThreadIterable;
+
+  ThreadCollection();
+
+  ThreadCollection(collection threads);
+
+  virtual ~ThreadCollection() {}
+
+  uint32_t GetSize();
 
-    ThreadCollection();
-    
-    ThreadCollection(collection threads);
-    
-    virtual
-    ~ThreadCollection()
-    {
-    }
-    
-    uint32_t
-    GetSize();
-    
-    void
-    AddThread (const lldb::ThreadSP &thread_sp);
-
-    void
-    AddThreadSortedByIndexID (const lldb::ThreadSP &thread_sp);
-
-    void
-    InsertThread (const lldb::ThreadSP &thread_sp, uint32_t idx);
-    
-    // Note that "idx" is not the same as the "thread_index". It is a zero
-    // based index to accessing the current threads, whereas "thread_index"
-    // is a unique index assigned
-    lldb::ThreadSP
-    GetThreadAtIndex (uint32_t idx);
-
-    virtual ThreadIterable
-    Threads ()
-    {
-        return ThreadIterable(m_threads, GetMutex());
-    }
-
-    virtual std::recursive_mutex &
-    GetMutex()
-    {
-        return m_mutex;
-    }
+  void AddThread(const lldb::ThreadSP &thread_sp);
+
+  void AddThreadSortedByIndexID(const lldb::ThreadSP &thread_sp);
+
+  void InsertThread(const lldb::ThreadSP &thread_sp, uint32_t idx);
+
+  // Note that "idx" is not the same as the "thread_index". It is a zero
+  // based index to accessing the current threads, whereas "thread_index"
+  // is a unique index assigned
+  lldb::ThreadSP GetThreadAtIndex(uint32_t idx);
+
+  virtual ThreadIterable Threads() {
+    return ThreadIterable(m_threads, GetMutex());
+  }
+
+  virtual std::recursive_mutex &GetMutex() { return m_mutex; }
 
 protected:
-    collection m_threads;
-    std::recursive_mutex m_mutex;
+  collection m_threads;
+  std::recursive_mutex m_mutex;
 };
-    
+
 } // namespace lldb_private
 
-#endif  // liblldb_ThreadCollection_h_
+#endif // liblldb_ThreadCollection_h_

Modified: lldb/trunk/include/lldb/Target/ThreadList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadList.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadList.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadList.h Tue Sep  6 15:57:50 2016
@@ -13,183 +13,149 @@
 #include <mutex>
 #include <vector>
 
-#include "lldb/lldb-private.h"
 #include "lldb/Core/UserID.h"
-#include "lldb/Utility/Iterable.h"
-#include "lldb/Target/ThreadCollection.h"
 #include "lldb/Target/Thread.h"
+#include "lldb/Target/ThreadCollection.h"
+#include "lldb/Utility/Iterable.h"
+#include "lldb/lldb-private.h"
 
 namespace lldb_private {
 
 // This is a thread list with lots of functionality for use only by the process
 // for which this is the thread list.  A generic container class with iterator
 // functionality is ThreadCollection.
-class ThreadList : public ThreadCollection
-{
-friend class Process;
+class ThreadList : public ThreadCollection {
+  friend class Process;
 
 public:
+  ThreadList(Process *process);
+
+  ThreadList(const ThreadList &rhs);
+
+  ~ThreadList() override;
+
+  const ThreadList &operator=(const ThreadList &rhs);
 
-    ThreadList (Process *process);
+  uint32_t GetSize(bool can_update = true);
 
-    ThreadList (const ThreadList &rhs);
+  // Return the selected thread if there is one.  Otherwise, return the thread
+  // selected at index 0.
+  lldb::ThreadSP GetSelectedThread();
 
-    ~ThreadList() override;
+  // Manage the thread to use for running expressions.  This is usually the
+  // Selected thread,
+  // but sometimes (e.g. when evaluating breakpoint conditions & stop hooks) it
+  // isn't.
+  class ExpressionExecutionThreadPusher {
+  public:
+    ExpressionExecutionThreadPusher(ThreadList &thread_list, lldb::tid_t tid)
+        : m_thread_list(&thread_list), m_tid(tid) {
+      m_thread_list->PushExpressionExecutionThread(m_tid);
+    }
 
-    const ThreadList&
-    operator = (const ThreadList& rhs);
+    ExpressionExecutionThreadPusher(lldb::ThreadSP thread_sp);
+
+    ~ExpressionExecutionThreadPusher() {
+      if (m_thread_list && m_tid != LLDB_INVALID_THREAD_ID)
+        m_thread_list->PopExpressionExecutionThread(m_tid);
+    }
+
+  private:
+    ThreadList *m_thread_list;
+    lldb::tid_t m_tid;
+  };
+
+  lldb::ThreadSP GetExpressionExecutionThread();
 
-    uint32_t
-    GetSize(bool can_update = true);
-
-    // Return the selected thread if there is one.  Otherwise, return the thread
-    // selected at index 0.
-    lldb::ThreadSP
-    GetSelectedThread ();
-    
-    // Manage the thread to use for running expressions.  This is usually the Selected thread,
-    // but sometimes (e.g. when evaluating breakpoint conditions & stop hooks) it isn't.
-    class ExpressionExecutionThreadPusher
-    {
-        public:
-        ExpressionExecutionThreadPusher(ThreadList &thread_list, lldb::tid_t tid) :
-            m_thread_list(&thread_list),
-            m_tid(tid)
-        {
-            m_thread_list->PushExpressionExecutionThread(m_tid);
-        }
-        
-        ExpressionExecutionThreadPusher(lldb::ThreadSP thread_sp);
-        
-        ~ExpressionExecutionThreadPusher()
-        {
-            if (m_thread_list && m_tid != LLDB_INVALID_THREAD_ID)
-                m_thread_list->PopExpressionExecutionThread(m_tid);
-        }
-        
-        private:
-            ThreadList *m_thread_list;
-            lldb::tid_t m_tid;
-    };
-
-    lldb::ThreadSP
-    GetExpressionExecutionThread();
-    
 protected:
-    void
-    PushExpressionExecutionThread(lldb::tid_t tid);
-    
-    void
-    PopExpressionExecutionThread(lldb::tid_t tid);
+  void PushExpressionExecutionThread(lldb::tid_t tid);
+
+  void PopExpressionExecutionThread(lldb::tid_t tid);
 
 public:
-    bool
-    SetSelectedThreadByID (lldb::tid_t tid, bool notify = false);
+  bool SetSelectedThreadByID(lldb::tid_t tid, bool notify = false);
 
-    bool
-    SetSelectedThreadByIndexID (uint32_t index_id, bool notify = false);
+  bool SetSelectedThreadByIndexID(uint32_t index_id, bool notify = false);
 
-    void
-    Clear();
+  void Clear();
 
-    void
-    Flush();
-
-    void
-    Destroy();
-
-    // Note that "idx" is not the same as the "thread_index". It is a zero
-    // based index to accessing the current threads, whereas "thread_index"
-    // is a unique index assigned
-    lldb::ThreadSP
-    GetThreadAtIndex (uint32_t idx, bool can_update = true);
-
-    lldb::ThreadSP
-    FindThreadByID (lldb::tid_t tid, bool can_update = true);
-    
-    lldb::ThreadSP
-    FindThreadByProtocolID (lldb::tid_t tid, bool can_update = true);
-
-    lldb::ThreadSP
-    RemoveThreadByID (lldb::tid_t tid, bool can_update = true);
-    
-    lldb::ThreadSP
-    RemoveThreadByProtocolID (lldb::tid_t tid, bool can_update = true);
-
-    lldb::ThreadSP
-    FindThreadByIndexID (uint32_t index_id, bool can_update = true);
-
-    lldb::ThreadSP
-    GetThreadSPForThreadPtr (Thread *thread_ptr);
-
-    bool
-    ShouldStop (Event *event_ptr);
-
-    Vote
-    ShouldReportStop (Event *event_ptr);
-
-    Vote
-    ShouldReportRun (Event *event_ptr);
-
-    void
-    RefreshStateAfterStop ();
-
-    //------------------------------------------------------------------
-    /// The thread list asks tells all the threads it is about to resume.
-    /// If a thread can "resume" without having to resume the target, it
-    /// will return false for WillResume, and then the process will not be
-    /// restarted.
-    ///
-    /// @return
-    ///    \b true instructs the process to resume normally,
-    ///    \b false means start & stopped events will be generated, but
-    ///    the process will not actually run.  The thread must then return
-    ///    the correct StopInfo when asked.
-    ///
-    //------------------------------------------------------------------
-    bool
-    WillResume ();
-
-    void
-    DidResume ();
-
-    void
-    DidStop ();
-
-    void
-    DiscardThreadPlans();
-
-    uint32_t
-    GetStopID () const;
-
-    void
-    SetStopID (uint32_t stop_id);
-
-    std::recursive_mutex &
-    GetMutex() override;
-
-    void
-    Update (ThreadList &rhs);
-    
-protected:
+  void Flush();
 
-    void
-    SetShouldReportStop (Vote vote);
+  void Destroy();
 
-    void
-    NotifySelectedThreadChanged (lldb::tid_t tid);
+  // Note that "idx" is not the same as the "thread_index". It is a zero
+  // based index to accessing the current threads, whereas "thread_index"
+  // is a unique index assigned
+  lldb::ThreadSP GetThreadAtIndex(uint32_t idx, bool can_update = true);
 
-    //------------------------------------------------------------------
-    // Classes that inherit from Process can see and modify these
-    //------------------------------------------------------------------
-    Process *m_process; ///< The process that manages this thread list.
-    uint32_t m_stop_id; ///< The process stop ID that this thread list is valid for.
-    lldb::tid_t m_selected_tid;  ///< For targets that need the notion of a current thread.
-    std::vector<lldb::tid_t> m_expression_tid_stack;
+  lldb::ThreadSP FindThreadByID(lldb::tid_t tid, bool can_update = true);
 
-private:
+  lldb::ThreadSP FindThreadByProtocolID(lldb::tid_t tid,
+                                        bool can_update = true);
+
+  lldb::ThreadSP RemoveThreadByID(lldb::tid_t tid, bool can_update = true);
+
+  lldb::ThreadSP RemoveThreadByProtocolID(lldb::tid_t tid,
+                                          bool can_update = true);
+
+  lldb::ThreadSP FindThreadByIndexID(uint32_t index_id, bool can_update = true);
 
-    ThreadList ();
+  lldb::ThreadSP GetThreadSPForThreadPtr(Thread *thread_ptr);
+
+  bool ShouldStop(Event *event_ptr);
+
+  Vote ShouldReportStop(Event *event_ptr);
+
+  Vote ShouldReportRun(Event *event_ptr);
+
+  void RefreshStateAfterStop();
+
+  //------------------------------------------------------------------
+  /// The thread list asks tells all the threads it is about to resume.
+  /// If a thread can "resume" without having to resume the target, it
+  /// will return false for WillResume, and then the process will not be
+  /// restarted.
+  ///
+  /// @return
+  ///    \b true instructs the process to resume normally,
+  ///    \b false means start & stopped events will be generated, but
+  ///    the process will not actually run.  The thread must then return
+  ///    the correct StopInfo when asked.
+  ///
+  //------------------------------------------------------------------
+  bool WillResume();
+
+  void DidResume();
+
+  void DidStop();
+
+  void DiscardThreadPlans();
+
+  uint32_t GetStopID() const;
+
+  void SetStopID(uint32_t stop_id);
+
+  std::recursive_mutex &GetMutex() override;
+
+  void Update(ThreadList &rhs);
+
+protected:
+  void SetShouldReportStop(Vote vote);
+
+  void NotifySelectedThreadChanged(lldb::tid_t tid);
+
+  //------------------------------------------------------------------
+  // Classes that inherit from Process can see and modify these
+  //------------------------------------------------------------------
+  Process *m_process; ///< The process that manages this thread list.
+  uint32_t
+      m_stop_id; ///< The process stop ID that this thread list is valid for.
+  lldb::tid_t
+      m_selected_tid; ///< For targets that need the notion of a current thread.
+  std::vector<lldb::tid_t> m_expression_tid_stack;
+
+private:
+  ThreadList();
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadPlan.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlan.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlan.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlan.h Tue Sep  6 15:57:50 2016
@@ -17,13 +17,13 @@
 
 // Other libraries and framework includes
 // Project includes
-#include "lldb/lldb-private.h"
 #include "lldb/Core/UserID.h"
 #include "lldb/Target/Process.h"
+#include "lldb/Target/StopInfo.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/ThreadPlanTracer.h"
-#include "lldb/Target/StopInfo.h"
+#include "lldb/lldb-private.h"
 
 namespace lldb_private {
 
@@ -37,613 +37,593 @@ namespace lldb_private {
 //
 //  Plan Stack:
 //
-//  The thread maintaining a thread plan stack, and you program the actions of a particular thread
+//  The thread maintaining a thread plan stack, and you program the actions of a
+//  particular thread
 //  by pushing plans onto the plan stack.
-//  There is always a "Current" plan, which is the head of the plan stack, though in some cases
+//  There is always a "Current" plan, which is the head of the plan stack,
+//  though in some cases
 //  a plan may defer to plans higher in the stack for some piece of information.
 //
-//  The plan stack is never empty, there is always a Base Plan which persists through the life
+//  The plan stack is never empty, there is always a Base Plan which persists
+//  through the life
 //  of the running process.
 //
 //
 //  Creating Plans:
 //
-//  The thread plan is generally created and added to the plan stack through the QueueThreadPlanFor... API
-//  in lldb::Thread.  Those API's will return the plan that performs the named operation in a manner
-//  appropriate for the current process.  The plans in lldb/source/Target are generic
+//  The thread plan is generally created and added to the plan stack through the
+//  QueueThreadPlanFor... API
+//  in lldb::Thread.  Those API's will return the plan that performs the named
+//  operation in a manner
+//  appropriate for the current process.  The plans in lldb/source/Target are
+//  generic
 //  implementations, but a Process plugin can override them.
 //
-//  ValidatePlan is then called.  If it returns false, the plan is unshipped.  This is a little
+//  ValidatePlan is then called.  If it returns false, the plan is unshipped.
+//  This is a little
 //  convenience which keeps us from having to error out of the constructor.
 //
-//  Then the plan is added to the plan stack.  When the plan is added to the plan stack its DidPush
-//  will get called.  This is useful if a plan wants to push any additional plans as it is constructed,
-//  since you need to make sure you're already on the stack before you push additional plans.
+//  Then the plan is added to the plan stack.  When the plan is added to the
+//  plan stack its DidPush
+//  will get called.  This is useful if a plan wants to push any additional
+//  plans as it is constructed,
+//  since you need to make sure you're already on the stack before you push
+//  additional plans.
 //
 //  Completed Plans:
 //
-//  When the target process stops the plans are queried, among other things, for whether their job is done.
-//  If it is they are moved from the plan stack to the Completed Plan stack in reverse order from their position
-//  on the plan stack (since multiple plans may be done at a given stop.)  This is used primarily so that
-//  the lldb::Thread::StopInfo for the thread can be set properly.  If one plan pushes another to achieve part of
-//  its job, but it doesn't want that sub-plan to be the one that sets the StopInfo, then call SetPrivate on the
-//  sub-plan when you create it, and the Thread will pass over that plan in reporting the reason for the stop.
+//  When the target process stops the plans are queried, among other things, for
+//  whether their job is done.
+//  If it is they are moved from the plan stack to the Completed Plan stack in
+//  reverse order from their position
+//  on the plan stack (since multiple plans may be done at a given stop.)  This
+//  is used primarily so that
+//  the lldb::Thread::StopInfo for the thread can be set properly.  If one plan
+//  pushes another to achieve part of
+//  its job, but it doesn't want that sub-plan to be the one that sets the
+//  StopInfo, then call SetPrivate on the
+//  sub-plan when you create it, and the Thread will pass over that plan in
+//  reporting the reason for the stop.
 //
 //  Discarded plans:
 //
-//  Your plan may also get discarded, i.e. moved from the plan stack to the "discarded plan stack".  This can
-//  happen, for instance, if the plan is calling a function and the function call crashes and you want
-//  to unwind the attempt to call.  So don't assume that your plan will always successfully stop.  Which leads to:
+//  Your plan may also get discarded, i.e. moved from the plan stack to the
+//  "discarded plan stack".  This can
+//  happen, for instance, if the plan is calling a function and the function
+//  call crashes and you want
+//  to unwind the attempt to call.  So don't assume that your plan will always
+//  successfully stop.  Which leads to:
 //
 //  Cleaning up after your plans:
 //
-//  When the plan is moved from the plan stack its WillPop method is always called, no matter why.  Once it is
-//  moved off the plan stack it is done, and won't get a chance to run again.  So you should
-//  undo anything that affects target state in this method.  But be sure to leave the plan able to correctly 
+//  When the plan is moved from the plan stack its WillPop method is always
+//  called, no matter why.  Once it is
+//  moved off the plan stack it is done, and won't get a chance to run again.
+//  So you should
+//  undo anything that affects target state in this method.  But be sure to
+//  leave the plan able to correctly
 //  fill the StopInfo, however.
-//  N.B. Don't wait to do clean up target state till the destructor, since that will usually get called when 
-//  the target resumes, and you want to leave the target state correct for new plans in the time between when
+//  N.B. Don't wait to do clean up target state till the destructor, since that
+//  will usually get called when
+//  the target resumes, and you want to leave the target state correct for new
+//  plans in the time between when
 //  your plan gets unshipped and the next resume.
 //
-//  Over the lifetime of the plan, various methods of the ThreadPlan are then called in response to changes of state in
+//  Over the lifetime of the plan, various methods of the ThreadPlan are then
+//  called in response to changes of state in
 //  the process we are debugging as follows:
 //
 //  Resuming:
 //
-//  When the target process is about to be restarted, the plan's WillResume method is called,
-//  giving the plan a chance to prepare for the run.  If WillResume returns false, then the
-//  process is not restarted.  Be sure to set an appropriate error value in the Process if
-//  you have to do this.  Note, ThreadPlans actually implement DoWillResume, WillResume wraps that call.
-//
-//  Next the "StopOthers" method of all the threads are polled, and if one thread's Current plan
-//  returns "true" then only that thread gets to run.  If more than one returns "true" the threads that want to run solo
+//  When the target process is about to be restarted, the plan's WillResume
+//  method is called,
+//  giving the plan a chance to prepare for the run.  If WillResume returns
+//  false, then the
+//  process is not restarted.  Be sure to set an appropriate error value in the
+//  Process if
+//  you have to do this.  Note, ThreadPlans actually implement DoWillResume,
+//  WillResume wraps that call.
+//
+//  Next the "StopOthers" method of all the threads are polled, and if one
+//  thread's Current plan
+//  returns "true" then only that thread gets to run.  If more than one returns
+//  "true" the threads that want to run solo
 //  get run one by one round robin fashion.  Otherwise all are let to run.
 //
-//  Note, the way StopOthers is implemented, the base class implementation just asks the previous plan.  So if your plan
-//  has no opinion about whether it should run stopping others or not, just don't implement StopOthers, and the parent
+//  Note, the way StopOthers is implemented, the base class implementation just
+//  asks the previous plan.  So if your plan
+//  has no opinion about whether it should run stopping others or not, just
+//  don't implement StopOthers, and the parent
 //  will be asked.
 //
-//  Finally, for each thread that is running, it run state is set to the return of RunState from the
+//  Finally, for each thread that is running, it run state is set to the return
+//  of RunState from the
 //  thread's Current plan.
 //
 //  Responding to a stop:
 //
 //  When the target process stops, the plan is called in the following stages:
 //
-//  First the thread asks the Current Plan if it can handle this stop by calling PlanExplainsStop.
-//  If the Current plan answers "true" then it is asked if the stop should percolate all the way to the
-//  user by calling the ShouldStop method.  If the current plan doesn't explain the stop, then we query down
-//  the plan stack for a plan that does explain the stop.  The plan that does explain the stop then needs to
-//  figure out what to do about the plans below it in the stack.  If the stop is recoverable, then the plan that
-//  understands it can just do what it needs to set up to restart, and then continue.
-//  Otherwise, the plan that understood the stop should call DiscardPlanStack to clean up the stack below it.
-//  Note, plans actually implement DoPlanExplainsStop, the result is cached in PlanExplainsStop so the DoPlanExplainsStop
+//  First the thread asks the Current Plan if it can handle this stop by calling
+//  PlanExplainsStop.
+//  If the Current plan answers "true" then it is asked if the stop should
+//  percolate all the way to the
+//  user by calling the ShouldStop method.  If the current plan doesn't explain
+//  the stop, then we query down
+//  the plan stack for a plan that does explain the stop.  The plan that does
+//  explain the stop then needs to
+//  figure out what to do about the plans below it in the stack.  If the stop is
+//  recoverable, then the plan that
+//  understands it can just do what it needs to set up to restart, and then
+//  continue.
+//  Otherwise, the plan that understood the stop should call DiscardPlanStack to
+//  clean up the stack below it.
+//  Note, plans actually implement DoPlanExplainsStop, the result is cached in
+//  PlanExplainsStop so the DoPlanExplainsStop
 //  itself will only get called once per stop.
 //
 //  Master plans:
 //
-//  In the normal case, when we decide to stop, we will  collapse the plan stack up to the point of the plan that understood
-//  the stop reason.  However, if a plan wishes to stay on the stack after an event it didn't directly handle
-//  it can designate itself a "Master" plan by responding true to IsMasterPlan, and then if it wants not to be
-//  discarded, it can return true to OkayToDiscard, and it and all its dependent plans will be preserved when
+//  In the normal case, when we decide to stop, we will  collapse the plan stack
+//  up to the point of the plan that understood
+//  the stop reason.  However, if a plan wishes to stay on the stack after an
+//  event it didn't directly handle
+//  it can designate itself a "Master" plan by responding true to IsMasterPlan,
+//  and then if it wants not to be
+//  discarded, it can return true to OkayToDiscard, and it and all its dependent
+//  plans will be preserved when
 //  we resume execution.
 //
-//  The other effect of being a master plan is that when the Master plan is done , if it has set "OkayToDiscard" to false,
-//  then it will be popped & execution will stop and return to the user.  Remember that if OkayToDiscard is false, the
-//  plan will be popped and control will be given to the next plan above it on the stack  So setting OkayToDiscard to
+//  The other effect of being a master plan is that when the Master plan is done
+//  , if it has set "OkayToDiscard" to false,
+//  then it will be popped & execution will stop and return to the user.
+//  Remember that if OkayToDiscard is false, the
+//  plan will be popped and control will be given to the next plan above it on
+//  the stack  So setting OkayToDiscard to
 //  false means the user will regain control when the MasterPlan is completed.
 //
-//  Between these two controls this allows things like: a MasterPlan/DontDiscard Step Over to hit a breakpoint, stop and
-//  return control to the user, but then when the user continues, the step out succeeds.
-//  Even more tricky, when the breakpoint is hit, the user can continue to step in/step over/etc, and finally when they
+//  Between these two controls this allows things like: a MasterPlan/DontDiscard
+//  Step Over to hit a breakpoint, stop and
+//  return control to the user, but then when the user continues, the step out
+//  succeeds.
+//  Even more tricky, when the breakpoint is hit, the user can continue to step
+//  in/step over/etc, and finally when they
 //  continue, they will finish up the Step Over.
 //
-//  FIXME: MasterPlan & OkayToDiscard aren't really orthogonal.  MasterPlan designation means that this plan controls
-//  it's fate and the fate of plans below it.  OkayToDiscard tells whether the MasterPlan wants to stay on the stack.  I
-//  originally thought "MasterPlan-ness" would need to be a fixed characteristic of a ThreadPlan, in which case you needed
-//  the extra control.  But that doesn't seem to be true.  So we should be able to convert to only MasterPlan status to mean
-//  the current "MasterPlan/DontDiscard".  Then no plans would be MasterPlans by default, and you would set the ones you
+//  FIXME: MasterPlan & OkayToDiscard aren't really orthogonal.  MasterPlan
+//  designation means that this plan controls
+//  it's fate and the fate of plans below it.  OkayToDiscard tells whether the
+//  MasterPlan wants to stay on the stack.  I
+//  originally thought "MasterPlan-ness" would need to be a fixed characteristic
+//  of a ThreadPlan, in which case you needed
+//  the extra control.  But that doesn't seem to be true.  So we should be able
+//  to convert to only MasterPlan status to mean
+//  the current "MasterPlan/DontDiscard".  Then no plans would be MasterPlans by
+//  default, and you would set the ones you
 //  wanted to be "user level" in this way.
 //
 //
 //  Actually Stopping:
 //
-//  If a plan says responds "true" to ShouldStop, then it is asked if it's job is complete by calling
-//  MischiefManaged.  If that returns true, the thread is popped from the plan stack and added to the
-//  Completed Plan Stack.  Then the next plan in the stack is asked if it ShouldStop, and  it returns "true",
-//  it is asked if it is done, and if yes popped, and so on till we reach a plan that is not done.
-//
-//  Since you often know in the ShouldStop method whether your plan is complete, as a convenience you can call
-//  SetPlanComplete and the ThreadPlan implementation of MischiefManaged will return "true", without your having
-//  to redo the calculation when your sub-classes MischiefManaged is called.  If you call SetPlanComplete, you can
-//  later use IsPlanComplete to determine whether the plan is complete.  This is only a convenience for sub-classes,
+//  If a plan says responds "true" to ShouldStop, then it is asked if it's job
+//  is complete by calling
+//  MischiefManaged.  If that returns true, the thread is popped from the plan
+//  stack and added to the
+//  Completed Plan Stack.  Then the next plan in the stack is asked if it
+//  ShouldStop, and  it returns "true",
+//  it is asked if it is done, and if yes popped, and so on till we reach a plan
+//  that is not done.
+//
+//  Since you often know in the ShouldStop method whether your plan is complete,
+//  as a convenience you can call
+//  SetPlanComplete and the ThreadPlan implementation of MischiefManaged will
+//  return "true", without your having
+//  to redo the calculation when your sub-classes MischiefManaged is called.  If
+//  you call SetPlanComplete, you can
+//  later use IsPlanComplete to determine whether the plan is complete.  This is
+//  only a convenience for sub-classes,
 //  the logic in lldb::Thread will only call MischiefManaged.
 //
-//  One slightly tricky point is you have to be careful using SetPlanComplete in PlanExplainsStop because you
-//  are not guaranteed that PlanExplainsStop for a plan will get called before ShouldStop gets called.  If your sub-plan
-//  explained the stop and then popped itself, only your ShouldStop will get called.
-//
-//  If ShouldStop for any thread returns "true", then the WillStop method of the Current plan of
-//  all threads will be called, the stop event is placed on the Process's public broadcaster, and
+//  One slightly tricky point is you have to be careful using SetPlanComplete in
+//  PlanExplainsStop because you
+//  are not guaranteed that PlanExplainsStop for a plan will get called before
+//  ShouldStop gets called.  If your sub-plan
+//  explained the stop and then popped itself, only your ShouldStop will get
+//  called.
+//
+//  If ShouldStop for any thread returns "true", then the WillStop method of the
+//  Current plan of
+//  all threads will be called, the stop event is placed on the Process's public
+//  broadcaster, and
 //  control returns to the upper layers of the debugger.
 //
 //  Reporting the stop:
 //
-//  When the process stops, the thread is given a StopReason, in the form of a StopInfo object.  If there is a completed
-//  plan corresponding to the stop, then the "actual" stop reason will be suppressed, and instead a StopInfoThreadPlan
-//  object will be cons'ed up from the highest completed plan in the stack.  However, if the plan doesn't want to be
-//  the stop reason, then it can call SetPlanComplete and pass in "false" for the "success" parameter.  In that case,
-//  the real stop reason will be used instead.  One exapmle of this is the "StepRangeStepIn" thread plan.  If it stops
-//  because of a crash or breakpoint hit, it wants to unship itself, because it isn't so useful to have step in keep going
-//  after a breakpoint hit.  But it can't be the reason for the stop or no-one would see that they had hit a breakpoint.
+//  When the process stops, the thread is given a StopReason, in the form of a
+//  StopInfo object.  If there is a completed
+//  plan corresponding to the stop, then the "actual" stop reason will be
+//  suppressed, and instead a StopInfoThreadPlan
+//  object will be cons'ed up from the highest completed plan in the stack.
+//  However, if the plan doesn't want to be
+//  the stop reason, then it can call SetPlanComplete and pass in "false" for
+//  the "success" parameter.  In that case,
+//  the real stop reason will be used instead.  One exapmle of this is the
+//  "StepRangeStepIn" thread plan.  If it stops
+//  because of a crash or breakpoint hit, it wants to unship itself, because it
+//  isn't so useful to have step in keep going
+//  after a breakpoint hit.  But it can't be the reason for the stop or no-one
+//  would see that they had hit a breakpoint.
 //
 //  Cleaning up the plan stack:
 //
-//  One of the complications of MasterPlans is that you may get past the limits of a plan without triggering it to clean
-//  itself up.  For instance, if you are doing a MasterPlan StepOver, and hit a breakpoint in a called function, then
-//  step over enough times to step out of the initial StepOver range, each of the step overs will explain the stop & 
-//  take themselves off the stack, but control would never be returned to the original StepOver.  Eventually, the user 
-//  will continue, and when that continue stops, the old stale StepOver plan that was left on the stack will get woken 
-//  up and notice it is done. But that can leave junk on the stack for a while.  To avoid that, the plans implement a
-//  "IsPlanStale" method, that can check whether it is relevant anymore.  On stop, after the regular plan negotiation, 
-//  the remaining plan stack is consulted and if any plan says it is stale, it and the plans below it are discarded from
+//  One of the complications of MasterPlans is that you may get past the limits
+//  of a plan without triggering it to clean
+//  itself up.  For instance, if you are doing a MasterPlan StepOver, and hit a
+//  breakpoint in a called function, then
+//  step over enough times to step out of the initial StepOver range, each of
+//  the step overs will explain the stop &
+//  take themselves off the stack, but control would never be returned to the
+//  original StepOver.  Eventually, the user
+//  will continue, and when that continue stops, the old stale StepOver plan
+//  that was left on the stack will get woken
+//  up and notice it is done. But that can leave junk on the stack for a while.
+//  To avoid that, the plans implement a
+//  "IsPlanStale" method, that can check whether it is relevant anymore.  On
+//  stop, after the regular plan negotiation,
+//  the remaining plan stack is consulted and if any plan says it is stale, it
+//  and the plans below it are discarded from
 //  the stack.
 //
 //  Automatically Resuming:
 //
-//  If ShouldStop for all threads returns "false", then the target process will resume.  This then cycles back to
+//  If ShouldStop for all threads returns "false", then the target process will
+//  resume.  This then cycles back to
 //  Resuming above.
 //
 //  Reporting eStateStopped events when the target is restarted:
 //
-//  If a plan decides to auto-continue the target by returning "false" from ShouldStop, then it will be asked
-//  whether the Stopped event should still be reported.  For instance, if you hit a breakpoint that is a User set
-//  breakpoint, but the breakpoint callback said to continue the target process, you might still want to inform
+//  If a plan decides to auto-continue the target by returning "false" from
+//  ShouldStop, then it will be asked
+//  whether the Stopped event should still be reported.  For instance, if you
+//  hit a breakpoint that is a User set
+//  breakpoint, but the breakpoint callback said to continue the target process,
+//  you might still want to inform
 //  the upper layers of lldb that the stop had happened.
-//  The way this works is every thread gets to vote on whether to report the stop.  If all votes are eVoteNoOpinion,
-//  then the thread list will decide what to do (at present it will pretty much always suppress these stopped events.)
-//  If there is an eVoteYes, then the event will be reported regardless of the other votes.  If there is an eVoteNo
+//  The way this works is every thread gets to vote on whether to report the
+//  stop.  If all votes are eVoteNoOpinion,
+//  then the thread list will decide what to do (at present it will pretty much
+//  always suppress these stopped events.)
+//  If there is an eVoteYes, then the event will be reported regardless of the
+//  other votes.  If there is an eVoteNo
 //  and no eVoteYes's, then the event won't be reported.
 //
-//  One other little detail here, sometimes a plan will push another plan onto the plan stack to do some part of
-//  the first plan's job, and it would be convenient to tell that plan how it should respond to ShouldReportStop.
-//  You can do that by setting the stop_vote in the child plan when you create it.
+//  One other little detail here, sometimes a plan will push another plan onto
+//  the plan stack to do some part of
+//  the first plan's job, and it would be convenient to tell that plan how it
+//  should respond to ShouldReportStop.
+//  You can do that by setting the stop_vote in the child plan when you create
+//  it.
 //
 //  Suppressing the initial eStateRunning event:
 //
-//  The private process running thread will take care of ensuring that only one "eStateRunning" event will be
-//  delivered to the public Process broadcaster per public eStateStopped event.  However there are some cases
-//  where the public state of this process is eStateStopped, but a thread plan needs to restart the target, but
-//  doesn't want the running event to be publicly broadcast.  The obvious example of this is running functions
-//  by hand as part of expression evaluation.  To suppress the running event return eVoteNo from ShouldReportStop,
-//  to force a running event to be reported return eVoteYes, in general though you should return eVoteNoOpinion
+//  The private process running thread will take care of ensuring that only one
+//  "eStateRunning" event will be
+//  delivered to the public Process broadcaster per public eStateStopped event.
+//  However there are some cases
+//  where the public state of this process is eStateStopped, but a thread plan
+//  needs to restart the target, but
+//  doesn't want the running event to be publicly broadcast.  The obvious
+//  example of this is running functions
+//  by hand as part of expression evaluation.  To suppress the running event
+//  return eVoteNo from ShouldReportStop,
+//  to force a running event to be reported return eVoteYes, in general though
+//  you should return eVoteNoOpinion
 //  which will allow the ThreadList to figure out the right thing to do.
-//  The run_vote argument to the constructor works like stop_vote, and is a way for a plan to instruct a sub-plan
+//  The run_vote argument to the constructor works like stop_vote, and is a way
+//  for a plan to instruct a sub-plan
 //  on how to respond to ShouldReportStop.
 //
 //------------------------------------------------------------------
 
-class ThreadPlan :
-    public std::enable_shared_from_this<ThreadPlan>,
-    public UserID
-{
+class ThreadPlan : public std::enable_shared_from_this<ThreadPlan>,
+                   public UserID {
 public:
-    typedef enum
-    {
-        eAllThreads,
-        eSomeThreads,
-        eThisThread
-    } ThreadScope;
-
-    // We use these enums so that we can cast a base thread plan to it's real type without having to resort
-    // to dynamic casting.
-    typedef enum
-    {
-        eKindGeneric,
-        eKindNull,
-        eKindBase,
-        eKindCallFunction,
-        eKindPython,
-        eKindStepInstruction,
-        eKindStepOut,
-        eKindStepOverBreakpoint,
-        eKindStepOverRange,
-        eKindStepInRange,
-        eKindRunToAddress,
-        eKindStepThrough,
-        eKindStepUntil,
-        eKindTestCondition
-        
-    } ThreadPlanKind;
-    
-    //------------------------------------------------------------------
-    // Constructors and Destructors
-    //------------------------------------------------------------------
-    ThreadPlan (ThreadPlanKind kind,
-                const char *name,
-                Thread &thread,
-                Vote stop_vote,
-                Vote run_vote);
-
-    virtual
-    ~ThreadPlan();
-
-    //------------------------------------------------------------------
-    /// Returns the name of this thread plan.
-    ///
-    /// @return
-    ///   A const char * pointer to the thread plan's name.
-    //------------------------------------------------------------------
-    const char *
-    GetName () const
-    {
-        return m_name.c_str();
-    }
-    
-    //------------------------------------------------------------------
-    /// Returns the Thread that is using this thread plan.
-    ///
-    /// @return
-    ///   A  pointer to the thread plan's owning thread.
-    //------------------------------------------------------------------
-    Thread &
-    GetThread()
-    {
-        return m_thread;
-    }
-
-    const Thread &
-    GetThread() const
-    {
-        return m_thread;
-    }
-    
-    Target &
-    GetTarget()
-    {
-        return m_thread.GetProcess()->GetTarget();
-    }
-
-    const Target &
-    GetTarget() const
-    {
-        return m_thread.GetProcess()->GetTarget();
-    }
-
-    //------------------------------------------------------------------
-    /// Print a description of this thread to the stream \a s.
-    /// \a thread.
-    ///
-    /// @param[in] s
-    ///    The stream to which to print the description.
-    ///
-    /// @param[in] level
-    ///    The level of description desired.  Note that eDescriptionLevelBrief
-    ///    will be used in the stop message printed when the plan is complete.
-    //------------------------------------------------------------------
-    virtual void
-    GetDescription (Stream *s,
-                    lldb::DescriptionLevel level) = 0;
-
-    //------------------------------------------------------------------
-    /// Returns whether this plan could be successfully created.
-    ///
-    /// @param[in] error
-    ///    A stream to which to print some reason why the plan could not be created.
-    ///    Can be NULL.
-    ///
-    /// @return
-    ///   \b true if the plan should be queued, \b false otherwise.
-    //------------------------------------------------------------------
-    virtual bool
-    ValidatePlan (Stream *error) = 0;
-
-    bool
-    TracerExplainsStop ()
-    {
-        if (!m_tracer_sp)
-            return false;
-        else
-            return m_tracer_sp->TracerExplainsStop();
-    }
-
+  typedef enum { eAllThreads, eSomeThreads, eThisThread } ThreadScope;
 
-    lldb::StateType
-    RunState ();
-
-    bool
-    PlanExplainsStop (Event *event_ptr);
-    
-    virtual bool
-    ShouldStop (Event *event_ptr) = 0;
-    
-    virtual bool
-    ShouldAutoContinue (Event *event_ptr)
-    {
+  // We use these enums so that we can cast a base thread plan to it's real type
+  // without having to resort
+  // to dynamic casting.
+  typedef enum {
+    eKindGeneric,
+    eKindNull,
+    eKindBase,
+    eKindCallFunction,
+    eKindPython,
+    eKindStepInstruction,
+    eKindStepOut,
+    eKindStepOverBreakpoint,
+    eKindStepOverRange,
+    eKindStepInRange,
+    eKindRunToAddress,
+    eKindStepThrough,
+    eKindStepUntil,
+    eKindTestCondition
+
+  } ThreadPlanKind;
+
+  //------------------------------------------------------------------
+  // Constructors and Destructors
+  //------------------------------------------------------------------
+  ThreadPlan(ThreadPlanKind kind, const char *name, Thread &thread,
+             Vote stop_vote, Vote run_vote);
+
+  virtual ~ThreadPlan();
+
+  //------------------------------------------------------------------
+  /// Returns the name of this thread plan.
+  ///
+  /// @return
+  ///   A const char * pointer to the thread plan's name.
+  //------------------------------------------------------------------
+  const char *GetName() const { return m_name.c_str(); }
+
+  //------------------------------------------------------------------
+  /// Returns the Thread that is using this thread plan.
+  ///
+  /// @return
+  ///   A  pointer to the thread plan's owning thread.
+  //------------------------------------------------------------------
+  Thread &GetThread() { return m_thread; }
+
+  const Thread &GetThread() const { return m_thread; }
+
+  Target &GetTarget() { return m_thread.GetProcess()->GetTarget(); }
+
+  const Target &GetTarget() const { return m_thread.GetProcess()->GetTarget(); }
+
+  //------------------------------------------------------------------
+  /// Print a description of this thread to the stream \a s.
+  /// \a thread.
+  ///
+  /// @param[in] s
+  ///    The stream to which to print the description.
+  ///
+  /// @param[in] level
+  ///    The level of description desired.  Note that eDescriptionLevelBrief
+  ///    will be used in the stop message printed when the plan is complete.
+  //------------------------------------------------------------------
+  virtual void GetDescription(Stream *s, lldb::DescriptionLevel level) = 0;
+
+  //------------------------------------------------------------------
+  /// Returns whether this plan could be successfully created.
+  ///
+  /// @param[in] error
+  ///    A stream to which to print some reason why the plan could not be
+  ///    created.
+  ///    Can be NULL.
+  ///
+  /// @return
+  ///   \b true if the plan should be queued, \b false otherwise.
+  //------------------------------------------------------------------
+  virtual bool ValidatePlan(Stream *error) = 0;
+
+  bool TracerExplainsStop() {
+    if (!m_tracer_sp)
+      return false;
+    else
+      return m_tracer_sp->TracerExplainsStop();
+  }
+
+  lldb::StateType RunState();
+
+  bool PlanExplainsStop(Event *event_ptr);
+
+  virtual bool ShouldStop(Event *event_ptr) = 0;
+
+  virtual bool ShouldAutoContinue(Event *event_ptr) { return false; }
+
+  // Whether a "stop class" event should be reported to the "outside world".  In
+  // general
+  // if a thread plan is active, events should not be reported.
+
+  virtual Vote ShouldReportStop(Event *event_ptr);
+
+  virtual Vote ShouldReportRun(Event *event_ptr);
+
+  virtual void SetStopOthers(bool new_value);
+
+  virtual bool StopOthers();
+
+  // This is the wrapper for DoWillResume that does generic ThreadPlan logic,
+  // then
+  // calls DoWillResume.
+  bool WillResume(lldb::StateType resume_state, bool current_plan);
+
+  virtual bool WillStop() = 0;
+
+  bool IsMasterPlan() { return m_is_master_plan; }
+
+  bool SetIsMasterPlan(bool value) {
+    bool old_value = m_is_master_plan;
+    m_is_master_plan = value;
+    return old_value;
+  }
+
+  virtual bool OkayToDiscard();
+
+  void SetOkayToDiscard(bool value) { m_okay_to_discard = value; }
+
+  // The base class MischiefManaged does some cleanup - so you have to call it
+  // in your MischiefManaged derived class.
+  virtual bool MischiefManaged();
+
+  virtual void ThreadDestroyed() {
+    // Any cleanup that a plan might want to do in case the thread goes away
+    // in the middle of the plan being queued on a thread can be done here.
+  }
+
+  bool GetPrivate() { return m_plan_private; }
+
+  void SetPrivate(bool input) { m_plan_private = input; }
+
+  virtual void DidPush();
+
+  virtual void WillPop();
+
+  // This pushes a plan onto the plan stack of the current plan's thread.
+  void PushPlan(lldb::ThreadPlanSP &thread_plan_sp) {
+    m_thread.PushPlan(thread_plan_sp);
+  }
+
+  ThreadPlanKind GetKind() const { return m_kind; }
+
+  bool IsPlanComplete();
+
+  void SetPlanComplete(bool success = true);
+
+  virtual bool IsPlanStale() { return false; }
+
+  bool PlanSucceeded() { return m_plan_succeeded; }
+
+  virtual bool IsBasePlan() { return false; }
+
+  lldb::ThreadPlanTracerSP &GetThreadPlanTracer() { return m_tracer_sp; }
+
+  void SetThreadPlanTracer(lldb::ThreadPlanTracerSP new_tracer_sp) {
+    m_tracer_sp = new_tracer_sp;
+  }
+
+  void DoTraceLog() {
+    if (m_tracer_sp && m_tracer_sp->TracingEnabled())
+      m_tracer_sp->Log();
+  }
+
+  // Some thread plans hide away the actual stop info which caused any
+  // particular stop.  For
+  // instance the ThreadPlanCallFunction restores the original stop reason so
+  // that stopping and
+  // calling a few functions won't lose the history of the run.
+  // This call can be implemented to get you back to the real stop info.
+  virtual lldb::StopInfoSP GetRealStopInfo() { return m_thread.GetStopInfo(); }
+
+  // If the completion of the thread plan stepped out of a function, the return
+  // value of the function
+  // might have been captured by the thread plan (currently only
+  // ThreadPlanStepOut does this.)
+  // If so, the ReturnValueObject can be retrieved from here.
+
+  virtual lldb::ValueObjectSP GetReturnValueObject() {
+    return lldb::ValueObjectSP();
+  }
+
+  // If the thread plan managing the evaluation of a user expression lives
+  // longer than the command
+  // that instigated the expression (generally because the expression evaluation
+  // hit a breakpoint, and
+  // the user regained control at that point) a subsequent process control
+  // command step/continue/etc. might
+  // complete the expression evaluations.  If so, the result of the expression
+  // evaluation will show up here.
+
+  virtual lldb::ExpressionVariableSP GetExpressionVariable() {
+    return lldb::ExpressionVariableSP();
+  }
+
+  // If a thread plan stores the state before it was run, then you might
+  // want to restore the state when it is done.  This will do that job.
+  // This is mostly useful for artificial plans like CallFunction plans.
+
+  virtual bool RestoreThreadState() {
+    // Nothing to do in general.
+    return true;
+  }
+
+  virtual bool IsVirtualStep() { return false; }
+
+  virtual bool SetIterationCount(size_t count) {
+    if (m_takes_iteration_count) {
+      // Don't tell me to do something 0 times...
+      if (count == 0)
         return false;
+      m_iteration_count = count;
     }
+    return m_takes_iteration_count;
+  }
 
-    // Whether a "stop class" event should be reported to the "outside world".  In general
-    // if a thread plan is active, events should not be reported.
+  virtual size_t GetIterationCount() {
+    if (!m_takes_iteration_count)
+      return 0;
+    else
+      return m_iteration_count;
+  }
 
-    virtual Vote
-    ShouldReportStop (Event *event_ptr);
+protected:
+  //------------------------------------------------------------------
+  // Classes that inherit from ThreadPlan can see and modify these
+  //------------------------------------------------------------------
 
-    virtual Vote
-    ShouldReportRun (Event *event_ptr);
+  virtual bool DoWillResume(lldb::StateType resume_state, bool current_plan) {
+    return true;
+  }
 
-    virtual void
-    SetStopOthers (bool new_value);
-    
-    virtual bool
-    StopOthers ();
-
-    // This is the wrapper for DoWillResume that does generic ThreadPlan logic, then
-    // calls DoWillResume.
-    bool
-    WillResume (lldb::StateType resume_state, bool current_plan);
-    
-    virtual bool
-    WillStop () = 0;
-
-    bool
-    IsMasterPlan()
-    {
-        return m_is_master_plan;
-    }
-    
-    bool
-    SetIsMasterPlan (bool value)
-    {
-        bool old_value = m_is_master_plan;
-        m_is_master_plan = value;
-        return old_value;
-    }
+  virtual bool DoPlanExplainsStop(Event *event_ptr) = 0;
 
-    virtual bool
-    OkayToDiscard();
+  // This gets the previous plan to the current plan (for forwarding requests).
+  // This is mostly a formal requirement, it allows us to make the Thread's
+  // GetPreviousPlan protected, but only friend ThreadPlan to thread.
 
-    void
-    SetOkayToDiscard (bool value)
-    {
-        m_okay_to_discard = value;
-    }
-    
-    // The base class MischiefManaged does some cleanup - so you have to call it
-    // in your MischiefManaged derived class.
-    virtual bool
-    MischiefManaged ();
-
-    virtual void
-    ThreadDestroyed ()
-    {
-        // Any cleanup that a plan might want to do in case the thread goes away
-        // in the middle of the plan being queued on a thread can be done here.
-    }
+  ThreadPlan *GetPreviousPlan() { return m_thread.GetPreviousPlan(this); }
 
-    bool
-    GetPrivate ()
-    {
-        return m_plan_private;
-    }
+  // This forwards the private Thread::GetPrivateStopInfo which is generally
+  // what
+  // ThreadPlan's need to know.
 
-    void
-    SetPrivate (bool input)
-    {
-        m_plan_private = input;
-    }
+  lldb::StopInfoSP GetPrivateStopInfo() {
+    return m_thread.GetPrivateStopInfo();
+  }
 
-    virtual void
-    DidPush();
+  void SetStopInfo(lldb::StopInfoSP stop_reason_sp) {
+    m_thread.SetStopInfo(stop_reason_sp);
+  }
 
-    virtual void
-    WillPop();
+  void CachePlanExplainsStop(bool does_explain) {
+    m_cached_plan_explains_stop = does_explain ? eLazyBoolYes : eLazyBoolNo;
+  }
 
-    // This pushes a plan onto the plan stack of the current plan's thread.
-    void
-    PushPlan (lldb::ThreadPlanSP &thread_plan_sp)
-    {
-        m_thread.PushPlan (thread_plan_sp);
-    }
-    
-    ThreadPlanKind GetKind() const
-    {
-        return m_kind;
-    }
-    
-    bool
-    IsPlanComplete();
-    
-    void
-    SetPlanComplete (bool success = true);
-    
-    virtual bool
-    IsPlanStale ()
-    {
-        return false;
-    }
-    
-    bool
-    PlanSucceeded ()
-    {
-        return m_plan_succeeded;
-    }
-    
-    virtual bool
-    IsBasePlan()
-    {
-        return false;
-    }
-    
-    lldb::ThreadPlanTracerSP &
-    GetThreadPlanTracer()
-    {
-        return m_tracer_sp;
-    }
-    
-    void
-    SetThreadPlanTracer (lldb::ThreadPlanTracerSP new_tracer_sp)
-    {
-        m_tracer_sp = new_tracer_sp;
-    }
-    
-    void
-    DoTraceLog ()
-    {
-        if (m_tracer_sp && m_tracer_sp->TracingEnabled())
-            m_tracer_sp->Log();
-    }
+  LazyBool GetCachedPlanExplainsStop() const {
+    return m_cached_plan_explains_stop;
+  }
 
-    // Some thread plans hide away the actual stop info which caused any particular stop.  For
-    // instance the ThreadPlanCallFunction restores the original stop reason so that stopping and 
-    // calling a few functions won't lose the history of the run.
-    // This call can be implemented to get you back to the real stop info.
-    virtual lldb::StopInfoSP
-    GetRealStopInfo ()
-    {
-        return m_thread.GetStopInfo ();
-    }
-    
-    // If the completion of the thread plan stepped out of a function, the return value of the function
-    // might have been captured by the thread plan (currently only ThreadPlanStepOut does this.)
-    // If so, the ReturnValueObject can be retrieved from here.
-    
-    virtual lldb::ValueObjectSP
-    GetReturnValueObject ()
-    {
-        return lldb::ValueObjectSP();
-    }
+  virtual lldb::StateType GetPlanRunState() = 0;
 
-    // If the thread plan managing the evaluation of a user expression lives longer than the command
-    // that instigated the expression (generally because the expression evaluation hit a breakpoint, and
-    // the user regained control at that point) a subsequent process control command step/continue/etc. might
-    // complete the expression evaluations.  If so, the result of the expression evaluation will show up here.
-    
-    virtual lldb::ExpressionVariableSP
-    GetExpressionVariable ()
-    {
-        return lldb::ExpressionVariableSP();
-    }
-    
-    // If a thread plan stores the state before it was run, then you might
-    // want to restore the state when it is done.  This will do that job.
-    // This is mostly useful for artificial plans like CallFunction plans.
-    
-    virtual bool
-    RestoreThreadState()
-    {
-        // Nothing to do in general.
-        return true;
-    }
+  bool IsUsuallyUnexplainedStopReason(lldb::StopReason);
 
-    virtual bool
-    IsVirtualStep()
-    {
-        return false;
-    }
-    
-    virtual bool
-    SetIterationCount (size_t count)
-    {
-        if (m_takes_iteration_count)
-        {
-            // Don't tell me to do something 0 times...
-            if (count == 0)
-                return false;
-            m_iteration_count = count;
-        }
-        return m_takes_iteration_count;
-    }
-    
-    virtual size_t
-    GetIterationCount ()
-    {
-        if (!m_takes_iteration_count)
-            return 0;
-        else
-            return m_iteration_count;
-    }
-
-protected:
-    //------------------------------------------------------------------
-    // Classes that inherit from ThreadPlan can see and modify these
-    //------------------------------------------------------------------
-
-    virtual bool
-    DoWillResume (lldb::StateType resume_state, bool current_plan) { return true; }
-
-    virtual bool
-    DoPlanExplainsStop (Event *event_ptr) = 0;
-    
-    // This gets the previous plan to the current plan (for forwarding requests).
-    // This is mostly a formal requirement, it allows us to make the Thread's
-    // GetPreviousPlan protected, but only friend ThreadPlan to thread.
-
-    ThreadPlan *
-    GetPreviousPlan ()
-    {
-        return m_thread.GetPreviousPlan (this);
-    }
-    
-    // This forwards the private Thread::GetPrivateStopInfo which is generally what
-    // ThreadPlan's need to know.
-    
-    lldb::StopInfoSP 
-    GetPrivateStopInfo()
-    {
-        return m_thread.GetPrivateStopInfo ();
-    }
-    
-    void
-    SetStopInfo (lldb::StopInfoSP stop_reason_sp)
-    {
-        m_thread.SetStopInfo (stop_reason_sp);
-    }
-    
-    void
-    CachePlanExplainsStop (bool does_explain)
-    {
-        m_cached_plan_explains_stop = does_explain ? eLazyBoolYes : eLazyBoolNo;
-    }
-    
-    LazyBool
-    GetCachedPlanExplainsStop () const
-    {
-        return m_cached_plan_explains_stop;
-    }
-    
-    virtual lldb::StateType
-    GetPlanRunState () = 0;
-
-    bool
-    IsUsuallyUnexplainedStopReason(lldb::StopReason);
-
-    Thread &m_thread;
-    Vote m_stop_vote;
-    Vote m_run_vote;
-    bool m_takes_iteration_count = false;
-    int32_t m_iteration_count = 1;
+  Thread &m_thread;
+  Vote m_stop_vote;
+  Vote m_run_vote;
+  bool m_takes_iteration_count = false;
+  int32_t m_iteration_count = 1;
 
 private:
-    //------------------------------------------------------------------
-    // For ThreadPlan only
-    //------------------------------------------------------------------
-    static lldb::user_id_t GetNextID ();
-
-    ThreadPlanKind m_kind;
-    std::string m_name;
-    std::recursive_mutex m_plan_complete_mutex;
-    LazyBool m_cached_plan_explains_stop;
-    bool m_plan_complete;
-    bool m_plan_private;
-    bool m_okay_to_discard;
-    bool m_is_master_plan;
-    bool m_plan_succeeded;
-    
-    lldb::ThreadPlanTracerSP m_tracer_sp;
+  //------------------------------------------------------------------
+  // For ThreadPlan only
+  //------------------------------------------------------------------
+  static lldb::user_id_t GetNextID();
+
+  ThreadPlanKind m_kind;
+  std::string m_name;
+  std::recursive_mutex m_plan_complete_mutex;
+  LazyBool m_cached_plan_explains_stop;
+  bool m_plan_complete;
+  bool m_plan_private;
+  bool m_okay_to_discard;
+  bool m_is_master_plan;
+  bool m_plan_succeeded;
+
+  lldb::ThreadPlanTracerSP m_tracer_sp;
 
 private:
-    DISALLOW_COPY_AND_ASSIGN(ThreadPlan);
+  DISALLOW_COPY_AND_ASSIGN(ThreadPlan);
 };
 
 //----------------------------------------------------------------------
@@ -654,48 +634,31 @@ private:
 // But asking questions of the ThreadPlanNull is definitely an error.
 //----------------------------------------------------------------------
 
-class ThreadPlanNull : public ThreadPlan
-{
+class ThreadPlanNull : public ThreadPlan {
 public:
-    ThreadPlanNull (Thread &thread);
-    ~ThreadPlanNull() override;
-    
-    void
-    GetDescription(Stream *s,
-		   lldb::DescriptionLevel level) override;
-
-    bool
-    ValidatePlan(Stream *error) override;
-
-    bool
-    ShouldStop(Event *event_ptr) override;
-
-    bool
-    MischiefManaged() override;
-
-    bool
-    WillStop() override;
-
-    bool
-    IsBasePlan() override
-    {
-        return true;
-    }
-    
-    bool
-    OkayToDiscard() override
-    {
-        return false;
-    }
+  ThreadPlanNull(Thread &thread);
+  ~ThreadPlanNull() override;
+
+  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
+
+  bool ValidatePlan(Stream *error) override;
+
+  bool ShouldStop(Event *event_ptr) override;
+
+  bool MischiefManaged() override;
+
+  bool WillStop() override;
+
+  bool IsBasePlan() override { return true; }
+
+  bool OkayToDiscard() override { return false; }
 
 protected:
-    bool
-    DoPlanExplainsStop(Event *event_ptr) override;
-    
-    lldb::StateType
-    GetPlanRunState() override;
+  bool DoPlanExplainsStop(Event *event_ptr) override;
+
+  lldb::StateType GetPlanRunState() override;
 
-    DISALLOW_COPY_AND_ASSIGN(ThreadPlanNull);
+  DISALLOW_COPY_AND_ASSIGN(ThreadPlanNull);
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadPlanBase.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanBase.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanBase.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanBase.h Tue Sep  6 15:57:50 2016
@@ -20,50 +20,41 @@
 
 namespace lldb_private {
 
-
 //------------------------------------------------------------------
 //  Base thread plans:
-//  This is the generic version of the bottom most plan on the plan stack.  It should
+//  This is the generic version of the bottom most plan on the plan stack.  It
+//  should
 //  be able to handle generic breakpoint hitting, and signals and exceptions.
 //------------------------------------------------------------------
 
-class ThreadPlanBase : public ThreadPlan
-{
-friend class Process;  // RunThreadPlan manages "stopper" base plans.
+class ThreadPlanBase : public ThreadPlan {
+  friend class Process; // RunThreadPlan manages "stopper" base plans.
 public:
-    ~ThreadPlanBase() override;
+  ~ThreadPlanBase() override;
+
+  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
+  bool ValidatePlan(Stream *error) override;
+  bool ShouldStop(Event *event_ptr) override;
+  Vote ShouldReportStop(Event *event_ptr) override;
+  bool StopOthers() override;
+  lldb::StateType GetPlanRunState() override;
+  bool WillStop() override;
+  bool MischiefManaged() override;
+
+  bool OkayToDiscard() override { return false; }
+
+  bool IsBasePlan() override { return true; }
 
-    void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
-    bool ValidatePlan(Stream *error) override;
-    bool ShouldStop(Event *event_ptr) override;
-    Vote ShouldReportStop(Event *event_ptr) override;
-    bool StopOthers() override;
-    lldb::StateType GetPlanRunState() override;
-    bool WillStop() override;
-    bool MischiefManaged() override;
-
-    bool
-    OkayToDiscard() override
-    {
-        return false;
-    }
-
-    bool
-    IsBasePlan() override
-    {
-        return true;
-    }
-    
 protected:
-    bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
-    bool DoPlanExplainsStop(Event *event_ptr) override;
-    ThreadPlanBase (Thread &thread);
+  bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
+  bool DoPlanExplainsStop(Event *event_ptr) override;
+  ThreadPlanBase(Thread &thread);
 
 private:
-    friend lldb::ThreadPlanSP
-    Thread::QueueFundamentalPlan(bool abort_other_plans);
+  friend lldb::ThreadPlanSP
+  Thread::QueueFundamentalPlan(bool abort_other_plans);
 
-    DISALLOW_COPY_AND_ASSIGN (ThreadPlanBase);
+  DISALLOW_COPY_AND_ASSIGN(ThreadPlanBase);
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h Tue Sep  6 15:57:50 2016
@@ -14,177 +14,149 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/lldb-private.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/ThreadPlan.h"
+#include "lldb/lldb-private.h"
 
 #include "llvm/ADT/ArrayRef.h"
 
 namespace lldb_private {
 
-class ThreadPlanCallFunction : public ThreadPlan
-{
-    // Create a thread plan to call a function at the address passed in the "function"
-    // argument.  If you plan to call GetReturnValueObject, then pass in the 
-    // return type, otherwise just pass in an invalid CompilerType.
+class ThreadPlanCallFunction : public ThreadPlan {
+  // Create a thread plan to call a function at the address passed in the
+  // "function"
+  // argument.  If you plan to call GetReturnValueObject, then pass in the
+  // return type, otherwise just pass in an invalid CompilerType.
 public:
-    ThreadPlanCallFunction (Thread &thread,
-                            const Address &function,
-                            const CompilerType &return_type,
-                            llvm::ArrayRef<lldb::addr_t> args,
-                            const EvaluateExpressionOptions &options);
-
-    ThreadPlanCallFunction(Thread &thread,
-                           const Address &function,
-                           const EvaluateExpressionOptions &options);
-
-    ~ThreadPlanCallFunction() override;
-
-    void
-    GetDescription(Stream *s, lldb::DescriptionLevel level) override;
-
-    bool
-    ValidatePlan(Stream *error) override;
-
-    bool
-    ShouldStop(Event *event_ptr) override;
-    
-    Vote
-    ShouldReportStop(Event *event_ptr) override;
-
-    bool
-    StopOthers() override;
-    
-    lldb::StateType
-    GetPlanRunState() override;
-
-    void
-    DidPush() override;
-
-    bool
-    WillStop() override;
-
-    bool
-    MischiefManaged() override;
-
-    // To get the return value from a function call you must create a 
-    // lldb::ValueSP that contains a valid clang type in its context and call
-    // RequestReturnValue. The ValueSP will be stored and when the function is
-    // done executing, the object will check if there is a requested return 
-    // value. If there is, the return value will be retrieved using the 
-    // ABI::GetReturnValue() for the ABI in the process. Then after the thread
-    // plan is complete, you can call "GetReturnValue()" to retrieve the value
-    // that was extracted.
-
-    lldb::ValueObjectSP
-    GetReturnValueObject() override
-    {
-        return m_return_valobj_sp;
-    }
-
-    // Return the stack pointer that the function received
-    // on entry.  Any stack address below this should be 
-    // considered invalid after the function has been
-    // cleaned up.
-    lldb::addr_t
-    GetFunctionStackPointer()
-    {
-        return m_function_sp;
-    }
-    
-    // Classes that derive from FunctionCaller, and implement
-    // their own WillPop methods should call this so that the
-    // thread state gets restored if the plan gets discarded.
-    void
-    WillPop() override;
-    
-    // If the thread plan stops mid-course, this will be the stop reason that interrupted us.
-    // Once DoTakedown is called, this will be the real stop reason at the end of the function call.
-    // If it hasn't been set for one or the other of these reasons, we'll return the PrivateStopReason.
-    // This is needed because we want the CallFunction thread plans not to show up as the stop reason.
-    // But if something bad goes wrong, it is nice to be able to tell the user what really happened.
-
-    lldb::StopInfoSP
-    GetRealStopInfo() override
-    {
-        if (m_real_stop_info_sp)
-            return m_real_stop_info_sp;
-        else
-            return GetPrivateStopInfo ();
-    }
-    
-    lldb::addr_t
-    GetStopAddress ()
-    {
-        return m_stop_address;
-    }
-
-    bool
-    RestoreThreadState() override;
-    
-    void
-    ThreadDestroyed() override
-    {
-        m_takedown_done = true;
-    }
-    
-    void
-    SetStopOthers(bool new_value) override;
-    
+  ThreadPlanCallFunction(Thread &thread, const Address &function,
+                         const CompilerType &return_type,
+                         llvm::ArrayRef<lldb::addr_t> args,
+                         const EvaluateExpressionOptions &options);
+
+  ThreadPlanCallFunction(Thread &thread, const Address &function,
+                         const EvaluateExpressionOptions &options);
+
+  ~ThreadPlanCallFunction() override;
+
+  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
+
+  bool ValidatePlan(Stream *error) override;
+
+  bool ShouldStop(Event *event_ptr) override;
+
+  Vote ShouldReportStop(Event *event_ptr) override;
+
+  bool StopOthers() override;
+
+  lldb::StateType GetPlanRunState() override;
+
+  void DidPush() override;
+
+  bool WillStop() override;
+
+  bool MischiefManaged() override;
+
+  // To get the return value from a function call you must create a
+  // lldb::ValueSP that contains a valid clang type in its context and call
+  // RequestReturnValue. The ValueSP will be stored and when the function is
+  // done executing, the object will check if there is a requested return
+  // value. If there is, the return value will be retrieved using the
+  // ABI::GetReturnValue() for the ABI in the process. Then after the thread
+  // plan is complete, you can call "GetReturnValue()" to retrieve the value
+  // that was extracted.
+
+  lldb::ValueObjectSP GetReturnValueObject() override {
+    return m_return_valobj_sp;
+  }
+
+  // Return the stack pointer that the function received
+  // on entry.  Any stack address below this should be
+  // considered invalid after the function has been
+  // cleaned up.
+  lldb::addr_t GetFunctionStackPointer() { return m_function_sp; }
+
+  // Classes that derive from FunctionCaller, and implement
+  // their own WillPop methods should call this so that the
+  // thread state gets restored if the plan gets discarded.
+  void WillPop() override;
+
+  // If the thread plan stops mid-course, this will be the stop reason that
+  // interrupted us.
+  // Once DoTakedown is called, this will be the real stop reason at the end of
+  // the function call.
+  // If it hasn't been set for one or the other of these reasons, we'll return
+  // the PrivateStopReason.
+  // This is needed because we want the CallFunction thread plans not to show up
+  // as the stop reason.
+  // But if something bad goes wrong, it is nice to be able to tell the user
+  // what really happened.
+
+  lldb::StopInfoSP GetRealStopInfo() override {
+    if (m_real_stop_info_sp)
+      return m_real_stop_info_sp;
+    else
+      return GetPrivateStopInfo();
+  }
+
+  lldb::addr_t GetStopAddress() { return m_stop_address; }
+
+  bool RestoreThreadState() override;
+
+  void ThreadDestroyed() override { m_takedown_done = true; }
+
+  void SetStopOthers(bool new_value) override;
+
 protected:
-    void ReportRegisterState (const char *message);
+  void ReportRegisterState(const char *message);
 
-    bool
-    DoPlanExplainsStop(Event *event_ptr) override;
+  bool DoPlanExplainsStop(Event *event_ptr) override;
 
-    virtual void
-    SetReturnValue();
+  virtual void SetReturnValue();
 
-    bool
-    ConstructorSetup (Thread &thread,
-                      ABI *& abi,
-                      lldb::addr_t &start_load_addr,
-                      lldb::addr_t &function_load_addr);
-
-    void
-    DoTakedown (bool success);
-    
-    void
-    SetBreakpoints ();
-    
-    void
-    ClearBreakpoints ();
-    
-    bool
-    BreakpointsExplainStop ();
-
-    bool                                            m_valid;
-    bool                                            m_stop_other_threads;
-    bool                                            m_unwind_on_error;
-    bool                                            m_ignore_breakpoints;
-    bool                                            m_debug_execution;
-    bool                                            m_trap_exceptions;
-    Address                                         m_function_addr;
-    Address                                         m_start_addr;
-    lldb::addr_t                                    m_function_sp;
-    lldb::ThreadPlanSP                              m_subplan_sp;
-    LanguageRuntime                                *m_cxx_language_runtime;
-    LanguageRuntime                                *m_objc_language_runtime;
-    Thread::ThreadStateCheckpoint                   m_stored_thread_state;
-    lldb::StopInfoSP                                m_real_stop_info_sp; // In general we want to hide call function
-                                                                         // thread plans, but for reporting purposes,
-                                                                         // it's nice to know the real stop reason.
-                                                                         // This gets set in DoTakedown.
-    StreamString                                    m_constructor_errors;
-    lldb::ValueObjectSP                             m_return_valobj_sp;  // If this contains a valid pointer, use the ABI to extract values when complete
-    bool                                            m_takedown_done;    // We want to ensure we only do the takedown once.  This ensures that.
-    bool                                            m_should_clear_objc_exception_bp;
-    bool                                            m_should_clear_cxx_exception_bp;
-    lldb::addr_t                                    m_stop_address;     // This is the address we stopped at.  Also set in DoTakedown;
+  bool ConstructorSetup(Thread &thread, ABI *&abi,
+                        lldb::addr_t &start_load_addr,
+                        lldb::addr_t &function_load_addr);
+
+  void DoTakedown(bool success);
+
+  void SetBreakpoints();
+
+  void ClearBreakpoints();
+
+  bool BreakpointsExplainStop();
+
+  bool m_valid;
+  bool m_stop_other_threads;
+  bool m_unwind_on_error;
+  bool m_ignore_breakpoints;
+  bool m_debug_execution;
+  bool m_trap_exceptions;
+  Address m_function_addr;
+  Address m_start_addr;
+  lldb::addr_t m_function_sp;
+  lldb::ThreadPlanSP m_subplan_sp;
+  LanguageRuntime *m_cxx_language_runtime;
+  LanguageRuntime *m_objc_language_runtime;
+  Thread::ThreadStateCheckpoint m_stored_thread_state;
+  lldb::StopInfoSP
+      m_real_stop_info_sp; // In general we want to hide call function
+                           // thread plans, but for reporting purposes,
+                           // it's nice to know the real stop reason.
+                           // This gets set in DoTakedown.
+  StreamString m_constructor_errors;
+  lldb::ValueObjectSP m_return_valobj_sp; // If this contains a valid pointer,
+                                          // use the ABI to extract values when
+                                          // complete
+  bool m_takedown_done; // We want to ensure we only do the takedown once.  This
+                        // ensures that.
+  bool m_should_clear_objc_exception_bp;
+  bool m_should_clear_cxx_exception_bp;
+  lldb::addr_t m_stop_address; // This is the address we stopped at.  Also set
+                               // in DoTakedown;
 
 private:
-    CompilerType                                    m_return_type;
-    DISALLOW_COPY_AND_ASSIGN (ThreadPlanCallFunction);
+  CompilerType m_return_type;
+  DISALLOW_COPY_AND_ASSIGN(ThreadPlanCallFunction);
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h Tue Sep  6 15:57:50 2016
@@ -1,4 +1,5 @@
-//===-- ThreadPlanCallFunctionUsingABI.h --------------------------------*- C++ -*-===//
+//===-- ThreadPlanCallFunctionUsingABI.h --------------------------------*- C++
+//-*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -14,42 +15,43 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/lldb-private.h"
 #include "lldb/Target/ABI.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/ThreadPlanCallFunction.h"
+#include "lldb/lldb-private.h"
 
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/IR/DerivedTypes.h"
 
 namespace lldb_private {
 
-class ThreadPlanCallFunctionUsingABI : public ThreadPlanCallFunction
-{
-    // Create a thread plan to call a function at the address passed in the "function"
-    // argument, this function is executed using register manipulation instead of JIT.
-    // Class derives from ThreadPlanCallFunction and differs by calling a alternative
-    // ABI interface ABI::PrepareTrivialCall() which provides more detailed information.
+class ThreadPlanCallFunctionUsingABI : public ThreadPlanCallFunction {
+  // Create a thread plan to call a function at the address passed in the
+  // "function"
+  // argument, this function is executed using register manipulation instead of
+  // JIT.
+  // Class derives from ThreadPlanCallFunction and differs by calling a
+  // alternative
+  // ABI interface ABI::PrepareTrivialCall() which provides more detailed
+  // information.
 public:
-    ThreadPlanCallFunctionUsingABI (Thread &thread,
+  ThreadPlanCallFunctionUsingABI(Thread &thread,
                                  const Address &function_address,
                                  llvm::Type &function_prototype,
                                  llvm::Type &return_type,
                                  llvm::ArrayRef<ABI::CallArgument> args,
                                  const EvaluateExpressionOptions &options);
 
-    ~ThreadPlanCallFunctionUsingABI() override;
+  ~ThreadPlanCallFunctionUsingABI() override;
 
-    void
-    GetDescription (Stream *s, lldb::DescriptionLevel level) override;
+  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
 
 protected:
-    void
-    SetReturnValue () override;
+  void SetReturnValue() override;
 
 private:
-    llvm::Type                                     &m_return_type;
-    DISALLOW_COPY_AND_ASSIGN (ThreadPlanCallFunctionUsingABI);
+  llvm::Type &m_return_type;
+  DISALLOW_COPY_AND_ASSIGN(ThreadPlanCallFunctionUsingABI);
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadPlanCallOnFunctionExit.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanCallOnFunctionExit.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanCallOnFunctionExit.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanCallOnFunctionExit.h Tue Sep  6 15:57:50 2016
@@ -20,50 +20,37 @@ namespace lldb_private {
 /// This thread plan calls a function object when the current function exits.
 // =============================================================================
 
-class ThreadPlanCallOnFunctionExit : public ThreadPlan
-{
+class ThreadPlanCallOnFunctionExit : public ThreadPlan {
 public:
+  /// Definition for the callback made when the currently executing thread
+  /// finishes executing its function.
+  using Callback = std::function<void()>;
 
-    /// Definition for the callback made when the currently executing thread
-    /// finishes executing its function.
-    using Callback = std::function<void()>;
+  ThreadPlanCallOnFunctionExit(Thread &thread, const Callback &callback);
 
-    ThreadPlanCallOnFunctionExit(Thread &thread, const Callback &callback);
+  void DidPush() override;
 
-    void
-    DidPush() override;
+  // -------------------------------------------------------------------------
+  // ThreadPlan API
+  // -------------------------------------------------------------------------
 
-    // -------------------------------------------------------------------------
-    // ThreadPlan API
-    // -------------------------------------------------------------------------
+  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
 
-    void
-    GetDescription (Stream *s, lldb::DescriptionLevel level) override;
+  bool ValidatePlan(Stream *error) override;
 
-    bool
-    ValidatePlan (Stream *error) override;
+  bool ShouldStop(Event *event_ptr) override;
 
-    bool
-    ShouldStop (Event *event_ptr) override;
+  bool WillStop() override;
 
-    bool
-    WillStop () override;
-    
 protected:
+  bool DoPlanExplainsStop(Event *event_ptr) override;
 
-    bool
-    DoPlanExplainsStop (Event *event_ptr) override;
-
-    lldb::StateType
-    GetPlanRunState () override;
+  lldb::StateType GetPlanRunState() override;
 
 private:
-
-    Callback m_callback;
-    lldb::ThreadPlanSP m_step_out_threadplan_sp;
-
+  Callback m_callback;
+  lldb::ThreadPlanSP m_step_out_threadplan_sp;
 };
-
 }
 
 #endif /* ThreadPlanCallOnFunctionExit_h */

Modified: lldb/trunk/include/lldb/Target/ThreadPlanCallUserExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanCallUserExpression.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanCallUserExpression.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanCallUserExpression.h Tue Sep  6 15:57:50 2016
@@ -1,4 +1,5 @@
-//===-- ThreadPlanCallUserExpression.h --------------------------------*- C++ -*-===//
+//===-- ThreadPlanCallUserExpression.h --------------------------------*- C++
+//-*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -14,60 +15,50 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/lldb-private.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/ThreadPlan.h"
 #include "lldb/Target/ThreadPlanCallFunction.h"
+#include "lldb/lldb-private.h"
 
 #include "llvm/ADT/ArrayRef.h"
 
 namespace lldb_private {
 
-class ThreadPlanCallUserExpression : public ThreadPlanCallFunction
-{
+class ThreadPlanCallUserExpression : public ThreadPlanCallFunction {
 public:
-    ThreadPlanCallUserExpression (Thread &thread,
-                                  Address &function,
-                                  llvm::ArrayRef<lldb::addr_t> args,
-                                  const EvaluateExpressionOptions &options,
-                                  lldb::UserExpressionSP &user_expression_sp);
-    
-    ~ThreadPlanCallUserExpression() override;
-
-    void
-    GetDescription(Stream *s, lldb::DescriptionLevel level) override;
-    
-    void
-    WillPop() override;
-
-    lldb::StopInfoSP
-    GetRealStopInfo() override;
-    
-    bool
-    MischiefManaged() override;
-    
-    void
-    TransferExpressionOwnership ()
-    {
-        m_manage_materialization = true;
-    }
-    
-    lldb::ExpressionVariableSP
-    GetExpressionVariable() override
-    {
-        return m_result_var_sp;
-    }
-    
+  ThreadPlanCallUserExpression(Thread &thread, Address &function,
+                               llvm::ArrayRef<lldb::addr_t> args,
+                               const EvaluateExpressionOptions &options,
+                               lldb::UserExpressionSP &user_expression_sp);
+
+  ~ThreadPlanCallUserExpression() override;
+
+  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
+
+  void WillPop() override;
+
+  lldb::StopInfoSP GetRealStopInfo() override;
+
+  bool MischiefManaged() override;
+
+  void TransferExpressionOwnership() { m_manage_materialization = true; }
+
+  lldb::ExpressionVariableSP GetExpressionVariable() override {
+    return m_result_var_sp;
+  }
+
 protected:
 private:
-    lldb::UserExpressionSP m_user_expression_sp;    // This is currently just used to ensure the
-                                                         // User expression the initiated this ThreadPlan
-                                                         // lives as long as the thread plan does.
-    bool m_manage_materialization = false;
-    lldb::ExpressionVariableSP m_result_var_sp;     // If we are left to manage the materialization,
-                                                         // then stuff the result expression variable here.
+  lldb::UserExpressionSP
+      m_user_expression_sp; // This is currently just used to ensure the
+                            // User expression the initiated this ThreadPlan
+                            // lives as long as the thread plan does.
+  bool m_manage_materialization = false;
+  lldb::ExpressionVariableSP
+      m_result_var_sp; // If we are left to manage the materialization,
+                       // then stuff the result expression variable here.
 
-    DISALLOW_COPY_AND_ASSIGN (ThreadPlanCallUserExpression);
+  DISALLOW_COPY_AND_ASSIGN(ThreadPlanCallUserExpression);
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadPlanPython.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanPython.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanPython.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanPython.h Tue Sep  6 15:57:50 2016
@@ -1,4 +1,5 @@
-//===-- ThreadPlanPython.h --------------------------------------------*- C++ -*-===//
+//===-- ThreadPlanPython.h --------------------------------------------*- C++
+//-*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -16,15 +17,15 @@
 
 // Other libraries and framework includes
 // Project includes
-#include "lldb/lldb-private.h"
 #include "lldb/Core/StructuredData.h"
 #include "lldb/Core/UserID.h"
 #include "lldb/Target/Process.h"
+#include "lldb/Target/StopInfo.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/ThreadPlan.h"
 #include "lldb/Target/ThreadPlanTracer.h"
-#include "lldb/Target/StopInfo.h"
+#include "lldb/lldb-private.h"
 
 namespace lldb_private {
 
@@ -33,49 +34,37 @@ namespace lldb_private {
 //
 //------------------------------------------------------------------
 
-class ThreadPlanPython : public ThreadPlan
-{
+class ThreadPlanPython : public ThreadPlan {
 public:
-    ThreadPlanPython (Thread &thread, const char *class_name);
-    ~ThreadPlanPython() override;
-    
-    void
-    GetDescription(Stream *s,
-		   lldb::DescriptionLevel level) override;
-
-    bool
-    ValidatePlan(Stream *error) override;
-
-    bool
-    ShouldStop(Event *event_ptr) override;
-
-    bool
-    MischiefManaged() override;
-
-    bool
-    WillStop() override;
-
-    bool
-    StopOthers() override;
-
-    void
-    DidPush() override;
-    
-    bool
-    IsPlanStale() override;
+  ThreadPlanPython(Thread &thread, const char *class_name);
+  ~ThreadPlanPython() override;
+
+  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
+
+  bool ValidatePlan(Stream *error) override;
+
+  bool ShouldStop(Event *event_ptr) override;
+
+  bool MischiefManaged() override;
+
+  bool WillStop() override;
+
+  bool StopOthers() override;
+
+  void DidPush() override;
+
+  bool IsPlanStale() override;
 
 protected:
-    bool
-    DoPlanExplainsStop(Event *event_ptr) override;
-    
-    lldb::StateType
-    GetPlanRunState() override;
+  bool DoPlanExplainsStop(Event *event_ptr) override;
+
+  lldb::StateType GetPlanRunState() override;
 
 private:
-    std::string m_class_name;
-    StructuredData::ObjectSP m_implementation_sp;
+  std::string m_class_name;
+  StructuredData::ObjectSP m_implementation_sp;
 
-    DISALLOW_COPY_AND_ASSIGN(ThreadPlanPython);
+  DISALLOW_COPY_AND_ASSIGN(ThreadPlanPython);
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadPlanRunToAddress.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanRunToAddress.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanRunToAddress.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanRunToAddress.h Tue Sep  6 15:57:50 2016
@@ -16,65 +16,55 @@
 
 // Other libraries and framework includes
 // Project includes
-#include "lldb/lldb-private.h"
 #include "lldb/Target/ThreadPlan.h"
+#include "lldb/lldb-private.h"
 
 namespace lldb_private {
 
-class ThreadPlanRunToAddress : public ThreadPlan
-{
+class ThreadPlanRunToAddress : public ThreadPlan {
 public:
-    ThreadPlanRunToAddress (Thread &thread,
-                            Address &address,
-                            bool stop_others);
-
-    ThreadPlanRunToAddress (Thread &thread,
-                            lldb::addr_t address,
-                            bool stop_others);
-
-    ThreadPlanRunToAddress (Thread &thread,
-                            const std::vector<lldb::addr_t> &addresses,
-                            bool stop_others);
-
-    ~ThreadPlanRunToAddress() override;
-
-    void
-    GetDescription(Stream *s, lldb::DescriptionLevel level) override;
-
-    bool
-    ValidatePlan(Stream *error) override;
-
-    bool
-    ShouldStop(Event *event_ptr) override;
-
-    bool
-    StopOthers() override;
-    
-    void
-    SetStopOthers(bool new_value) override;
-    
-    lldb::StateType
-    GetPlanRunState() override;
+  ThreadPlanRunToAddress(Thread &thread, Address &address, bool stop_others);
+
+  ThreadPlanRunToAddress(Thread &thread, lldb::addr_t address,
+                         bool stop_others);
+
+  ThreadPlanRunToAddress(Thread &thread,
+                         const std::vector<lldb::addr_t> &addresses,
+                         bool stop_others);
+
+  ~ThreadPlanRunToAddress() override;
+
+  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
 
-    bool
-    WillStop() override;
+  bool ValidatePlan(Stream *error) override;
 
-    bool
-    MischiefManaged() override;
+  bool ShouldStop(Event *event_ptr) override;
+
+  bool StopOthers() override;
+
+  void SetStopOthers(bool new_value) override;
+
+  lldb::StateType GetPlanRunState() override;
+
+  bool WillStop() override;
+
+  bool MischiefManaged() override;
 
 protected:
-    bool
-    DoPlanExplainsStop(Event *event_ptr) override;
+  bool DoPlanExplainsStop(Event *event_ptr) override;
+
+  void SetInitialBreakpoints();
+  bool AtOurAddress();
 
-    void SetInitialBreakpoints();
-    bool AtOurAddress();
 private:
-    bool m_stop_others;
-    std::vector<lldb::addr_t> m_addresses;   // This is the address we are going to run to.
-                          // TODO: Would it be useful to have multiple addresses?
-    std::vector<lldb::break_id_t> m_break_ids; // This is the breakpoint we are using to stop us at m_address.
+  bool m_stop_others;
+  std::vector<lldb::addr_t>
+      m_addresses; // This is the address we are going to run to.
+                   // TODO: Would it be useful to have multiple addresses?
+  std::vector<lldb::break_id_t> m_break_ids; // This is the breakpoint we are
+                                             // using to stop us at m_address.
 
-    DISALLOW_COPY_AND_ASSIGN (ThreadPlanRunToAddress);
+  DISALLOW_COPY_AND_ASSIGN(ThreadPlanRunToAddress);
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h Tue Sep  6 15:57:50 2016
@@ -18,134 +18,128 @@
 
 namespace lldb_private {
 
-// This is an interface that ThreadPlans can adopt to allow flexible modifications of the behavior
-// when a thread plan comes to a place where it would ordinarily stop.  If such modification makes
-// sense for your plan, inherit from this class, and when you would be about to stop (in your ShouldStop
-// method), call InvokeShouldStopHereCallback, passing in the frame comparison between where the step operation
-// started and where you arrived.  If it returns true, then QueueStepOutFromHere will queue the plan
+// This is an interface that ThreadPlans can adopt to allow flexible
+// modifications of the behavior
+// when a thread plan comes to a place where it would ordinarily stop.  If such
+// modification makes
+// sense for your plan, inherit from this class, and when you would be about to
+// stop (in your ShouldStop
+// method), call InvokeShouldStopHereCallback, passing in the frame comparison
+// between where the step operation
+// started and where you arrived.  If it returns true, then QueueStepOutFromHere
+// will queue the plan
 // to execute instead of stopping.
 //
-// The classic example of the use of this is ThreadPlanStepInRange not stopping in frames that have
+// The classic example of the use of this is ThreadPlanStepInRange not stopping
+// in frames that have
 // no debug information.
 //
-// This class also defines a set of flags to control general aspects of this "ShouldStop" behavior.
-// A class implementing this protocol needs to define a default set of flags, and can provide access to
+// This class also defines a set of flags to control general aspects of this
+// "ShouldStop" behavior.
+// A class implementing this protocol needs to define a default set of flags,
+// and can provide access to
 // changing that default flag set if it wishes.
 
-class ThreadPlanShouldStopHere
-{
+class ThreadPlanShouldStopHere {
 public:
-    struct ThreadPlanShouldStopHereCallbacks
-    {
-        ThreadPlanShouldStopHereCallbacks()
-        {
-            should_stop_here_callback = nullptr;
-            step_from_here_callback = nullptr;
-        }
-        
-        ThreadPlanShouldStopHereCallbacks(ThreadPlanShouldStopHereCallback should_stop,
-                                          ThreadPlanStepFromHereCallback step_from_here)
-        {
-            should_stop_here_callback = should_stop;
-            step_from_here_callback = step_from_here;
-        }
-        
-        void
-        Clear()
-        {
-            should_stop_here_callback = nullptr;
-            step_from_here_callback = nullptr;
-        }
-        
-        ThreadPlanShouldStopHereCallback should_stop_here_callback;
-        ThreadPlanStepFromHereCallback   step_from_here_callback;
-    };
-    
-    enum
-    {
-        eNone = 0,
-        eAvoidInlines            = (1 << 0),
-        eStepInAvoidNoDebug      = (1 << 1),
-        eStepOutAvoidNoDebug     = (1 << 2)
-    };
-
-    //------------------------------------------------------------------
-    // Constructors and Destructors
-    //------------------------------------------------------------------
-    ThreadPlanShouldStopHere (ThreadPlan *owner);
-    
-    ThreadPlanShouldStopHere(ThreadPlan *owner,
-                             const ThreadPlanShouldStopHereCallbacks *callbacks,
-                             void *baton = nullptr);
-    virtual
-    ~ThreadPlanShouldStopHere();
-    
-    // Set the ShouldStopHere callbacks.  Pass in null to clear them and have no special behavior (though you
-    // can also call ClearShouldStopHereCallbacks for that purpose.  If you pass in a valid pointer, it will
-    // adopt the non-null fields, and any null fields will be set to the default values.
-    
-    void
-    SetShouldStopHereCallbacks (const ThreadPlanShouldStopHereCallbacks *callbacks, void *baton)
-    {
-        if (callbacks)
-        {
-            m_callbacks = *callbacks;
-            if (!m_callbacks.should_stop_here_callback)
-                m_callbacks.should_stop_here_callback = ThreadPlanShouldStopHere::DefaultShouldStopHereCallback;
-            if (!m_callbacks.step_from_here_callback)
-                m_callbacks.step_from_here_callback = ThreadPlanShouldStopHere::DefaultStepFromHereCallback;
-        }
-        else
-        {
-            ClearShouldStopHereCallbacks ();
-        }
-        m_baton = baton;
+  struct ThreadPlanShouldStopHereCallbacks {
+    ThreadPlanShouldStopHereCallbacks() {
+      should_stop_here_callback = nullptr;
+      step_from_here_callback = nullptr;
     }
-    
-    void
-    ClearShouldStopHereCallbacks()
-    {
-        m_callbacks.Clear();
+
+    ThreadPlanShouldStopHereCallbacks(
+        ThreadPlanShouldStopHereCallback should_stop,
+        ThreadPlanStepFromHereCallback step_from_here) {
+      should_stop_here_callback = should_stop;
+      step_from_here_callback = step_from_here;
     }
 
-    bool
-    InvokeShouldStopHereCallback (lldb::FrameComparison operation);
-    
-    lldb::ThreadPlanSP
-    CheckShouldStopHereAndQueueStepOut (lldb::FrameComparison operation);
-
-    lldb_private::Flags &
-    GetFlags ()
-    {
-        return m_flags;
+    void Clear() {
+      should_stop_here_callback = nullptr;
+      step_from_here_callback = nullptr;
     }
 
-    const lldb_private::Flags &
-    GetFlags () const
-    {
-        return m_flags;
+    ThreadPlanShouldStopHereCallback should_stop_here_callback;
+    ThreadPlanStepFromHereCallback step_from_here_callback;
+  };
+
+  enum {
+    eNone = 0,
+    eAvoidInlines = (1 << 0),
+    eStepInAvoidNoDebug = (1 << 1),
+    eStepOutAvoidNoDebug = (1 << 2)
+  };
+
+  //------------------------------------------------------------------
+  // Constructors and Destructors
+  //------------------------------------------------------------------
+  ThreadPlanShouldStopHere(ThreadPlan *owner);
+
+  ThreadPlanShouldStopHere(ThreadPlan *owner,
+                           const ThreadPlanShouldStopHereCallbacks *callbacks,
+                           void *baton = nullptr);
+  virtual ~ThreadPlanShouldStopHere();
+
+  // Set the ShouldStopHere callbacks.  Pass in null to clear them and have no
+  // special behavior (though you
+  // can also call ClearShouldStopHereCallbacks for that purpose.  If you pass
+  // in a valid pointer, it will
+  // adopt the non-null fields, and any null fields will be set to the default
+  // values.
+
+  void
+  SetShouldStopHereCallbacks(const ThreadPlanShouldStopHereCallbacks *callbacks,
+                             void *baton) {
+    if (callbacks) {
+      m_callbacks = *callbacks;
+      if (!m_callbacks.should_stop_here_callback)
+        m_callbacks.should_stop_here_callback =
+            ThreadPlanShouldStopHere::DefaultShouldStopHereCallback;
+      if (!m_callbacks.step_from_here_callback)
+        m_callbacks.step_from_here_callback =
+            ThreadPlanShouldStopHere::DefaultStepFromHereCallback;
+    } else {
+      ClearShouldStopHereCallbacks();
     }
+    m_baton = baton;
+  }
+
+  void ClearShouldStopHereCallbacks() { m_callbacks.Clear(); }
+
+  bool InvokeShouldStopHereCallback(lldb::FrameComparison operation);
+
+  lldb::ThreadPlanSP
+  CheckShouldStopHereAndQueueStepOut(lldb::FrameComparison operation);
+
+  lldb_private::Flags &GetFlags() { return m_flags; }
+
+  const lldb_private::Flags &GetFlags() const { return m_flags; }
 
 protected:
-    static bool
-    DefaultShouldStopHereCallback (ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation, void *baton);
-    
-    static lldb::ThreadPlanSP
-    DefaultStepFromHereCallback (ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation, void *baton);
-    
-    virtual lldb::ThreadPlanSP
-    QueueStepOutFromHerePlan (Flags &flags, lldb::FrameComparison operation);
-
-    // Implement this, and call it in the plan's constructor to set the default flags.
-    virtual void SetFlagsToDefault () = 0;
-
-    ThreadPlanShouldStopHereCallbacks m_callbacks;
-    void * m_baton;
-    ThreadPlan *m_owner;
-    lldb_private::Flags m_flags;
+  static bool DefaultShouldStopHereCallback(ThreadPlan *current_plan,
+                                            Flags &flags,
+                                            lldb::FrameComparison operation,
+                                            void *baton);
+
+  static lldb::ThreadPlanSP
+  DefaultStepFromHereCallback(ThreadPlan *current_plan, Flags &flags,
+                              lldb::FrameComparison operation, void *baton);
+
+  virtual lldb::ThreadPlanSP
+  QueueStepOutFromHerePlan(Flags &flags, lldb::FrameComparison operation);
+
+  // Implement this, and call it in the plan's constructor to set the default
+  // flags.
+  virtual void SetFlagsToDefault() = 0;
+
+  ThreadPlanShouldStopHereCallbacks m_callbacks;
+  void *m_baton;
+  ThreadPlan *m_owner;
+  lldb_private::Flags m_flags;
 
 private:
-    DISALLOW_COPY_AND_ASSIGN (ThreadPlanShouldStopHere);
+  DISALLOW_COPY_AND_ASSIGN(ThreadPlanShouldStopHere);
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadPlanStepInRange.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanStepInRange.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanStepInRange.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanStepInRange.h Tue Sep  6 15:57:50 2016
@@ -17,107 +17,94 @@
 #include "lldb/Core/AddressRange.h"
 #include "lldb/Target/StackID.h"
 #include "lldb/Target/Thread.h"
-#include "lldb/Target/ThreadPlanStepRange.h"
 #include "lldb/Target/ThreadPlanShouldStopHere.h"
+#include "lldb/Target/ThreadPlanStepRange.h"
 
 namespace lldb_private {
 
-class ThreadPlanStepInRange :
-    public ThreadPlanStepRange,
-    public ThreadPlanShouldStopHere
-{
+class ThreadPlanStepInRange : public ThreadPlanStepRange,
+                              public ThreadPlanShouldStopHere {
 public:
-    ThreadPlanStepInRange (Thread &thread,
-                           const AddressRange &range,
-                           const SymbolContext &addr_context,
-                           lldb::RunMode stop_others,
-                            LazyBool step_in_avoids_code_without_debug_info,
-                            LazyBool step_out_avoids_code_without_debug_info);
-    
-    ThreadPlanStepInRange (Thread &thread,
-                           const AddressRange &range,
-                           const SymbolContext &addr_context,
-                           const char *step_into_function_name,
-                           lldb::RunMode stop_others,
-                            LazyBool step_in_avoids_code_without_debug_info,
-                            LazyBool step_out_avoids_code_without_debug_info);
-
-    ~ThreadPlanStepInRange() override;
-
-    void
-    GetDescription(Stream *s, lldb::DescriptionLevel level) override;
-
-    bool
-    ShouldStop(Event *event_ptr) override;
-
-    void SetAvoidRegexp(const char *name);
-    
-    void SetStepInTarget (const char *target)
-    {
-        m_step_into_target.SetCString(target);
-    }
-    
-    static void
-    SetDefaultFlagValue (uint32_t new_value);
-    
-    bool
-    IsVirtualStep() override;
+  ThreadPlanStepInRange(Thread &thread, const AddressRange &range,
+                        const SymbolContext &addr_context,
+                        lldb::RunMode stop_others,
+                        LazyBool step_in_avoids_code_without_debug_info,
+                        LazyBool step_out_avoids_code_without_debug_info);
 
-protected:
-    static bool
-    DefaultShouldStopHereCallback (ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation, void *baton);
+  ThreadPlanStepInRange(Thread &thread, const AddressRange &range,
+                        const SymbolContext &addr_context,
+                        const char *step_into_function_name,
+                        lldb::RunMode stop_others,
+                        LazyBool step_in_avoids_code_without_debug_info,
+                        LazyBool step_out_avoids_code_without_debug_info);
 
-    bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
+  ~ThreadPlanStepInRange() override;
 
-    bool
-    DoPlanExplainsStop(Event *event_ptr) override;
+  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
 
-    void
-    SetFlagsToDefault() override
-    {
-        GetFlags().Set(ThreadPlanStepInRange::s_default_flag_values);
-    }
-    
-    void
-    SetCallbacks()
-    {
-        ThreadPlanShouldStopHere::ThreadPlanShouldStopHereCallbacks callbacks(ThreadPlanStepInRange::DefaultShouldStopHereCallback, nullptr);
-        SetShouldStopHereCallbacks (&callbacks, nullptr);
-    }
-    
-    bool
-    FrameMatchesAvoidCriteria ();
+  bool ShouldStop(Event *event_ptr) override;
 
-private:
+  void SetAvoidRegexp(const char *name);
+
+  void SetStepInTarget(const char *target) {
+    m_step_into_target.SetCString(target);
+  }
+
+  static void SetDefaultFlagValue(uint32_t new_value);
 
-    friend lldb::ThreadPlanSP
-    Thread::QueueThreadPlanForStepOverRange (bool abort_other_plans,
-                                         const AddressRange &range,
-                                         const SymbolContext &addr_context,
-                                         lldb::RunMode stop_others,
-                                         LazyBool avoid_code_without_debug_info);
-    friend lldb::ThreadPlanSP
-    Thread::QueueThreadPlanForStepInRange (bool abort_other_plans,
-                                         const AddressRange &range,
-                                         const SymbolContext &addr_context,
-                                         const char *step_in_target,
-                                         lldb::RunMode stop_others,
-                                         LazyBool step_in_avoids_code_without_debug_info,
-                                         LazyBool step_out_avoids_code_without_debug_info);
-
-    void SetupAvoidNoDebug(LazyBool step_in_avoids_code_without_debug_info,
-                           LazyBool step_out_avoids_code_without_debug_info);
-    // Need an appropriate marker for the current stack so we can tell step out
-    // from step in.
-
-    static uint32_t s_default_flag_values;  // These are the default flag values for the ThreadPlanStepThrough.
-    lldb::ThreadPlanSP m_sub_plan_sp;  // Keep track of the last plan we were running.  If it fails, we should stop.
-    std::unique_ptr<RegularExpression> m_avoid_regexp_ap;
-    bool m_step_past_prologue;  // FIXME: For now hard-coded to true, we could put a switch in for this if there's
-                                // demand for that.
-    bool m_virtual_step;        // true if we've just done a "virtual step", i.e. just moved the inline stack depth.
-    ConstString m_step_into_target;
-    DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepInRange);
+  bool IsVirtualStep() override;
+
+protected:
+  static bool DefaultShouldStopHereCallback(ThreadPlan *current_plan,
+                                            Flags &flags,
+                                            lldb::FrameComparison operation,
+                                            void *baton);
+
+  bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
+
+  bool DoPlanExplainsStop(Event *event_ptr) override;
+
+  void SetFlagsToDefault() override {
+    GetFlags().Set(ThreadPlanStepInRange::s_default_flag_values);
+  }
+
+  void SetCallbacks() {
+    ThreadPlanShouldStopHere::ThreadPlanShouldStopHereCallbacks callbacks(
+        ThreadPlanStepInRange::DefaultShouldStopHereCallback, nullptr);
+    SetShouldStopHereCallbacks(&callbacks, nullptr);
+  }
+
+  bool FrameMatchesAvoidCriteria();
+
+private:
+  friend lldb::ThreadPlanSP Thread::QueueThreadPlanForStepOverRange(
+      bool abort_other_plans, const AddressRange &range,
+      const SymbolContext &addr_context, lldb::RunMode stop_others,
+      LazyBool avoid_code_without_debug_info);
+  friend lldb::ThreadPlanSP Thread::QueueThreadPlanForStepInRange(
+      bool abort_other_plans, const AddressRange &range,
+      const SymbolContext &addr_context, const char *step_in_target,
+      lldb::RunMode stop_others,
+      LazyBool step_in_avoids_code_without_debug_info,
+      LazyBool step_out_avoids_code_without_debug_info);
+
+  void SetupAvoidNoDebug(LazyBool step_in_avoids_code_without_debug_info,
+                         LazyBool step_out_avoids_code_without_debug_info);
+  // Need an appropriate marker for the current stack so we can tell step out
+  // from step in.
+
+  static uint32_t s_default_flag_values; // These are the default flag values
+                                         // for the ThreadPlanStepThrough.
+  lldb::ThreadPlanSP m_sub_plan_sp;      // Keep track of the last plan we were
+                                    // running.  If it fails, we should stop.
+  std::unique_ptr<RegularExpression> m_avoid_regexp_ap;
+  bool m_step_past_prologue; // FIXME: For now hard-coded to true, we could put
+                             // a switch in for this if there's
+                             // demand for that.
+  bool m_virtual_step; // true if we've just done a "virtual step", i.e. just
+                       // moved the inline stack depth.
+  ConstString m_step_into_target;
+  DISALLOW_COPY_AND_ASSIGN(ThreadPlanStepInRange);
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadPlanStepInstruction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanStepInstruction.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanStepInstruction.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanStepInstruction.h Tue Sep  6 15:57:50 2016
@@ -14,50 +14,46 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/lldb-private.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/ThreadPlan.h"
+#include "lldb/lldb-private.h"
 
 namespace lldb_private {
 
-class ThreadPlanStepInstruction : public ThreadPlan
-{
+class ThreadPlanStepInstruction : public ThreadPlan {
 public:
-    ThreadPlanStepInstruction (Thread &thread,
-                               bool step_over,
-                               bool stop_others,
-                               Vote stop_vote,
-                               Vote run_vote);
-
-    ~ThreadPlanStepInstruction() override;
-
-    void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
-    bool ValidatePlan(Stream *error) override;
-    bool ShouldStop(Event *event_ptr) override;
-    bool StopOthers() override;
-    lldb::StateType GetPlanRunState() override;
-    bool WillStop() override;
-    bool MischiefManaged() override;
-    bool IsPlanStale() override;
+  ThreadPlanStepInstruction(Thread &thread, bool step_over, bool stop_others,
+                            Vote stop_vote, Vote run_vote);
+
+  ~ThreadPlanStepInstruction() override;
+
+  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
+  bool ValidatePlan(Stream *error) override;
+  bool ShouldStop(Event *event_ptr) override;
+  bool StopOthers() override;
+  lldb::StateType GetPlanRunState() override;
+  bool WillStop() override;
+  bool MischiefManaged() override;
+  bool IsPlanStale() override;
 
 protected:
-    bool DoPlanExplainsStop(Event *event_ptr) override;
+  bool DoPlanExplainsStop(Event *event_ptr) override;
 
-    void SetUpState ();
+  void SetUpState();
 
 private:
-    friend lldb::ThreadPlanSP
-    Thread::QueueThreadPlanForStepSingleInstruction (bool step_over, bool abort_other_plans, bool stop_other_threads);
+  friend lldb::ThreadPlanSP Thread::QueueThreadPlanForStepSingleInstruction(
+      bool step_over, bool abort_other_plans, bool stop_other_threads);
 
-    lldb::addr_t m_instruction_addr;
-    bool m_stop_other_threads;
-    bool m_step_over;
-    // These two are used only for the step over case.
-    bool m_start_has_symbol;
-    StackID m_stack_id;
-    StackID m_parent_frame_id;
+  lldb::addr_t m_instruction_addr;
+  bool m_stop_other_threads;
+  bool m_step_over;
+  // These two are used only for the step over case.
+  bool m_start_has_symbol;
+  StackID m_stack_id;
+  StackID m_parent_frame_id;
 
-    DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepInstruction);
+  DISALLOW_COPY_AND_ASSIGN(ThreadPlanStepInstruction);
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadPlanStepOut.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanStepOut.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanStepOut.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanStepOut.h Tue Sep  6 15:57:50 2016
@@ -20,85 +20,75 @@
 
 namespace lldb_private {
 
-class ThreadPlanStepOut : public ThreadPlan,
-                          public ThreadPlanShouldStopHere
-{
+class ThreadPlanStepOut : public ThreadPlan, public ThreadPlanShouldStopHere {
 public:
-    ThreadPlanStepOut (Thread &thread,
-                       SymbolContext *addr_context,
-                       bool first_insn,
-                       bool stop_others,
-                       Vote stop_vote,
-                       Vote run_vote,
-                       uint32_t frame_idx,
-                       LazyBool step_out_avoids_code_without_debug_info,
-                       bool continue_to_next_branch = false,
-                       bool gather_return_value = true);
-
-    ~ThreadPlanStepOut() override;
-
-    void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
-    bool ValidatePlan(Stream *error) override;
-    bool ShouldStop(Event *event_ptr) override;
-    bool StopOthers() override;
-    lldb::StateType GetPlanRunState() override;
-    bool WillStop() override;
-    bool MischiefManaged() override;
-    void DidPush() override;
-    bool IsPlanStale() override;
-    
-    lldb::ValueObjectSP 
-    GetReturnValueObject() override
-    {
-        return m_return_valobj_sp;
-    }
-    
+  ThreadPlanStepOut(Thread &thread, SymbolContext *addr_context,
+                    bool first_insn, bool stop_others, Vote stop_vote,
+                    Vote run_vote, uint32_t frame_idx,
+                    LazyBool step_out_avoids_code_without_debug_info,
+                    bool continue_to_next_branch = false,
+                    bool gather_return_value = true);
+
+  ~ThreadPlanStepOut() override;
+
+  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
+  bool ValidatePlan(Stream *error) override;
+  bool ShouldStop(Event *event_ptr) override;
+  bool StopOthers() override;
+  lldb::StateType GetPlanRunState() override;
+  bool WillStop() override;
+  bool MischiefManaged() override;
+  void DidPush() override;
+  bool IsPlanStale() override;
+
+  lldb::ValueObjectSP GetReturnValueObject() override {
+    return m_return_valobj_sp;
+  }
+
 protected:
-    void
-    SetFlagsToDefault() override
-    {
-        GetFlags().Set(ThreadPlanStepOut::s_default_flag_values);
-    }
-    
-    bool DoPlanExplainsStop (Event *event_ptr) override;
-    bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
-    bool QueueInlinedStepPlan (bool queue_now);
+  void SetFlagsToDefault() override {
+    GetFlags().Set(ThreadPlanStepOut::s_default_flag_values);
+  }
+
+  bool DoPlanExplainsStop(Event *event_ptr) override;
+  bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
+  bool QueueInlinedStepPlan(bool queue_now);
 
 private:
-    static uint32_t s_default_flag_values;  // These are the default flag values for the ThreadPlanStepThrough.
-    
-    lldb::addr_t        m_step_from_insn;
-    StackID             m_step_out_to_id;
-    StackID             m_immediate_step_from_id;
-    lldb::break_id_t    m_return_bp_id;
-    lldb::addr_t        m_return_addr;
-    bool                m_stop_others;
-    lldb::ThreadPlanSP  m_step_out_to_inline_plan_sp;    // This plan implements step out to the real function containing
-                                                        // an inlined frame so we can then step out of that.
-    lldb::ThreadPlanSP  m_step_through_inline_plan_sp;   // This plan then steps past the inlined frame(s).
-    lldb::ThreadPlanSP  m_step_out_further_plan_sp;      // This plan keeps stepping out if ShouldStopHere told us to.
-    Function           *m_immediate_step_from_function;
-    lldb::ValueObjectSP m_return_valobj_sp;
-    bool                m_calculate_return_value;
-
-    friend lldb::ThreadPlanSP
-    Thread::QueueThreadPlanForStepOut (bool abort_other_plans,
-                                       SymbolContext *addr_context,
-                                       bool first_insn,
-                                       bool stop_others,
-                                       Vote stop_vote,
-                                       Vote run_vote,
-                                       uint32_t frame_idx,
-                                       LazyBool step_out_avoids_code_without_debug_info);
-
-    void SetupAvoidNoDebug(LazyBool step_out_avoids_code_without_debug_info);
-    // Need an appropriate marker for the current stack so we can tell step out
-    // from step in.
-
-    void
-    CalculateReturnValue();
-    
-    DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepOut);
+  static uint32_t s_default_flag_values; // These are the default flag values
+                                         // for the ThreadPlanStepThrough.
+
+  lldb::addr_t m_step_from_insn;
+  StackID m_step_out_to_id;
+  StackID m_immediate_step_from_id;
+  lldb::break_id_t m_return_bp_id;
+  lldb::addr_t m_return_addr;
+  bool m_stop_others;
+  lldb::ThreadPlanSP m_step_out_to_inline_plan_sp; // This plan implements step
+                                                   // out to the real function
+                                                   // containing
+  // an inlined frame so we can then step out of that.
+  lldb::ThreadPlanSP m_step_through_inline_plan_sp; // This plan then steps past
+                                                    // the inlined frame(s).
+  lldb::ThreadPlanSP m_step_out_further_plan_sp; // This plan keeps stepping out
+                                                 // if ShouldStopHere told us
+                                                 // to.
+  Function *m_immediate_step_from_function;
+  lldb::ValueObjectSP m_return_valobj_sp;
+  bool m_calculate_return_value;
+
+  friend lldb::ThreadPlanSP Thread::QueueThreadPlanForStepOut(
+      bool abort_other_plans, SymbolContext *addr_context, bool first_insn,
+      bool stop_others, Vote stop_vote, Vote run_vote, uint32_t frame_idx,
+      LazyBool step_out_avoids_code_without_debug_info);
+
+  void SetupAvoidNoDebug(LazyBool step_out_avoids_code_without_debug_info);
+  // Need an appropriate marker for the current stack so we can tell step out
+  // from step in.
+
+  void CalculateReturnValue();
+
+  DISALLOW_COPY_AND_ASSIGN(ThreadPlanStepOut);
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadPlanStepOverBreakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanStepOverBreakpoint.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanStepOverBreakpoint.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanStepOverBreakpoint.h Tue Sep  6 15:57:50 2016
@@ -19,44 +19,39 @@
 
 namespace lldb_private {
 
-class ThreadPlanStepOverBreakpoint : public ThreadPlan
-{
+class ThreadPlanStepOverBreakpoint : public ThreadPlan {
 public:
-    ThreadPlanStepOverBreakpoint (Thread &thread);
+  ThreadPlanStepOverBreakpoint(Thread &thread);
 
-    ~ThreadPlanStepOverBreakpoint() override;
+  ~ThreadPlanStepOverBreakpoint() override;
 
-    void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
-    bool ValidatePlan(Stream *error) override;
-    bool ShouldStop(Event *event_ptr) override;
-    bool StopOthers() override;
-    lldb::StateType GetPlanRunState() override;
-    bool WillStop() override;
-    bool MischiefManaged() override;
-    void ThreadDestroyed() override;
-    void SetAutoContinue(bool do_it);
-    bool ShouldAutoContinue(Event *event_ptr) override;
-    bool IsPlanStale() override;
-
-    lldb::addr_t
-    GetBreakpointLoadAddress() const
-    {
-        return m_breakpoint_addr;
-    }
+  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
+  bool ValidatePlan(Stream *error) override;
+  bool ShouldStop(Event *event_ptr) override;
+  bool StopOthers() override;
+  lldb::StateType GetPlanRunState() override;
+  bool WillStop() override;
+  bool MischiefManaged() override;
+  void ThreadDestroyed() override;
+  void SetAutoContinue(bool do_it);
+  bool ShouldAutoContinue(Event *event_ptr) override;
+  bool IsPlanStale() override;
+
+  lldb::addr_t GetBreakpointLoadAddress() const { return m_breakpoint_addr; }
 
 protected:
-    bool DoPlanExplainsStop(Event *event_ptr) override;
-    bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
+  bool DoPlanExplainsStop(Event *event_ptr) override;
+  bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
 
-    void ReenableBreakpointSite ();
-private:
+  void ReenableBreakpointSite();
 
-    lldb::addr_t m_breakpoint_addr;
-    lldb::user_id_t m_breakpoint_site_id;
-    bool m_auto_continue;
-    bool m_reenabled_breakpoint_site;
+private:
+  lldb::addr_t m_breakpoint_addr;
+  lldb::user_id_t m_breakpoint_site_id;
+  bool m_auto_continue;
+  bool m_reenabled_breakpoint_site;
 
-    DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepOverBreakpoint);
+  DISALLOW_COPY_AND_ASSIGN(ThreadPlanStepOverBreakpoint);
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadPlanStepOverRange.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanStepOverRange.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanStepOverRange.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanStepOverRange.h Tue Sep  6 15:57:50 2016
@@ -22,39 +22,35 @@
 namespace lldb_private {
 
 class ThreadPlanStepOverRange : public ThreadPlanStepRange,
-                                       ThreadPlanShouldStopHere
-{
+                                ThreadPlanShouldStopHere {
 public:
-    ThreadPlanStepOverRange (Thread &thread, 
-                             const AddressRange &range, 
-                             const SymbolContext &addr_context, 
-                             lldb::RunMode stop_others,
-                             LazyBool step_out_avoids_no_debug);
-                             
-    ~ThreadPlanStepOverRange() override;
-
-    void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
-    bool ShouldStop(Event *event_ptr) override;
-    
+  ThreadPlanStepOverRange(Thread &thread, const AddressRange &range,
+                          const SymbolContext &addr_context,
+                          lldb::RunMode stop_others,
+                          LazyBool step_out_avoids_no_debug);
+
+  ~ThreadPlanStepOverRange() override;
+
+  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
+  bool ShouldStop(Event *event_ptr) override;
+
 protected:
-    bool DoPlanExplainsStop(Event *event_ptr) override;
-    bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
-    
-    void
-    SetFlagsToDefault() override
-    {
-        GetFlags().Set(ThreadPlanStepOverRange::s_default_flag_values);
-    }
+  bool DoPlanExplainsStop(Event *event_ptr) override;
+  bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
+
+  void SetFlagsToDefault() override {
+    GetFlags().Set(ThreadPlanStepOverRange::s_default_flag_values);
+  }
 
 private:
-    static uint32_t s_default_flag_values;
-    
-    void SetupAvoidNoDebug(LazyBool step_out_avoids_code_without_debug_info);
-    bool IsEquivalentContext(const SymbolContext &context);
+  static uint32_t s_default_flag_values;
+
+  void SetupAvoidNoDebug(LazyBool step_out_avoids_code_without_debug_info);
+  bool IsEquivalentContext(const SymbolContext &context);
 
-    bool m_first_resume;
+  bool m_first_resume;
 
-    DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepOverRange);
+  DISALLOW_COPY_AND_ASSIGN(ThreadPlanStepOverRange);
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadPlanStepRange.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanStepRange.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanStepRange.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanStepRange.h Tue Sep  6 15:57:50 2016
@@ -22,72 +22,71 @@
 
 namespace lldb_private {
 
-class ThreadPlanStepRange : public ThreadPlan
-{
+class ThreadPlanStepRange : public ThreadPlan {
 public:
-    ThreadPlanStepRange (ThreadPlanKind kind,
-                         const char *name,
-                         Thread &thread,
-                         const AddressRange &range,
-                         const SymbolContext &addr_context,
-                         lldb::RunMode stop_others,
-                         bool given_ranges_only = false);
-
-    ~ThreadPlanStepRange() override;
-
-    void GetDescription(Stream *s, lldb::DescriptionLevel level) override = 0;
-    bool ValidatePlan(Stream *error) override;
-    bool ShouldStop(Event *event_ptr) override = 0;
-    Vote ShouldReportStop(Event *event_ptr) override;
-    bool StopOthers() override;
-    lldb::StateType GetPlanRunState() override;
-    bool WillStop() override;
-    bool MischiefManaged() override;
-    void DidPush() override;
-    bool IsPlanStale() override;
+  ThreadPlanStepRange(ThreadPlanKind kind, const char *name, Thread &thread,
+                      const AddressRange &range,
+                      const SymbolContext &addr_context,
+                      lldb::RunMode stop_others,
+                      bool given_ranges_only = false);
+
+  ~ThreadPlanStepRange() override;
+
+  void GetDescription(Stream *s, lldb::DescriptionLevel level) override = 0;
+  bool ValidatePlan(Stream *error) override;
+  bool ShouldStop(Event *event_ptr) override = 0;
+  Vote ShouldReportStop(Event *event_ptr) override;
+  bool StopOthers() override;
+  lldb::StateType GetPlanRunState() override;
+  bool WillStop() override;
+  bool MischiefManaged() override;
+  void DidPush() override;
+  bool IsPlanStale() override;
 
-    void AddRange(const AddressRange &new_range);
+  void AddRange(const AddressRange &new_range);
 
 protected:
-    bool InRange();
-    lldb::FrameComparison CompareCurrentFrameToStartFrame();
-    bool InSymbol();
-    void DumpRanges (Stream *s);
-    
-    Disassembler *
-    GetDisassembler ();
-
-    InstructionList *
-    GetInstructionsForAddress(lldb::addr_t addr, size_t &range_index, size_t &insn_offset);
-    
-    // Pushes a plan to proceed through the next section of instructions in the range - usually just a RunToAddress
-    // plan to run to the next branch.  Returns true if it pushed such a plan.  If there was no available 'quick run'
-    // plan, then just single step.
-    bool
-    SetNextBranchBreakpoint ();
-    
-    void
-    ClearNextBranchBreakpoint();
-    
-    bool
-    NextRangeBreakpointExplainsStop (lldb::StopInfoSP stop_info_sp);
-    
-    SymbolContext             m_addr_context;
-    std::vector<AddressRange> m_address_ranges;
-    lldb::RunMode             m_stop_others;
-    StackID                   m_stack_id;        // Use the stack ID so we can tell step out from step in.
-    StackID                   m_parent_stack_id; // Use the parent stack ID so we can identify tail calls and the like.
-    bool                      m_no_more_plans;   // Need this one so we can tell if we stepped into a call,
-                                                 // but can't continue, in which case we are done.
-    bool                      m_first_run_event; // We want to broadcast only one running event, our first.
-    lldb::BreakpointSP        m_next_branch_bp_sp;
-    bool                      m_use_fast_step;
-    bool                      m_given_ranges_only;
+  bool InRange();
+  lldb::FrameComparison CompareCurrentFrameToStartFrame();
+  bool InSymbol();
+  void DumpRanges(Stream *s);
+
+  Disassembler *GetDisassembler();
+
+  InstructionList *GetInstructionsForAddress(lldb::addr_t addr,
+                                             size_t &range_index,
+                                             size_t &insn_offset);
+
+  // Pushes a plan to proceed through the next section of instructions in the
+  // range - usually just a RunToAddress
+  // plan to run to the next branch.  Returns true if it pushed such a plan.  If
+  // there was no available 'quick run'
+  // plan, then just single step.
+  bool SetNextBranchBreakpoint();
+
+  void ClearNextBranchBreakpoint();
+
+  bool NextRangeBreakpointExplainsStop(lldb::StopInfoSP stop_info_sp);
+
+  SymbolContext m_addr_context;
+  std::vector<AddressRange> m_address_ranges;
+  lldb::RunMode m_stop_others;
+  StackID m_stack_id; // Use the stack ID so we can tell step out from step in.
+  StackID m_parent_stack_id; // Use the parent stack ID so we can identify tail
+                             // calls and the like.
+  bool m_no_more_plans;   // Need this one so we can tell if we stepped into a
+                          // call,
+                          // but can't continue, in which case we are done.
+  bool m_first_run_event; // We want to broadcast only one running event, our
+                          // first.
+  lldb::BreakpointSP m_next_branch_bp_sp;
+  bool m_use_fast_step;
+  bool m_given_ranges_only;
 
 private:
-    std::vector<lldb::DisassemblerSP> m_instruction_ranges;
+  std::vector<lldb::DisassemblerSP> m_instruction_ranges;
 
-    DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepRange);
+  DISALLOW_COPY_AND_ASSIGN(ThreadPlanStepRange);
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadPlanStepThrough.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanStepThrough.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanStepThrough.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanStepThrough.h Tue Sep  6 15:57:50 2016
@@ -19,51 +19,47 @@
 
 namespace lldb_private {
 
-class ThreadPlanStepThrough : public ThreadPlan
-{
+class ThreadPlanStepThrough : public ThreadPlan {
 public:
-    ~ThreadPlanStepThrough() override;
+  ~ThreadPlanStepThrough() override;
 
-    void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
-    bool ValidatePlan(Stream *error) override;
-    bool ShouldStop(Event *event_ptr) override;
-    bool StopOthers() override;
-    lldb::StateType GetPlanRunState() override;
-    bool WillStop() override;
-    bool MischiefManaged() override;
-    void DidPush() override;
+  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
+  bool ValidatePlan(Stream *error) override;
+  bool ShouldStop(Event *event_ptr) override;
+  bool StopOthers() override;
+  lldb::StateType GetPlanRunState() override;
+  bool WillStop() override;
+  bool MischiefManaged() override;
+  void DidPush() override;
 
 protected:
-    bool DoPlanExplainsStop(Event *event_ptr) override;
-    bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
+  bool DoPlanExplainsStop(Event *event_ptr) override;
+  bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
 
-    ThreadPlanStepThrough (Thread &thread,
-                           StackID &return_stack_id,
-                           bool stop_others);
-
-    void
-    LookForPlanToStepThroughFromCurrentPC ();
-    
-    bool 
-    HitOurBackstopBreakpoint();
+  ThreadPlanStepThrough(Thread &thread, StackID &return_stack_id,
+                        bool stop_others);
+
+  void LookForPlanToStepThroughFromCurrentPC();
+
+  bool HitOurBackstopBreakpoint();
 
 private:
-    friend lldb::ThreadPlanSP
+  friend lldb::ThreadPlanSP
 
-    Thread::QueueThreadPlanForStepThrough (StackID &return_stack_id,
-                                           bool abort_other_plans,
-                                           bool stop_others);
-                                           
-    void ClearBackstopBreakpoint();
-
-    lldb::ThreadPlanSP m_sub_plan_sp;
-    lldb::addr_t      m_start_address;
-    lldb::break_id_t  m_backstop_bkpt_id;
-    lldb::addr_t      m_backstop_addr;
-    StackID           m_return_stack_id;
-    bool              m_stop_others;
+  Thread::QueueThreadPlanForStepThrough(StackID &return_stack_id,
+                                        bool abort_other_plans,
+                                        bool stop_others);
+
+  void ClearBackstopBreakpoint();
+
+  lldb::ThreadPlanSP m_sub_plan_sp;
+  lldb::addr_t m_start_address;
+  lldb::break_id_t m_backstop_bkpt_id;
+  lldb::addr_t m_backstop_addr;
+  StackID m_return_stack_id;
+  bool m_stop_others;
 
-    DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepThrough);
+  DISALLOW_COPY_AND_ASSIGN(ThreadPlanStepThrough);
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadPlanStepUntil.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanStepUntil.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanStepUntil.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanStepUntil.h Tue Sep  6 15:57:50 2016
@@ -19,58 +19,52 @@
 
 namespace lldb_private {
 
-class ThreadPlanStepUntil : public ThreadPlan
-{
+class ThreadPlanStepUntil : public ThreadPlan {
 public:
-    ~ThreadPlanStepUntil() override;
+  ~ThreadPlanStepUntil() override;
 
-    void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
-    bool ValidatePlan(Stream *error) override;
-    bool ShouldStop(Event *event_ptr) override;
-    bool StopOthers() override;
-    lldb::StateType GetPlanRunState() override;
-    bool WillStop() override;
-    bool MischiefManaged() override;
+  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
+  bool ValidatePlan(Stream *error) override;
+  bool ShouldStop(Event *event_ptr) override;
+  bool StopOthers() override;
+  lldb::StateType GetPlanRunState() override;
+  bool WillStop() override;
+  bool MischiefManaged() override;
 
 protected:
-    bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
-    bool DoPlanExplainsStop(Event *event_ptr) override;
+  bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
+  bool DoPlanExplainsStop(Event *event_ptr) override;
 
-    ThreadPlanStepUntil (Thread &thread,
-                         lldb::addr_t *address_list,
-                         size_t num_addresses,
-                         bool stop_others,
-                         uint32_t frame_idx = 0);
+  ThreadPlanStepUntil(Thread &thread, lldb::addr_t *address_list,
+                      size_t num_addresses, bool stop_others,
+                      uint32_t frame_idx = 0);
 
-    void AnalyzeStop();
+  void AnalyzeStop();
 
 private:
-    StackID m_stack_id;
-    lldb::addr_t m_step_from_insn;
-    lldb::break_id_t m_return_bp_id;
-    lldb::addr_t m_return_addr;
-    bool m_stepped_out;
-    bool m_should_stop;
-    bool m_ran_analyze;
-    bool m_explains_stop;
-
-    typedef std::map<lldb::addr_t,lldb::break_id_t> until_collection;
-    until_collection m_until_points;
-    bool m_stop_others;
-
-    void Clear();
-
-    friend lldb::ThreadPlanSP
-    Thread::QueueThreadPlanForStepUntil (bool abort_other_plans,
-                                         lldb::addr_t *address_list,
-                                         size_t num_addresses,
-                                         bool stop_others,
-                                         uint32_t frame_idx);
+  StackID m_stack_id;
+  lldb::addr_t m_step_from_insn;
+  lldb::break_id_t m_return_bp_id;
+  lldb::addr_t m_return_addr;
+  bool m_stepped_out;
+  bool m_should_stop;
+  bool m_ran_analyze;
+  bool m_explains_stop;
+
+  typedef std::map<lldb::addr_t, lldb::break_id_t> until_collection;
+  until_collection m_until_points;
+  bool m_stop_others;
+
+  void Clear();
+
+  friend lldb::ThreadPlanSP Thread::QueueThreadPlanForStepUntil(
+      bool abort_other_plans, lldb::addr_t *address_list, size_t num_addresses,
+      bool stop_others, uint32_t frame_idx);
 
-    // Need an appropriate marker for the current stack so we can tell step out
-    // from step in.
+  // Need an appropriate marker for the current stack so we can tell step out
+  // from step in.
 
-    DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepUntil);
+  DISALLOW_COPY_AND_ASSIGN(ThreadPlanStepUntil);
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadPlanTracer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanTracer.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanTracer.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanTracer.h Tue Sep  6 15:57:50 2016
@@ -1,4 +1,5 @@
-//===-- ThreadPlanTracer.h --------------------------------------------*- C++ -*-===//
+//===-- ThreadPlanTracer.h --------------------------------------------*- C++
+//-*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -14,111 +15,88 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/lldb-private.h"
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Symbol/TaggedASTType.h"
 #include "lldb/Target/Thread.h"
+#include "lldb/lldb-private.h"
 
 namespace lldb_private {
 
-class ThreadPlanTracer
-{
-friend class ThreadPlan;
+class ThreadPlanTracer {
+  friend class ThreadPlan;
 
 public:
-    typedef enum ThreadPlanTracerStyle
-    {
-        eLocation = 0,
-        eStateChange,
-        eCheckFrames,
-        ePython
-    } ThreadPlanTracerStyle;
-
-    ThreadPlanTracer (Thread &thread, lldb::StreamSP &stream_sp);    
-    ThreadPlanTracer (Thread &thread);
-        
-    virtual ~ThreadPlanTracer() = default;
-    
-    virtual void TracingStarted ()
-    {
-    }
-    
-    virtual void TracingEnded ()
-    {
-    }
-    
-    bool
-    EnableTracing(bool value)
-    {
-        bool old_value = m_enabled;
-        m_enabled = value;
-        if (old_value == false && value == true)
-            TracingStarted();
-        else if (old_value == true && value == false)
-            TracingEnded();
-            
-        return old_value;
-    }
-    
-    bool
-    TracingEnabled()
-    {
-        return m_enabled;
-    }
-    
-    bool
-    EnableSingleStep (bool value)
-    {
-        bool old_value = m_single_step;
-        m_single_step = value;
-        return old_value;
-    }
-    
-    bool 
-    SingleStepEnabled ()
-    {
-        return m_single_step;
-    }
+  typedef enum ThreadPlanTracerStyle {
+    eLocation = 0,
+    eStateChange,
+    eCheckFrames,
+    ePython
+  } ThreadPlanTracerStyle;
+
+  ThreadPlanTracer(Thread &thread, lldb::StreamSP &stream_sp);
+  ThreadPlanTracer(Thread &thread);
+
+  virtual ~ThreadPlanTracer() = default;
+
+  virtual void TracingStarted() {}
+
+  virtual void TracingEnded() {}
+
+  bool EnableTracing(bool value) {
+    bool old_value = m_enabled;
+    m_enabled = value;
+    if (old_value == false && value == true)
+      TracingStarted();
+    else if (old_value == true && value == false)
+      TracingEnded();
+
+    return old_value;
+  }
+
+  bool TracingEnabled() { return m_enabled; }
+
+  bool EnableSingleStep(bool value) {
+    bool old_value = m_single_step;
+    m_single_step = value;
+    return old_value;
+  }
+
+  bool SingleStepEnabled() { return m_single_step; }
 
 protected:
-    Thread &m_thread;
+  Thread &m_thread;
+
+  Stream *GetLogStream();
+
+  virtual void Log();
 
-    Stream *
-    GetLogStream ();
-    
-    virtual void Log();
-    
 private:
-    bool
-    TracerExplainsStop ();
-        
-    bool m_single_step;
-    bool m_enabled;
-    lldb::StreamSP m_stream_sp;
+  bool TracerExplainsStop();
+
+  bool m_single_step;
+  bool m_enabled;
+  lldb::StreamSP m_stream_sp;
 };
-    
-class ThreadPlanAssemblyTracer : public ThreadPlanTracer
-{
+
+class ThreadPlanAssemblyTracer : public ThreadPlanTracer {
 public:
-    ThreadPlanAssemblyTracer (Thread &thread, lldb::StreamSP &stream_sp);    
-    ThreadPlanAssemblyTracer (Thread &thread);    
-    ~ThreadPlanAssemblyTracer() override;
-
-    void TracingStarted() override;
-    void TracingEnded() override;
-    void Log() override;
+  ThreadPlanAssemblyTracer(Thread &thread, lldb::StreamSP &stream_sp);
+  ThreadPlanAssemblyTracer(Thread &thread);
+  ~ThreadPlanAssemblyTracer() override;
+
+  void TracingStarted() override;
+  void TracingEnded() override;
+  void Log() override;
 
 private:
-    Disassembler *
-    GetDisassembler ();
+  Disassembler *GetDisassembler();
 
-    TypeFromUser
-    GetIntPointerType();
+  TypeFromUser GetIntPointerType();
 
-    lldb::DisassemblerSP    m_disassembler_sp;
-    TypeFromUser            m_intptr_type;
-    std::vector<RegisterValue> m_register_values;
-    lldb::DataBufferSP      m_buffer_sp;
+  lldb::DisassemblerSP m_disassembler_sp;
+  TypeFromUser m_intptr_type;
+  std::vector<RegisterValue> m_register_values;
+  lldb::DataBufferSP m_buffer_sp;
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadSpec.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadSpec.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadSpec.h Tue Sep  6 15:57:50 2016
@@ -26,130 +26,90 @@ namespace lldb_private {
 //   Thread Name
 //   Thread Queue Name
 //
-//  But if we need more generality, we can hang a key/value map off of this structure.
-//  That's why the thread matches spec test is done as a virtual method in Thread::MatchesSpec,
+//  But if we need more generality, we can hang a key/value map off of this
+//  structure.
+//  That's why the thread matches spec test is done as a virtual method in
+//  Thread::MatchesSpec,
 //  since it is the native thread that would know how to interpret the keys.
-//  I was going to do the Queue Name this way out of sheer orneriness, but that seems a
+//  I was going to do the Queue Name this way out of sheer orneriness, but that
+//  seems a
 //  sufficiently general concept, so I put it in here on its own.
 
-class ThreadSpec
-{
+class ThreadSpec {
 public:
-    ThreadSpec ();
-    
-    ThreadSpec (const ThreadSpec &rhs);
-    
-    const ThreadSpec &
-    operator=(const ThreadSpec &rhs);
-    
-    void
-    SetIndex (uint32_t index)
-    {
-        m_index = index;
-    }
-    
-    void
-    SetTID   (lldb::tid_t tid)
-    {
-        m_tid = tid;
-    }
-    
-    void
-    SetName (const char *name)
-    {
-        m_name = name;
-    }
-    
-    void 
-    SetQueueName (const char *queue_name)
-    {
-        m_queue_name = queue_name;
-    }
-
-    uint32_t
-    GetIndex () const
-    {
-        return m_index;
-    }
-    
-    lldb::tid_t 
-    GetTID () const
-    {
-        return m_tid;
-    }
-
-    const char *
-    GetName () const;
-    
-    const char *
-    GetQueueName () const;
-    
-    bool
-    TIDMatches (lldb::tid_t thread_id) const
-    {
-        if (m_tid == LLDB_INVALID_THREAD_ID || thread_id == LLDB_INVALID_THREAD_ID)
-            return true;
-        else
-            return thread_id == m_tid;
-    }
-        
-    bool
-    TIDMatches (Thread &thread) const;
-    
-    bool 
-    IndexMatches (uint32_t index) const
-    {
-        if (m_index == UINT32_MAX || index == UINT32_MAX)
-            return true;
-        else
-            return index == m_index;
-    }
-    
-    bool 
-    IndexMatches (Thread &thread) const;
-    
-    bool 
-    NameMatches (const char *name) const
-    {
-        if (m_name.empty())
-            return true;
-        else if (name == nullptr)
-            return false;
-        else
-            return m_name == name;
-    }
-    
-    bool 
-    NameMatches (Thread &thread) const;
-    
-    bool 
-    QueueNameMatches (const char *queue_name) const
-    {
-        if (m_queue_name.empty())
-            return true;
-        else if (queue_name == nullptr)
-            return false;
-        else
-            return m_queue_name == queue_name;
-    }
-    
-    bool 
-    QueueNameMatches (Thread &thread) const;
-    
-    bool
-    ThreadPassesBasicTests (Thread &thread) const;
-    
-    bool
-    HasSpecification () const;
-    
-    void
-    GetDescription (Stream *s, lldb::DescriptionLevel level) const;
+  ThreadSpec();
+
+  ThreadSpec(const ThreadSpec &rhs);
+
+  const ThreadSpec &operator=(const ThreadSpec &rhs);
+
+  void SetIndex(uint32_t index) { m_index = index; }
+
+  void SetTID(lldb::tid_t tid) { m_tid = tid; }
+
+  void SetName(const char *name) { m_name = name; }
+
+  void SetQueueName(const char *queue_name) { m_queue_name = queue_name; }
+
+  uint32_t GetIndex() const { return m_index; }
+
+  lldb::tid_t GetTID() const { return m_tid; }
+
+  const char *GetName() const;
+
+  const char *GetQueueName() const;
+
+  bool TIDMatches(lldb::tid_t thread_id) const {
+    if (m_tid == LLDB_INVALID_THREAD_ID || thread_id == LLDB_INVALID_THREAD_ID)
+      return true;
+    else
+      return thread_id == m_tid;
+  }
+
+  bool TIDMatches(Thread &thread) const;
+
+  bool IndexMatches(uint32_t index) const {
+    if (m_index == UINT32_MAX || index == UINT32_MAX)
+      return true;
+    else
+      return index == m_index;
+  }
+
+  bool IndexMatches(Thread &thread) const;
+
+  bool NameMatches(const char *name) const {
+    if (m_name.empty())
+      return true;
+    else if (name == nullptr)
+      return false;
+    else
+      return m_name == name;
+  }
+
+  bool NameMatches(Thread &thread) const;
+
+  bool QueueNameMatches(const char *queue_name) const {
+    if (m_queue_name.empty())
+      return true;
+    else if (queue_name == nullptr)
+      return false;
+    else
+      return m_queue_name == queue_name;
+  }
+
+  bool QueueNameMatches(Thread &thread) const;
+
+  bool ThreadPassesBasicTests(Thread &thread) const;
+
+  bool HasSpecification() const;
+
+  void GetDescription(Stream *s, lldb::DescriptionLevel level) const;
 
 private:
-    uint32_t m_index;
-    lldb::tid_t m_tid;
-    std::string m_name;
-    std::string m_queue_name;
+  uint32_t m_index;
+  lldb::tid_t m_tid;
+  std::string m_name;
+  std::string m_queue_name;
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/UnixSignals.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/UnixSignals.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/UnixSignals.h (original)
+++ lldb/trunk/include/lldb/Target/UnixSignals.h Tue Sep  6 15:57:50 2016
@@ -12,149 +12,110 @@
 
 // C Includes
 // C++ Includes
-#include <string>
 #include <map>
+#include <string>
 
 // Other libraries and framework includes
 // Project includes
-#include "lldb/lldb-private.h"
 #include "lldb/Core/ConstString.h"
+#include "lldb/lldb-private.h"
 
-namespace lldb_private
-{
+namespace lldb_private {
 
-class UnixSignals
-{
+class UnixSignals {
 public:
-    static lldb::UnixSignalsSP
-    Create(const ArchSpec &arch);
+  static lldb::UnixSignalsSP Create(const ArchSpec &arch);
+
+  //------------------------------------------------------------------
+  // Constructors and Destructors
+  //------------------------------------------------------------------
+  UnixSignals();
+
+  virtual ~UnixSignals();
+
+  const char *GetSignalAsCString(int32_t signo) const;
+
+  bool SignalIsValid(int32_t signo) const;
+
+  int32_t GetSignalNumberFromName(const char *name) const;
+
+  const char *GetSignalInfo(int32_t signo, bool &should_suppress,
+                            bool &should_stop, bool &should_notify) const;
+
+  bool GetShouldSuppress(int32_t signo) const;
+
+  bool SetShouldSuppress(int32_t signo, bool value);
+
+  bool SetShouldSuppress(const char *signal_name, bool value);
+
+  bool GetShouldStop(int32_t signo) const;
+
+  bool SetShouldStop(int32_t signo, bool value);
+  bool SetShouldStop(const char *signal_name, bool value);
 
-    //------------------------------------------------------------------
-    // Constructors and Destructors
-    //------------------------------------------------------------------
-    UnixSignals();
-
-    virtual
-    ~UnixSignals();
-
-    const char *
-    GetSignalAsCString (int32_t signo) const;
-
-    bool
-    SignalIsValid (int32_t signo) const;
-
-    int32_t
-    GetSignalNumberFromName (const char *name) const;
-
-    const char *
-    GetSignalInfo (int32_t signo,
-                   bool &should_suppress,
-                   bool &should_stop,
-                   bool &should_notify) const;
-
-    bool
-    GetShouldSuppress (int32_t signo) const;
-
-    bool
-    SetShouldSuppress (int32_t signo,
-                       bool value);
-
-    bool
-    SetShouldSuppress (const char *signal_name,
-                       bool value);
-
-    bool
-    GetShouldStop (int32_t signo) const;
-
-    bool
-    SetShouldStop (int32_t signo,
-                   bool value);
-    bool
-    SetShouldStop (const char *signal_name,
-                   bool value);
-
-    bool
-    GetShouldNotify (int32_t signo) const;
-
-    bool
-    SetShouldNotify (int32_t signo, bool value);
-
-    bool
-    SetShouldNotify (const char *signal_name,
-                     bool value);
-
-    // These provide an iterator through the signals available on this system.
-    // Call GetFirstSignalNumber to get the first entry, then iterate on GetNextSignalNumber
-    // till you get back LLDB_INVALID_SIGNAL_NUMBER.
-    int32_t
-    GetFirstSignalNumber () const;
-
-    int32_t
-    GetNextSignalNumber (int32_t current_signal) const;
-
-    int32_t
-    GetNumSignals() const;
-
-    int32_t
-    GetSignalAtIndex(int32_t index) const;
-
-    ConstString
-    GetShortName(ConstString name) const;
-
-    // We assume that the elements of this object are constant once it is constructed,
-    // since a process should never need to add or remove symbols as it runs.  So don't
-    // call these functions anywhere but the constructor of your subclass of UnixSignals or in
-    // your Process Plugin's GetUnixSignals method before you return the UnixSignal object.
-
-    void
-    AddSignal (int signo,
-               const char *name,
-               bool default_suppress,
-               bool default_stop,
-               bool default_notify,
-               const char *description,
-               const char *alias = nullptr);
+  bool GetShouldNotify(int32_t signo) const;
 
-    void
-    RemoveSignal (int signo);
+  bool SetShouldNotify(int32_t signo, bool value);
+
+  bool SetShouldNotify(const char *signal_name, bool value);
+
+  // These provide an iterator through the signals available on this system.
+  // Call GetFirstSignalNumber to get the first entry, then iterate on
+  // GetNextSignalNumber
+  // till you get back LLDB_INVALID_SIGNAL_NUMBER.
+  int32_t GetFirstSignalNumber() const;
+
+  int32_t GetNextSignalNumber(int32_t current_signal) const;
+
+  int32_t GetNumSignals() const;
+
+  int32_t GetSignalAtIndex(int32_t index) const;
+
+  ConstString GetShortName(ConstString name) const;
+
+  // We assume that the elements of this object are constant once it is
+  // constructed,
+  // since a process should never need to add or remove symbols as it runs.  So
+  // don't
+  // call these functions anywhere but the constructor of your subclass of
+  // UnixSignals or in
+  // your Process Plugin's GetUnixSignals method before you return the
+  // UnixSignal object.
+
+  void AddSignal(int signo, const char *name, bool default_suppress,
+                 bool default_stop, bool default_notify,
+                 const char *description, const char *alias = nullptr);
+
+  void RemoveSignal(int signo);
 
 protected:
-    //------------------------------------------------------------------
-    // Classes that inherit from UnixSignals can see and modify these
-    //------------------------------------------------------------------
-
-    struct Signal
-    {
-        ConstString m_name;
-        ConstString m_alias;
-        std::string m_description;
-        bool m_suppress:1,
-             m_stop:1,
-             m_notify:1;
-
-        Signal (const char *name,
-                bool default_suppress,
-                bool default_stop,
-                bool default_notify,
-                const char *description,
-                const char *alias);
-
-        ~Signal () {}
-    };
-
-    virtual void
-    Reset ();
-
-    typedef std::map <int32_t, Signal> collection;
+  //------------------------------------------------------------------
+  // Classes that inherit from UnixSignals can see and modify these
+  //------------------------------------------------------------------
+
+  struct Signal {
+    ConstString m_name;
+    ConstString m_alias;
+    std::string m_description;
+    bool m_suppress : 1, m_stop : 1, m_notify : 1;
+
+    Signal(const char *name, bool default_suppress, bool default_stop,
+           bool default_notify, const char *description, const char *alias);
+
+    ~Signal() {}
+  };
+
+  virtual void Reset();
+
+  typedef std::map<int32_t, Signal> collection;
 
-    collection m_signals;
+  collection m_signals;
 
-    // GDBRemote signals need to be copyable.
-    UnixSignals(const UnixSignals &rhs);
+  // GDBRemote signals need to be copyable.
+  UnixSignals(const UnixSignals &rhs);
 
-    const UnixSignals &
-    operator=(const UnixSignals &rhs) = delete;
+  const UnixSignals &operator=(const UnixSignals &rhs) = delete;
 };
 
 } // Namespace lldb
-#endif  // lldb_UnixSignals_h_
+#endif // lldb_UnixSignals_h_

Modified: lldb/trunk/include/lldb/Target/Unwind.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Unwind.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Unwind.h (original)
+++ lldb/trunk/include/lldb/Target/Unwind.h Tue Sep  6 15:57:50 2016
@@ -20,96 +20,73 @@
 
 namespace lldb_private {
 
-class Unwind 
-{
+class Unwind {
 protected:
-    //------------------------------------------------------------------
-    // Classes that inherit from Unwind can see and modify these
-    //------------------------------------------------------------------
-    Unwind(Thread &thread) : m_thread(thread), m_unwind_mutex() {}
+  //------------------------------------------------------------------
+  // Classes that inherit from Unwind can see and modify these
+  //------------------------------------------------------------------
+  Unwind(Thread &thread) : m_thread(thread), m_unwind_mutex() {}
 
 public:
-    virtual
-    ~Unwind()
-    {
-    }
+  virtual ~Unwind() {}
 
-    void
-    Clear()
-    {
-        std::lock_guard<std::recursive_mutex> guard(m_unwind_mutex);
-        DoClear();
-    }
+  void Clear() {
+    std::lock_guard<std::recursive_mutex> guard(m_unwind_mutex);
+    DoClear();
+  }
+
+  uint32_t GetFrameCount() {
+    std::lock_guard<std::recursive_mutex> guard(m_unwind_mutex);
+    return DoGetFrameCount();
+  }
+
+  uint32_t GetFramesUpTo(uint32_t end_idx) {
+    lldb::addr_t cfa;
+    lldb::addr_t pc;
+    uint32_t idx;
+
+    for (idx = 0; idx < end_idx; idx++) {
+      if (!DoGetFrameInfoAtIndex(idx, cfa, pc)) {
+        break;
+      }
+    }
+    return idx;
+  }
+
+  bool GetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa,
+                           lldb::addr_t &pc) {
+    std::lock_guard<std::recursive_mutex> guard(m_unwind_mutex);
+    return DoGetFrameInfoAtIndex(frame_idx, cfa, pc);
+  }
+
+  lldb::RegisterContextSP CreateRegisterContextForFrame(StackFrame *frame) {
+    std::lock_guard<std::recursive_mutex> guard(m_unwind_mutex);
+    return DoCreateRegisterContextForFrame(frame);
+  }
 
-    uint32_t
-    GetFrameCount()
-    {
-        std::lock_guard<std::recursive_mutex> guard(m_unwind_mutex);
-        return DoGetFrameCount();
-    }
-
-    uint32_t
-    GetFramesUpTo (uint32_t end_idx)
-    {
-        lldb::addr_t cfa;
-        lldb::addr_t pc;
-        uint32_t idx;
-        
-        for (idx = 0; idx < end_idx; idx++)
-        {
-            if (!DoGetFrameInfoAtIndex (idx, cfa, pc))
-            {
-                break;
-            }
-        }
-        return idx;
-    }
+  Thread &GetThread() { return m_thread; }
 
-    bool
-    GetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa, lldb::addr_t &pc)
-    {
-        std::lock_guard<std::recursive_mutex> guard(m_unwind_mutex);
-        return DoGetFrameInfoAtIndex(frame_idx, cfa, pc);
-    }
+protected:
+  //------------------------------------------------------------------
+  // Classes that inherit from Unwind can see and modify these
+  //------------------------------------------------------------------
+  virtual void DoClear() = 0;
 
-    lldb::RegisterContextSP
-    CreateRegisterContextForFrame(StackFrame *frame)
-    {
-        std::lock_guard<std::recursive_mutex> guard(m_unwind_mutex);
-        return DoCreateRegisterContextForFrame(frame);
-    }
+  virtual uint32_t DoGetFrameCount() = 0;
 
-    Thread &
-    GetThread()
-    {
-        return m_thread;
-    }
+  virtual bool DoGetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa,
+                                     lldb::addr_t &pc) = 0;
 
-protected:
-    //------------------------------------------------------------------
-    // Classes that inherit from Unwind can see and modify these
-    //------------------------------------------------------------------
-    virtual void
-    DoClear() = 0;
-
-    virtual uint32_t
-    DoGetFrameCount() = 0;
-
-    virtual bool
-    DoGetFrameInfoAtIndex (uint32_t frame_idx,
-                         lldb::addr_t& cfa, 
-                         lldb::addr_t& pc) = 0;
-    
-    virtual lldb::RegisterContextSP
-    DoCreateRegisterContextForFrame (StackFrame *frame) = 0;
+  virtual lldb::RegisterContextSP
+  DoCreateRegisterContextForFrame(StackFrame *frame) = 0;
 
-    Thread &m_thread;
-    std::recursive_mutex m_unwind_mutex;
+  Thread &m_thread;
+  std::recursive_mutex m_unwind_mutex;
 
 private:
-    DISALLOW_COPY_AND_ASSIGN (Unwind);
+  DISALLOW_COPY_AND_ASSIGN(Unwind);
 };
 
 } // namespace lldb_private
 
-#endif  // liblldb_Unwind_h_
+#endif // liblldb_Unwind_h_

Modified: lldb/trunk/include/lldb/Target/UnwindAssembly.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/UnwindAssembly.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/UnwindAssembly.h (original)
+++ lldb/trunk/include/lldb/Target/UnwindAssembly.h Tue Sep  6 15:57:50 2016
@@ -10,50 +10,43 @@
 #ifndef utility_UnwindAssembly_h_
 #define utility_UnwindAssembly_h_
 
-#include "lldb/lldb-private.h"
 #include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/PluginInterface.h"
+#include "lldb/lldb-private.h"
 
 namespace lldb_private {
 
-class UnwindAssembly :
-   public std::enable_shared_from_this<UnwindAssembly>,
-   public PluginInterface
-{
+class UnwindAssembly : public std::enable_shared_from_this<UnwindAssembly>,
+                       public PluginInterface {
 public:
-    static lldb::UnwindAssemblySP
-    FindPlugin (const ArchSpec &arch);
+  static lldb::UnwindAssemblySP FindPlugin(const ArchSpec &arch);
 
-    ~UnwindAssembly() override;
+  ~UnwindAssembly() override;
 
-    virtual bool
-    GetNonCallSiteUnwindPlanFromAssembly (AddressRange& func, 
-                                          Thread& thread, 
-                                          UnwindPlan& unwind_plan) = 0;
-
-    virtual bool
-    AugmentUnwindPlanFromCallSite (AddressRange& func,
-                                   Thread& thread,
-                                   UnwindPlan& unwind_plan) = 0;
-
-    virtual bool
-    GetFastUnwindPlan (AddressRange& func, 
-                       Thread& thread, 
-                       UnwindPlan &unwind_plan) = 0;
-
-    // thread may be NULL in which case we only use the Target (e.g. if this is called pre-process-launch).
-    virtual bool
-    FirstNonPrologueInsn (AddressRange& func, 
-                          const lldb_private::ExecutionContext &exe_ctx,
-                          Address& first_non_prologue_insn) = 0;
+  virtual bool
+  GetNonCallSiteUnwindPlanFromAssembly(AddressRange &func, Thread &thread,
+                                       UnwindPlan &unwind_plan) = 0;
+
+  virtual bool AugmentUnwindPlanFromCallSite(AddressRange &func, Thread &thread,
+                                             UnwindPlan &unwind_plan) = 0;
+
+  virtual bool GetFastUnwindPlan(AddressRange &func, Thread &thread,
+                                 UnwindPlan &unwind_plan) = 0;
+
+  // thread may be NULL in which case we only use the Target (e.g. if this is
+  // called pre-process-launch).
+  virtual bool
+  FirstNonPrologueInsn(AddressRange &func,
+                       const lldb_private::ExecutionContext &exe_ctx,
+                       Address &first_non_prologue_insn) = 0;
 
 protected:
-    UnwindAssembly (const ArchSpec &arch);
-    ArchSpec m_arch;
+  UnwindAssembly(const ArchSpec &arch);
+  ArchSpec m_arch;
 
 private:
-    UnwindAssembly(); // Outlaw default constructor
-    DISALLOW_COPY_AND_ASSIGN (UnwindAssembly);
+  UnwindAssembly(); // Outlaw default constructor
+  DISALLOW_COPY_AND_ASSIGN(UnwindAssembly);
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Utility/AnsiTerminal.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/AnsiTerminal.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/AnsiTerminal.h (original)
+++ lldb/trunk/include/lldb/Utility/AnsiTerminal.h Tue Sep  6 15:57:50 2016
@@ -7,124 +7,122 @@
 //
 //===----------------------------------------------------------------------===//
 
+#define ANSI_FG_COLOR_BLACK 30
+#define ANSI_FG_COLOR_RED 31
+#define ANSI_FG_COLOR_GREEN 32
+#define ANSI_FG_COLOR_YELLOW 33
+#define ANSI_FG_COLOR_BLUE 34
+#define ANSI_FG_COLOR_PURPLE 35
+#define ANSI_FG_COLOR_CYAN 36
+#define ANSI_FG_COLOR_WHITE 37
+
+#define ANSI_BG_COLOR_BLACK 40
+#define ANSI_BG_COLOR_RED 41
+#define ANSI_BG_COLOR_GREEN 42
+#define ANSI_BG_COLOR_YELLOW 43
+#define ANSI_BG_COLOR_BLUE 44
+#define ANSI_BG_COLOR_PURPLE 45
+#define ANSI_BG_COLOR_CYAN 46
+#define ANSI_BG_COLOR_WHITE 47
+
+#define ANSI_SPECIAL_FRAMED 51
+#define ANSI_SPECIAL_ENCIRCLED 52
+
+#define ANSI_CTRL_NORMAL 0
+#define ANSI_CTRL_BOLD 1
+#define ANSI_CTRL_FAINT 2
+#define ANSI_CTRL_ITALIC 3
+#define ANSI_CTRL_UNDERLINE 4
+#define ANSI_CTRL_SLOW_BLINK 5
+#define ANSI_CTRL_FAST_BLINK 6
+#define ANSI_CTRL_IMAGE_NEGATIVE 7
+#define ANSI_CTRL_CONCEAL 8
+#define ANSI_CTRL_CROSSED_OUT 9
+
+#define ANSI_ESC_START "\033["
+#define ANSI_ESC_END "m"
 
+#define ANSI_STR(s) #s
+#define ANSI_DEF_STR(s) ANSI_STR(s)
 
-#define ANSI_FG_COLOR_BLACK         30
-#define ANSI_FG_COLOR_RED           31	
-#define ANSI_FG_COLOR_GREEN         32	
-#define ANSI_FG_COLOR_YELLOW        33	
-#define ANSI_FG_COLOR_BLUE          34	
-#define ANSI_FG_COLOR_PURPLE        35	
-#define ANSI_FG_COLOR_CYAN          36	
-#define ANSI_FG_COLOR_WHITE         37	
-
-#define ANSI_BG_COLOR_BLACK         40
-#define ANSI_BG_COLOR_RED           41	
-#define ANSI_BG_COLOR_GREEN         42	
-#define ANSI_BG_COLOR_YELLOW        43	
-#define ANSI_BG_COLOR_BLUE          44	
-#define ANSI_BG_COLOR_PURPLE        45	
-#define ANSI_BG_COLOR_CYAN          46	
-#define ANSI_BG_COLOR_WHITE         47	
-
-#define ANSI_SPECIAL_FRAMED         51
-#define ANSI_SPECIAL_ENCIRCLED      52
-
-#define ANSI_CTRL_NORMAL            0
-#define ANSI_CTRL_BOLD              1
-#define ANSI_CTRL_FAINT             2
-#define ANSI_CTRL_ITALIC            3
-#define ANSI_CTRL_UNDERLINE         4
-#define ANSI_CTRL_SLOW_BLINK        5
-#define ANSI_CTRL_FAST_BLINK        6
-#define ANSI_CTRL_IMAGE_NEGATIVE    7
-#define ANSI_CTRL_CONCEAL           8
-#define ANSI_CTRL_CROSSED_OUT       9
-
-#define ANSI_ESC_START              "\033["
-#define ANSI_ESC_END                "m"
+#define ANSI_ESCAPE1(s) ANSI_ESC_START ANSI_DEF_STR(s) ANSI_ESC_END
 
-#define ANSI_STR(s)                 #s
-#define ANSI_DEF_STR(s)             ANSI_STR(s)
+#define ANSI_1_CTRL(ctrl1) "\033["##ctrl1 ANSI_ESC_END
+#define ANSI_2_CTRL(ctrl1, ctrl2) "\033["##ctrl1 ";"##ctrl2 ANSI_ESC_END
 
-#define ANSI_ESCAPE1(s)             ANSI_ESC_START ANSI_DEF_STR(s) ANSI_ESC_END
+namespace lldb_utility {
 
-#define ANSI_1_CTRL(ctrl1)          "\033["##ctrl1 ANSI_ESC_END
-#define ANSI_2_CTRL(ctrl1,ctrl2)    "\033["##ctrl1";"##ctrl2 ANSI_ESC_END
+namespace ansi {
 
-namespace lldb_utility {
+inline std::string FormatAnsiTerminalCodes(const char *format,
+                                           bool do_color = true) {
+  // Convert "${ansi.XXX}" tokens to ansi values or clear them if do_color is
+  // false.
+  static const struct {
+    const char *name;
+    const char *value;
+  } g_color_tokens[] = {
+#define _TO_STR2(_val) #_val
+#define _TO_STR(_val) _TO_STR2(_val)
+      {"fg.black}", ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_BLACK) ANSI_ESC_END},
+      {"fg.red}", ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_RED) ANSI_ESC_END},
+      {"fg.green}", ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_GREEN) ANSI_ESC_END},
+      {"fg.yellow}", ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_YELLOW) ANSI_ESC_END},
+      {"fg.blue}", ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_BLUE) ANSI_ESC_END},
+      {"fg.purple}", ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_PURPLE) ANSI_ESC_END},
+      {"fg.cyan}", ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_CYAN) ANSI_ESC_END},
+      {"fg.white}", ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_WHITE) ANSI_ESC_END},
+      {"bg.black}", ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_BLACK) ANSI_ESC_END},
+      {"bg.red}", ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_RED) ANSI_ESC_END},
+      {"bg.green}", ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_GREEN) ANSI_ESC_END},
+      {"bg.yellow}", ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_YELLOW) ANSI_ESC_END},
+      {"bg.blue}", ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_BLUE) ANSI_ESC_END},
+      {"bg.purple}", ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_PURPLE) ANSI_ESC_END},
+      {"bg.cyan}", ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_CYAN) ANSI_ESC_END},
+      {"bg.white}", ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_WHITE) ANSI_ESC_END},
+      {"normal}", ANSI_ESC_START _TO_STR(ANSI_CTRL_NORMAL) ANSI_ESC_END},
+      {"bold}", ANSI_ESC_START _TO_STR(ANSI_CTRL_BOLD) ANSI_ESC_END},
+      {"faint}", ANSI_ESC_START _TO_STR(ANSI_CTRL_FAINT) ANSI_ESC_END},
+      {"italic}", ANSI_ESC_START _TO_STR(ANSI_CTRL_ITALIC) ANSI_ESC_END},
+      {"underline}", ANSI_ESC_START _TO_STR(ANSI_CTRL_UNDERLINE) ANSI_ESC_END},
+      {"slow-blink}",
+       ANSI_ESC_START _TO_STR(ANSI_CTRL_SLOW_BLINK) ANSI_ESC_END},
+      {"fast-blink}",
+       ANSI_ESC_START _TO_STR(ANSI_CTRL_FAST_BLINK) ANSI_ESC_END},
+      {"negative}",
+       ANSI_ESC_START _TO_STR(ANSI_CTRL_IMAGE_NEGATIVE) ANSI_ESC_END},
+      {"conceal}", ANSI_ESC_START _TO_STR(ANSI_CTRL_CONCEAL) ANSI_ESC_END},
+      {"crossed-out}",
+       ANSI_ESC_START _TO_STR(ANSI_CTRL_CROSSED_OUT) ANSI_ESC_END},
+#undef _TO_STR
+#undef _TO_STR2
+  };
+  static const char tok_hdr[] = "${ansi.";
+
+  std::string fmt;
+  for (const char *p = format; *p; ++p) {
+    const char *tok_start = strstr(p, tok_hdr);
+    if (!tok_start) {
+      fmt.append(p, strlen(p));
+      break;
+    }
 
-    namespace ansi {
+    fmt.append(p, tok_start - p);
+    p = tok_start;
 
-        inline std::string
-        FormatAnsiTerminalCodes(const char *format, bool do_color = true)
-        {
-            // Convert "${ansi.XXX}" tokens to ansi values or clear them if do_color is false.
-            static const struct
-            {
-                const char *name;
-                const char *value;
-            } g_color_tokens[] =
-            {
-        #define _TO_STR2(_val) #_val
-        #define _TO_STR(_val) _TO_STR2(_val)
-                { "fg.black}",        ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_BLACK)      ANSI_ESC_END },
-                { "fg.red}",          ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_RED)        ANSI_ESC_END },
-                { "fg.green}",        ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_GREEN)      ANSI_ESC_END },
-                { "fg.yellow}",       ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_YELLOW)     ANSI_ESC_END },
-                { "fg.blue}",         ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_BLUE)       ANSI_ESC_END },
-                { "fg.purple}",       ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_PURPLE)     ANSI_ESC_END },
-                { "fg.cyan}",         ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_CYAN)       ANSI_ESC_END },
-                { "fg.white}",        ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_WHITE)      ANSI_ESC_END },
-                { "bg.black}",        ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_BLACK)      ANSI_ESC_END },
-                { "bg.red}",          ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_RED)        ANSI_ESC_END },
-                { "bg.green}",        ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_GREEN)      ANSI_ESC_END },
-                { "bg.yellow}",       ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_YELLOW)     ANSI_ESC_END },
-                { "bg.blue}",         ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_BLUE)       ANSI_ESC_END },
-                { "bg.purple}",       ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_PURPLE)     ANSI_ESC_END },
-                { "bg.cyan}",         ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_CYAN)       ANSI_ESC_END },
-                { "bg.white}",        ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_WHITE)      ANSI_ESC_END },
-                { "normal}",          ANSI_ESC_START _TO_STR(ANSI_CTRL_NORMAL)         ANSI_ESC_END },
-                { "bold}",            ANSI_ESC_START _TO_STR(ANSI_CTRL_BOLD)           ANSI_ESC_END },
-                { "faint}",           ANSI_ESC_START _TO_STR(ANSI_CTRL_FAINT)          ANSI_ESC_END },
-                { "italic}",          ANSI_ESC_START _TO_STR(ANSI_CTRL_ITALIC)         ANSI_ESC_END },
-                { "underline}",       ANSI_ESC_START _TO_STR(ANSI_CTRL_UNDERLINE)      ANSI_ESC_END },
-                { "slow-blink}",      ANSI_ESC_START _TO_STR(ANSI_CTRL_SLOW_BLINK)     ANSI_ESC_END },
-                { "fast-blink}",      ANSI_ESC_START _TO_STR(ANSI_CTRL_FAST_BLINK)     ANSI_ESC_END },
-                { "negative}",        ANSI_ESC_START _TO_STR(ANSI_CTRL_IMAGE_NEGATIVE) ANSI_ESC_END },
-                { "conceal}",         ANSI_ESC_START _TO_STR(ANSI_CTRL_CONCEAL)        ANSI_ESC_END },
-                { "crossed-out}",     ANSI_ESC_START _TO_STR(ANSI_CTRL_CROSSED_OUT)    ANSI_ESC_END },
-        #undef _TO_STR
-        #undef _TO_STR2
-            };
-            static const char tok_hdr[] = "${ansi.";
-
-            std::string fmt;
-            for (const char *p = format; *p; ++p)
-            {
-                const char *tok_start = strstr (p, tok_hdr);
-                if (!tok_start)
-                {
-                    fmt.append (p, strlen(p));
-                    break;
-                }
-
-                fmt.append (p, tok_start - p);
-                p = tok_start;
-
-                const char *tok_str = tok_start + sizeof(tok_hdr) - 1;
-                for (size_t i = 0; i < sizeof(g_color_tokens) / sizeof(g_color_tokens[0]); ++i)
-                {
-                    if (!strncmp (tok_str, g_color_tokens[i].name, strlen(g_color_tokens[i].name)))
-                    {
-                        if (do_color)
-                            fmt.append (g_color_tokens[i].value);
-                        p = tok_str + strlen (g_color_tokens[i].name) - 1;
-                        break;
-                    }
-                }
-            }
-            return fmt;
-        }
+    const char *tok_str = tok_start + sizeof(tok_hdr) - 1;
+    for (size_t i = 0; i < sizeof(g_color_tokens) / sizeof(g_color_tokens[0]);
+         ++i) {
+      if (!strncmp(tok_str, g_color_tokens[i].name,
+                   strlen(g_color_tokens[i].name))) {
+        if (do_color)
+          fmt.append(g_color_tokens[i].value);
+        p = tok_str + strlen(g_color_tokens[i].name) - 1;
+        break;
+      }
     }
+  }
+  return fmt;
+}
+}
 }

Modified: lldb/trunk/include/lldb/Utility/CleanUp.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/CleanUp.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/CleanUp.h (original)
+++ lldb/trunk/include/lldb/Utility/CleanUp.h Tue Sep  6 15:57:50 2016
@@ -17,33 +17,33 @@ namespace lldb_utility {
 
 //----------------------------------------------------------------------
 // Templated class that guarantees that a cleanup callback function will
-// be called. The cleanup function will be called once under the 
+// be called. The cleanup function will be called once under the
 // following conditions:
 // - when the object goes out of scope
-// - when the user explicitly calls clean. 
+// - when the user explicitly calls clean.
 // - the current value will be cleaned up when a new value is set using
 //   set(T value) as long as the current value hasn't already been cleaned.
 //
 // This class is designed to be used with simple types for type T (like
-// file descriptors, opaque handles, pointers, etc). If more complex 
+// file descriptors, opaque handles, pointers, etc). If more complex
 // type T objects are desired, we need to probably specialize this class
-// to take "const T&" for all input T parameters. Yet if a type T is 
-// complex already it might be better to build the cleanup functionality 
+// to take "const T&" for all input T parameters. Yet if a type T is
+// complex already it might be better to build the cleanup functionality
 // into T.
 //
-// The cleanup function must take one argument that is of type T. 
+// The cleanup function must take one argument that is of type T.
 // The calback function return type is R. The return value is currently
 // needed for "CallbackType". If there is an easy way to get around the
 // need for the return value we can change this class.
 //
 // The two template parameters are:
-//    T - The variable type of value that will be stored and used as the 
+//    T - The variable type of value that will be stored and used as the
 //      sole argument for the cleanup callback.
 //    R - The return type for the cleanup function.
 //
 // EXAMPLES
-//  // Use with file handles that get opened where you want to close 
-//  // them. Below we use "int open(const char *path, int oflag, ...)" 
+//  // Use with file handles that get opened where you want to close
+//  // them. Below we use "int open(const char *path, int oflag, ...)"
 //  // which returns an integer file descriptor. -1 is the invalid file
 //  // descriptor so to make an object that will call "int close(int fd)"
 //  // automatically we can use:
@@ -53,269 +53,207 @@ namespace lldb_utility {
 //  // malloc/free example
 //  CleanUp <void *, void> malloced_bytes(malloc(32), NULL, free);
 //----------------------------------------------------------------------
-template <typename T, typename R = void>
-class CleanUp
-{
+template <typename T, typename R = void> class CleanUp {
 public:
-    typedef T value_type;
-    typedef std::function<R(value_type)> CallbackType;
+  typedef T value_type;
+  typedef std::function<R(value_type)> CallbackType;
 
-    //----------------------------------------------------------------------
-    // Constructor that sets the current value only. No values are 
-    // considered to be invalid and the cleanup function will be called
-    // regardless of the value of m_current_value.
-    //----------------------------------------------------------------------
-    CleanUp (value_type value, CallbackType callback) : 
-        m_current_value (value),
-        m_invalid_value (),
-        m_callback (callback),
-        m_callback_called (false),
-        m_invalid_value_is_valid (false)
-    {
-    }
-
-    //----------------------------------------------------------------------
-    // Constructor that sets the current value and also the invalid value.
-    // The cleanup function will be called on "m_value" as long as it isn't
-    // equal to "m_invalid_value".
-    //----------------------------------------------------------------------
-    CleanUp (value_type value, value_type invalid, CallbackType callback) : 
-        m_current_value (value),
-        m_invalid_value (invalid),
-        m_callback (callback),
-        m_callback_called (false),
-        m_invalid_value_is_valid (true)
-    {
-    }
-
-    //----------------------------------------------------------------------
-    // Automatically cleanup when this object goes out of scope.
-    //----------------------------------------------------------------------
-    ~CleanUp ()
-    {
-        clean();
-    }
-
-    //----------------------------------------------------------------------
-    // Access the value stored in this class
-    //----------------------------------------------------------------------
-    value_type get() 
-    {
-        return m_current_value; 
-    }
+  //----------------------------------------------------------------------
+  // Constructor that sets the current value only. No values are
+  // considered to be invalid and the cleanup function will be called
+  // regardless of the value of m_current_value.
+  //----------------------------------------------------------------------
+  CleanUp(value_type value, CallbackType callback)
+      : m_current_value(value), m_invalid_value(), m_callback(callback),
+        m_callback_called(false), m_invalid_value_is_valid(false) {}
+
+  //----------------------------------------------------------------------
+  // Constructor that sets the current value and also the invalid value.
+  // The cleanup function will be called on "m_value" as long as it isn't
+  // equal to "m_invalid_value".
+  //----------------------------------------------------------------------
+  CleanUp(value_type value, value_type invalid, CallbackType callback)
+      : m_current_value(value), m_invalid_value(invalid), m_callback(callback),
+        m_callback_called(false), m_invalid_value_is_valid(true) {}
+
+  //----------------------------------------------------------------------
+  // Automatically cleanup when this object goes out of scope.
+  //----------------------------------------------------------------------
+  ~CleanUp() { clean(); }
+
+  //----------------------------------------------------------------------
+  // Access the value stored in this class
+  //----------------------------------------------------------------------
+  value_type get() { return m_current_value; }
+
+  //----------------------------------------------------------------------
+  // Access the value stored in this class
+  //----------------------------------------------------------------------
+  const value_type get() const { return m_current_value; }
+
+  //----------------------------------------------------------------------
+  // Reset the owned value to "value". If a current value is valid and
+  // the cleanup callback hasn't been called, the previous value will
+  // be cleaned up (see void CleanUp::clean()).
+  //----------------------------------------------------------------------
+  void set(const value_type value) {
+    // Cleanup the current value if needed
+    clean();
+    // Now set the new value and mark our callback as not called
+    m_callback_called = false;
+    m_current_value = value;
+  }
+
+  //----------------------------------------------------------------------
+  // Checks is "m_current_value" is valid. The value is considered valid
+  // no invalid value was supplied during construction of this object or
+  // if an invalid value was supplied and "m_current_value" is not equal
+  // to "m_invalid_value".
+  //
+  // Returns true if "m_current_value" is valid, false otherwise.
+  //----------------------------------------------------------------------
+  bool is_valid() const {
+    if (m_invalid_value_is_valid)
+      return m_current_value != m_invalid_value;
+    return true;
+  }
+
+  //----------------------------------------------------------------------
+  // This function will call the cleanup callback provided in the
+  // constructor one time if the value is considered valid (See is_valid()).
+  // This function sets m_callback_called to true so we don't call the
+  // cleanup callback multiple times on the same value.
+  //----------------------------------------------------------------------
+  void clean() {
+    if (m_callback && !m_callback_called) {
+      m_callback_called = true;
+      if (is_valid())
+        m_callback(m_current_value);
+    }
+  }
+
+  //----------------------------------------------------------------------
+  // Cancels the cleanup that would have been called on "m_current_value"
+  // if it was valid. This function can be used to release the value
+  // contained in this object so ownership can be transferred to the caller.
+  //----------------------------------------------------------------------
+  value_type release() {
+    m_callback_called = true;
+    return m_current_value;
+  }
 
-    //----------------------------------------------------------------------
-    // Access the value stored in this class
-    //----------------------------------------------------------------------
-    const value_type
-    get() const 
-    {
-        return m_current_value; 
-    }
-
-    //----------------------------------------------------------------------
-    // Reset the owned value to "value". If a current value is valid and
-    // the cleanup callback hasn't been called, the previous value will
-    // be cleaned up (see void CleanUp::clean()). 
-    //----------------------------------------------------------------------
-    void 
-    set (const value_type value)
-    {
-        // Cleanup the current value if needed
-        clean ();
-        // Now set the new value and mark our callback as not called
-        m_callback_called = false;
-        m_current_value = value;
-    }
+private:
+  value_type m_current_value;
+  const value_type m_invalid_value;
+  CallbackType m_callback;
+  bool m_callback_called;
+  bool m_invalid_value_is_valid;
 
-    //----------------------------------------------------------------------
-    // Checks is "m_current_value" is valid. The value is considered valid
-    // no invalid value was supplied during construction of this object or
-    // if an invalid value was supplied and "m_current_value" is not equal
-    // to "m_invalid_value".
-    //
-    // Returns true if "m_current_value" is valid, false otherwise.
-    //----------------------------------------------------------------------
-    bool 
-    is_valid() const 
-    {
-        if (m_invalid_value_is_valid)
-            return m_current_value != m_invalid_value; 
-        return true;
-    }
+  // Outlaw default constructor, copy constructor and the assignment operator
+  DISALLOW_COPY_AND_ASSIGN(CleanUp);
+};
 
-    //----------------------------------------------------------------------
-    // This function will call the cleanup callback provided in the 
-    // constructor one time if the value is considered valid (See is_valid()).
-    // This function sets m_callback_called to true so we don't call the
-    // cleanup callback multiple times on the same value.
-    //----------------------------------------------------------------------
-    void 
-    clean()
-    {
-        if (m_callback && !m_callback_called)
-        {
-            m_callback_called = true;
-            if (is_valid())
-                m_callback(m_current_value);
-        }
-    }
+template <typename T, typename R, typename A0> class CleanUp2 {
+public:
+  typedef T value_type;
+  typedef std::function<R(value_type, A0)> CallbackType;
 
-    //----------------------------------------------------------------------
-    // Cancels the cleanup that would have been called on "m_current_value" 
-    // if it was valid. This function can be used to release the value 
-    // contained in this object so ownership can be transferred to the caller.
-    //----------------------------------------------------------------------
-    value_type
-    release ()
-    {
-        m_callback_called = true;
-        return m_current_value;
-    }
+  //----------------------------------------------------------------------
+  // Constructor that sets the current value only. No values are
+  // considered to be invalid and the cleanup function will be called
+  // regardless of the value of m_current_value.
+  //----------------------------------------------------------------------
+  CleanUp2(value_type value, CallbackType callback, A0 arg)
+      : m_current_value(value), m_invalid_value(), m_callback(callback),
+        m_callback_called(false), m_invalid_value_is_valid(false),
+        m_argument(arg) {}
+
+  //----------------------------------------------------------------------
+  // Constructor that sets the current value and also the invalid value.
+  // The cleanup function will be called on "m_value" as long as it isn't
+  // equal to "m_invalid_value".
+  //----------------------------------------------------------------------
+  CleanUp2(value_type value, value_type invalid, CallbackType callback, A0 arg)
+      : m_current_value(value), m_invalid_value(invalid), m_callback(callback),
+        m_callback_called(false), m_invalid_value_is_valid(true),
+        m_argument(arg) {}
+
+  //----------------------------------------------------------------------
+  // Automatically cleanup when this object goes out of scope.
+  //----------------------------------------------------------------------
+  ~CleanUp2() { clean(); }
+
+  //----------------------------------------------------------------------
+  // Access the value stored in this class
+  //----------------------------------------------------------------------
+  value_type get() { return m_current_value; }
+
+  //----------------------------------------------------------------------
+  // Access the value stored in this class
+  //----------------------------------------------------------------------
+  const value_type get() const { return m_current_value; }
+
+  //----------------------------------------------------------------------
+  // Reset the owned value to "value". If a current value is valid and
+  // the cleanup callback hasn't been called, the previous value will
+  // be cleaned up (see void CleanUp::clean()).
+  //----------------------------------------------------------------------
+  void set(const value_type value) {
+    // Cleanup the current value if needed
+    clean();
+    // Now set the new value and mark our callback as not called
+    m_callback_called = false;
+    m_current_value = value;
+  }
+
+  //----------------------------------------------------------------------
+  // Checks is "m_current_value" is valid. The value is considered valid
+  // no invalid value was supplied during construction of this object or
+  // if an invalid value was supplied and "m_current_value" is not equal
+  // to "m_invalid_value".
+  //
+  // Returns true if "m_current_value" is valid, false otherwise.
+  //----------------------------------------------------------------------
+  bool is_valid() const {
+    if (m_invalid_value_is_valid)
+      return m_current_value != m_invalid_value;
+    return true;
+  }
+
+  //----------------------------------------------------------------------
+  // This function will call the cleanup callback provided in the
+  // constructor one time if the value is considered valid (See is_valid()).
+  // This function sets m_callback_called to true so we don't call the
+  // cleanup callback multiple times on the same value.
+  //----------------------------------------------------------------------
+  void clean() {
+    if (m_callback && !m_callback_called) {
+      m_callback_called = true;
+      if (is_valid())
+        m_callback(m_current_value, m_argument);
+    }
+  }
+
+  //----------------------------------------------------------------------
+  // Cancels the cleanup that would have been called on "m_current_value"
+  // if it was valid. This function can be used to release the value
+  // contained in this object so ownership can be transferred to the caller.
+  //----------------------------------------------------------------------
+  value_type release() {
+    m_callback_called = true;
+    return m_current_value;
+  }
 
 private:
-            value_type      m_current_value;
-    const   value_type      m_invalid_value;
-            CallbackType    m_callback;
-            bool            m_callback_called;
-            bool            m_invalid_value_is_valid;
+  value_type m_current_value;
+  const value_type m_invalid_value;
+  CallbackType m_callback;
+  bool m_callback_called;
+  bool m_invalid_value_is_valid;
+  A0 m_argument;
 
-    // Outlaw default constructor, copy constructor and the assignment operator
-    DISALLOW_COPY_AND_ASSIGN (CleanUp);                 
-};
-    
-template <typename T, typename R, typename A0>
-class CleanUp2
-{
-public:
-    typedef T value_type;
-    typedef std::function<R(value_type,A0)> CallbackType;
-    
-    //----------------------------------------------------------------------
-    // Constructor that sets the current value only. No values are 
-    // considered to be invalid and the cleanup function will be called
-    // regardless of the value of m_current_value.
-    //----------------------------------------------------------------------
-    CleanUp2 (value_type value, CallbackType callback, A0 arg) : 
-    m_current_value (value),
-    m_invalid_value (),
-    m_callback (callback),
-    m_callback_called (false),
-    m_invalid_value_is_valid (false),
-    m_argument(arg)
-    {
-    }
-    
-    //----------------------------------------------------------------------
-    // Constructor that sets the current value and also the invalid value.
-    // The cleanup function will be called on "m_value" as long as it isn't
-    // equal to "m_invalid_value".
-    //----------------------------------------------------------------------
-    CleanUp2 (value_type value, value_type invalid, CallbackType callback, A0 arg) : 
-    m_current_value (value),
-    m_invalid_value (invalid),
-    m_callback (callback),
-    m_callback_called (false),
-    m_invalid_value_is_valid (true),
-    m_argument(arg)
-    {
-    }
-    
-    //----------------------------------------------------------------------
-    // Automatically cleanup when this object goes out of scope.
-    //----------------------------------------------------------------------
-    ~CleanUp2 ()
-    {
-        clean();
-    }
-    
-    //----------------------------------------------------------------------
-    // Access the value stored in this class
-    //----------------------------------------------------------------------
-    value_type get() 
-    {
-        return m_current_value; 
-    }
-    
-    //----------------------------------------------------------------------
-    // Access the value stored in this class
-    //----------------------------------------------------------------------
-    const value_type
-    get() const 
-    {
-        return m_current_value; 
-    }
-    
-    //----------------------------------------------------------------------
-    // Reset the owned value to "value". If a current value is valid and
-    // the cleanup callback hasn't been called, the previous value will
-    // be cleaned up (see void CleanUp::clean()). 
-    //----------------------------------------------------------------------
-    void 
-    set (const value_type value)
-    {
-        // Cleanup the current value if needed
-        clean ();
-        // Now set the new value and mark our callback as not called
-        m_callback_called = false;
-        m_current_value = value;
-    }
-    
-    //----------------------------------------------------------------------
-    // Checks is "m_current_value" is valid. The value is considered valid
-    // no invalid value was supplied during construction of this object or
-    // if an invalid value was supplied and "m_current_value" is not equal
-    // to "m_invalid_value".
-    //
-    // Returns true if "m_current_value" is valid, false otherwise.
-    //----------------------------------------------------------------------
-    bool 
-    is_valid() const 
-    {
-        if (m_invalid_value_is_valid)
-            return m_current_value != m_invalid_value; 
-        return true;
-    }
-    
-    //----------------------------------------------------------------------
-    // This function will call the cleanup callback provided in the 
-    // constructor one time if the value is considered valid (See is_valid()).
-    // This function sets m_callback_called to true so we don't call the
-    // cleanup callback multiple times on the same value.
-    //----------------------------------------------------------------------
-    void 
-    clean()
-    {
-        if (m_callback && !m_callback_called)
-        {
-            m_callback_called = true;
-            if (is_valid())
-                m_callback(m_current_value, m_argument);
-        }
-    }
-    
-    //----------------------------------------------------------------------
-    // Cancels the cleanup that would have been called on "m_current_value" 
-    // if it was valid. This function can be used to release the value 
-    // contained in this object so ownership can be transferred to the caller.
-    //----------------------------------------------------------------------
-    value_type
-    release ()
-    {
-        m_callback_called = true;
-        return m_current_value;
-    }
-    
-private:
-    value_type      m_current_value;
-    const   value_type      m_invalid_value;
-    CallbackType    m_callback;
-    bool            m_callback_called;
-    bool            m_invalid_value_is_valid;
-    A0              m_argument;
-    
-    // Outlaw default constructor, copy constructor and the assignment operator
-    DISALLOW_COPY_AND_ASSIGN (CleanUp2);                 
+  // Outlaw default constructor, copy constructor and the assignment operator
+  DISALLOW_COPY_AND_ASSIGN(CleanUp2);
 };
 
 } // namespace lldb_utility

Modified: lldb/trunk/include/lldb/Utility/ConvertEnum.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/ConvertEnum.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/ConvertEnum.h (original)
+++ lldb/trunk/include/lldb/Utility/ConvertEnum.h Tue Sep  6 15:57:50 2016
@@ -12,8 +12,7 @@
 #include "lldb/lldb-enumerations.h"
 #include "lldb/lldb-private-enumerations.h"
 
-namespace lldb_private
-{
+namespace lldb_private {
 
 const char *GetVoteAsCString(Vote vote);
 const char *GetSectionTypeAsCString(lldb::SectionType sect_type);

Modified: lldb/trunk/include/lldb/Utility/Either.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Either.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Either.h (original)
+++ lldb/trunk/include/lldb/Utility/Either.h Tue Sep  6 15:57:50 2016
@@ -15,140 +15,112 @@
 #include <functional>
 
 namespace lldb_utility {
-    template <typename T1, typename T2>
-    class Either
-    {
-    private:
-        enum class Selected
-        {
-            One, Two
-        };
-        
-        Selected m_selected;
-        union
-        {
-            T1 m_t1;
-            T2 m_t2;
-        };
-        
-    public:
-        Either (const T1& t1)
-        {
-            m_t1 = t1;
-            m_selected = Selected::One;
-        }
-        
-        Either (const T2& t2)
-        {
-            m_t2 = t2;
-            m_selected = Selected::Two;
-        }
-        
-        Either (const Either<T1,T2>& rhs)
-        {
-            switch (rhs.m_selected)
-            {
-                case Selected::One:
-                    m_t1 = rhs.GetAs<T1>().getValue();
-                    m_selected = Selected::One;
-                    break;
-                case Selected::Two:
-                    m_t2 = rhs.GetAs<T2>().getValue();
-                    m_selected = Selected::Two;
-                    break;
-            }
-        }
-        
-        template <class X, typename std::enable_if<std::is_same<T1,X>::value>::type * = nullptr>
-        llvm::Optional<T1>
-        GetAs() const
-        {
-            switch (m_selected)
-            {
-                case Selected::One:
-                    return m_t1;
-                default:
-                    return llvm::Optional<T1>();
-            }
-        }
-        
-        template <class X, typename std::enable_if<std::is_same<T2,X>::value>::type * = nullptr>
-        llvm::Optional<T2>
-        GetAs() const
-        {
-            switch (m_selected)
-            {
-                case Selected::Two:
-                    return m_t2;
-                default:
-                    return llvm::Optional<T2>();
-            }
-        }
-        
-        template <class ResultType>
-        ResultType
-        Apply (std::function<ResultType(T1)> if_T1,
-               std::function<ResultType(T2)> if_T2) const
-        {
-            switch (m_selected)
-            {
-                case Selected::One:
-                    return if_T1(m_t1);
-                case Selected::Two:
-                    return if_T2(m_t2);
-            }
-        }
-        
-        bool
-        operator == (const Either<T1,T2>& rhs)
-        {
-            return (GetAs<T1>() == rhs.GetAs<T1>()) && (GetAs<T2>() == rhs.GetAs<T2>());
-        }
-        
-        explicit
-        operator bool ()
-        {
-            switch (m_selected)
-            {
-                case Selected::One:
-                    return (bool)m_t1;
-                case Selected::Two:
-                    return (bool)m_t2;
-            }
-        }
-        
-        Either<T1,T2>&
-        operator = (const Either<T1,T2>& rhs)
-        {
-            switch (rhs.m_selected)
-            {
-                case Selected::One:
-                    m_t1 = rhs.GetAs<T1>().getValue();
-                    m_selected = Selected::One;
-                    break;
-                case Selected::Two:
-                    m_t2 = rhs.GetAs<T2>().getValue();
-                    m_selected = Selected::Two;
-                    break;
-            }
-            return *this;
-        }
-        
-        ~Either ()
-        {
-            switch (m_selected)
-            {
-                case Selected::One:
-                    m_t1.T1::~T1();
-                    break;
-                case Selected::Two:
-                    m_t2.T2::~T2();
-                    break;
-            }
-        }
-    };
-    
+template <typename T1, typename T2> class Either {
+private:
+  enum class Selected { One, Two };
+
+  Selected m_selected;
+  union {
+    T1 m_t1;
+    T2 m_t2;
+  };
+
+public:
+  Either(const T1 &t1) {
+    m_t1 = t1;
+    m_selected = Selected::One;
+  }
+
+  Either(const T2 &t2) {
+    m_t2 = t2;
+    m_selected = Selected::Two;
+  }
+
+  Either(const Either<T1, T2> &rhs) {
+    switch (rhs.m_selected) {
+    case Selected::One:
+      m_t1 = rhs.GetAs<T1>().getValue();
+      m_selected = Selected::One;
+      break;
+    case Selected::Two:
+      m_t2 = rhs.GetAs<T2>().getValue();
+      m_selected = Selected::Two;
+      break;
+    }
+  }
+
+  template <class X, typename std::enable_if<std::is_same<T1, X>::value>::type
+                         * = nullptr>
+  llvm::Optional<T1> GetAs() const {
+    switch (m_selected) {
+    case Selected::One:
+      return m_t1;
+    default:
+      return llvm::Optional<T1>();
+    }
+  }
+
+  template <class X, typename std::enable_if<std::is_same<T2, X>::value>::type
+                         * = nullptr>
+  llvm::Optional<T2> GetAs() const {
+    switch (m_selected) {
+    case Selected::Two:
+      return m_t2;
+    default:
+      return llvm::Optional<T2>();
+    }
+  }
+
+  template <class ResultType>
+  ResultType Apply(std::function<ResultType(T1)> if_T1,
+                   std::function<ResultType(T2)> if_T2) const {
+    switch (m_selected) {
+    case Selected::One:
+      return if_T1(m_t1);
+    case Selected::Two:
+      return if_T2(m_t2);
+    }
+  }
+
+  bool operator==(const Either<T1, T2> &rhs) {
+    return (GetAs<T1>() == rhs.GetAs<T1>()) && (GetAs<T2>() == rhs.GetAs<T2>());
+  }
+
+  explicit operator bool() {
+    switch (m_selected) {
+    case Selected::One:
+      return (bool)m_t1;
+    case Selected::Two:
+      return (bool)m_t2;
+    }
+  }
+
+  Either<T1, T2> &operator=(const Either<T1, T2> &rhs) {
+    switch (rhs.m_selected) {
+    case Selected::One:
+      m_t1 = rhs.GetAs<T1>().getValue();
+      m_selected = Selected::One;
+      break;
+    case Selected::Two:
+      m_t2 = rhs.GetAs<T2>().getValue();
+      m_selected = Selected::Two;
+      break;
+    }
+    return *this;
+  }
+
+  ~Either() {
+    switch (m_selected) {
+    case Selected::One:
+      m_t1.T1::~T1();
+      break;
+    case Selected::Two:
+      m_t2.T2::~T2();
+      break;
+    }
+  }
+};
+
 } // namespace lldb_utility
 
 #endif // #ifndef liblldb_Either_h_
-

Modified: lldb/trunk/include/lldb/Utility/Iterable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Iterable.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Iterable.h (original)
+++ lldb/trunk/include/lldb/Utility/Iterable.h Tue Sep  6 15:57:50 2016
@@ -17,222 +17,184 @@
 // Other libraries and framework includes
 // Project includes
 
-namespace lldb_private
-{
-    
-template <typename I, typename E> E map_adapter(I &iter)
-{
-    return iter->second;
-}
-    
-template <typename I, typename E> E vector_adapter(I &iter)
-{
-    return *iter;
-}
-    
-template <typename I, typename E> E list_adapter(I &iter)
-{
-    return *iter;
+namespace lldb_private {
+
+template <typename I, typename E> E map_adapter(I &iter) {
+  return iter->second;
 }
-    
-template <typename C, typename E, E (*A)(typename C::const_iterator &)> class AdaptedConstIterator
-{
-public:
-    typedef typename C::const_iterator BackingIterator;
 
-    // Wrapping constructor
-    AdaptedConstIterator (BackingIterator backing_iterator) :
-        m_iter(backing_iterator)
-    {
-    }
-    
-    // Default-constructible
-    AdaptedConstIterator () :
-        m_iter()
-    {
-    }
-    
-    // Copy-constructible
-    AdaptedConstIterator (const AdaptedConstIterator &rhs) :
-        m_iter(rhs.m_iter)
-    {
-    }
-    
-    // Copy-assignable
-    AdaptedConstIterator &operator= (const AdaptedConstIterator &rhs)
-    {
-        m_iter = rhs.m_iter;
-        return *this;
-    }
-    
-    // Destructible
-    ~AdaptedConstIterator() = default;
-    
-    // Comparable
-    bool operator== (const AdaptedConstIterator &rhs)
-    {
-        return m_iter == rhs.m_iter;
-    }
-    
-    bool operator!= (const AdaptedConstIterator &rhs)
-    {
-        return m_iter != rhs.m_iter;
-    }
-    
-    // Rvalue dereferenceable
-    E operator* ()
-    {
-        return (*A)(m_iter);
-    }
-    
-    E operator-> ()
-    {
-        return (*A)(m_iter);
-    }
-    
-    // Offset dereferenceable
-    E operator[] (typename BackingIterator::difference_type offset)
-    {
-        return AdaptedConstIterator(m_iter + offset);
-    }
-    
-    // Incrementable
-    AdaptedConstIterator &operator++ ()
-    {
-        m_iter++;
-        return *this;
-    }
-    
-    // Decrementable
-    AdaptedConstIterator &operator-- ()
-    {
-        m_iter--;
-        return *this;
-    }
-    
-    // Compound assignment
-    AdaptedConstIterator &operator+= (typename BackingIterator::difference_type offset)
-    {
-        m_iter += offset;
-        return *this;
-    }
-    
-    AdaptedConstIterator &operator-= (typename BackingIterator::difference_type offset)
-    {
-        m_iter -= offset;
-        return *this;
-    }
-    
-    // Arithmetic
-    AdaptedConstIterator operator+ (typename BackingIterator::difference_type offset)
-    {
-        return AdaptedConstIterator(m_iter + offset);
-    }
-    
-    AdaptedConstIterator operator- (typename BackingIterator::difference_type offset)
-    {
-        return AdaptedConstIterator(m_iter - offset);
-    }
-    
-    // Comparable
-    bool operator< (AdaptedConstIterator &rhs)
-    {
-        return m_iter < rhs.m_iter;
-    }
-    
-    bool operator<= (AdaptedConstIterator &rhs)
-    {
-        return m_iter <= rhs.m_iter;
-    }
-    
-    bool operator> (AdaptedConstIterator &rhs)
-    {
-        return m_iter > rhs.m_iter;
-    }
-    
-    bool operator>= (AdaptedConstIterator &rhs)
-    {
-        return m_iter >= rhs.m_iter;
-    }
-    
-    template <typename C1, typename E1, E1 (*A1)(typename C1::const_iterator &)>
-    friend AdaptedConstIterator<C1, E1, A1> operator+(typename C1::const_iterator::difference_type, AdaptedConstIterator<C1, E1, A1> &);
+template <typename I, typename E> E vector_adapter(I &iter) { return *iter; }
+
+template <typename I, typename E> E list_adapter(I &iter) { return *iter; }
 
-    template <typename C1, typename E1, E1 (*A1)(typename C1::const_iterator &)>
-    friend typename C1::const_iterator::difference_type operator-(AdaptedConstIterator<C1, E1, A1> &, AdaptedConstIterator<C1, E1, A1> &);
+template <typename C, typename E, E (*A)(typename C::const_iterator &)>
+class AdaptedConstIterator {
+public:
+  typedef typename C::const_iterator BackingIterator;
 
-    template <typename C1, typename E1, E1 (*A1)(typename C1::const_iterator &)>
-    friend void swap(AdaptedConstIterator<C1, E1, A1> &, AdaptedConstIterator<C1, E1, A1> &);
+  // Wrapping constructor
+  AdaptedConstIterator(BackingIterator backing_iterator)
+      : m_iter(backing_iterator) {}
+
+  // Default-constructible
+  AdaptedConstIterator() : m_iter() {}
+
+  // Copy-constructible
+  AdaptedConstIterator(const AdaptedConstIterator &rhs) : m_iter(rhs.m_iter) {}
+
+  // Copy-assignable
+  AdaptedConstIterator &operator=(const AdaptedConstIterator &rhs) {
+    m_iter = rhs.m_iter;
+    return *this;
+  }
+
+  // Destructible
+  ~AdaptedConstIterator() = default;
+
+  // Comparable
+  bool operator==(const AdaptedConstIterator &rhs) {
+    return m_iter == rhs.m_iter;
+  }
+
+  bool operator!=(const AdaptedConstIterator &rhs) {
+    return m_iter != rhs.m_iter;
+  }
+
+  // Rvalue dereferenceable
+  E operator*() { return (*A)(m_iter); }
+
+  E operator->() { return (*A)(m_iter); }
+
+  // Offset dereferenceable
+  E operator[](typename BackingIterator::difference_type offset) {
+    return AdaptedConstIterator(m_iter + offset);
+  }
+
+  // Incrementable
+  AdaptedConstIterator &operator++() {
+    m_iter++;
+    return *this;
+  }
+
+  // Decrementable
+  AdaptedConstIterator &operator--() {
+    m_iter--;
+    return *this;
+  }
+
+  // Compound assignment
+  AdaptedConstIterator &
+  operator+=(typename BackingIterator::difference_type offset) {
+    m_iter += offset;
+    return *this;
+  }
+
+  AdaptedConstIterator &
+  operator-=(typename BackingIterator::difference_type offset) {
+    m_iter -= offset;
+    return *this;
+  }
+
+  // Arithmetic
+  AdaptedConstIterator
+  operator+(typename BackingIterator::difference_type offset) {
+    return AdaptedConstIterator(m_iter + offset);
+  }
+
+  AdaptedConstIterator
+  operator-(typename BackingIterator::difference_type offset) {
+    return AdaptedConstIterator(m_iter - offset);
+  }
+
+  // Comparable
+  bool operator<(AdaptedConstIterator &rhs) { return m_iter < rhs.m_iter; }
+
+  bool operator<=(AdaptedConstIterator &rhs) { return m_iter <= rhs.m_iter; }
+
+  bool operator>(AdaptedConstIterator &rhs) { return m_iter > rhs.m_iter; }
+
+  bool operator>=(AdaptedConstIterator &rhs) { return m_iter >= rhs.m_iter; }
+
+  template <typename C1, typename E1, E1 (*A1)(typename C1::const_iterator &)>
+  friend AdaptedConstIterator<C1, E1, A1>
+  operator+(typename C1::const_iterator::difference_type,
+            AdaptedConstIterator<C1, E1, A1> &);
+
+  template <typename C1, typename E1, E1 (*A1)(typename C1::const_iterator &)>
+  friend typename C1::const_iterator::difference_type
+  operator-(AdaptedConstIterator<C1, E1, A1> &,
+            AdaptedConstIterator<C1, E1, A1> &);
+
+  template <typename C1, typename E1, E1 (*A1)(typename C1::const_iterator &)>
+  friend void swap(AdaptedConstIterator<C1, E1, A1> &,
+                   AdaptedConstIterator<C1, E1, A1> &);
 
 private:
-    BackingIterator m_iter;
+  BackingIterator m_iter;
 };
-    
+
 template <typename C, typename E, E (*A)(typename C::const_iterator &)>
-AdaptedConstIterator<C, E, A> operator+ (typename AdaptedConstIterator<C, E, A>::BackingIterator::difference_type offset, AdaptedConstIterator<C, E, A> &rhs)
-{
-    return rhs.operator+(offset);
+AdaptedConstIterator<C, E, A> operator+(
+    typename AdaptedConstIterator<C, E, A>::BackingIterator::difference_type
+        offset,
+    AdaptedConstIterator<C, E, A> &rhs) {
+  return rhs.operator+(offset);
 }
 
 template <typename C, typename E, E (*A)(typename C::const_iterator &)>
-typename AdaptedConstIterator<C, E, A>::BackingIterator::difference_type operator- (AdaptedConstIterator<C, E, A> &lhs, AdaptedConstIterator<C, E, A> &rhs)
-{
-    return(lhs.m_iter - rhs.m_iter);
+typename AdaptedConstIterator<C, E, A>::BackingIterator::difference_type
+operator-(AdaptedConstIterator<C, E, A> &lhs,
+          AdaptedConstIterator<C, E, A> &rhs) {
+  return (lhs.m_iter - rhs.m_iter);
 }
 
 template <typename C, typename E, E (*A)(typename C::const_iterator &)>
-void swap (AdaptedConstIterator<C, E, A> &lhs, AdaptedConstIterator<C, E, A> &rhs)
-{
-    std::swap(lhs.m_iter, rhs.m_iter);
+void swap(AdaptedConstIterator<C, E, A> &lhs,
+          AdaptedConstIterator<C, E, A> &rhs) {
+  std::swap(lhs.m_iter, rhs.m_iter);
 }
-    
-template <typename C, typename E, E (*A)(typename C::const_iterator &)> class AdaptedIterable
-{
+
+template <typename C, typename E, E (*A)(typename C::const_iterator &)>
+class AdaptedIterable {
 private:
-    const C &m_container;
+  const C &m_container;
+
 public:
-    AdaptedIterable (const C &container) :
-        m_container(container)
-    {
-    }
-    
-    AdaptedConstIterator<C, E, A> begin ()
-    {
-        return AdaptedConstIterator<C, E, A>(m_container.begin());
-    }
-    
-    AdaptedConstIterator<C, E, A> end ()
-    {
-        return AdaptedConstIterator<C, E, A>(m_container.end());
-    }
+  AdaptedIterable(const C &container) : m_container(container) {}
+
+  AdaptedConstIterator<C, E, A> begin() {
+    return AdaptedConstIterator<C, E, A>(m_container.begin());
+  }
+
+  AdaptedConstIterator<C, E, A> end() {
+    return AdaptedConstIterator<C, E, A>(m_container.end());
+  }
 };
 
-template <typename C, typename E, E (*A)(typename C::const_iterator &), typename MutexType>
-class LockingAdaptedIterable : public AdaptedIterable<C, E, A>
-{
+template <typename C, typename E, E (*A)(typename C::const_iterator &),
+          typename MutexType>
+class LockingAdaptedIterable : public AdaptedIterable<C, E, A> {
 public:
-    LockingAdaptedIterable(C &container, MutexType &mutex) : AdaptedIterable<C, E, A>(container), m_mutex(&mutex)
-    {
-        m_mutex->lock();
-    }
-
-    LockingAdaptedIterable(LockingAdaptedIterable &&rhs) : AdaptedIterable<C, E, A>(rhs), m_mutex(rhs.m_mutex)
-    {
-        rhs.m_mutex = nullptr;
-    }
-
-    ~LockingAdaptedIterable()
-    {
-        if (m_mutex)
-            m_mutex->unlock();
-    }
+  LockingAdaptedIterable(C &container, MutexType &mutex)
+      : AdaptedIterable<C, E, A>(container), m_mutex(&mutex) {
+    m_mutex->lock();
+  }
+
+  LockingAdaptedIterable(LockingAdaptedIterable &&rhs)
+      : AdaptedIterable<C, E, A>(rhs), m_mutex(rhs.m_mutex) {
+    rhs.m_mutex = nullptr;
+  }
+
+  ~LockingAdaptedIterable() {
+    if (m_mutex)
+      m_mutex->unlock();
+  }
 
 private:
-    MutexType *m_mutex = nullptr;
+  MutexType *m_mutex = nullptr;
 
-    LockingAdaptedIterable(const LockingAdaptedIterable &) = delete;
-    LockingAdaptedIterable &
-    operator=(const LockingAdaptedIterable &) = delete;
+  LockingAdaptedIterable(const LockingAdaptedIterable &) = delete;
+  LockingAdaptedIterable &operator=(const LockingAdaptedIterable &) = delete;
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Utility/JSON.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/JSON.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/JSON.h (original)
+++ lldb/trunk/include/lldb/Utility/JSON.h Tue Sep  6 15:57:50 2016
@@ -24,338 +24,263 @@
 
 namespace lldb_private {
 
-    class JSONValue
-    {
-    public:
-        virtual void
-        Write (Stream& s) = 0;
-        
-        typedef std::shared_ptr<JSONValue> SP;
-        
-        enum class Kind
-        {
-            String,
-            Number,
-            True,
-            False,
-            Null,
-            Object,
-            Array
-        };
-        
-        JSONValue (Kind k) :
-        m_kind(k)
-        {}
-        
-        Kind
-        GetKind() const
-        {
-            return m_kind;
-        }
-        
-        virtual
-        ~JSONValue () = default;
-        
-    private:
-        const Kind m_kind;
-    };
-    
-    class JSONString : public JSONValue
-    {
-    public:
-        JSONString ();
-        JSONString (const char* s);
-        JSONString (const std::string& s);
-
-        JSONString (const JSONString& s) = delete;
-        JSONString&
-        operator = (const JSONString& s) = delete;
-        
-        void
-        Write(Stream& s) override;
-        
-        typedef std::shared_ptr<JSONString> SP;
-        
-        std::string
-        GetData () { return m_data; }
-        
-        static bool classof(const JSONValue *V)
-        {
-            return V->GetKind() == JSONValue::Kind::String;
-        }
-        
-        ~JSONString() override = default;
-        
-    private:
-        
-        static std::string
-        json_string_quote_metachars (const std::string&);
-        
-        std::string m_data;
-    };
-
-    class JSONNumber : public JSONValue
-    {
-    public:
-        typedef std::shared_ptr<JSONNumber> SP;
-
-        // We cretae a constructor for all integer and floating point type with using templates and
-        // SFINAE to avoid having ambiguous overloads because of the implicit type promotion. If we
-        // would have constructors only with int64_t, uint64_t and double types then constructing a
-        // JSONNumber from an int32_t (or any other similar type) would fail to compile.
-
-        template <typename T,
-                  typename std::enable_if<std::is_integral<T>::value &&
-                                          std::is_unsigned<T>::value>::type* = nullptr>
-        explicit JSONNumber (T u) :
-            JSONValue(JSONValue::Kind::Number),
-            m_data_type(DataType::Unsigned)
-        {
-            m_data.m_unsigned = u;
-        }
-
-        template <typename T,
-                  typename std::enable_if<std::is_integral<T>::value &&
-                                          std::is_signed<T>::value>::type* = nullptr>
-        explicit JSONNumber (T s) :
-            JSONValue(JSONValue::Kind::Number),
-            m_data_type(DataType::Signed)
-        {
-            m_data.m_signed = s;
-        }
-
-        template <typename T,
-                  typename std::enable_if<std::is_floating_point<T>::value>::type* = nullptr>
-        explicit JSONNumber (T d) :
-            JSONValue(JSONValue::Kind::Number),
-            m_data_type(DataType::Double)
-        {
-            m_data.m_double = d;
-        }
-
-        ~JSONNumber() override = default;
-
-        JSONNumber (const JSONNumber& s) = delete;
-        JSONNumber&
-        operator = (const JSONNumber& s) = delete;
-
-        void
-        Write(Stream& s) override;
-
-        uint64_t
-        GetAsUnsigned() const;
-
-        int64_t
-        GetAsSigned() const;
-
-        double
-        GetAsDouble() const;
-
-        static bool classof(const JSONValue *V)
-        {
-            return V->GetKind() == JSONValue::Kind::Number;
-        }
-
-    private:
-        enum class DataType : uint8_t
-        {
-            Unsigned,
-            Signed,
-            Double
-        } m_data_type;
-
-        union
-        {
-            uint64_t m_unsigned;
-            int64_t  m_signed;
-            double   m_double;
-        } m_data;
-    };
-
-    class JSONTrue : public JSONValue
-    {
-    public:
-        JSONTrue ();
-
-        JSONTrue (const JSONTrue& s) = delete;
-        JSONTrue&
-        operator = (const JSONTrue& s) = delete;
-        
-        void
-        Write(Stream& s) override;
-        
-        typedef std::shared_ptr<JSONTrue> SP;
-        
-        static bool classof(const JSONValue *V)
-        {
-            return V->GetKind() == JSONValue::Kind::True;
-        }
-        
-        ~JSONTrue() override = default;
-    };
-
-    class JSONFalse : public JSONValue
-    {
-    public:
-        JSONFalse ();
-
-        JSONFalse (const JSONFalse& s) = delete;
-        JSONFalse&
-        operator = (const JSONFalse& s) = delete;
-        
-        void
-        Write(Stream& s) override;
-        
-        typedef std::shared_ptr<JSONFalse> SP;
-        
-        static bool classof(const JSONValue *V)
-        {
-            return V->GetKind() == JSONValue::Kind::False;
-        }
-        
-        ~JSONFalse() override = default;
-    };
-
-    class JSONNull : public JSONValue
-    {
-    public:
-        JSONNull ();
-
-        JSONNull (const JSONNull& s) = delete;
-        JSONNull&
-        operator = (const JSONNull& s) = delete;
-        
-        void
-        Write(Stream& s) override;
-        
-        typedef std::shared_ptr<JSONNull> SP;
-        
-        static bool classof(const JSONValue *V)
-        {
-            return V->GetKind() == JSONValue::Kind::Null;
-        }
-        
-        ~JSONNull() override = default;
-    };
-
-    class JSONObject : public JSONValue
-    {
-    public:
-        JSONObject ();
-        
-        JSONObject (const JSONObject& s) = delete;
-        JSONObject&
-        operator = (const JSONObject& s) = delete;
-
-        void
-        Write(Stream& s) override;
-        
-        typedef std::shared_ptr<JSONObject> SP;
-        
-        static bool classof(const JSONValue *V)
-        {
-            return V->GetKind() == JSONValue::Kind::Object;
-        }
-        
-        bool
-        SetObject (const std::string& key,
-                   JSONValue::SP value);
-        
-        JSONValue::SP
-        GetObject (const std::string& key);
-        
-        ~JSONObject() override = default;
-        
-    private:
-        typedef std::map<std::string, JSONValue::SP> Map;
-        typedef Map::iterator Iterator;
-        Map m_elements;
-    };
-
-    class JSONArray : public JSONValue
-    {
-    public:
-        JSONArray ();
-        
-        JSONArray (const JSONArray& s) = delete;
-        JSONArray&
-        operator = (const JSONArray& s) = delete;
-        
-        void
-        Write(Stream& s) override;
-        
-        typedef std::shared_ptr<JSONArray> SP;
-        
-        static bool classof(const JSONValue *V)
-        {
-            return V->GetKind() == JSONValue::Kind::Array;
-        }
-        
-    private:
-        typedef std::vector<JSONValue::SP> Vector;
-        typedef Vector::iterator Iterator;
-        typedef Vector::size_type Index;
-        typedef Vector::size_type Size;
-        
-    public:
-        bool
-        SetObject (Index i,
-                   JSONValue::SP value);
-        
-        bool
-        AppendObject (JSONValue::SP value);
-        
-        JSONValue::SP
-        GetObject (Index i);
-        
-        Size
-        GetNumElements ();
-
-        ~JSONArray() override = default;
-        
-        Vector m_elements;
-    };
-
-    class JSONParser : public StringExtractor
-    {
-    public:
-        enum Token
-        {
-            Invalid,
-            Error,
-            ObjectStart,
-            ObjectEnd,
-            ArrayStart,
-            ArrayEnd,
-            Comma,
-            Colon,
-            String,
-            Integer,
-            Float,
-            True,
-            False,
-            Null,
-            EndOfFile
-        };
-
-        JSONParser (const char *cstr);
-
-        int
-        GetEscapedChar (bool &was_escaped);
-
-        Token
-        GetToken (std::string &value);
-
-        JSONValue::SP
-        ParseJSONValue ();
-
-    protected:
-        JSONValue::SP
-        ParseJSONObject ();
-
-        JSONValue::SP
-        ParseJSONArray ();
-    };
+class JSONValue {
+public:
+  virtual void Write(Stream &s) = 0;
+
+  typedef std::shared_ptr<JSONValue> SP;
+
+  enum class Kind { String, Number, True, False, Null, Object, Array };
+
+  JSONValue(Kind k) : m_kind(k) {}
+
+  Kind GetKind() const { return m_kind; }
+
+  virtual ~JSONValue() = default;
+
+private:
+  const Kind m_kind;
+};
+
+class JSONString : public JSONValue {
+public:
+  JSONString();
+  JSONString(const char *s);
+  JSONString(const std::string &s);
+
+  JSONString(const JSONString &s) = delete;
+  JSONString &operator=(const JSONString &s) = delete;
+
+  void Write(Stream &s) override;
+
+  typedef std::shared_ptr<JSONString> SP;
+
+  std::string GetData() { return m_data; }
+
+  static bool classof(const JSONValue *V) {
+    return V->GetKind() == JSONValue::Kind::String;
+  }
+
+  ~JSONString() override = default;
+
+private:
+  static std::string json_string_quote_metachars(const std::string &);
+
+  std::string m_data;
+};
+
+class JSONNumber : public JSONValue {
+public:
+  typedef std::shared_ptr<JSONNumber> SP;
+
+  // We cretae a constructor for all integer and floating point type with using
+  // templates and
+  // SFINAE to avoid having ambiguous overloads because of the implicit type
+  // promotion. If we
+  // would have constructors only with int64_t, uint64_t and double types then
+  // constructing a
+  // JSONNumber from an int32_t (or any other similar type) would fail to
+  // compile.
+
+  template <typename T, typename std::enable_if<
+                            std::is_integral<T>::value &&
+                            std::is_unsigned<T>::value>::type * = nullptr>
+  explicit JSONNumber(T u)
+      : JSONValue(JSONValue::Kind::Number), m_data_type(DataType::Unsigned) {
+    m_data.m_unsigned = u;
+  }
+
+  template <typename T,
+            typename std::enable_if<std::is_integral<T>::value &&
+                                    std::is_signed<T>::value>::type * = nullptr>
+  explicit JSONNumber(T s)
+      : JSONValue(JSONValue::Kind::Number), m_data_type(DataType::Signed) {
+    m_data.m_signed = s;
+  }
+
+  template <typename T, typename std::enable_if<
+                            std::is_floating_point<T>::value>::type * = nullptr>
+  explicit JSONNumber(T d)
+      : JSONValue(JSONValue::Kind::Number), m_data_type(DataType::Double) {
+    m_data.m_double = d;
+  }
+
+  ~JSONNumber() override = default;
+
+  JSONNumber(const JSONNumber &s) = delete;
+  JSONNumber &operator=(const JSONNumber &s) = delete;
+
+  void Write(Stream &s) override;
+
+  uint64_t GetAsUnsigned() const;
+
+  int64_t GetAsSigned() const;
+
+  double GetAsDouble() const;
+
+  static bool classof(const JSONValue *V) {
+    return V->GetKind() == JSONValue::Kind::Number;
+  }
+
+private:
+  enum class DataType : uint8_t { Unsigned, Signed, Double } m_data_type;
+
+  union {
+    uint64_t m_unsigned;
+    int64_t m_signed;
+    double m_double;
+  } m_data;
+};
+
+class JSONTrue : public JSONValue {
+public:
+  JSONTrue();
+
+  JSONTrue(const JSONTrue &s) = delete;
+  JSONTrue &operator=(const JSONTrue &s) = delete;
+
+  void Write(Stream &s) override;
+
+  typedef std::shared_ptr<JSONTrue> SP;
+
+  static bool classof(const JSONValue *V) {
+    return V->GetKind() == JSONValue::Kind::True;
+  }
+
+  ~JSONTrue() override = default;
+};
+
+class JSONFalse : public JSONValue {
+public:
+  JSONFalse();
+
+  JSONFalse(const JSONFalse &s) = delete;
+  JSONFalse &operator=(const JSONFalse &s) = delete;
+
+  void Write(Stream &s) override;
+
+  typedef std::shared_ptr<JSONFalse> SP;
+
+  static bool classof(const JSONValue *V) {
+    return V->GetKind() == JSONValue::Kind::False;
+  }
+
+  ~JSONFalse() override = default;
+};
+
+class JSONNull : public JSONValue {
+public:
+  JSONNull();
+
+  JSONNull(const JSONNull &s) = delete;
+  JSONNull &operator=(const JSONNull &s) = delete;
+
+  void Write(Stream &s) override;
+
+  typedef std::shared_ptr<JSONNull> SP;
+
+  static bool classof(const JSONValue *V) {
+    return V->GetKind() == JSONValue::Kind::Null;
+  }
+
+  ~JSONNull() override = default;
+};
+
+class JSONObject : public JSONValue {
+public:
+  JSONObject();
+
+  JSONObject(const JSONObject &s) = delete;
+  JSONObject &operator=(const JSONObject &s) = delete;
+
+  void Write(Stream &s) override;
+
+  typedef std::shared_ptr<JSONObject> SP;
+
+  static bool classof(const JSONValue *V) {
+    return V->GetKind() == JSONValue::Kind::Object;
+  }
+
+  bool SetObject(const std::string &key, JSONValue::SP value);
+
+  JSONValue::SP GetObject(const std::string &key);
+
+  ~JSONObject() override = default;
+
+private:
+  typedef std::map<std::string, JSONValue::SP> Map;
+  typedef Map::iterator Iterator;
+  Map m_elements;
+};
+
+class JSONArray : public JSONValue {
+public:
+  JSONArray();
+
+  JSONArray(const JSONArray &s) = delete;
+  JSONArray &operator=(const JSONArray &s) = delete;
+
+  void Write(Stream &s) override;
+
+  typedef std::shared_ptr<JSONArray> SP;
+
+  static bool classof(const JSONValue *V) {
+    return V->GetKind() == JSONValue::Kind::Array;
+  }
+
+private:
+  typedef std::vector<JSONValue::SP> Vector;
+  typedef Vector::iterator Iterator;
+  typedef Vector::size_type Index;
+  typedef Vector::size_type Size;
+
+public:
+  bool SetObject(Index i, JSONValue::SP value);
+
+  bool AppendObject(JSONValue::SP value);
+
+  JSONValue::SP GetObject(Index i);
+
+  Size GetNumElements();
+
+  ~JSONArray() override = default;
+
+  Vector m_elements;
+};
+
+class JSONParser : public StringExtractor {
+public:
+  enum Token {
+    Invalid,
+    Error,
+    ObjectStart,
+    ObjectEnd,
+    ArrayStart,
+    ArrayEnd,
+    Comma,
+    Colon,
+    String,
+    Integer,
+    Float,
+    True,
+    False,
+    Null,
+    EndOfFile
+  };
+
+  JSONParser(const char *cstr);
+
+  int GetEscapedChar(bool &was_escaped);
+
+  Token GetToken(std::string &value);
+
+  JSONValue::SP ParseJSONValue();
+
+protected:
+  JSONValue::SP ParseJSONObject();
+
+  JSONValue::SP ParseJSONArray();
+};
 } // namespace lldb_private
 
 #endif // utility_JSON_h_

Modified: lldb/trunk/include/lldb/Utility/LLDBAssert.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/LLDBAssert.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/LLDBAssert.h (original)
+++ lldb/trunk/include/lldb/Utility/LLDBAssert.h Tue Sep  6 15:57:50 2016
@@ -1,4 +1,5 @@
-//===----------------- LLDBAssert.h --------------------------------*- C++ -*-===//
+//===----------------- LLDBAssert.h --------------------------------*- C++
+//-*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -15,16 +16,13 @@
 #ifdef LLDB_CONFIGURATION_DEBUG
 #define lldbassert(x) assert(x)
 #else
-#define lldbassert(x) lldb_private::lldb_assert(x, #x, __FUNCTION__, __FILE__, __LINE__)
+#define lldbassert(x)                                                          \
+  lldb_private::lldb_assert(x, #x, __FUNCTION__, __FILE__, __LINE__)
 #endif
 
 namespace lldb_private {
-    void
-    lldb_assert (bool expression,
-                 const char* expr_text,
-                 const char* func,
-                 const char* file,
-                 unsigned int line);
+void lldb_assert(bool expression, const char *expr_text, const char *func,
+                 const char *file, unsigned int line);
 }
 
 #endif // utility_LLDBAssert_h_

Modified: lldb/trunk/include/lldb/Utility/NameMatches.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/NameMatches.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/NameMatches.h (original)
+++ lldb/trunk/include/lldb/Utility/NameMatches.h Tue Sep  6 15:57:50 2016
@@ -11,8 +11,7 @@
 
 #include "lldb/lldb-private-enumerations.h"
 
-namespace lldb_private
-{
+namespace lldb_private {
 bool NameMatches(const char *name, NameMatchType match_type, const char *match);
 }
 

Modified: lldb/trunk/include/lldb/Utility/PriorityPointerPair.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/PriorityPointerPair.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/PriorityPointerPair.h (original)
+++ lldb/trunk/include/lldb/Utility/PriorityPointerPair.h Tue Sep  6 15:57:50 2016
@@ -1,4 +1,5 @@
-//===-- PriorityPointerPair.h ----------------------------------------*- C++ -*-===//
+//===-- PriorityPointerPair.h ----------------------------------------*- C++
+//-*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -10,8 +11,8 @@
 #ifndef liblldb_PriorityPointerPair_h_
 #define liblldb_PriorityPointerPair_h_
 
-#include "lldb/lldb-public.h"
 #include "lldb/Utility/SharingPtr.h"
+#include "lldb/lldb-public.h"
 
 namespace lldb_utility {
 
@@ -22,127 +23,62 @@ namespace lldb_utility {
 // otherwise, low is returned (even if *low == NULL)
 //----------------------------------------------------------------------
 
-template<typename T>
-class PriorityPointerPair
-{
+template <typename T> class PriorityPointerPair {
 public:
-    
-    typedef T& reference_type;
-    typedef T* pointer_type;
-    
-    typedef typename std::shared_ptr<T> T_SP;
-    
-    PriorityPointerPair() : 
-    m_high(),
-    m_low()
-    {}
-    
-    PriorityPointerPair(pointer_type high,
-                        pointer_type low) : 
-    m_high(high),
-    m_low(low)
-    {}
-
-    PriorityPointerPair(pointer_type low) : 
-    m_high(),
-    m_low(low)
-    {}
-
-    PriorityPointerPair(T_SP& high,
-                        T_SP& low) : 
-    m_high(high),
-    m_low(low)
-    {}
-    
-    PriorityPointerPair(T_SP& low) : 
-    m_high(),
-    m_low(low)
-    {}
-    
-    void
-    SwapLow(pointer_type l)
-    {
-        m_low.swap(l);
-    }
-    
-    void
-    SwapHigh(pointer_type h)
-    {
-        m_high.swap(h);
-    }
-    
-    void
-    SwapLow(T_SP l)
-    {
-        m_low.swap(l);
-    }
-
-    void
-    SwapHigh(T_SP h)
-    {
-        m_high.swap(h);
-    }
-    
-    T_SP
-    GetLow()
-    {
-        return m_low;
-    }
-    
-    T_SP
-    GetHigh()
-    {
-        return m_high;
-    }
-    
-    T_SP
-    Get()
-    {
-        if (m_high.get())
-            return m_high;
-        return m_low;
-    }
-    
-    void
-    ResetHigh()
-    {
-        m_high.reset();
-    }
-    
-    void
-    ResetLow()
-    {
-        m_low.reset();
-    }
-    
-    void
-    Reset()
-    {
-        ResetLow();
-        ResetHigh();
-    }
-    
-    reference_type
-    operator*() const
-    {
-        return Get().operator*();
-    }
-    
-    pointer_type
-    operator->() const
-    {
-        return Get().operator->();
-    }
-    
-    ~PriorityPointerPair();
-    
+  typedef T &reference_type;
+  typedef T *pointer_type;
+
+  typedef typename std::shared_ptr<T> T_SP;
+
+  PriorityPointerPair() : m_high(), m_low() {}
+
+  PriorityPointerPair(pointer_type high, pointer_type low)
+      : m_high(high), m_low(low) {}
+
+  PriorityPointerPair(pointer_type low) : m_high(), m_low(low) {}
+
+  PriorityPointerPair(T_SP &high, T_SP &low) : m_high(high), m_low(low) {}
+
+  PriorityPointerPair(T_SP &low) : m_high(), m_low(low) {}
+
+  void SwapLow(pointer_type l) { m_low.swap(l); }
+
+  void SwapHigh(pointer_type h) { m_high.swap(h); }
+
+  void SwapLow(T_SP l) { m_low.swap(l); }
+
+  void SwapHigh(T_SP h) { m_high.swap(h); }
+
+  T_SP GetLow() { return m_low; }
+
+  T_SP GetHigh() { return m_high; }
+
+  T_SP Get() {
+    if (m_high.get())
+      return m_high;
+    return m_low;
+  }
+
+  void ResetHigh() { m_high.reset(); }
+
+  void ResetLow() { m_low.reset(); }
+
+  void Reset() {
+    ResetLow();
+    ResetHigh();
+  }
+
+  reference_type operator*() const { return Get().operator*(); }
+
+  pointer_type operator->() const { return Get().operator->(); }
+
+  ~PriorityPointerPair();
+
 private:
+  T_SP m_high;
+  T_SP m_low;
 
-    T_SP m_high;
-    T_SP m_low;
-    
-    DISALLOW_COPY_AND_ASSIGN (PriorityPointerPair);
-        
+  DISALLOW_COPY_AND_ASSIGN(PriorityPointerPair);
 };
 
 } // namespace lldb_utility

Modified: lldb/trunk/include/lldb/Utility/ProcessStructReader.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/ProcessStructReader.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/ProcessStructReader.h (original)
+++ lldb/trunk/include/lldb/Utility/ProcessStructReader.h Tue Sep  6 15:57:50 2016
@@ -1,4 +1,5 @@
-//===---------------------ProcessStructReader.h ------------------*- C++ -*-===//
+//===---------------------ProcessStructReader.h ------------------*- C++
+//-*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -24,86 +25,79 @@
 #include <string>
 
 namespace lldb_private {
-    class ProcessStructReader
-    {
-    protected:
-        struct FieldImpl
-        {
-            CompilerType type;
-            size_t offset;
-            size_t size;
-        };
-        
-        std::map<ConstString, FieldImpl> m_fields;
-        DataExtractor m_data;
-        lldb::ByteOrder m_byte_order;
-        size_t m_addr_byte_size;
-        
-    public:
-        ProcessStructReader (Process *process, lldb::addr_t base_addr, CompilerType struct_type)
-        {
-            if (!process)
-                return;
-            if (base_addr == 0 || base_addr == LLDB_INVALID_ADDRESS)
-                return;
-            m_byte_order = process->GetByteOrder();
-            m_addr_byte_size = process->GetAddressByteSize();
-
-            for (size_t idx = 0; idx < struct_type.GetNumFields(); idx++)
-            {
-                std::string name;
-                uint64_t bit_offset;
-                uint32_t bitfield_bit_size;
-                bool is_bitfield;
-                CompilerType field_type = struct_type.GetFieldAtIndex(idx,name,&bit_offset,&bitfield_bit_size,&is_bitfield);
-                // no support for bitfields in here (yet)
-                if (is_bitfield)
-                    return;
-                auto size = field_type.GetByteSize(nullptr);
-                // no support for things larger than a uint64_t (yet)
-                if (size > 8)
-                    return;
-                ConstString const_name = ConstString(name.c_str());
-                size_t byte_index = static_cast<size_t>(bit_offset / 8);
-                m_fields[const_name] = FieldImpl{field_type, byte_index, static_cast<size_t>(size)};
-            }
-            size_t total_size = struct_type.GetByteSize(nullptr);
-            lldb::DataBufferSP buffer_sp(new DataBufferHeap(total_size,0));
-            Error error;
-            process->ReadMemoryFromInferior(base_addr,
-                                            buffer_sp->GetBytes(),
-                                            total_size,
-                                            error);
-            if (error.Fail())
-                return;
-            m_data = DataExtractor(buffer_sp,m_byte_order,m_addr_byte_size);
-        }
-        
-        template<typename RetType>
-        RetType
-        GetField (ConstString name, RetType fail_value = RetType())
-        {
-            auto iter = m_fields.find(name), end = m_fields.end();
-            if (iter == end)
-                return fail_value;
-            auto size = iter->second.size;
-            if (sizeof(RetType) < size)
-                return fail_value;
-            lldb::offset_t offset = iter->second.offset;
-            if (offset + size > m_data.GetByteSize())
-                return fail_value;
-            return (RetType)(m_data.GetMaxU64(&offset, size));
-        }
-
-        size_t
-        GetOffsetOf(ConstString name, size_t fail_value = SIZE_MAX)
-        {
-            auto iter = m_fields.find(name), end = m_fields.end();
-            if (iter == end)
-                return fail_value;
-            return iter->second.offset;
-        }
-    };
+class ProcessStructReader {
+protected:
+  struct FieldImpl {
+    CompilerType type;
+    size_t offset;
+    size_t size;
+  };
+
+  std::map<ConstString, FieldImpl> m_fields;
+  DataExtractor m_data;
+  lldb::ByteOrder m_byte_order;
+  size_t m_addr_byte_size;
+
+public:
+  ProcessStructReader(Process *process, lldb::addr_t base_addr,
+                      CompilerType struct_type) {
+    if (!process)
+      return;
+    if (base_addr == 0 || base_addr == LLDB_INVALID_ADDRESS)
+      return;
+    m_byte_order = process->GetByteOrder();
+    m_addr_byte_size = process->GetAddressByteSize();
+
+    for (size_t idx = 0; idx < struct_type.GetNumFields(); idx++) {
+      std::string name;
+      uint64_t bit_offset;
+      uint32_t bitfield_bit_size;
+      bool is_bitfield;
+      CompilerType field_type = struct_type.GetFieldAtIndex(
+          idx, name, &bit_offset, &bitfield_bit_size, &is_bitfield);
+      // no support for bitfields in here (yet)
+      if (is_bitfield)
+        return;
+      auto size = field_type.GetByteSize(nullptr);
+      // no support for things larger than a uint64_t (yet)
+      if (size > 8)
+        return;
+      ConstString const_name = ConstString(name.c_str());
+      size_t byte_index = static_cast<size_t>(bit_offset / 8);
+      m_fields[const_name] =
+          FieldImpl{field_type, byte_index, static_cast<size_t>(size)};
+    }
+    size_t total_size = struct_type.GetByteSize(nullptr);
+    lldb::DataBufferSP buffer_sp(new DataBufferHeap(total_size, 0));
+    Error error;
+    process->ReadMemoryFromInferior(base_addr, buffer_sp->GetBytes(),
+                                    total_size, error);
+    if (error.Fail())
+      return;
+    m_data = DataExtractor(buffer_sp, m_byte_order, m_addr_byte_size);
+  }
+
+  template <typename RetType>
+  RetType GetField(ConstString name, RetType fail_value = RetType()) {
+    auto iter = m_fields.find(name), end = m_fields.end();
+    if (iter == end)
+      return fail_value;
+    auto size = iter->second.size;
+    if (sizeof(RetType) < size)
+      return fail_value;
+    lldb::offset_t offset = iter->second.offset;
+    if (offset + size > m_data.GetByteSize())
+      return fail_value;
+    return (RetType)(m_data.GetMaxU64(&offset, size));
+  }
+
+  size_t GetOffsetOf(ConstString name, size_t fail_value = SIZE_MAX) {
+    auto iter = m_fields.find(name), end = m_fields.end();
+    if (iter == end)
+      return fail_value;
+    return iter->second.offset;
+  }
+};
 }
 
 #endif // utility_ProcessStructReader_h_

Modified: lldb/trunk/include/lldb/Utility/PseudoTerminal.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/PseudoTerminal.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/PseudoTerminal.h (original)
+++ lldb/trunk/include/lldb/Utility/PseudoTerminal.h Tue Sep  6 15:57:50 2016
@@ -11,7 +11,6 @@
 #define liblldb_PseudoTerminal_h_
 #if defined(__cplusplus)
 
-
 #include <fcntl.h>
 #include <string>
 
@@ -26,241 +25,228 @@ namespace lldb_utility {
 /// The pseudo terminal class abstracts the use of pseudo terminals on
 /// the host system.
 //----------------------------------------------------------------------
-class PseudoTerminal
-{
+class PseudoTerminal {
 public:
-    enum
-    {
-        invalid_fd = -1     ///< Invalid file descriptor value
-    };
-
-    //------------------------------------------------------------------
-    /// Default constructor
-    ///
-    /// Constructs this object with invalid master and slave file
-    /// descriptors.
-    //------------------------------------------------------------------
-    PseudoTerminal ();
-
-    //------------------------------------------------------------------
-    /// Destructor
-    ///
-    /// The destructor will close the master and slave file descriptors
-    /// if they are valid and ownership has not been released using
-    /// one of:
-    /// @li PseudoTerminal::ReleaseMasterFileDescriptor()
-    /// @li PseudoTerminal::ReleaseSaveFileDescriptor()
-    //------------------------------------------------------------------
-    ~PseudoTerminal ();
-
-    //------------------------------------------------------------------
-    /// Close the master file descriptor if it is valid.
-    //------------------------------------------------------------------
-    void
-    CloseMasterFileDescriptor ();
-
-    //------------------------------------------------------------------
-    /// Close the slave file descriptor if it is valid.
-    //------------------------------------------------------------------
-    void
-    CloseSlaveFileDescriptor ();
-
-    //------------------------------------------------------------------
-    /// Fork a child process that uses pseudo terminals for its stdio.
-    ///
-    /// In the parent process, a call to this function results in a pid
-    /// being returned. If the pid is valid, the master file descriptor
-    /// can be used for read/write access to stdio of the child process.
-    ///
-    /// In the child process the stdin/stdout/stderr will already be
-    /// routed to the slave pseudo terminal and the master file
-    /// descriptor will be closed as it is no longer needed by the child
-    /// process.
-    ///
-    /// This class will close the file descriptors for the master/slave
-    /// when the destructor is called. The file handles can be released
-    /// using either:
-    /// @li PseudoTerminal::ReleaseMasterFileDescriptor()
-    /// @li PseudoTerminal::ReleaseSaveFileDescriptor()
-    ///
-    /// @param[out] error
-    ///     An pointer to an error that can describe any errors that
-    ///     occur. This can be NULL if no error status is desired.
-    ///
-    /// @return
-    ///     @li \b Parent process: a child process ID that is greater
-    ///         than zero, or -1 if the fork fails.
-    ///     @li \b Child process: zero.
-    //------------------------------------------------------------------
-    lldb::pid_t
-    Fork (char *error_str, size_t error_len);
-
-    //------------------------------------------------------------------
-    /// The master file descriptor accessor.
-    ///
-    /// This object retains ownership of the master file descriptor when
-    /// this accessor is used. Users can call the member function
-    /// PseudoTerminal::ReleaseMasterFileDescriptor() if this
-    /// object should release ownership of the slave file descriptor.
-    ///
-    /// @return
-    ///     The master file descriptor, or PseudoTerminal::invalid_fd
-    ///     if the master file  descriptor is not currently valid.
-    ///
-    /// @see PseudoTerminal::ReleaseMasterFileDescriptor()
-    //------------------------------------------------------------------
-    int
-    GetMasterFileDescriptor () const;
-
-    //------------------------------------------------------------------
-    /// The slave file descriptor accessor.
-    ///
-    /// This object retains ownership of the slave file descriptor when
-    /// this accessor is used. Users can call the member function
-    /// PseudoTerminal::ReleaseSlaveFileDescriptor() if this
-    /// object should release ownership of the slave file descriptor.
-    ///
-    /// @return
-    ///     The slave file descriptor, or PseudoTerminal::invalid_fd
-    ///     if the slave file descriptor is not currently valid.
-    ///
-    /// @see PseudoTerminal::ReleaseSlaveFileDescriptor()
-    //------------------------------------------------------------------
-    int
-    GetSlaveFileDescriptor () const;
-
-    //------------------------------------------------------------------
-    /// Get the name of the slave pseudo terminal.
-    ///
-    /// A master pseudo terminal should already be valid prior to
-    /// calling this function.
-    ///
-    /// @param[out] error
-    ///     An pointer to an error that can describe any errors that
-    ///     occur. This can be NULL if no error status is desired.
-    ///
-    /// @return
-    ///     The name of the slave pseudo terminal as a NULL terminated
-    ///     C. This string that comes from static memory, so a copy of
-    ///     the string should be made as subsequent calls can change
-    ///     this value. NULL is returned if this object doesn't have
-    ///     a valid master pseudo terminal opened or if the call to
-    ///     \c ptsname() fails.
-    ///
-    /// @see PseudoTerminal::OpenFirstAvailableMaster()
-    //------------------------------------------------------------------
-    const char*
-    GetSlaveName (char *error_str, size_t error_len) const;
-
-    //------------------------------------------------------------------
-    /// Open the first available pseudo terminal.
-    ///
-    /// Opens the first available pseudo terminal with \a oflag as the
-    /// permissions. The opened master file descriptor is stored in this
-    /// object and can be accessed by calling the
-    /// PseudoTerminal::GetMasterFileDescriptor() accessor. Clients
-    /// can call the PseudoTerminal::ReleaseMasterFileDescriptor()
-    /// accessor function if they wish to use the master file descriptor
-    /// beyond the lifespan of this object.
-    ///
-    /// If this object still has a valid master file descriptor when its
-    /// destructor is called, it will close it.
-    ///
-    /// @param[in] oflag
-    ///     Flags to use when calling \c posix_openpt(\a oflag).
-    ///     A value of "O_RDWR|O_NOCTTY" is suggested.
-    ///
-    /// @param[out] error
-    ///     An pointer to an error that can describe any errors that
-    ///     occur. This can be NULL if no error status is desired.
-    ///
-    /// @return
-    ///     @li \b true when the master files descriptor is
-    ///         successfully opened.
-    ///     @li \b false if anything goes wrong.
-    ///
-    /// @see PseudoTerminal::GetMasterFileDescriptor()
-    /// @see PseudoTerminal::ReleaseMasterFileDescriptor()
-    //------------------------------------------------------------------
-    bool
-    OpenFirstAvailableMaster (int oflag, char *error_str, size_t error_len);
-
-    //------------------------------------------------------------------
-    /// Open the slave for the current master pseudo terminal.
-    ///
-    /// A master pseudo terminal should already be valid prior to
-    /// calling this function. The opened slave file descriptor is
-    /// stored in this object and can be accessed by calling the
-    /// PseudoTerminal::GetSlaveFileDescriptor() accessor. Clients
-    /// can call the PseudoTerminal::ReleaseSlaveFileDescriptor()
-    /// accessor function if they wish to use the slave file descriptor
-    /// beyond the lifespan of this object.
-    ///
-    /// If this object still has a valid slave file descriptor when its
-    /// destructor is called, it will close it.
-    ///
-    /// @param[in] oflag
-    ///     Flags to use when calling \c open(\a oflag).
-    ///
-    /// @param[out] error
-    ///     An pointer to an error that can describe any errors that
-    ///     occur. This can be NULL if no error status is desired.
-    ///
-    /// @return
-    ///     @li \b true when the master files descriptor is
-    ///         successfully opened.
-    ///     @li \b false if anything goes wrong.
-    ///
-    /// @see PseudoTerminal::OpenFirstAvailableMaster()
-    /// @see PseudoTerminal::GetSlaveFileDescriptor()
-    /// @see PseudoTerminal::ReleaseSlaveFileDescriptor()
-    //------------------------------------------------------------------
-    bool
-    OpenSlave (int oflag, char *error_str, size_t error_len);
-
-    //------------------------------------------------------------------
-    /// Release the master file descriptor.
-    ///
-    /// Releases ownership of the master pseudo terminal file descriptor
-    /// without closing it. The destructor for this class will close the
-    /// master file descriptor if the ownership isn't released using this
-    /// call and the master file descriptor has been opened.
-    ///
-    /// @return
-    ///     The master file descriptor, or PseudoTerminal::invalid_fd
-    ///     if the mast file descriptor is not currently valid.
-    //------------------------------------------------------------------
-    int
-    ReleaseMasterFileDescriptor ();
-
-    //------------------------------------------------------------------
-    /// Release the slave file descriptor.
-    ///
-    /// Release ownership of the slave pseudo terminal file descriptor
-    /// without closing it. The destructor for this class will close the
-    /// slave file descriptor if the ownership isn't released using this
-    /// call and the slave file descriptor has been opened.
-    ///
-    /// @return
-    ///     The slave file descriptor, or PseudoTerminal::invalid_fd
-    ///     if the slave file descriptor is not currently valid.
-    //------------------------------------------------------------------
-    int
-    ReleaseSlaveFileDescriptor ();
+  enum {
+    invalid_fd = -1 ///< Invalid file descriptor value
+  };
+
+  //------------------------------------------------------------------
+  /// Default constructor
+  ///
+  /// Constructs this object with invalid master and slave file
+  /// descriptors.
+  //------------------------------------------------------------------
+  PseudoTerminal();
+
+  //------------------------------------------------------------------
+  /// Destructor
+  ///
+  /// The destructor will close the master and slave file descriptors
+  /// if they are valid and ownership has not been released using
+  /// one of:
+  /// @li PseudoTerminal::ReleaseMasterFileDescriptor()
+  /// @li PseudoTerminal::ReleaseSaveFileDescriptor()
+  //------------------------------------------------------------------
+  ~PseudoTerminal();
+
+  //------------------------------------------------------------------
+  /// Close the master file descriptor if it is valid.
+  //------------------------------------------------------------------
+  void CloseMasterFileDescriptor();
+
+  //------------------------------------------------------------------
+  /// Close the slave file descriptor if it is valid.
+  //------------------------------------------------------------------
+  void CloseSlaveFileDescriptor();
+
+  //------------------------------------------------------------------
+  /// Fork a child process that uses pseudo terminals for its stdio.
+  ///
+  /// In the parent process, a call to this function results in a pid
+  /// being returned. If the pid is valid, the master file descriptor
+  /// can be used for read/write access to stdio of the child process.
+  ///
+  /// In the child process the stdin/stdout/stderr will already be
+  /// routed to the slave pseudo terminal and the master file
+  /// descriptor will be closed as it is no longer needed by the child
+  /// process.
+  ///
+  /// This class will close the file descriptors for the master/slave
+  /// when the destructor is called. The file handles can be released
+  /// using either:
+  /// @li PseudoTerminal::ReleaseMasterFileDescriptor()
+  /// @li PseudoTerminal::ReleaseSaveFileDescriptor()
+  ///
+  /// @param[out] error
+  ///     An pointer to an error that can describe any errors that
+  ///     occur. This can be NULL if no error status is desired.
+  ///
+  /// @return
+  ///     @li \b Parent process: a child process ID that is greater
+  ///         than zero, or -1 if the fork fails.
+  ///     @li \b Child process: zero.
+  //------------------------------------------------------------------
+  lldb::pid_t Fork(char *error_str, size_t error_len);
+
+  //------------------------------------------------------------------
+  /// The master file descriptor accessor.
+  ///
+  /// This object retains ownership of the master file descriptor when
+  /// this accessor is used. Users can call the member function
+  /// PseudoTerminal::ReleaseMasterFileDescriptor() if this
+  /// object should release ownership of the slave file descriptor.
+  ///
+  /// @return
+  ///     The master file descriptor, or PseudoTerminal::invalid_fd
+  ///     if the master file  descriptor is not currently valid.
+  ///
+  /// @see PseudoTerminal::ReleaseMasterFileDescriptor()
+  //------------------------------------------------------------------
+  int GetMasterFileDescriptor() const;
+
+  //------------------------------------------------------------------
+  /// The slave file descriptor accessor.
+  ///
+  /// This object retains ownership of the slave file descriptor when
+  /// this accessor is used. Users can call the member function
+  /// PseudoTerminal::ReleaseSlaveFileDescriptor() if this
+  /// object should release ownership of the slave file descriptor.
+  ///
+  /// @return
+  ///     The slave file descriptor, or PseudoTerminal::invalid_fd
+  ///     if the slave file descriptor is not currently valid.
+  ///
+  /// @see PseudoTerminal::ReleaseSlaveFileDescriptor()
+  //------------------------------------------------------------------
+  int GetSlaveFileDescriptor() const;
+
+  //------------------------------------------------------------------
+  /// Get the name of the slave pseudo terminal.
+  ///
+  /// A master pseudo terminal should already be valid prior to
+  /// calling this function.
+  ///
+  /// @param[out] error
+  ///     An pointer to an error that can describe any errors that
+  ///     occur. This can be NULL if no error status is desired.
+  ///
+  /// @return
+  ///     The name of the slave pseudo terminal as a NULL terminated
+  ///     C. This string that comes from static memory, so a copy of
+  ///     the string should be made as subsequent calls can change
+  ///     this value. NULL is returned if this object doesn't have
+  ///     a valid master pseudo terminal opened or if the call to
+  ///     \c ptsname() fails.
+  ///
+  /// @see PseudoTerminal::OpenFirstAvailableMaster()
+  //------------------------------------------------------------------
+  const char *GetSlaveName(char *error_str, size_t error_len) const;
+
+  //------------------------------------------------------------------
+  /// Open the first available pseudo terminal.
+  ///
+  /// Opens the first available pseudo terminal with \a oflag as the
+  /// permissions. The opened master file descriptor is stored in this
+  /// object and can be accessed by calling the
+  /// PseudoTerminal::GetMasterFileDescriptor() accessor. Clients
+  /// can call the PseudoTerminal::ReleaseMasterFileDescriptor()
+  /// accessor function if they wish to use the master file descriptor
+  /// beyond the lifespan of this object.
+  ///
+  /// If this object still has a valid master file descriptor when its
+  /// destructor is called, it will close it.
+  ///
+  /// @param[in] oflag
+  ///     Flags to use when calling \c posix_openpt(\a oflag).
+  ///     A value of "O_RDWR|O_NOCTTY" is suggested.
+  ///
+  /// @param[out] error
+  ///     An pointer to an error that can describe any errors that
+  ///     occur. This can be NULL if no error status is desired.
+  ///
+  /// @return
+  ///     @li \b true when the master files descriptor is
+  ///         successfully opened.
+  ///     @li \b false if anything goes wrong.
+  ///
+  /// @see PseudoTerminal::GetMasterFileDescriptor()
+  /// @see PseudoTerminal::ReleaseMasterFileDescriptor()
+  //------------------------------------------------------------------
+  bool OpenFirstAvailableMaster(int oflag, char *error_str, size_t error_len);
+
+  //------------------------------------------------------------------
+  /// Open the slave for the current master pseudo terminal.
+  ///
+  /// A master pseudo terminal should already be valid prior to
+  /// calling this function. The opened slave file descriptor is
+  /// stored in this object and can be accessed by calling the
+  /// PseudoTerminal::GetSlaveFileDescriptor() accessor. Clients
+  /// can call the PseudoTerminal::ReleaseSlaveFileDescriptor()
+  /// accessor function if they wish to use the slave file descriptor
+  /// beyond the lifespan of this object.
+  ///
+  /// If this object still has a valid slave file descriptor when its
+  /// destructor is called, it will close it.
+  ///
+  /// @param[in] oflag
+  ///     Flags to use when calling \c open(\a oflag).
+  ///
+  /// @param[out] error
+  ///     An pointer to an error that can describe any errors that
+  ///     occur. This can be NULL if no error status is desired.
+  ///
+  /// @return
+  ///     @li \b true when the master files descriptor is
+  ///         successfully opened.
+  ///     @li \b false if anything goes wrong.
+  ///
+  /// @see PseudoTerminal::OpenFirstAvailableMaster()
+  /// @see PseudoTerminal::GetSlaveFileDescriptor()
+  /// @see PseudoTerminal::ReleaseSlaveFileDescriptor()
+  //------------------------------------------------------------------
+  bool OpenSlave(int oflag, char *error_str, size_t error_len);
+
+  //------------------------------------------------------------------
+  /// Release the master file descriptor.
+  ///
+  /// Releases ownership of the master pseudo terminal file descriptor
+  /// without closing it. The destructor for this class will close the
+  /// master file descriptor if the ownership isn't released using this
+  /// call and the master file descriptor has been opened.
+  ///
+  /// @return
+  ///     The master file descriptor, or PseudoTerminal::invalid_fd
+  ///     if the mast file descriptor is not currently valid.
+  //------------------------------------------------------------------
+  int ReleaseMasterFileDescriptor();
+
+  //------------------------------------------------------------------
+  /// Release the slave file descriptor.
+  ///
+  /// Release ownership of the slave pseudo terminal file descriptor
+  /// without closing it. The destructor for this class will close the
+  /// slave file descriptor if the ownership isn't released using this
+  /// call and the slave file descriptor has been opened.
+  ///
+  /// @return
+  ///     The slave file descriptor, or PseudoTerminal::invalid_fd
+  ///     if the slave file descriptor is not currently valid.
+  //------------------------------------------------------------------
+  int ReleaseSlaveFileDescriptor();
 
 protected:
-    //------------------------------------------------------------------
-    // Member variables
-    //------------------------------------------------------------------
-    int m_master_fd;    ///< The file descriptor for the master.
-    int m_slave_fd;     ///< The file descriptor for the slave.
+  //------------------------------------------------------------------
+  // Member variables
+  //------------------------------------------------------------------
+  int m_master_fd; ///< The file descriptor for the master.
+  int m_slave_fd;  ///< The file descriptor for the slave.
 
 private:
-    DISALLOW_COPY_AND_ASSIGN (PseudoTerminal);
-
+  DISALLOW_COPY_AND_ASSIGN(PseudoTerminal);
 };
 
 } // namespace lldb_utility
 
-#endif  // #if defined(__cplusplus)
+#endif // #if defined(__cplusplus)
 #endif // #ifndef liblldb_PseudoTerminal_h_

Modified: lldb/trunk/include/lldb/Utility/Range.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Range.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Range.h (original)
+++ lldb/trunk/include/lldb/Utility/Range.h Tue Sep  6 15:57:50 2016
@@ -10,80 +10,52 @@
 #ifndef utility_Range_h_
 #define utility_Range_h_
 
-#include <stdint.h>
 #include <algorithm>
+#include <stdint.h>
 
 namespace lldb_utility {
-    
-class Range
-{
+
+class Range {
 public:
-    
-    typedef uint64_t ValueType;
-    
-    static const ValueType OPEN_END = UINT64_MAX;
-    
-    Range (const Range& rng);
-    
-    Range (ValueType low = 0,
-           ValueType high = OPEN_END);
-
-    Range&
-    operator = (const Range& rhs);
-    
-    ValueType
-    GetLow ()
-    {
-        return m_low;
-    }
-    
-    ValueType
-    GetHigh ()
-    {
-        return m_high;
-    }
-    
-    void
-    SetLow (ValueType low)
-    {
-        m_low = low;
-    }
-    
-    void
-    SetHigh (ValueType high)
-    {
-        m_high = high;
-    }
-    
-    void
-    Flip ();
-    
-    void
-    Intersection (const Range& other);
-    
-    void
-    Union (const Range& other);
-    
-    typedef bool (*RangeCallback)(ValueType index);
-    
-    void
-    Iterate (RangeCallback callback);
-    
-    ValueType
-    GetSize ();
-    
-    bool
-    IsEmpty ();
-    
+  typedef uint64_t ValueType;
+
+  static const ValueType OPEN_END = UINT64_MAX;
+
+  Range(const Range &rng);
+
+  Range(ValueType low = 0, ValueType high = OPEN_END);
+
+  Range &operator=(const Range &rhs);
+
+  ValueType GetLow() { return m_low; }
+
+  ValueType GetHigh() { return m_high; }
+
+  void SetLow(ValueType low) { m_low = low; }
+
+  void SetHigh(ValueType high) { m_high = high; }
+
+  void Flip();
+
+  void Intersection(const Range &other);
+
+  void Union(const Range &other);
+
+  typedef bool (*RangeCallback)(ValueType index);
+
+  void Iterate(RangeCallback callback);
+
+  ValueType GetSize();
+
+  bool IsEmpty();
+
 private:
-    
-    void
-    InitRange ();
-    
-    ValueType m_low;
-    ValueType m_high;
+  void InitRange();
+
+  ValueType m_low;
+  ValueType m_high;
 };
-    
+
 } // namespace lldb_private
 
 #endif // #ifndef utility_Range_h_

Modified: lldb/trunk/include/lldb/Utility/RegisterNumber.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/RegisterNumber.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/RegisterNumber.h (original)
+++ lldb/trunk/include/lldb/Utility/RegisterNumber.h Tue Sep  6 15:57:50 2016
@@ -21,49 +21,42 @@
 
 class RegisterNumber {
 public:
-    RegisterNumber (lldb_private::Thread &thread, lldb::RegisterKind kind, uint32_t num);
+  RegisterNumber(lldb_private::Thread &thread, lldb::RegisterKind kind,
+                 uint32_t num);
 
-    // This constructor plus the init() method below allow for the placeholder
-    // creation of an invalid object initially, possibly to be filled in.  It
-    // would be more consistent to have three Set* methods to set the three
-    // data that the object needs.
-    RegisterNumber ();
+  // This constructor plus the init() method below allow for the placeholder
+  // creation of an invalid object initially, possibly to be filled in.  It
+  // would be more consistent to have three Set* methods to set the three
+  // data that the object needs.
+  RegisterNumber();
 
-    void
-    init (lldb_private::Thread &thread, lldb::RegisterKind kind, uint32_t num);
+  void init(lldb_private::Thread &thread, lldb::RegisterKind kind,
+            uint32_t num);
 
-    const RegisterNumber &
-    operator = (const RegisterNumber &rhs);
+  const RegisterNumber &operator=(const RegisterNumber &rhs);
 
-    bool
-    operator == (RegisterNumber &rhs);
+  bool operator==(RegisterNumber &rhs);
 
-    bool
-    operator != (RegisterNumber &rhs);
+  bool operator!=(RegisterNumber &rhs);
 
-    bool
-    IsValid () const;
+  bool IsValid() const;
 
-    uint32_t
-    GetAsKind (lldb::RegisterKind kind);
+  uint32_t GetAsKind(lldb::RegisterKind kind);
 
-    uint32_t
-    GetRegisterNumber () const;
+  uint32_t GetRegisterNumber() const;
 
-    lldb::RegisterKind
-    GetRegisterKind () const;
+  lldb::RegisterKind GetRegisterKind() const;
 
-    const char *
-    GetName ();
+  const char *GetName();
 
 private:
-    typedef std::map<lldb::RegisterKind, uint32_t> Collection; 
+  typedef std::map<lldb::RegisterKind, uint32_t> Collection;
 
-    lldb::RegisterContextSP m_reg_ctx_sp;
-    uint32_t                m_regnum;
-    lldb::RegisterKind      m_kind;
-    Collection              m_kind_regnum_map;
-    const char              *m_name;
+  lldb::RegisterContextSP m_reg_ctx_sp;
+  uint32_t m_regnum;
+  lldb::RegisterKind m_kind;
+  Collection m_kind_regnum_map;
+  const char *m_name;
 };
 
 #endif // liblldb_RegisterNumber_h

Modified: lldb/trunk/include/lldb/Utility/SafeMachO.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/SafeMachO.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/SafeMachO.h (original)
+++ lldb/trunk/include/lldb/Utility/SafeMachO.h Tue Sep  6 15:57:50 2016
@@ -9,104 +9,110 @@
 #ifndef liblldb_SafeMachO_h_
 #define liblldb_SafeMachO_h_
 
-// This header file is required to work around collisions between the defines in mach/machine.h, and enum members
-// of the same name in llvm's MachO.h.  If you want to use llvm/Support/MachO.h, use this file instead.
+// This header file is required to work around collisions between the defines in
+// mach/machine.h, and enum members
+// of the same name in llvm's MachO.h.  If you want to use llvm/Support/MachO.h,
+// use this file instead.
 // The caveats are:
-// 1) You can only use the MachO.h enums, you can't use the defines.  That won't make a difference since the values
+// 1) You can only use the MachO.h enums, you can't use the defines.  That won't
+// make a difference since the values
 //    are the same.
-// 2) If you need any header file that relies on mach/machine.h, you must include that first.
-// 3) This isn't a total solution, it doesn't undef every define that MachO.h has borrowed from various system headers,
-//    only the ones that come from mach/machine.h because that is the one we ended up pulling in from various places.
+// 2) If you need any header file that relies on mach/machine.h, you must
+// include that first.
+// 3) This isn't a total solution, it doesn't undef every define that MachO.h
+// has borrowed from various system headers,
+//    only the ones that come from mach/machine.h because that is the one we
+//    ended up pulling in from various places.
 //
 
 #undef CPU_ARCH_MASK
-#undef CPU_ARCH_ABI64 
+#undef CPU_ARCH_ABI64
 
-#undef CPU_TYPE_ANY       
-#undef CPU_TYPE_X86       
-#undef CPU_TYPE_I386      
-#undef CPU_TYPE_X86_64    
-#undef CPU_TYPE_MC98000   
-#undef CPU_TYPE_ARM       
-#undef CPU_TYPE_ARM64     
-#undef CPU_TYPE_SPARC     
-#undef CPU_TYPE_POWERPC   
-#undef CPU_TYPE_POWERPC64 
-
-#undef CPU_SUB_TYPE_MASK  
-#undef CPU_SUB_TYPE_LIB64 
-
-#undef CPU_SUBTYPE_MULTIPLE 
-
-#undef CPU_SUBTYPE_I386_ALL       
-#undef CPU_SUBTYPE_386            
-#undef CPU_SUBTYPE_486            
-#undef CPU_SUBTYPE_486SX          
-#undef CPU_SUBTYPE_586            
-#undef CPU_SUBTYPE_PENT           
-#undef CPU_SUBTYPE_PENTPRO        
-#undef CPU_SUBTYPE_PENTII_M3      
-#undef CPU_SUBTYPE_PENTII_M5      
-#undef CPU_SUBTYPE_CELERON        
-#undef CPU_SUBTYPE_CELERON_MOBILE 
-#undef CPU_SUBTYPE_PENTIUM_3      
-#undef CPU_SUBTYPE_PENTIUM_3_M    
-#undef CPU_SUBTYPE_PENTIUM_3_XEON 
-#undef CPU_SUBTYPE_PENTIUM_M      
-#undef CPU_SUBTYPE_PENTIUM_4      
-#undef CPU_SUBTYPE_PENTIUM_4_M    
-#undef CPU_SUBTYPE_ITANIUM        
-#undef CPU_SUBTYPE_ITANIUM_2      
-#undef CPU_SUBTYPE_XEON           
-#undef CPU_SUBTYPE_XEON_MP        
-
-#undef CPU_SUBTYPE_X86_ALL     
-#undef CPU_SUBTYPE_X86_64_ALL  
-#undef CPU_SUBTYPE_X86_ARCH1   
-#undef CPU_SUBTYPE_X86_64_H    
+#undef CPU_TYPE_ANY
+#undef CPU_TYPE_X86
+#undef CPU_TYPE_I386
+#undef CPU_TYPE_X86_64
+#undef CPU_TYPE_MC98000
+#undef CPU_TYPE_ARM
+#undef CPU_TYPE_ARM64
+#undef CPU_TYPE_SPARC
+#undef CPU_TYPE_POWERPC
+#undef CPU_TYPE_POWERPC64
+
+#undef CPU_SUB_TYPE_MASK
+#undef CPU_SUB_TYPE_LIB64
+
+#undef CPU_SUBTYPE_MULTIPLE
+
+#undef CPU_SUBTYPE_I386_ALL
+#undef CPU_SUBTYPE_386
+#undef CPU_SUBTYPE_486
+#undef CPU_SUBTYPE_486SX
+#undef CPU_SUBTYPE_586
+#undef CPU_SUBTYPE_PENT
+#undef CPU_SUBTYPE_PENTPRO
+#undef CPU_SUBTYPE_PENTII_M3
+#undef CPU_SUBTYPE_PENTII_M5
+#undef CPU_SUBTYPE_CELERON
+#undef CPU_SUBTYPE_CELERON_MOBILE
+#undef CPU_SUBTYPE_PENTIUM_3
+#undef CPU_SUBTYPE_PENTIUM_3_M
+#undef CPU_SUBTYPE_PENTIUM_3_XEON
+#undef CPU_SUBTYPE_PENTIUM_M
+#undef CPU_SUBTYPE_PENTIUM_4
+#undef CPU_SUBTYPE_PENTIUM_4_M
+#undef CPU_SUBTYPE_ITANIUM
+#undef CPU_SUBTYPE_ITANIUM_2
+#undef CPU_SUBTYPE_XEON
+#undef CPU_SUBTYPE_XEON_MP
+
+#undef CPU_SUBTYPE_X86_ALL
+#undef CPU_SUBTYPE_X86_64_ALL
+#undef CPU_SUBTYPE_X86_ARCH1
+#undef CPU_SUBTYPE_X86_64_H
 
 #undef CPU_SUBTYPE_INTEL
 #undef CPU_SUBTYPE_INTEL_FAMILY
 #undef CPU_SUBTYPE_INTEL_FAMILY_MAX
-#undef CPU_SUBTYPE_INTEL_MODEL 
-#undef CPU_SUBTYPE_INTEL_MODEL_ALL  
+#undef CPU_SUBTYPE_INTEL_MODEL
+#undef CPU_SUBTYPE_INTEL_MODEL_ALL
 
 #undef CPU_SUBTYPE_ARM
-#undef CPU_SUBTYPE_ARM_ALL     
-#undef CPU_SUBTYPE_ARM_V4T     
-#undef CPU_SUBTYPE_ARM_V6      
-#undef CPU_SUBTYPE_ARM_V5      
-#undef CPU_SUBTYPE_ARM_V5TEJ   
-#undef CPU_SUBTYPE_ARM_XSCALE  
-#undef CPU_SUBTYPE_ARM_V7      
-
-#undef CPU_SUBTYPE_ARM_V7S     
-#undef CPU_SUBTYPE_ARM_V7K     
-#undef CPU_SUBTYPE_ARM_V6M     
-#undef CPU_SUBTYPE_ARM_V7M     
-#undef CPU_SUBTYPE_ARM_V7EM    
+#undef CPU_SUBTYPE_ARM_ALL
+#undef CPU_SUBTYPE_ARM_V4T
+#undef CPU_SUBTYPE_ARM_V6
+#undef CPU_SUBTYPE_ARM_V5
+#undef CPU_SUBTYPE_ARM_V5TEJ
+#undef CPU_SUBTYPE_ARM_XSCALE
+#undef CPU_SUBTYPE_ARM_V7
+
+#undef CPU_SUBTYPE_ARM_V7S
+#undef CPU_SUBTYPE_ARM_V7K
+#undef CPU_SUBTYPE_ARM_V6M
+#undef CPU_SUBTYPE_ARM_V7M
+#undef CPU_SUBTYPE_ARM_V7EM
 
-#undef CPU_SUBTYPE_ARM64_ALL   
+#undef CPU_SUBTYPE_ARM64_ALL
 
-#undef CPU_SUBTYPE_SPARC_ALL   
+#undef CPU_SUBTYPE_SPARC_ALL
 
 #undef CPU_SUBTYPE_POWERPC
-#undef CPU_SUBTYPE_POWERPC_ALL   
-#undef CPU_SUBTYPE_POWERPC_601   
-#undef CPU_SUBTYPE_POWERPC_602   
-#undef CPU_SUBTYPE_POWERPC_603   
-#undef CPU_SUBTYPE_POWERPC_603e  
-#undef CPU_SUBTYPE_POWERPC_603ev 
-#undef CPU_SUBTYPE_POWERPC_604   
-#undef CPU_SUBTYPE_POWERPC_604e  
-#undef CPU_SUBTYPE_POWERPC_620   
-#undef CPU_SUBTYPE_POWERPC_750   
-#undef CPU_SUBTYPE_POWERPC_7400  
-#undef CPU_SUBTYPE_POWERPC_7450  
-#undef CPU_SUBTYPE_POWERPC_970   
+#undef CPU_SUBTYPE_POWERPC_ALL
+#undef CPU_SUBTYPE_POWERPC_601
+#undef CPU_SUBTYPE_POWERPC_602
+#undef CPU_SUBTYPE_POWERPC_603
+#undef CPU_SUBTYPE_POWERPC_603e
+#undef CPU_SUBTYPE_POWERPC_603ev
+#undef CPU_SUBTYPE_POWERPC_604
+#undef CPU_SUBTYPE_POWERPC_604e
+#undef CPU_SUBTYPE_POWERPC_620
+#undef CPU_SUBTYPE_POWERPC_750
+#undef CPU_SUBTYPE_POWERPC_7400
+#undef CPU_SUBTYPE_POWERPC_7450
+#undef CPU_SUBTYPE_POWERPC_970
 
-#undef CPU_SUBTYPE_MC980000_ALL  
-#undef CPU_SUBTYPE_MC98601       
+#undef CPU_SUBTYPE_MC980000_ALL
+#undef CPU_SUBTYPE_MC98601
 
 #include "llvm/Support/MachO.h"
 

Modified: lldb/trunk/include/lldb/Utility/SelectHelper.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/SelectHelper.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/SelectHelper.h (original)
+++ lldb/trunk/include/lldb/Utility/SelectHelper.h Tue Sep  6 15:57:50 2016
@@ -21,70 +21,56 @@
 // Project includes
 #include "lldb/lldb-forward.h"
 
-class SelectHelper
-{
+class SelectHelper {
 public:
+  // Defaults to infinite wait for select unless you call SetTimeout()
+  SelectHelper();
 
-    // Defaults to infinite wait for select unless you call SetTimeout()
-    SelectHelper();
+  // Call SetTimeout() before calling SelectHelper::Select() to set the
+  // timeout based on the current time + the timeout. This allows multiple
+  // calls to SelectHelper::Select() without having to worry about the
+  // absolute timeout as this class manages to set the relative timeout
+  // correctly.
+  void SetTimeout(const std::chrono::microseconds &timeout);
+
+  // Call the FDSet*() functions before calling SelectHelper::Select() to
+  // set the file descriptors that we will watch for when calling
+  // select. This will cause FD_SET() to be called prior to calling select
+  // using the "fd" provided.
+  void FDSetRead(int fd);
+  void FDSetWrite(int fd);
+  void FDSetError(int fd);
+
+  // Call the FDIsSet*() functions after calling SelectHelper::Select()
+  // to check which file descriptors are ready for read/write/error. This
+  // will contain the result of FD_ISSET after calling select for a given
+  // file descriptor.
+  bool FDIsSetRead(int fd) const;
+  bool FDIsSetWrite(int fd) const;
+  bool FDIsSetError(int fd) const;
+
+  // Call the system's select() to wait for descriptors using
+  // timeout provided in a call the SelectHelper::SetTimeout(),
+  // or infinite wait if no timeout was set.
+  lldb_private::Error Select();
 
-    // Call SetTimeout() before calling SelectHelper::Select() to set the
-    // timeout based on the current time + the timeout. This allows multiple
-    // calls to SelectHelper::Select() without having to worry about the
-    // absolute timeout as this class manages to set the relative timeout
-    // correctly.
-    void SetTimeout(const std::chrono::microseconds &timeout);
-
-    // Call the FDSet*() functions before calling SelectHelper::Select() to
-    // set the file descriptors that we will watch for when calling
-    // select. This will cause FD_SET() to be called prior to calling select
-    // using the "fd" provided.
-    void FDSetRead(int fd);
-    void FDSetWrite(int fd);
-    void FDSetError(int fd);
-
-    // Call the FDIsSet*() functions after calling SelectHelper::Select()
-    // to check which file descriptors are ready for read/write/error. This
-    // will contain the result of FD_ISSET after calling select for a given
-    // file descriptor.
-    bool FDIsSetRead(int fd) const;
-    bool FDIsSetWrite(int fd) const;
-    bool FDIsSetError(int fd) const;
-
-    // Call the system's select() to wait for descriptors using
-    // timeout provided in a call the SelectHelper::SetTimeout(),
-    // or infinite wait if no timeout was set.
-    lldb_private::Error Select();
 protected:
-    struct FDInfo
-    {
-        FDInfo() :
-            read_set(false),
-            write_set(false),
-            error_set(false),
-            read_is_set(false),
-            write_is_set(false),
-            error_is_set(false)
-        {
-        }
-
-        void
-        PrepareForSelect()
-        {
-            read_is_set = false;
-            write_is_set = false;
-            error_is_set = false;
-        }
-
-        bool read_set     : 1,
-             write_set    : 1,
-             error_set    : 1,
-             read_is_set  : 1,
-             write_is_set : 1,
-             error_is_set : 1;
-    };
-    llvm::DenseMap<int, FDInfo> m_fd_map;
-    llvm::Optional<std::chrono::steady_clock::time_point> m_end_time;
+  struct FDInfo {
+    FDInfo()
+        : read_set(false), write_set(false), error_set(false),
+          read_is_set(false), write_is_set(false), error_is_set(false) {}
+
+    void PrepareForSelect() {
+      read_is_set = false;
+      write_is_set = false;
+      error_is_set = false;
+    }
+
+    bool read_set : 1, write_set : 1, error_set : 1, read_is_set : 1,
+        write_is_set : 1, error_is_set : 1;
+  };
+  llvm::DenseMap<int, FDInfo> m_fd_map;
+  llvm::Optional<std::chrono::steady_clock::time_point> m_end_time;
 };
 
 #endif // liblldb_SelectHelper_h_

Modified: lldb/trunk/include/lldb/Utility/SharedCluster.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/SharedCluster.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/SharedCluster.h (original)
+++ lldb/trunk/include/lldb/Utility/SharedCluster.h Tue Sep  6 15:57:50 2016
@@ -17,91 +17,76 @@
 
 namespace lldb_private {
 
-namespace imp
-{
-    template <typename T>
-    class shared_ptr_refcount : public lldb_private::imp::shared_count
-    {
-    public:
-        template<class Y> shared_ptr_refcount (Y *in) : shared_count (0), manager(in) {}
-        
-        shared_ptr_refcount() : shared_count (0) {}
-        
-        ~shared_ptr_refcount() override
-        {
-        }
-        
-        void on_zero_shared() override
-        {
-            manager->DecrementRefCount();
-        }
-
-    private:
-        T *manager;
-    };
+namespace imp {
+template <typename T>
+class shared_ptr_refcount : public lldb_private::imp::shared_count {
+public:
+  template <class Y>
+  shared_ptr_refcount(Y *in) : shared_count(0), manager(in) {}
+
+  shared_ptr_refcount() : shared_count(0) {}
+
+  ~shared_ptr_refcount() override {}
+
+  void on_zero_shared() override { manager->DecrementRefCount(); }
+
+private:
+  T *manager;
+};
 
 } // namespace imp
 
-template <class T>
-class ClusterManager
-{
+template <class T> class ClusterManager {
 public:
-    ClusterManager() : m_objects(), m_external_ref(0), m_mutex() {}
+  ClusterManager() : m_objects(), m_external_ref(0), m_mutex() {}
 
-    ~ClusterManager()
-    {
-        for (typename llvm::SmallPtrSet<T *, 16>::iterator pos = m_objects.begin(), end = m_objects.end(); pos != end;
-             ++pos)
-        {
-            T *object = *pos;
-            delete object;
-        }
-
-        // Decrement refcount should have been called on this ClusterManager,
-        // and it should have locked the mutex, now we will unlock it before
-        // we destroy it...
-        m_mutex.unlock();
+  ~ClusterManager() {
+    for (typename llvm::SmallPtrSet<T *, 16>::iterator pos = m_objects.begin(),
+                                                       end = m_objects.end();
+         pos != end; ++pos) {
+      T *object = *pos;
+      delete object;
     }
 
-    void
-    ManageObject(T *new_object)
-    {
-        std::lock_guard<std::mutex> guard(m_mutex);
-        m_objects.insert(new_object);
-    }
+    // Decrement refcount should have been called on this ClusterManager,
+    // and it should have locked the mutex, now we will unlock it before
+    // we destroy it...
+    m_mutex.unlock();
+  }
+
+  void ManageObject(T *new_object) {
+    std::lock_guard<std::mutex> guard(m_mutex);
+    m_objects.insert(new_object);
+  }
 
-    typename lldb_private::SharingPtr<T>
-    GetSharedPointer(T *desired_object)
+  typename lldb_private::SharingPtr<T> GetSharedPointer(T *desired_object) {
     {
-        {
-            std::lock_guard<std::mutex> guard(m_mutex);
-            m_external_ref++;
-            if (0 == m_objects.count(desired_object))
-            {
-                lldbassert(false && "object not found in shared cluster when expected");
-                desired_object = nullptr;
-            }
-        }
-        return typename lldb_private::SharingPtr<T>(desired_object, new imp::shared_ptr_refcount<ClusterManager>(this));
+      std::lock_guard<std::mutex> guard(m_mutex);
+      m_external_ref++;
+      if (0 == m_objects.count(desired_object)) {
+        lldbassert(false && "object not found in shared cluster when expected");
+        desired_object = nullptr;
+      }
     }
+    return typename lldb_private::SharingPtr<T>(
+        desired_object, new imp::shared_ptr_refcount<ClusterManager>(this));
+  }
 
 private:
-    void
-    DecrementRefCount()
-    {
-        m_mutex.lock();
-        m_external_ref--;
-        if (m_external_ref == 0)
-            delete this;
-        else
-            m_mutex.unlock();
-    }
-
-    friend class imp::shared_ptr_refcount<ClusterManager>;
-
-    llvm::SmallPtrSet<T *, 16> m_objects;
-    int m_external_ref;
-    std::mutex m_mutex;
+  void DecrementRefCount() {
+    m_mutex.lock();
+    m_external_ref--;
+    if (m_external_ref == 0)
+      delete this;
+    else
+      m_mutex.unlock();
+  }
+
+  friend class imp::shared_ptr_refcount<ClusterManager>;
+
+  llvm::SmallPtrSet<T *, 16> m_objects;
+  int m_external_ref;
+  std::mutex m_mutex;
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Utility/SharingPtr.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/SharingPtr.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/SharingPtr.h (original)
+++ lldb/trunk/include/lldb/Utility/SharingPtr.h Tue Sep  6 15:57:50 2016
@@ -28,813 +28,595 @@
 // Project includes
 
 //#define ENABLE_SP_LOGGING 1 // DON'T CHECK THIS LINE IN UNLESS COMMENTED OUT
-#if defined (ENABLE_SP_LOGGING)
+#if defined(ENABLE_SP_LOGGING)
 
-extern "C" void track_sp (void *sp_this, void *ptr, long count);
+extern "C" void track_sp(void *sp_this, void *ptr, long count);
 
 #endif
 
 namespace lldb_private {
 
 namespace imp {
-    
-class shared_count
-{
-    shared_count(const shared_count&);
-    shared_count& operator=(const shared_count&);
+
+class shared_count {
+  shared_count(const shared_count &);
+  shared_count &operator=(const shared_count &);
 
 public:
-    explicit shared_count(long refs = 0)
-        : shared_owners_(refs) {}
+  explicit shared_count(long refs = 0) : shared_owners_(refs) {}
+
+  void add_shared();
+  void release_shared();
+  long use_count() const { return shared_owners_ + 1; }
 
-    void add_shared();
-    void release_shared();
-    long use_count() const {return shared_owners_ + 1;}
 protected:
 #ifdef _MSC_VER
-    long shared_owners_;
+  long shared_owners_;
 #else
-    std::atomic<long> shared_owners_;
+  std::atomic<long> shared_owners_;
 #endif
-    virtual ~shared_count();
+  virtual ~shared_count();
 
 private:
-    virtual void on_zero_shared() = 0;
+  virtual void on_zero_shared() = 0;
 };
 
-template <class T>
-class shared_ptr_pointer
-    : public shared_count
-{
-    T data_;
+template <class T> class shared_ptr_pointer : public shared_count {
+  T data_;
+
 public:
-    shared_ptr_pointer(T p)
-        :  data_(p) {}
+  shared_ptr_pointer(T p) : data_(p) {}
 
 private:
-    void on_zero_shared() override;
+  void on_zero_shared() override;
 
-    // Outlaw copy constructor and assignment operator to keep effective C++
-    // warnings down to a minimum
-    shared_ptr_pointer (const shared_ptr_pointer &);
-    shared_ptr_pointer & operator=(const shared_ptr_pointer &);
+  // Outlaw copy constructor and assignment operator to keep effective C++
+  // warnings down to a minimum
+  shared_ptr_pointer(const shared_ptr_pointer &);
+  shared_ptr_pointer &operator=(const shared_ptr_pointer &);
 };
 
-template <class T>
-void
-shared_ptr_pointer<T>::on_zero_shared()
-{
-    delete data_;
+template <class T> void shared_ptr_pointer<T>::on_zero_shared() {
+  delete data_;
 }
 
-template <class T>
-class shared_ptr_emplace
-    : public shared_count
-{
-    T data_;
+template <class T> class shared_ptr_emplace : public shared_count {
+  T data_;
+
 public:
+  shared_ptr_emplace() : data_() {}
+
+  template <class A0> shared_ptr_emplace(A0 &a0) : data_(a0) {}
+
+  template <class A0, class A1>
+  shared_ptr_emplace(A0 &a0, A1 &a1) : data_(a0, a1) {}
 
-    shared_ptr_emplace()
-        :  data_() {}
+  template <class A0, class A1, class A2>
+  shared_ptr_emplace(A0 &a0, A1 &a1, A2 &a2) : data_(a0, a1, a2) {}
 
-    template <class A0>
-        shared_ptr_emplace(A0& a0)
-            :  data_(a0) {}
-
-    template <class A0, class A1>
-        shared_ptr_emplace(A0& a0, A1& a1)
-            :  data_(a0, a1) {}
-
-    template <class A0, class A1, class A2>
-        shared_ptr_emplace(A0& a0, A1& a1, A2& a2)
-            :  data_(a0, a1, a2) {}
-
-    template <class A0, class A1, class A2, class A3>
-        shared_ptr_emplace(A0& a0, A1& a1, A2& a2, A3& a3)
-            :  data_(a0, a1, a2, a3) {}
-
-    template <class A0, class A1, class A2, class A3, class A4>
-        shared_ptr_emplace(A0& a0, A1& a1, A2& a2, A3& a3, A4& a4)
-            :  data_(a0, a1, a2, a3, a4) {}
+  template <class A0, class A1, class A2, class A3>
+  shared_ptr_emplace(A0 &a0, A1 &a1, A2 &a2, A3 &a3) : data_(a0, a1, a2, a3) {}
+
+  template <class A0, class A1, class A2, class A3, class A4>
+  shared_ptr_emplace(A0 &a0, A1 &a1, A2 &a2, A3 &a3, A4 &a4)
+      : data_(a0, a1, a2, a3, a4) {}
 
 private:
-    void on_zero_shared() override;
+  void on_zero_shared() override;
 
 public:
-    T* get() {return &data_;}
+  T *get() { return &data_; }
 };
 
-template <class T>
-void
-shared_ptr_emplace<T>::on_zero_shared()
-{
-}
+template <class T> void shared_ptr_emplace<T>::on_zero_shared() {}
 
 } // namespace imp
 
-template<class T>
-class SharingPtr
-{
-public: 
-    typedef T element_type; 
+template <class T> class SharingPtr {
+public:
+  typedef T element_type;
 
 private:
-    element_type*      ptr_;
-    imp::shared_count* cntrl_;
+  element_type *ptr_;
+  imp::shared_count *cntrl_;
 
-    struct nat {int for_bool_;};
+  struct nat {
+    int for_bool_;
+  };
 
 public:
-    SharingPtr();
-    SharingPtr(std::nullptr_t);
-    template<class Y> explicit SharingPtr(Y* p);
-    template<class Y> explicit SharingPtr(Y* p, imp::shared_count *ctrl_block);
-    template<class Y> SharingPtr(const SharingPtr<Y>& r, element_type *p); 
-    SharingPtr(const SharingPtr& r);
-    template<class Y>
-        SharingPtr(const SharingPtr<Y>& r);
-
-    ~SharingPtr();
-
-    SharingPtr& operator=(const SharingPtr& r); 
-    template<class Y> SharingPtr& operator=(const SharingPtr<Y>& r); 
-
-    void swap(SharingPtr& r);
-    void reset();
-    template<class Y> void reset(Y* p);
-    void reset(std::nullptr_t);
-
-    element_type* get() const {return ptr_;}
-    element_type& operator*() const {return *ptr_;}
-    element_type* operator->() const {return ptr_;}
-    long use_count() const {return cntrl_ ? cntrl_->use_count() : 0;}
-    bool unique() const {return use_count() == 1;}
-    bool empty() const {return cntrl_ == nullptr;}
-    operator nat*() const {return (nat*)get();}
-
-    static SharingPtr<T> make_shared();
-
-    template<class A0>
-        static SharingPtr<T> make_shared(A0&);
-
-    template<class A0, class A1>
-        static SharingPtr<T> make_shared(A0&, A1&);
+  SharingPtr();
+  SharingPtr(std::nullptr_t);
+  template <class Y> explicit SharingPtr(Y *p);
+  template <class Y> explicit SharingPtr(Y *p, imp::shared_count *ctrl_block);
+  template <class Y> SharingPtr(const SharingPtr<Y> &r, element_type *p);
+  SharingPtr(const SharingPtr &r);
+  template <class Y> SharingPtr(const SharingPtr<Y> &r);
+
+  ~SharingPtr();
+
+  SharingPtr &operator=(const SharingPtr &r);
+  template <class Y> SharingPtr &operator=(const SharingPtr<Y> &r);
+
+  void swap(SharingPtr &r);
+  void reset();
+  template <class Y> void reset(Y *p);
+  void reset(std::nullptr_t);
+
+  element_type *get() const { return ptr_; }
+  element_type &operator*() const { return *ptr_; }
+  element_type *operator->() const { return ptr_; }
+  long use_count() const { return cntrl_ ? cntrl_->use_count() : 0; }
+  bool unique() const { return use_count() == 1; }
+  bool empty() const { return cntrl_ == nullptr; }
+  operator nat *() const { return (nat *)get(); }
+
+  static SharingPtr<T> make_shared();
+
+  template <class A0> static SharingPtr<T> make_shared(A0 &);
+
+  template <class A0, class A1> static SharingPtr<T> make_shared(A0 &, A1 &);
 
-    template<class A0, class A1, class A2>
-        static SharingPtr<T> make_shared(A0&, A1&, A2&);
+  template <class A0, class A1, class A2>
+  static SharingPtr<T> make_shared(A0 &, A1 &, A2 &);
 
-    template<class A0, class A1, class A2, class A3>
-        static SharingPtr<T> make_shared(A0&, A1&, A2&, A3&);
+  template <class A0, class A1, class A2, class A3>
+  static SharingPtr<T> make_shared(A0 &, A1 &, A2 &, A3 &);
 
-    template<class A0, class A1, class A2, class A3, class A4>
-        static SharingPtr<T> make_shared(A0&, A1&, A2&, A3&, A4&);
+  template <class A0, class A1, class A2, class A3, class A4>
+  static SharingPtr<T> make_shared(A0 &, A1 &, A2 &, A3 &, A4 &);
 
 private:
-    template <class U> friend class SharingPtr;
+  template <class U> friend class SharingPtr;
 };
 
-template<class T>
-inline
-SharingPtr<T>::SharingPtr()
-    : ptr_(nullptr),
-      cntrl_(nullptr)
-{
-}
-    
-template<class T>
-inline
-SharingPtr<T>::SharingPtr(std::nullptr_t)
-: ptr_(nullptr),
-cntrl_(nullptr)
-{
-}
-
-template<class T>
-template<class Y>
-SharingPtr<T>::SharingPtr(Y* p)
-    : ptr_(p), cntrl_(nullptr)
-{
-    std::unique_ptr<Y> hold(p);
-    typedef imp::shared_ptr_pointer<Y*> _CntrlBlk;
-    cntrl_ = new _CntrlBlk(p);
-    hold.release();
-}
-
-template<class T>
-template<class Y>
-SharingPtr<T>::SharingPtr(Y* p, imp::shared_count *cntrl_block)
-    : ptr_(p), cntrl_(cntrl_block)
-{
-}
-
-template<class T>
-template<class Y>
-inline
-SharingPtr<T>::SharingPtr(const SharingPtr<Y>& r, element_type *p)
-    : ptr_(p),
-      cntrl_(r.cntrl_)
-{
-    if (cntrl_)
-        cntrl_->add_shared();
-}
-
-template<class T>
-inline
-SharingPtr<T>::SharingPtr(const SharingPtr& r)
-    : ptr_(r.ptr_),
-      cntrl_(r.cntrl_)
-{
-    if (cntrl_)
-        cntrl_->add_shared();
-}
-
-template<class T>
-template<class Y>
-inline
-SharingPtr<T>::SharingPtr(const SharingPtr<Y>& r)
-    : ptr_(r.ptr_),
-      cntrl_(r.cntrl_)
-{
-    if (cntrl_)
-        cntrl_->add_shared();
-}
-
-template<class T>
-SharingPtr<T>::~SharingPtr()
-{
-    if (cntrl_)
-        cntrl_->release_shared();
-}
-
-template<class T>
-inline
-SharingPtr<T>&
-SharingPtr<T>::operator=(const SharingPtr& r)
-{
-    SharingPtr(r).swap(*this);
-    return *this;
+template <class T>
+inline SharingPtr<T>::SharingPtr() : ptr_(nullptr), cntrl_(nullptr) {}
+
+template <class T>
+inline SharingPtr<T>::SharingPtr(std::nullptr_t)
+    : ptr_(nullptr), cntrl_(nullptr) {}
+
+template <class T>
+template <class Y>
+SharingPtr<T>::SharingPtr(Y *p) : ptr_(p), cntrl_(nullptr) {
+  std::unique_ptr<Y> hold(p);
+  typedef imp::shared_ptr_pointer<Y *> _CntrlBlk;
+  cntrl_ = new _CntrlBlk(p);
+  hold.release();
 }
 
-template<class T>
-template<class Y>
-inline
-SharingPtr<T>&
-SharingPtr<T>::operator=(const SharingPtr<Y>& r)
-{
-    SharingPtr(r).swap(*this);
-    return *this;
+template <class T>
+template <class Y>
+SharingPtr<T>::SharingPtr(Y *p, imp::shared_count *cntrl_block)
+    : ptr_(p), cntrl_(cntrl_block) {}
+
+template <class T>
+template <class Y>
+inline SharingPtr<T>::SharingPtr(const SharingPtr<Y> &r, element_type *p)
+    : ptr_(p), cntrl_(r.cntrl_) {
+  if (cntrl_)
+    cntrl_->add_shared();
 }
 
-template<class T>
-inline
-void
-SharingPtr<T>::swap(SharingPtr& r)
-{
-    std::swap(ptr_, r.ptr_);
-    std::swap(cntrl_, r.cntrl_);
-}
-
-template<class T>
-inline
-void
-SharingPtr<T>::reset()
-{
-    SharingPtr().swap(*this);
-}
-
-template<class T>
-inline
-void
-SharingPtr<T>::reset (std::nullptr_t p)
-{
-    reset();
-}
-    
-template<class T>
-template<class Y>
-inline
-void
-SharingPtr<T>::reset(Y* p)
-{
-    SharingPtr(p).swap(*this);
-}
-
-template<class T>
-SharingPtr<T>
-SharingPtr<T>::make_shared()
-{
-    typedef imp::shared_ptr_emplace<T> CntrlBlk;
-    SharingPtr<T> r;
-    r.cntrl_ = new CntrlBlk();
-    r.ptr_ = static_cast<CntrlBlk*>(r.cntrl_)->get();
-    return r;
-}
-
-template<class T>
-template<class A0>
-SharingPtr<T>
-SharingPtr<T>::make_shared(A0& a0)
-{
-    typedef imp::shared_ptr_emplace<T> CntrlBlk;
-    SharingPtr<T> r;
-    r.cntrl_ = new CntrlBlk(a0);
-    r.ptr_ = static_cast<CntrlBlk*>(r.cntrl_)->get();
-    return r;
-}
-
-template<class T>
-template<class A0, class A1>
-SharingPtr<T>
-SharingPtr<T>::make_shared(A0& a0, A1& a1)
-{
-    typedef imp::shared_ptr_emplace<T> CntrlBlk;
-    SharingPtr<T> r;
-    r.cntrl_ = new CntrlBlk(a0, a1);
-    r.ptr_ = static_cast<CntrlBlk*>(r.cntrl_)->get();
-    return r;
-}
-
-template<class T>
-template<class A0, class A1, class A2>
-SharingPtr<T>
-SharingPtr<T>::make_shared(A0& a0, A1& a1, A2& a2)
-{
-    typedef imp::shared_ptr_emplace<T> CntrlBlk;
-    SharingPtr<T> r;
-    r.cntrl_ = new CntrlBlk(a0, a1, a2);
-    r.ptr_ = static_cast<CntrlBlk*>(r.cntrl_)->get();
-    return r;
-}
-
-template<class T>
-template<class A0, class A1, class A2, class A3>
-SharingPtr<T>
-SharingPtr<T>::make_shared(A0& a0, A1& a1, A2& a2, A3& a3)
-{
-    typedef imp::shared_ptr_emplace<T> CntrlBlk;
-    SharingPtr<T> r;
-    r.cntrl_ = new CntrlBlk(a0, a1, a2, a3);
-    r.ptr_ = static_cast<CntrlBlk*>(r.cntrl_)->get();
-    return r;
-}
-
-template<class T>
-template<class A0, class A1, class A2, class A3, class A4>
-SharingPtr<T>
-SharingPtr<T>::make_shared(A0& a0, A1& a1, A2& a2, A3& a3, A4& a4)
-{
-    typedef imp::shared_ptr_emplace<T> CntrlBlk;
-    SharingPtr<T> r;
-    r.cntrl_ = new CntrlBlk(a0, a1, a2, a3, a4);
-    r.ptr_ = static_cast<CntrlBlk*>(r.cntrl_)->get();
-    return r;
-}
-
-template<class T>
-inline
-SharingPtr<T>
-make_shared()
-{
-    return SharingPtr<T>::make_shared();
-}
-
-template<class T, class A0>
-inline
-SharingPtr<T>
-make_shared(A0& a0)
-{
-    return SharingPtr<T>::make_shared(a0);
-}
-
-template<class T, class A0, class A1>
-inline
-SharingPtr<T>
-make_shared(A0& a0, A1& a1)
-{
-    return SharingPtr<T>::make_shared(a0, a1);
-}
-
-template<class T, class A0, class A1, class A2>
-inline
-SharingPtr<T>
-make_shared(A0& a0, A1& a1, A2& a2)
-{
-    return SharingPtr<T>::make_shared(a0, a1, a2);
-}
-
-template<class T, class A0, class A1, class A2, class A3>
-inline
-SharingPtr<T>
-make_shared(A0& a0, A1& a1, A2& a2, A3& a3)
-{
-    return SharingPtr<T>::make_shared(a0, a1, a2, a3);
-}
-
-template<class T, class A0, class A1, class A2, class A3, class A4>
-inline
-SharingPtr<T>
-make_shared(A0& a0, A1& a1, A2& a2, A3& a3, A4& a4)
-{
-    return SharingPtr<T>::make_shared(a0, a1, a2, a3, a4);
-}
-
-template<class T, class U>
-inline
-bool
-operator==(const SharingPtr<T>& __x, const SharingPtr<U>& __y)
-{
-    return __x.get() == __y.get();
-}
-
-template<class T, class U>
-inline
-bool
-operator!=(const SharingPtr<T>& __x, const SharingPtr<U>& __y)
-{
-    return !(__x == __y);
-}
-
-template<class T, class U>
-inline
-bool
-operator<(const SharingPtr<T>& __x, const SharingPtr<U>& __y)
-{
-    return __x.get() < __y.get();
-}
-
-template<class T>
-inline
-void
-swap(SharingPtr<T>& __x, SharingPtr<T>& __y)
-{
-    __x.swap(__y);
-}
-
-template<class T, class U>
-inline
-SharingPtr<T>
-static_pointer_cast(const SharingPtr<U>& r)
-{
-    return SharingPtr<T>(r, static_cast<T*>(r.get()));
-}
-
-template<class T, class U>
-SharingPtr<T>
-const_pointer_cast(const SharingPtr<U>& r)
-{
-    return SharingPtr<T>(r, const_cast<T*>(r.get()));
-}
-
-template <class T>
-class LoggingSharingPtr
-    : public SharingPtr<T>
-{
-    typedef SharingPtr<T> base;
+template <class T>
+inline SharingPtr<T>::SharingPtr(const SharingPtr &r)
+    : ptr_(r.ptr_), cntrl_(r.cntrl_) {
+  if (cntrl_)
+    cntrl_->add_shared();
+}
 
-public:
-    typedef void (*Callback)(void*, const LoggingSharingPtr&, bool action);
-    // action:  false means increment just happened
-    //          true  means decrement is about to happen
-
-    LoggingSharingPtr() : cb_(0), baton_(nullptr) {}
-
-    LoggingSharingPtr(Callback cb, void* baton)
-        : cb_(cb), baton_(baton)
-    {
-        if (cb_)
-            cb_(baton_, *this, false);
-    }
+template <class T>
+template <class Y>
+inline SharingPtr<T>::SharingPtr(const SharingPtr<Y> &r)
+    : ptr_(r.ptr_), cntrl_(r.cntrl_) {
+  if (cntrl_)
+    cntrl_->add_shared();
+}
 
-    template <class Y>
-    LoggingSharingPtr(Y* p)
-        : base(p), cb_(0), baton_(nullptr) {}
-
-    template <class Y>
-    LoggingSharingPtr(Y* p, Callback cb, void* baton)
-        : base(p), cb_(cb), baton_(baton)
-    {
-        if (cb_)
-            cb_(baton_, *this, false);
-    }
+template <class T> SharingPtr<T>::~SharingPtr() {
+  if (cntrl_)
+    cntrl_->release_shared();
+}
 
-    ~LoggingSharingPtr()
-    {
-        if (cb_)
-            cb_(baton_, *this, true);
-    }
+template <class T>
+inline SharingPtr<T> &SharingPtr<T>::operator=(const SharingPtr &r) {
+  SharingPtr(r).swap(*this);
+  return *this;
+}
 
-    LoggingSharingPtr(const LoggingSharingPtr& p)
-        : base(p), cb_(p.cb_), baton_(p.baton_)
-    {
-        if (cb_)
-            cb_(baton_, *this, false);
-    }
+template <class T>
+template <class Y>
+inline SharingPtr<T> &SharingPtr<T>::operator=(const SharingPtr<Y> &r) {
+  SharingPtr(r).swap(*this);
+  return *this;
+}
 
-    LoggingSharingPtr& operator=(const LoggingSharingPtr& p)
-    {
-        if (cb_)
-            cb_(baton_, *this, true);
-        base::operator=(p);
-        cb_ = p.cb_;
-        baton_ = p.baton_;
-        if (cb_)
-            cb_(baton_, *this, false);
-        return *this;
-    }
+template <class T> inline void SharingPtr<T>::swap(SharingPtr &r) {
+  std::swap(ptr_, r.ptr_);
+  std::swap(cntrl_, r.cntrl_);
+}
 
-    void reset()
-    {
-        if (cb_)
-            cb_(baton_, *this, true);
-        base::reset();
-    }
+template <class T> inline void SharingPtr<T>::reset() {
+  SharingPtr().swap(*this);
+}
 
-    template <class Y>
-    void reset(Y* p)
-    {
-        if (cb_)
-            cb_(baton_, *this, true);
-        base::reset(p);
-        if (cb_)
-            cb_(baton_, *this, false);
-    }
-    
-    void SetCallback(Callback cb, void* baton)
-    {
-        cb_ = cb;
-        baton_ = baton;
-    }
+template <class T> inline void SharingPtr<T>::reset(std::nullptr_t p) {
+  reset();
+}
 
-    void ClearCallback()
-    {
-        cb_ = 0;
-        baton_ = 0;
-    }
+template <class T> template <class Y> inline void SharingPtr<T>::reset(Y *p) {
+  SharingPtr(p).swap(*this);
+}
 
-private:
-    Callback cb_;
-    void* baton_;
-};
+template <class T> SharingPtr<T> SharingPtr<T>::make_shared() {
+  typedef imp::shared_ptr_emplace<T> CntrlBlk;
+  SharingPtr<T> r;
+  r.cntrl_ = new CntrlBlk();
+  r.ptr_ = static_cast<CntrlBlk *>(r.cntrl_)->get();
+  return r;
+}
+
+template <class T>
+template <class A0>
+SharingPtr<T> SharingPtr<T>::make_shared(A0 &a0) {
+  typedef imp::shared_ptr_emplace<T> CntrlBlk;
+  SharingPtr<T> r;
+  r.cntrl_ = new CntrlBlk(a0);
+  r.ptr_ = static_cast<CntrlBlk *>(r.cntrl_)->get();
+  return r;
+}
+
+template <class T>
+template <class A0, class A1>
+SharingPtr<T> SharingPtr<T>::make_shared(A0 &a0, A1 &a1) {
+  typedef imp::shared_ptr_emplace<T> CntrlBlk;
+  SharingPtr<T> r;
+  r.cntrl_ = new CntrlBlk(a0, a1);
+  r.ptr_ = static_cast<CntrlBlk *>(r.cntrl_)->get();
+  return r;
+}
 
 template <class T>
-class IntrusiveSharingPtr;
+template <class A0, class A1, class A2>
+SharingPtr<T> SharingPtr<T>::make_shared(A0 &a0, A1 &a1, A2 &a2) {
+  typedef imp::shared_ptr_emplace<T> CntrlBlk;
+  SharingPtr<T> r;
+  r.cntrl_ = new CntrlBlk(a0, a1, a2);
+  r.ptr_ = static_cast<CntrlBlk *>(r.cntrl_)->get();
+  return r;
+}
+
+template <class T>
+template <class A0, class A1, class A2, class A3>
+SharingPtr<T> SharingPtr<T>::make_shared(A0 &a0, A1 &a1, A2 &a2, A3 &a3) {
+  typedef imp::shared_ptr_emplace<T> CntrlBlk;
+  SharingPtr<T> r;
+  r.cntrl_ = new CntrlBlk(a0, a1, a2, a3);
+  r.ptr_ = static_cast<CntrlBlk *>(r.cntrl_)->get();
+  return r;
+}
 
 template <class T>
-class ReferenceCountedBase
-{
+template <class A0, class A1, class A2, class A3, class A4>
+SharingPtr<T> SharingPtr<T>::make_shared(A0 &a0, A1 &a1, A2 &a2, A3 &a3,
+                                         A4 &a4) {
+  typedef imp::shared_ptr_emplace<T> CntrlBlk;
+  SharingPtr<T> r;
+  r.cntrl_ = new CntrlBlk(a0, a1, a2, a3, a4);
+  r.ptr_ = static_cast<CntrlBlk *>(r.cntrl_)->get();
+  return r;
+}
+
+template <class T> inline SharingPtr<T> make_shared() {
+  return SharingPtr<T>::make_shared();
+}
+
+template <class T, class A0> inline SharingPtr<T> make_shared(A0 &a0) {
+  return SharingPtr<T>::make_shared(a0);
+}
+
+template <class T, class A0, class A1>
+inline SharingPtr<T> make_shared(A0 &a0, A1 &a1) {
+  return SharingPtr<T>::make_shared(a0, a1);
+}
+
+template <class T, class A0, class A1, class A2>
+inline SharingPtr<T> make_shared(A0 &a0, A1 &a1, A2 &a2) {
+  return SharingPtr<T>::make_shared(a0, a1, a2);
+}
+
+template <class T, class A0, class A1, class A2, class A3>
+inline SharingPtr<T> make_shared(A0 &a0, A1 &a1, A2 &a2, A3 &a3) {
+  return SharingPtr<T>::make_shared(a0, a1, a2, a3);
+}
+
+template <class T, class A0, class A1, class A2, class A3, class A4>
+inline SharingPtr<T> make_shared(A0 &a0, A1 &a1, A2 &a2, A3 &a3, A4 &a4) {
+  return SharingPtr<T>::make_shared(a0, a1, a2, a3, a4);
+}
+
+template <class T, class U>
+inline bool operator==(const SharingPtr<T> &__x, const SharingPtr<U> &__y) {
+  return __x.get() == __y.get();
+}
+
+template <class T, class U>
+inline bool operator!=(const SharingPtr<T> &__x, const SharingPtr<U> &__y) {
+  return !(__x == __y);
+}
+
+template <class T, class U>
+inline bool operator<(const SharingPtr<T> &__x, const SharingPtr<U> &__y) {
+  return __x.get() < __y.get();
+}
+
+template <class T> inline void swap(SharingPtr<T> &__x, SharingPtr<T> &__y) {
+  __x.swap(__y);
+}
+
+template <class T, class U>
+inline SharingPtr<T> static_pointer_cast(const SharingPtr<U> &r) {
+  return SharingPtr<T>(r, static_cast<T *>(r.get()));
+}
+
+template <class T, class U>
+SharingPtr<T> const_pointer_cast(const SharingPtr<U> &r) {
+  return SharingPtr<T>(r, const_cast<T *>(r.get()));
+}
+
+template <class T> class LoggingSharingPtr : public SharingPtr<T> {
+  typedef SharingPtr<T> base;
+
 public:
-    explicit ReferenceCountedBase()
-        : shared_owners_(-1) 
-    {
-    }
-    
-    void
-    add_shared();
+  typedef void (*Callback)(void *, const LoggingSharingPtr &, bool action);
+  // action:  false means increment just happened
+  //          true  means decrement is about to happen
+
+  LoggingSharingPtr() : cb_(0), baton_(nullptr) {}
+
+  LoggingSharingPtr(Callback cb, void *baton) : cb_(cb), baton_(baton) {
+    if (cb_)
+      cb_(baton_, *this, false);
+  }
+
+  template <class Y>
+  LoggingSharingPtr(Y *p) : base(p), cb_(0), baton_(nullptr) {}
+
+  template <class Y>
+  LoggingSharingPtr(Y *p, Callback cb, void *baton)
+      : base(p), cb_(cb), baton_(baton) {
+    if (cb_)
+      cb_(baton_, *this, false);
+  }
+
+  ~LoggingSharingPtr() {
+    if (cb_)
+      cb_(baton_, *this, true);
+  }
+
+  LoggingSharingPtr(const LoggingSharingPtr &p)
+      : base(p), cb_(p.cb_), baton_(p.baton_) {
+    if (cb_)
+      cb_(baton_, *this, false);
+  }
+
+  LoggingSharingPtr &operator=(const LoggingSharingPtr &p) {
+    if (cb_)
+      cb_(baton_, *this, true);
+    base::operator=(p);
+    cb_ = p.cb_;
+    baton_ = p.baton_;
+    if (cb_)
+      cb_(baton_, *this, false);
+    return *this;
+  }
 
-    void
-    release_shared();
+  void reset() {
+    if (cb_)
+      cb_(baton_, *this, true);
+    base::reset();
+  }
+
+  template <class Y> void reset(Y *p) {
+    if (cb_)
+      cb_(baton_, *this, true);
+    base::reset(p);
+    if (cb_)
+      cb_(baton_, *this, false);
+  }
+
+  void SetCallback(Callback cb, void *baton) {
+    cb_ = cb;
+    baton_ = baton;
+  }
+
+  void ClearCallback() {
+    cb_ = 0;
+    baton_ = 0;
+  }
+
+private:
+  Callback cb_;
+  void *baton_;
+};
+
+template <class T> class IntrusiveSharingPtr;
+
+template <class T> class ReferenceCountedBase {
+public:
+  explicit ReferenceCountedBase() : shared_owners_(-1) {}
+
+  void add_shared();
+
+  void release_shared();
+
+  long use_count() const { return shared_owners_ + 1; }
 
-    long 
-    use_count() const 
-    {
-        return shared_owners_ + 1;
-    }
-    
 protected:
-    long shared_owners_;
-   
-    friend class IntrusiveSharingPtr<T>;
-    
+  long shared_owners_;
+
+  friend class IntrusiveSharingPtr<T>;
+
 private:
-    ReferenceCountedBase(const ReferenceCountedBase&);
-    ReferenceCountedBase& operator=(const ReferenceCountedBase&);
+  ReferenceCountedBase(const ReferenceCountedBase &);
+  ReferenceCountedBase &operator=(const ReferenceCountedBase &);
 };
 
-    template <class T>
-    void
-    lldb_private::ReferenceCountedBase<T>::add_shared()
-    {
+template <class T> void lldb_private::ReferenceCountedBase<T>::add_shared() {
 #ifdef _MSC_VER
-        _InterlockedIncrement(&shared_owners_);
+  _InterlockedIncrement(&shared_owners_);
 #else
-        ++shared_owners_;
+  ++shared_owners_;
 #endif
-    }
-    
-    template <class T>
-    void
-    lldb_private::ReferenceCountedBase<T>::release_shared()
-    {
+}
+
+template <class T>
+void lldb_private::ReferenceCountedBase<T>::release_shared() {
 #ifdef _MSC_VER
-        if (_InterlockedDecrement(&shared_owners_) == -1)
+  if (_InterlockedDecrement(&shared_owners_) == -1)
 #else
-        if (--shared_owners_ == -1)
+  if (--shared_owners_ == -1)
 #endif
-            delete static_cast<T*>(this);
-    }
+    delete static_cast<T *>(this);
+}
 
-    
 template <class T>
-class ReferenceCountedBaseVirtual : public imp::shared_count
-{
+class ReferenceCountedBaseVirtual : public imp::shared_count {
 public:
-    explicit ReferenceCountedBaseVirtual () : 
-        imp::shared_count(-1)
-    {
-    }
+  explicit ReferenceCountedBaseVirtual() : imp::shared_count(-1) {}
 
-    ~ReferenceCountedBaseVirtual() override = default;
+  ~ReferenceCountedBaseVirtual() override = default;
 
-    void on_zero_shared() override;
+  void on_zero_shared() override;
 };
 
-template <class T>
-void
-ReferenceCountedBaseVirtual<T>::on_zero_shared()
-{
-}
+template <class T> void ReferenceCountedBaseVirtual<T>::on_zero_shared() {}
 
-template <typename T>
-class IntrusiveSharingPtr 
-{
+template <typename T> class IntrusiveSharingPtr {
 public:
-    typedef T element_type;
-    
-    explicit 
-    IntrusiveSharingPtr () : 
-        ptr_(0) 
-    {
-    }
-    
-    explicit
-    IntrusiveSharingPtr (T* ptr) : 
-        ptr_(ptr) 
-    {
-        add_shared();
-    }
-    
-    IntrusiveSharingPtr (const IntrusiveSharingPtr& rhs) : 
-        ptr_(rhs.ptr_) 
-    {
-        add_shared();
-    }
-    
-    template <class X>
-    IntrusiveSharingPtr (const IntrusiveSharingPtr<X>& rhs)
-        : ptr_(rhs.get()) 
-    {
-        add_shared();
-    }
-    
-    IntrusiveSharingPtr& 
-    operator= (const IntrusiveSharingPtr& rhs) 
-    {
-        reset(rhs.get());
-        return *this;
-    }
-    
-    template <class X> IntrusiveSharingPtr& 
-    operator= (const IntrusiveSharingPtr<X>& rhs) 
-    {
-        reset(rhs.get());
-        return *this;
-    }
-    
-    IntrusiveSharingPtr& 
-    operator= (T *ptr) 
-    {
-        reset(ptr);
-        return *this;
-    }
-    
-    ~IntrusiveSharingPtr() 
-    {
-        release_shared(); 
-#if defined (LLDB_CONFIGURATION_DEBUG) || defined (LLDB_CONFIGURATION_RELEASE)
-        // NULL out the pointer in objects which can help with leaks detection.
-        // We don't enable this for LLDB_CONFIGURATION_BUILD_AND_INTEGRATION or
-        // when none of the LLDB_CONFIGURATION_XXX macros are defined since
-        // those would be builds for release. But for debug and release builds
-        // that are for development, we NULL out the pointers to catch potential
-        // issues.
-        ptr_ = nullptr; 
-#endif  // #if defined (LLDB_CONFIGURATION_DEBUG) || defined (LLDB_CONFIGURATION_RELEASE)
-    }
-    
-    T& 
-    operator*() const 
-    {
-        return *ptr_; 
-    }
-    
-    T* 
-    operator->() const
-    {
-        return ptr_; 
-    }
-    
-    T* 
-    get() const
-    {
-        return ptr_; 
-    }
-    
-    explicit operator bool() const
-    {
-        return ptr_ != 0;
-    }
-    
-    void 
-    swap (IntrusiveSharingPtr& rhs) 
-    {
-        std::swap(ptr_, rhs.ptr_);
-#if defined (ENABLE_SP_LOGGING)
-        track_sp (this, ptr_, use_count());
-        track_sp (&rhs, rhs.ptr_, rhs.use_count());
+  typedef T element_type;
+
+  explicit IntrusiveSharingPtr() : ptr_(0) {}
+
+  explicit IntrusiveSharingPtr(T *ptr) : ptr_(ptr) { add_shared(); }
+
+  IntrusiveSharingPtr(const IntrusiveSharingPtr &rhs) : ptr_(rhs.ptr_) {
+    add_shared();
+  }
+
+  template <class X>
+  IntrusiveSharingPtr(const IntrusiveSharingPtr<X> &rhs) : ptr_(rhs.get()) {
+    add_shared();
+  }
+
+  IntrusiveSharingPtr &operator=(const IntrusiveSharingPtr &rhs) {
+    reset(rhs.get());
+    return *this;
+  }
+
+  template <class X>
+  IntrusiveSharingPtr &operator=(const IntrusiveSharingPtr<X> &rhs) {
+    reset(rhs.get());
+    return *this;
+  }
+
+  IntrusiveSharingPtr &operator=(T *ptr) {
+    reset(ptr);
+    return *this;
+  }
+
+  ~IntrusiveSharingPtr() {
+    release_shared();
+#if defined(LLDB_CONFIGURATION_DEBUG) || defined(LLDB_CONFIGURATION_RELEASE)
+    // NULL out the pointer in objects which can help with leaks detection.
+    // We don't enable this for LLDB_CONFIGURATION_BUILD_AND_INTEGRATION or
+    // when none of the LLDB_CONFIGURATION_XXX macros are defined since
+    // those would be builds for release. But for debug and release builds
+    // that are for development, we NULL out the pointers to catch potential
+    // issues.
+    ptr_ = nullptr;
+#endif // #if defined (LLDB_CONFIGURATION_DEBUG) || defined
+       // (LLDB_CONFIGURATION_RELEASE)
+  }
+
+  T &operator*() const { return *ptr_; }
+
+  T *operator->() const { return ptr_; }
+
+  T *get() const { return ptr_; }
+
+  explicit operator bool() const { return ptr_ != 0; }
+
+  void swap(IntrusiveSharingPtr &rhs) {
+    std::swap(ptr_, rhs.ptr_);
+#if defined(ENABLE_SP_LOGGING)
+    track_sp(this, ptr_, use_count());
+    track_sp(&rhs, rhs.ptr_, rhs.use_count());
 #endif
-    }
+  }
 
-    void 
-    reset(T* ptr = nullptr) 
-    {
-        IntrusiveSharingPtr(ptr).swap(*this);
-    }
+  void reset(T *ptr = nullptr) { IntrusiveSharingPtr(ptr).swap(*this); }
 
-    long
-    use_count () const
-    {
-        if (ptr_)
-            return ptr_->use_count();
-        return 0;
-    }
-    
-    bool
-    unique () const
-    {
-        return use_count () == 1;
-    }
+  long use_count() const {
+    if (ptr_)
+      return ptr_->use_count();
+    return 0;
+  }
+
+  bool unique() const { return use_count() == 1; }
 
 private:
-    element_type *ptr_;
-    
-    void
-    add_shared() 
-    {
-        if (ptr_) 
-        {
-            ptr_->add_shared(); 
-#if defined (ENABLE_SP_LOGGING)
-            track_sp (this, ptr_, ptr_->use_count());
+  element_type *ptr_;
+
+  void add_shared() {
+    if (ptr_) {
+      ptr_->add_shared();
+#if defined(ENABLE_SP_LOGGING)
+      track_sp(this, ptr_, ptr_->use_count());
 #endif
-        }
     }
-    void
-    release_shared()
-    { 
-        if (ptr_) 
-        {
-#if defined (ENABLE_SP_LOGGING)
-            track_sp (this, nullptr, ptr_->use_count() - 1);
+  }
+  void release_shared() {
+    if (ptr_) {
+#if defined(ENABLE_SP_LOGGING)
+      track_sp(this, nullptr, ptr_->use_count() - 1);
 #endif
-            ptr_->release_shared(); 
-        }
+      ptr_->release_shared();
     }
+  }
 };
 
-template<class T, class U>
-inline bool operator== (const IntrusiveSharingPtr<T>& lhs, const IntrusiveSharingPtr<U>& rhs)
-{
-    return lhs.get() == rhs.get();
+template <class T, class U>
+inline bool operator==(const IntrusiveSharingPtr<T> &lhs,
+                       const IntrusiveSharingPtr<U> &rhs) {
+  return lhs.get() == rhs.get();
 }
 
-template<class T, class U>
-inline bool operator!= (const IntrusiveSharingPtr<T>& lhs, const IntrusiveSharingPtr<U>& rhs)
-{
-    return lhs.get() != rhs.get();
+template <class T, class U>
+inline bool operator!=(const IntrusiveSharingPtr<T> &lhs,
+                       const IntrusiveSharingPtr<U> &rhs) {
+  return lhs.get() != rhs.get();
 }
 
-template<class T, class U>
-inline bool operator== (const IntrusiveSharingPtr<T>& lhs, U* rhs)
-{
-    return lhs.get() == rhs;
+template <class T, class U>
+inline bool operator==(const IntrusiveSharingPtr<T> &lhs, U *rhs) {
+  return lhs.get() == rhs;
 }
 
-template<class T, class U>
-inline bool operator!= (const IntrusiveSharingPtr<T>& lhs, U* rhs)
-{
-    return lhs.get() != rhs;
+template <class T, class U>
+inline bool operator!=(const IntrusiveSharingPtr<T> &lhs, U *rhs) {
+  return lhs.get() != rhs;
 }
 
-template<class T, class U>
-inline bool operator== (T* lhs, const IntrusiveSharingPtr<U>& rhs)
-{
-    return lhs == rhs.get();
+template <class T, class U>
+inline bool operator==(T *lhs, const IntrusiveSharingPtr<U> &rhs) {
+  return lhs == rhs.get();
 }
 
-template<class T, class U>
-inline bool operator!= (T* lhs, const IntrusiveSharingPtr<U>& rhs)
-{
-    return lhs != rhs.get();
+template <class T, class U>
+inline bool operator!=(T *lhs, const IntrusiveSharingPtr<U> &rhs) {
+  return lhs != rhs.get();
 }
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Utility/StdStringExtractor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StdStringExtractor.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/StdStringExtractor.h (original)
+++ lldb/trunk/include/lldb/Utility/StdStringExtractor.h Tue Sep  6 15:57:50 2016
@@ -12,170 +12,114 @@
 
 // C Includes
 // C++ Includes
-#include <string>
 #include <stdint.h>
+#include <string>
 
 // Other libraries and framework includes
 // Project includes
 
 // Based on StringExtractor, with the added limitation that this file should not
 // take a dependency on LLVM, as it is used from debugserver.
-class StdStringExtractor
-{
+class StdStringExtractor {
 public:
+  enum { BigEndian = 0, LittleEndian = 1 };
+  //------------------------------------------------------------------
+  // Constructors and Destructors
+  //------------------------------------------------------------------
+  StdStringExtractor();
+  StdStringExtractor(const char *packet_cstr);
+  StdStringExtractor(const StdStringExtractor &rhs);
+  virtual ~StdStringExtractor();
+
+  //------------------------------------------------------------------
+  // Operators
+  //------------------------------------------------------------------
+  const StdStringExtractor &operator=(const StdStringExtractor &rhs);
+
+  // Returns true if the file position is still valid for the data
+  // contained in this string extractor object.
+  bool IsGood() const { return m_index != UINT64_MAX; }
+
+  uint64_t GetFilePos() const { return m_index; }
+
+  void SetFilePos(uint32_t idx) { m_index = idx; }
+
+  void Clear() {
+    m_packet.clear();
+    m_index = 0;
+  }
+
+  void SkipSpaces();
+
+  std::string &GetStringRef() { return m_packet; }
+
+  const std::string &GetStringRef() const { return m_packet; }
+
+  bool Empty() { return m_packet.empty(); }
+
+  size_t GetBytesLeft() {
+    if (m_index < m_packet.size())
+      return m_packet.size() - m_index;
+    return 0;
+  }
+
+  char GetChar(char fail_value = '\0');
+
+  char PeekChar(char fail_value = '\0') {
+    const char *cstr = Peek();
+    if (cstr)
+      return cstr[0];
+    return fail_value;
+  }
+
+  int DecodeHexU8();
+
+  uint8_t GetHexU8(uint8_t fail_value = 0, bool set_eof_on_fail = true);
+
+  bool GetHexU8Ex(uint8_t &ch, bool set_eof_on_fail = true);
+
+  bool GetNameColonValue(std::string &name, std::string &value);
+
+  int32_t GetS32(int32_t fail_value, int base = 0);
+
+  uint32_t GetU32(uint32_t fail_value, int base = 0);
+
+  int64_t GetS64(int64_t fail_value, int base = 0);
+
+  uint64_t GetU64(uint64_t fail_value, int base = 0);
+
+  uint32_t GetHexMaxU32(bool little_endian, uint32_t fail_value);
+
+  uint64_t GetHexMaxU64(bool little_endian, uint64_t fail_value);
+
+  size_t GetHexBytes(void *dst, size_t dst_len, uint8_t fail_fill_value);
+
+  size_t GetHexBytesAvail(void *dst, size_t dst_len);
+
+  uint64_t GetHexWithFixedSize(uint32_t byte_size, bool little_endian,
+                               uint64_t fail_value);
+
+  size_t GetHexByteString(std::string &str);
+
+  size_t GetHexByteStringFixedLength(std::string &str, uint32_t nibble_length);
+
+  size_t GetHexByteStringTerminatedBy(std::string &str, char terminator);
 
-    enum {
-        BigEndian = 0,
-        LittleEndian = 1
-    };
-    //------------------------------------------------------------------
-    // Constructors and Destructors
-    //------------------------------------------------------------------
-    StdStringExtractor();
-    StdStringExtractor(const char *packet_cstr);
-    StdStringExtractor(const StdStringExtractor& rhs);
-    virtual ~StdStringExtractor();
-
-    //------------------------------------------------------------------
-    // Operators
-    //------------------------------------------------------------------
-    const StdStringExtractor&
-    operator=(const StdStringExtractor& rhs);
-
-    // Returns true if the file position is still valid for the data
-    // contained in this string extractor object.
-    bool
-    IsGood() const
-    {
-        return m_index != UINT64_MAX;
-    }
-
-    uint64_t
-    GetFilePos () const
-    {
-        return m_index;
-    }
-
-    void
-    SetFilePos (uint32_t idx)
-    {
-        m_index = idx;
-    }
-
-    void
-    Clear ()
-    {
-        m_packet.clear();
-        m_index = 0;
-    }
-
-    void
-    SkipSpaces ();
-
-    std::string &
-    GetStringRef ()
-    {
-        return m_packet;
-    }
-
-    const std::string &
-    GetStringRef () const
-    {
-        return m_packet;
-    }
-
-    bool
-    Empty()
-    {
-        return m_packet.empty();
-    }
-
-    size_t
-    GetBytesLeft ()
-    {
-        if (m_index < m_packet.size())
-            return m_packet.size() - m_index;
-        return 0;
-    }
-
-    char
-    GetChar (char fail_value = '\0');
-
-    char
-    PeekChar (char fail_value = '\0')
-    {
-        const char *cstr = Peek();
-        if (cstr)
-            return cstr[0];
-        return fail_value;
-    }
-
-    int
-    DecodeHexU8();
-
-    uint8_t
-    GetHexU8 (uint8_t fail_value = 0, bool set_eof_on_fail = true);
-
-    bool
-    GetHexU8Ex (uint8_t& ch, bool set_eof_on_fail = true);
-
-    bool
-    GetNameColonValue (std::string &name, std::string &value);
-
-    int32_t
-    GetS32 (int32_t fail_value, int base = 0);
-
-    uint32_t
-    GetU32 (uint32_t fail_value, int base = 0);
-
-    int64_t
-    GetS64 (int64_t fail_value, int base = 0);
-    
-    uint64_t
-    GetU64 (uint64_t fail_value, int base = 0);
-
-    uint32_t
-    GetHexMaxU32 (bool little_endian, uint32_t fail_value);
-
-    uint64_t
-    GetHexMaxU64 (bool little_endian, uint64_t fail_value);
-
-    size_t
-    GetHexBytes (void *dst, size_t dst_len, uint8_t fail_fill_value);
-
-    size_t
-    GetHexBytesAvail (void *dst, size_t dst_len);
-
-    uint64_t
-    GetHexWithFixedSize (uint32_t byte_size, bool little_endian, uint64_t fail_value);
-
-    size_t
-    GetHexByteString (std::string &str);
-
-    size_t
-    GetHexByteStringFixedLength (std::string &str, uint32_t nibble_length);
-
-    size_t
-    GetHexByteStringTerminatedBy (std::string &str,
-                                  char terminator);
-    
-    const char *
-    Peek ()
-    {
-        if (m_index < m_packet.size())
-            return m_packet.c_str() + m_index;
-        return nullptr;
-    }
+  const char *Peek() {
+    if (m_index < m_packet.size())
+      return m_packet.c_str() + m_index;
+    return nullptr;
+  }
 
 protected:
-    //------------------------------------------------------------------
-    // For StdStringExtractor only
-    //------------------------------------------------------------------
-    std::string m_packet;   // The string in which to extract data.
-    uint64_t m_index;       // When extracting data from a packet, this index
-                            // will march along as things get extracted. If set
-                            // to UINT64_MAX the end of the packet data was
-                            // reached when decoding information
+  //------------------------------------------------------------------
+  // For StdStringExtractor only
+  //------------------------------------------------------------------
+  std::string m_packet; // The string in which to extract data.
+  uint64_t m_index;     // When extracting data from a packet, this index
+                        // will march along as things get extracted. If set
+                        // to UINT64_MAX the end of the packet data was
+                        // reached when decoding information
 };
 
-#endif  // utility_StringExtractor_h_
+#endif // utility_StringExtractor_h_

Modified: lldb/trunk/include/lldb/Utility/StringExtractor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StringExtractor.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/StringExtractor.h (original)
+++ lldb/trunk/include/lldb/Utility/StringExtractor.h Tue Sep  6 15:57:50 2016
@@ -12,184 +12,125 @@
 
 // C Includes
 // C++ Includes
-#include <string>
 #include <stdint.h>
+#include <string>
 
 // Other libraries and framework includes
 // Project includes
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/StringRef.h"
 
-class StringExtractor
-{
+class StringExtractor {
 public:
+  enum { BigEndian = 0, LittleEndian = 1 };
+  //------------------------------------------------------------------
+  // Constructors and Destructors
+  //------------------------------------------------------------------
+  StringExtractor();
+  StringExtractor(llvm::StringRef packet_str);
+  StringExtractor(const char *packet_cstr);
+  StringExtractor(const StringExtractor &rhs);
+  virtual ~StringExtractor();
+
+  //------------------------------------------------------------------
+  // Operators
+  //------------------------------------------------------------------
+  const StringExtractor &operator=(const StringExtractor &rhs);
+
+  void Reset(llvm::StringRef str) {
+    m_packet = str;
+    m_index = 0;
+  }
+
+  // Returns true if the file position is still valid for the data
+  // contained in this string extractor object.
+  bool IsGood() const { return m_index != UINT64_MAX; }
+
+  uint64_t GetFilePos() const { return m_index; }
+
+  void SetFilePos(uint32_t idx) { m_index = idx; }
+
+  void Clear() {
+    m_packet.clear();
+    m_index = 0;
+  }
+
+  void SkipSpaces();
+
+  std::string &GetStringRef() { return m_packet; }
+
+  const std::string &GetStringRef() const { return m_packet; }
+
+  bool Empty() { return m_packet.empty(); }
+
+  size_t GetBytesLeft() {
+    if (m_index < m_packet.size())
+      return m_packet.size() - m_index;
+    return 0;
+  }
+
+  char GetChar(char fail_value = '\0');
+
+  char PeekChar(char fail_value = '\0') {
+    const char *cstr = Peek();
+    if (cstr)
+      return cstr[0];
+    return fail_value;
+  }
+
+  int DecodeHexU8();
+
+  uint8_t GetHexU8(uint8_t fail_value = 0, bool set_eof_on_fail = true);
+
+  bool GetHexU8Ex(uint8_t &ch, bool set_eof_on_fail = true);
+
+  bool GetNameColonValue(llvm::StringRef &name, llvm::StringRef &value);
+
+  int32_t GetS32(int32_t fail_value, int base = 0);
+
+  uint32_t GetU32(uint32_t fail_value, int base = 0);
+
+  int64_t GetS64(int64_t fail_value, int base = 0);
+
+  uint64_t GetU64(uint64_t fail_value, int base = 0);
+
+  uint32_t GetHexMaxU32(bool little_endian, uint32_t fail_value);
+
+  uint64_t GetHexMaxU64(bool little_endian, uint64_t fail_value);
+
+  size_t GetHexBytes(llvm::MutableArrayRef<uint8_t> dest,
+                     uint8_t fail_fill_value);
+
+  size_t GetHexBytesAvail(llvm::MutableArrayRef<uint8_t> dest);
+
+  uint64_t GetHexWithFixedSize(uint32_t byte_size, bool little_endian,
+                               uint64_t fail_value);
+
+  size_t GetHexByteString(std::string &str);
+
+  size_t GetHexByteStringFixedLength(std::string &str, uint32_t nibble_length);
+
+  size_t GetHexByteStringTerminatedBy(std::string &str, char terminator);
 
-    enum {
-        BigEndian = 0,
-        LittleEndian = 1
-    };
-    //------------------------------------------------------------------
-    // Constructors and Destructors
-    //------------------------------------------------------------------
-    StringExtractor();
-    StringExtractor(llvm::StringRef packet_str);
-    StringExtractor(const char *packet_cstr);
-    StringExtractor(const StringExtractor& rhs);
-    virtual ~StringExtractor();
-
-    //------------------------------------------------------------------
-    // Operators
-    //------------------------------------------------------------------
-    const StringExtractor&
-    operator=(const StringExtractor& rhs);
-
-    void
-    Reset(llvm::StringRef str)
-    {
-        m_packet = str;
-        m_index = 0;
-    }
-
-    // Returns true if the file position is still valid for the data
-    // contained in this string extractor object.
-    bool
-    IsGood() const
-    {
-        return m_index != UINT64_MAX;
-    }
-
-    uint64_t
-    GetFilePos () const
-    {
-        return m_index;
-    }
-
-    void
-    SetFilePos (uint32_t idx)
-    {
-        m_index = idx;
-    }
-
-    void
-    Clear ()
-    {
-        m_packet.clear();
-        m_index = 0;
-    }
-
-    void
-    SkipSpaces ();
-
-    std::string &
-    GetStringRef ()
-    {
-        return m_packet;
-    }
-
-    const std::string &
-    GetStringRef () const
-    {
-        return m_packet;
-    }
-
-    bool
-    Empty()
-    {
-        return m_packet.empty();
-    }
-
-    size_t
-    GetBytesLeft ()
-    {
-        if (m_index < m_packet.size())
-            return m_packet.size() - m_index;
-        return 0;
-    }
-
-    char
-    GetChar (char fail_value = '\0');
-
-    char
-    PeekChar (char fail_value = '\0')
-    {
-        const char *cstr = Peek();
-        if (cstr)
-            return cstr[0];
-        return fail_value;
-    }
-
-    int
-    DecodeHexU8();
-
-    uint8_t
-    GetHexU8 (uint8_t fail_value = 0, bool set_eof_on_fail = true);
-
-    bool
-    GetHexU8Ex (uint8_t& ch, bool set_eof_on_fail = true);
-
-    bool
-    GetNameColonValue(llvm::StringRef &name, llvm::StringRef &value);
-
-    int32_t
-    GetS32 (int32_t fail_value, int base = 0);
-
-    uint32_t
-    GetU32 (uint32_t fail_value, int base = 0);
-
-    int64_t
-    GetS64 (int64_t fail_value, int base = 0);
-    
-    uint64_t
-    GetU64 (uint64_t fail_value, int base = 0);
-
-    uint32_t
-    GetHexMaxU32 (bool little_endian, uint32_t fail_value);
-
-    uint64_t
-    GetHexMaxU64 (bool little_endian, uint64_t fail_value);
-
-    size_t
-    GetHexBytes (llvm::MutableArrayRef<uint8_t> dest, uint8_t fail_fill_value);
-
-    size_t
-    GetHexBytesAvail (llvm::MutableArrayRef<uint8_t> dest);
-
-    uint64_t
-    GetHexWithFixedSize (uint32_t byte_size, bool little_endian, uint64_t fail_value);
-
-    size_t
-    GetHexByteString (std::string &str);
-
-    size_t
-    GetHexByteStringFixedLength (std::string &str, uint32_t nibble_length);
-
-    size_t
-    GetHexByteStringTerminatedBy (std::string &str,
-                                  char terminator);
-    
-    const char *
-    Peek ()
-    {
-        if (m_index < m_packet.size())
-            return m_packet.c_str() + m_index;
-        return nullptr;
-    }
+  const char *Peek() {
+    if (m_index < m_packet.size())
+      return m_packet.c_str() + m_index;
+    return nullptr;
+  }
 
 protected:
-    bool
-    fail()
-    {
-        m_index = UINT64_MAX;
-        return false;
-    }
-    //------------------------------------------------------------------
-    // For StringExtractor only
-    //------------------------------------------------------------------
-    std::string m_packet;   // The string in which to extract data.
-    uint64_t m_index;       // When extracting data from a packet, this index
-                            // will march along as things get extracted. If set
-                            // to UINT64_MAX the end of the packet data was
-                            // reached when decoding information
+  bool fail() {
+    m_index = UINT64_MAX;
+    return false;
+  }
+  //------------------------------------------------------------------
+  // For StringExtractor only
+  //------------------------------------------------------------------
+  std::string m_packet; // The string in which to extract data.
+  uint64_t m_index;     // When extracting data from a packet, this index
+                        // will march along as things get extracted. If set
+                        // to UINT64_MAX the end of the packet data was
+                        // reached when decoding information
 };
 
-#endif  // utility_StringExtractor_h_
+#endif // utility_StringExtractor_h_

Modified: lldb/trunk/include/lldb/Utility/StringLexer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StringLexer.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/StringLexer.h (original)
+++ lldb/trunk/include/lldb/Utility/StringLexer.h Tue Sep  6 15:57:50 2016
@@ -1,4 +1,5 @@
-//===--------------------- StringLexer.h -------------------------*- C++ -*-===//
+//===--------------------- StringLexer.h -------------------------*- C++
+//-*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -15,57 +16,45 @@
 #include <string>
 
 namespace lldb_utility {
-    
-class StringLexer
-{
+
+class StringLexer {
 public:
-    typedef std::string::size_type Position;
-    typedef std::string::size_type Size;
+  typedef std::string::size_type Position;
+  typedef std::string::size_type Size;
+
+  typedef std::string::value_type Character;
+
+  StringLexer(std::string s);
+
+  StringLexer(const StringLexer &rhs);
+
+  // These APIs are not bounds-checked.  Use HasAtLeast() if you're not sure.
+  Character Peek();
+
+  bool NextIf(Character c);
+
+  std::pair<bool, Character> NextIf(std::initializer_list<Character> cs);
+
+  bool AdvanceIf(const std::string &token);
+
+  Character Next();
+
+  bool HasAtLeast(Size s);
+
+  bool HasAny(Character c);
+
+  std::string GetUnlexed();
+
+  // This will assert if there are less than s characters preceding the cursor.
+  void PutBack(Size s);
+
+  StringLexer &operator=(const StringLexer &rhs);
 
-    typedef std::string::value_type Character;
-    
-    StringLexer (std::string s);
-    
-    StringLexer (const StringLexer& rhs);
-    
-    // These APIs are not bounds-checked.  Use HasAtLeast() if you're not sure.
-    Character
-    Peek ();
-    
-    bool
-    NextIf (Character c);
-    
-    std::pair<bool, Character>
-    NextIf (std::initializer_list<Character> cs);
-    
-    bool
-    AdvanceIf (const std::string& token);
-    
-    Character
-    Next ();
-    
-    bool
-    HasAtLeast (Size s);
-    
-    bool
-    HasAny (Character c);
-    
-    std::string
-    GetUnlexed ();
-    
-    // This will assert if there are less than s characters preceding the cursor.
-    void
-    PutBack (Size s);
-    
-    StringLexer&
-    operator = (const StringLexer& rhs);
-    
 private:
-    std::string m_data;
-    Position m_position;
-    
-    void
-    Consume();
+  std::string m_data;
+  Position m_position;
+
+  void Consume();
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Utility/TaskPool.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/TaskPool.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/TaskPool.h (original)
+++ lldb/trunk/include/lldb/Utility/TaskPool.h Tue Sep  6 15:57:50 2016
@@ -23,7 +23,7 @@
 // warnings in the Concurrency Runtime.  This can be removed when we switch to
 // MSVC 2015
 #pragma warning(push)
-#pragma warning(disable:4062)
+#pragma warning(disable : 4062)
 #endif
 
 #include <cassert>
@@ -34,185 +34,174 @@
 #include <thread>
 #include <vector>
 
-// Global TaskPool class for running tasks in parallel on a set of worker thread created the first
-// time the task pool is used. The TaskPool provide no guarantee about the order the task will be run
-// and about what tasks will run in parallel. None of the task added to the task pool should block
-// on something (mutex, future, condition variable) what will be set only by the completion of an
+// Global TaskPool class for running tasks in parallel on a set of worker thread
+// created the first
+// time the task pool is used. The TaskPool provide no guarantee about the order
+// the task will be run
+// and about what tasks will run in parallel. None of the task added to the task
+// pool should block
+// on something (mutex, future, condition variable) what will be set only by the
+// completion of an
 // other task on the task pool as they may run on the same thread sequentally.
-class TaskPool
-{
+class TaskPool {
 public:
-    // Add a new task to the task pool and return a std::future belonging to the newly created task.
-    // The caller of this function has to wait on the future for this task to complete.
-    template<typename F, typename... Args>
-    static std::future<typename std::result_of<F(Args...)>::type>
-    AddTask(F&& f, Args&&... args);
-
-    // Run all of the specified tasks on the task pool and wait until all of them are finished
-    // before returning. This method is intended to be used for small number tasks where listing
-    // them as function arguments is acceptable. For running large number of tasks you should use
-    // AddTask for each task and then call wait() on each returned future.
-    template<typename... T>
-    static void
-    RunTasks(T&&... tasks);
+  // Add a new task to the task pool and return a std::future belonging to the
+  // newly created task.
+  // The caller of this function has to wait on the future for this task to
+  // complete.
+  template <typename F, typename... Args>
+  static std::future<typename std::result_of<F(Args...)>::type>
+  AddTask(F &&f, Args &&... args);
+
+  // Run all of the specified tasks on the task pool and wait until all of them
+  // are finished
+  // before returning. This method is intended to be used for small number tasks
+  // where listing
+  // them as function arguments is acceptable. For running large number of tasks
+  // you should use
+  // AddTask for each task and then call wait() on each returned future.
+  template <typename... T> static void RunTasks(T &&... tasks);
 
 private:
-    TaskPool() = delete;
+  TaskPool() = delete;
 
-    template<typename... T>
-    struct RunTaskImpl;
+  template <typename... T> struct RunTaskImpl;
 
-    static void
-    AddTaskImpl(std::function<void()>&& task_fn);
+  static void AddTaskImpl(std::function<void()> &&task_fn);
 };
 
-// Wrapper class around the global TaskPool implementation to make it possible to create a set of
-// tasks and then wait for the tasks to be completed by the WaitForNextCompletedTask call. This
-// class should be used when WaitForNextCompletedTask is needed because this class add no other
-// extra functionality to the TaskPool class and it have a very minor performance overhead.
-template <typename T> // The return type of the tasks what will be added to this task runner
-class TaskRunner
-{
+// Wrapper class around the global TaskPool implementation to make it possible
+// to create a set of
+// tasks and then wait for the tasks to be completed by the
+// WaitForNextCompletedTask call. This
+// class should be used when WaitForNextCompletedTask is needed because this
+// class add no other
+// extra functionality to the TaskPool class and it have a very minor
+// performance overhead.
+template <typename T> // The return type of the tasks what will be added to this
+                      // task runner
+                      class TaskRunner {
 public:
-    // Add a task to the task runner what will also add the task to the global TaskPool. The
-    // function doesn't return the std::future for the task because it will be supplied by the
-    // WaitForNextCompletedTask after the task is completed.
-    template<typename F, typename... Args>
-    void
-    AddTask(F&& f, Args&&... args);
-
-    // Wait for the next task in this task runner to finish and then return the std::future what
-    // belongs to the finished task. If there is no task in this task runner (neither pending nor
-    // comleted) then this function will return an invalid future. Usually this function should be
-    // called in a loop processing the results of the tasks until it returns an invalid std::future
-    // what means that all task in this task runner is completed.
-    std::future<T>
-    WaitForNextCompletedTask();
-
-    // Convenience method to wait for all task in this TaskRunner to finish. Do NOT use this class
-    // just because of this method. Use TaskPool instead and wait for each std::future returned by
-    // AddTask in a loop.
-    void
-    WaitForAllTasks();
+  // Add a task to the task runner what will also add the task to the global
+  // TaskPool. The
+  // function doesn't return the std::future for the task because it will be
+  // supplied by the
+  // WaitForNextCompletedTask after the task is completed.
+  template <typename F, typename... Args> void AddTask(F &&f, Args &&... args);
+
+  // Wait for the next task in this task runner to finish and then return the
+  // std::future what
+  // belongs to the finished task. If there is no task in this task runner
+  // (neither pending nor
+  // comleted) then this function will return an invalid future. Usually this
+  // function should be
+  // called in a loop processing the results of the tasks until it returns an
+  // invalid std::future
+  // what means that all task in this task runner is completed.
+  std::future<T> WaitForNextCompletedTask();
+
+  // Convenience method to wait for all task in this TaskRunner to finish. Do
+  // NOT use this class
+  // just because of this method. Use TaskPool instead and wait for each
+  // std::future returned by
+  // AddTask in a loop.
+  void WaitForAllTasks();
 
 private:
-    std::list<std::future<T>> m_ready;
-    std::list<std::future<T>> m_pending;
-    std::mutex                m_mutex;
-    std::condition_variable   m_cv;
+  std::list<std::future<T>> m_ready;
+  std::list<std::future<T>> m_pending;
+  std::mutex m_mutex;
+  std::condition_variable m_cv;
 };
 
-template<typename F, typename... Args>
+template <typename F, typename... Args>
 std::future<typename std::result_of<F(Args...)>::type>
-TaskPool::AddTask(F&& f, Args&&... args)
-{
-    auto task_sp = std::make_shared<std::packaged_task<typename std::result_of<F(Args...)>::type()>>(
-        std::bind(std::forward<F>(f), std::forward<Args>(args)...));
-
-    AddTaskImpl([task_sp]() { (*task_sp)(); });
-
-    return task_sp->get_future();
-}
-
-template<typename... T>
-void
-TaskPool::RunTasks(T&&... tasks)
-{
-    RunTaskImpl<T...>::Run(std::forward<T>(tasks)...);
-}
-
-template<typename Head, typename... Tail>
-struct TaskPool::RunTaskImpl<Head, Tail...>
-{
-    static void
-    Run(Head&& h, Tail&&... t)
-    {
-        auto f = AddTask(std::forward<Head>(h));
-        RunTaskImpl<Tail...>::Run(std::forward<Tail>(t)...);
-        f.wait();
-    }
+TaskPool::AddTask(F &&f, Args &&... args) {
+  auto task_sp = std::make_shared<
+      std::packaged_task<typename std::result_of<F(Args...)>::type()>>(
+      std::bind(std::forward<F>(f), std::forward<Args>(args)...));
+
+  AddTaskImpl([task_sp]() { (*task_sp)(); });
+
+  return task_sp->get_future();
+}
+
+template <typename... T> void TaskPool::RunTasks(T &&... tasks) {
+  RunTaskImpl<T...>::Run(std::forward<T>(tasks)...);
+}
+
+template <typename Head, typename... Tail>
+struct TaskPool::RunTaskImpl<Head, Tail...> {
+  static void Run(Head &&h, Tail &&... t) {
+    auto f = AddTask(std::forward<Head>(h));
+    RunTaskImpl<Tail...>::Run(std::forward<Tail>(t)...);
+    f.wait();
+  }
 };
 
-template<>
-struct TaskPool::RunTaskImpl<>
-{
-    static void
-    Run() {}
+template <> struct TaskPool::RunTaskImpl<> {
+  static void Run() {}
 };
 
 template <typename T>
-template<typename F, typename... Args>
-void
-TaskRunner<T>::AddTask(F&& f, Args&&... args)
-{
-    std::unique_lock<std::mutex> lock(m_mutex);
-    auto it = m_pending.emplace(m_pending.end());
-    *it = std::move(TaskPool::AddTask(
-        [this, it](F f, Args... args)
-        {
-            T&& r = f(std::forward<Args>(args)...);
-
-            std::unique_lock<std::mutex> lock(this->m_mutex);
-            this->m_ready.splice(this->m_ready.end(), this->m_pending, it);
-            lock.unlock();
-
-            this->m_cv.notify_one();
-            return r;
-        },
-        std::forward<F>(f),
-        std::forward<Args>(args)...));
+template <typename F, typename... Args>
+void TaskRunner<T>::AddTask(F &&f, Args &&... args) {
+  std::unique_lock<std::mutex> lock(m_mutex);
+  auto it = m_pending.emplace(m_pending.end());
+  *it = std::move(TaskPool::AddTask(
+      [this, it](F f, Args... args) {
+        T &&r = f(std::forward<Args>(args)...);
+
+        std::unique_lock<std::mutex> lock(this->m_mutex);
+        this->m_ready.splice(this->m_ready.end(), this->m_pending, it);
+        lock.unlock();
+
+        this->m_cv.notify_one();
+        return r;
+      },
+      std::forward<F>(f), std::forward<Args>(args)...));
 }
 
 template <>
-template<typename F, typename... Args>
-void
-TaskRunner<void>::AddTask(F&& f, Args&&... args)
-{
-    std::unique_lock<std::mutex> lock(m_mutex);
-    auto it = m_pending.emplace(m_pending.end());
-    *it = std::move(TaskPool::AddTask(
-        [this, it](F f, Args... args)
-        {
-            f(std::forward<Args>(args)...);
-
-            std::unique_lock<std::mutex> lock(this->m_mutex);
-            this->m_ready.emplace_back(std::move(*it));
-            this->m_pending.erase(it);
-            lock.unlock();
-
-            this->m_cv.notify_one();
-        },
-        std::forward<F>(f),
-        std::forward<Args>(args)...));
-}
+template <typename F, typename... Args>
+void TaskRunner<void>::AddTask(F &&f, Args &&... args) {
+  std::unique_lock<std::mutex> lock(m_mutex);
+  auto it = m_pending.emplace(m_pending.end());
+  *it = std::move(TaskPool::AddTask(
+      [this, it](F f, Args... args) {
+        f(std::forward<Args>(args)...);
 
-template <typename T>
-std::future<T>
-TaskRunner<T>::WaitForNextCompletedTask()
-{
-    std::unique_lock<std::mutex> lock(m_mutex);
-    if (m_ready.empty() && m_pending.empty())
-        return std::future<T>(); // No more tasks
-
-    if (m_ready.empty())
-        m_cv.wait(lock, [this](){ return !this->m_ready.empty(); });
-
-    std::future<T> res = std::move(m_ready.front());
-    m_ready.pop_front();
-    
-    lock.unlock();
-    res.wait();
+        std::unique_lock<std::mutex> lock(this->m_mutex);
+        this->m_ready.emplace_back(std::move(*it));
+        this->m_pending.erase(it);
+        lock.unlock();
 
-    return std::move(res);
+        this->m_cv.notify_one();
+      },
+      std::forward<F>(f), std::forward<Args>(args)...));
 }
 
-template <typename T>
-void
-TaskRunner<T>::WaitForAllTasks()
-{
-    while (WaitForNextCompletedTask().valid());
+template <typename T> std::future<T> TaskRunner<T>::WaitForNextCompletedTask() {
+  std::unique_lock<std::mutex> lock(m_mutex);
+  if (m_ready.empty() && m_pending.empty())
+    return std::future<T>(); // No more tasks
+
+  if (m_ready.empty())
+    m_cv.wait(lock, [this]() { return !this->m_ready.empty(); });
+
+  std::future<T> res = std::move(m_ready.front());
+  m_ready.pop_front();
+
+  lock.unlock();
+  res.wait();
+
+  return std::move(res);
 }
 
+template <typename T> void TaskRunner<T>::WaitForAllTasks() {
+  while (WaitForNextCompletedTask().valid())
+    ;
+}
 
 #if defined(_MSC_VER)
 #pragma warning(pop)

Modified: lldb/trunk/include/lldb/lldb-defines.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-defines.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-defines.h (original)
+++ lldb/trunk/include/lldb/lldb-defines.h Tue Sep  6 15:57:50 2016
@@ -12,28 +12,28 @@
 
 #include "lldb/lldb-types.h"
 
-#if defined (_MSC_VER)
-    #if defined(EXPORT_LIBLLDB)
-        #define  LLDB_API __declspec(dllexport)
-    #elif defined(IMPORT_LIBLLDB)
-        #define  LLDB_API __declspec(dllimport)
-    #else
-        #define LLDB_API
-    #endif
+#if defined(_MSC_VER)
+#if defined(EXPORT_LIBLLDB)
+#define LLDB_API __declspec(dllexport)
+#elif defined(IMPORT_LIBLLDB)
+#define LLDB_API __declspec(dllimport)
+#else
+#define LLDB_API
+#endif
 #else // defined (_MSC_VER)
-    #define LLDB_API
+#define LLDB_API
 #endif
 
 #if !defined(INT32_MAX)
-    #define INT32_MAX 2147483647
+#define INT32_MAX 2147483647
 #endif
 
 #if !defined(UINT32_MAX)
-    #define UINT32_MAX 4294967295U
+#define UINT32_MAX 4294967295U
 #endif
 
 #if !defined(UINT64_MAX)
-    #define UINT64_MAX 18446744073709551615ULL
+#define UINT64_MAX 18446744073709551615ULL
 #endif
 
 //----------------------------------------------------------------------
@@ -48,87 +48,97 @@
 //----------------------------------------------------------------------
 // LLDB defines
 //----------------------------------------------------------------------
-#define LLDB_GENERIC_ERROR              UINT32_MAX
+#define LLDB_GENERIC_ERROR UINT32_MAX
 
 //----------------------------------------------------------------------
 // Breakpoints
 //----------------------------------------------------------------------
-#define LLDB_INVALID_BREAK_ID           0
-#define LLDB_DEFAULT_BREAK_SIZE         0
-#define LLDB_BREAK_ID_IS_VALID(bid)     ((bid) != (LLDB_INVALID_BREAK_ID))
-#define LLDB_BREAK_ID_IS_INTERNAL(bid)  ((bid) < 0)
+#define LLDB_INVALID_BREAK_ID 0
+#define LLDB_DEFAULT_BREAK_SIZE 0
+#define LLDB_BREAK_ID_IS_VALID(bid) ((bid) != (LLDB_INVALID_BREAK_ID))
+#define LLDB_BREAK_ID_IS_INTERNAL(bid) ((bid) < 0)
 
 //----------------------------------------------------------------------
 // Watchpoints
 //----------------------------------------------------------------------
-#define LLDB_INVALID_WATCH_ID           0
-#define LLDB_WATCH_ID_IS_VALID(uid)     ((uid) != (LLDB_INVALID_WATCH_ID))
-#define LLDB_WATCH_TYPE_READ            (1u << 0)
-#define LLDB_WATCH_TYPE_WRITE           (1u << 1)
-#define LLDB_WATCH_TYPE_IS_VALID(type)  ((type | LLDB_WATCH_TYPE_READ) || (type | LLDB_WATCH_TYPE_WRITE))
+#define LLDB_INVALID_WATCH_ID 0
+#define LLDB_WATCH_ID_IS_VALID(uid) ((uid) != (LLDB_INVALID_WATCH_ID))
+#define LLDB_WATCH_TYPE_READ (1u << 0)
+#define LLDB_WATCH_TYPE_WRITE (1u << 1)
+#define LLDB_WATCH_TYPE_IS_VALID(type)                                         \
+  ((type | LLDB_WATCH_TYPE_READ) || (type | LLDB_WATCH_TYPE_WRITE))
 
 //----------------------------------------------------------------------
 // Generic Register Numbers
 //----------------------------------------------------------------------
-#define LLDB_REGNUM_GENERIC_PC          0   // Program Counter
-#define LLDB_REGNUM_GENERIC_SP          1   // Stack Pointer
-#define LLDB_REGNUM_GENERIC_FP          2   // Frame Pointer
-#define LLDB_REGNUM_GENERIC_RA          3   // Return Address
-#define LLDB_REGNUM_GENERIC_FLAGS       4   // Processor flags register
-#define LLDB_REGNUM_GENERIC_ARG1        5   // The register that would contain pointer size or less argument 1 (if any)
-#define LLDB_REGNUM_GENERIC_ARG2        6   // The register that would contain pointer size or less argument 2 (if any)
-#define LLDB_REGNUM_GENERIC_ARG3        7   // The register that would contain pointer size or less argument 3 (if any)
-#define LLDB_REGNUM_GENERIC_ARG4        8   // The register that would contain pointer size or less argument 4 (if any)
-#define LLDB_REGNUM_GENERIC_ARG5        9   // The register that would contain pointer size or less argument 5 (if any)
-#define LLDB_REGNUM_GENERIC_ARG6        10  // The register that would contain pointer size or less argument 6 (if any)
-#define LLDB_REGNUM_GENERIC_ARG7        11  // The register that would contain pointer size or less argument 7 (if any)
-#define LLDB_REGNUM_GENERIC_ARG8        12  // The register that would contain pointer size or less argument 8 (if any)
+#define LLDB_REGNUM_GENERIC_PC 0    // Program Counter
+#define LLDB_REGNUM_GENERIC_SP 1    // Stack Pointer
+#define LLDB_REGNUM_GENERIC_FP 2    // Frame Pointer
+#define LLDB_REGNUM_GENERIC_RA 3    // Return Address
+#define LLDB_REGNUM_GENERIC_FLAGS 4 // Processor flags register
+#define LLDB_REGNUM_GENERIC_ARG1                                               \
+  5 // The register that would contain pointer size or less argument 1 (if any)
+#define LLDB_REGNUM_GENERIC_ARG2                                               \
+  6 // The register that would contain pointer size or less argument 2 (if any)
+#define LLDB_REGNUM_GENERIC_ARG3                                               \
+  7 // The register that would contain pointer size or less argument 3 (if any)
+#define LLDB_REGNUM_GENERIC_ARG4                                               \
+  8 // The register that would contain pointer size or less argument 4 (if any)
+#define LLDB_REGNUM_GENERIC_ARG5                                               \
+  9 // The register that would contain pointer size or less argument 5 (if any)
+#define LLDB_REGNUM_GENERIC_ARG6                                               \
+  10 // The register that would contain pointer size or less argument 6 (if any)
+#define LLDB_REGNUM_GENERIC_ARG7                                               \
+  11 // The register that would contain pointer size or less argument 7 (if any)
+#define LLDB_REGNUM_GENERIC_ARG8                                               \
+  12 // The register that would contain pointer size or less argument 8 (if any)
 //---------------------------------------------------------------------
 /// Invalid value definitions
 //----------------------------------------------------------------------
-#define LLDB_INVALID_ADDRESS            UINT64_MAX
-#define LLDB_INVALID_INDEX32            UINT32_MAX
-#define LLDB_INVALID_IVAR_OFFSET        UINT32_MAX
-#define LLDB_INVALID_IMAGE_TOKEN        UINT32_MAX
-#define LLDB_INVALID_MODULE_VERSION     UINT32_MAX
-#define LLDB_INVALID_REGNUM             UINT32_MAX
-#define LLDB_INVALID_UID                UINT64_MAX
-#define LLDB_INVALID_PROCESS_ID         0
-#define LLDB_INVALID_THREAD_ID          0
-#define LLDB_INVALID_FRAME_ID           UINT32_MAX
-#define LLDB_INVALID_SIGNAL_NUMBER      INT32_MAX
-#define LLDB_INVALID_OFFSET             UINT64_MAX // Must match max of lldb::offset_t
-#define LLDB_INVALID_LINE_NUMBER        UINT32_MAX
-#define LLDB_INVALID_QUEUE_ID           0
+#define LLDB_INVALID_ADDRESS UINT64_MAX
+#define LLDB_INVALID_INDEX32 UINT32_MAX
+#define LLDB_INVALID_IVAR_OFFSET UINT32_MAX
+#define LLDB_INVALID_IMAGE_TOKEN UINT32_MAX
+#define LLDB_INVALID_MODULE_VERSION UINT32_MAX
+#define LLDB_INVALID_REGNUM UINT32_MAX
+#define LLDB_INVALID_UID UINT64_MAX
+#define LLDB_INVALID_PROCESS_ID 0
+#define LLDB_INVALID_THREAD_ID 0
+#define LLDB_INVALID_FRAME_ID UINT32_MAX
+#define LLDB_INVALID_SIGNAL_NUMBER INT32_MAX
+#define LLDB_INVALID_OFFSET UINT64_MAX // Must match max of lldb::offset_t
+#define LLDB_INVALID_LINE_NUMBER UINT32_MAX
+#define LLDB_INVALID_QUEUE_ID 0
 
 //----------------------------------------------------------------------
 /// CPU Type definitions
 //----------------------------------------------------------------------
-#define LLDB_ARCH_DEFAULT               "systemArch"
-#define LLDB_ARCH_DEFAULT_32BIT         "systemArch32"
-#define LLDB_ARCH_DEFAULT_64BIT         "systemArch64"
-#define LLDB_INVALID_CPUTYPE            (0xFFFFFFFEu)
+#define LLDB_ARCH_DEFAULT "systemArch"
+#define LLDB_ARCH_DEFAULT_32BIT "systemArch32"
+#define LLDB_ARCH_DEFAULT_64BIT "systemArch64"
+#define LLDB_INVALID_CPUTYPE (0xFFFFFFFEu)
 
 //----------------------------------------------------------------------
 /// Option Set definitions
 //----------------------------------------------------------------------
 // FIXME: I'm sure there's some #define magic that can create all 32 sets on the
 // fly.  That would have the added benefit of making this unreadable.
-#define LLDB_MAX_NUM_OPTION_SETS        32
-#define LLDB_OPT_SET_ALL                0xFFFFFFFFU
-#define LLDB_OPT_SET_1                  (1U << 0)
-#define LLDB_OPT_SET_2                  (1U << 1)
-#define LLDB_OPT_SET_3                  (1U << 2)
-#define LLDB_OPT_SET_4                  (1U << 3)
-#define LLDB_OPT_SET_5                  (1U << 4)
-#define LLDB_OPT_SET_6                  (1U << 5)
-#define LLDB_OPT_SET_7                  (1U << 6)
-#define LLDB_OPT_SET_8                  (1U << 7)
-#define LLDB_OPT_SET_9                  (1U << 8)
-#define LLDB_OPT_SET_10                 (1U << 9)
-#define LLDB_OPT_SET_FROM_TO(A, B)      (((1U << (B)) - 1) ^ (((1U << (A))-1) >> 1))
+#define LLDB_MAX_NUM_OPTION_SETS 32
+#define LLDB_OPT_SET_ALL 0xFFFFFFFFU
+#define LLDB_OPT_SET_1 (1U << 0)
+#define LLDB_OPT_SET_2 (1U << 1)
+#define LLDB_OPT_SET_3 (1U << 2)
+#define LLDB_OPT_SET_4 (1U << 3)
+#define LLDB_OPT_SET_5 (1U << 4)
+#define LLDB_OPT_SET_6 (1U << 5)
+#define LLDB_OPT_SET_7 (1U << 6)
+#define LLDB_OPT_SET_8 (1U << 7)
+#define LLDB_OPT_SET_9 (1U << 8)
+#define LLDB_OPT_SET_10 (1U << 9)
+#define LLDB_OPT_SET_FROM_TO(A, B)                                             \
+  (((1U << (B)) - 1) ^ (((1U << (A)) - 1) >> 1))
 
-#if defined (_WIN32) && !defined (MAX_PATH)
+#if defined(_WIN32) && !defined(MAX_PATH)
 #define MAX_PATH 260
 #endif
 
@@ -146,10 +156,10 @@
 ///     Macro definition for easily disallowing copy constructor and
 ///     assignment operators in C++ classes.
 //----------------------------------------------------------------------
-#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
-    TypeName(const TypeName&); \
-    const TypeName& operator=(const TypeName&)
+#define DISALLOW_COPY_AND_ASSIGN(TypeName)                                     \
+  TypeName(const TypeName &);                                                  \
+  const TypeName &operator=(const TypeName &)
 
 #endif // #if defined(__cplusplus)
 
-#endif  // LLDB_lldb_defines_h_
+#endif // LLDB_lldb_defines_h_

Modified: lldb/trunk/include/lldb/lldb-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-enumerations.h Tue Sep  6 15:57:50 2016
@@ -34,1032 +34,1032 @@
 
 namespace lldb {
 
-    //----------------------------------------------------------------------
-    // Process and Thread States
-    //----------------------------------------------------------------------
-    enum StateType
-    {
-        eStateInvalid = 0,
-        eStateUnloaded,     ///< Process is object is valid, but not currently loaded
-        eStateConnected,    ///< Process is connected to remote debug services, but not launched or attached to anything yet
-        eStateAttaching,    ///< Process is currently trying to attach
-        eStateLaunching,    ///< Process is in the process of launching
-        eStateStopped,      ///< Process or thread is stopped and can be examined.
-        eStateRunning,      ///< Process or thread is running and can't be examined.
-        eStateStepping,     ///< Process or thread is in the process of stepping and can not be examined.
-        eStateCrashed,      ///< Process or thread has crashed and can be examined.
-        eStateDetached,     ///< Process has been detached and can't be examined.
-        eStateExited,       ///< Process has exited and can't be examined.
-        eStateSuspended     ///< Process or thread is in a suspended state as far
-                            ///< as the debugger is concerned while other processes
-                            ///< or threads get the chance to run.
-    };
-
-    //----------------------------------------------------------------------
-    // Launch Flags
-    //----------------------------------------------------------------------
-    FLAGS_ENUM(LaunchFlags)
-    {
-        eLaunchFlagNone         = 0u,
-        eLaunchFlagExec         = (1u << 0),       ///< Exec when launching and turn the calling process into a new process
-        eLaunchFlagDebug        = (1u << 1),       ///< Stop as soon as the process launches to allow the process to be debugged
-        eLaunchFlagStopAtEntry  = (1u << 2),       ///< Stop at the program entry point instead of auto-continuing when launching or attaching at entry point
-        eLaunchFlagDisableASLR  = (1u << 3),       ///< Disable Address Space Layout Randomization
-        eLaunchFlagDisableSTDIO = (1u << 4),       ///< Disable stdio for inferior process (e.g. for a GUI app)
-        eLaunchFlagLaunchInTTY  = (1u << 5),       ///< Launch the process in a new TTY if supported by the host
-        eLaunchFlagLaunchInShell= (1u << 6),       ///< Launch the process inside a shell to get shell expansion
-        eLaunchFlagLaunchInSeparateProcessGroup = (1u << 7), ///< Launch the process in a separate process group
-        eLaunchFlagDontSetExitStatus = (1u << 8), ///< If you are going to hand the process off (e.g. to debugserver)
-                                                   ///< set this flag so lldb & the handee don't race to set its exit status.
-        eLaunchFlagDetachOnError = (1u << 9),     ///< If set, then the client stub should detach rather than killing the debugee
-                                                   ///< if it loses connection with lldb.
-        eLaunchFlagShellExpandArguments  = (1u << 10),       ///< Perform shell-style argument expansion
-        eLaunchFlagCloseTTYOnExit = (1u << 11),    ///< Close the open TTY on exit
-    };
-        
-    //----------------------------------------------------------------------
-    // Thread Run Modes
-    //----------------------------------------------------------------------
-    enum RunMode
-    {
-        eOnlyThisThread,
-        eAllThreads,
-        eOnlyDuringStepping
-    };
-
-    //----------------------------------------------------------------------
-    // Byte ordering definitions
-    //----------------------------------------------------------------------
-    enum ByteOrder
-    {
-        eByteOrderInvalid   = 0,
-        eByteOrderBig       = 1,
-        eByteOrderPDP       = 2,
-        eByteOrderLittle    = 4
-    };
-
-    //----------------------------------------------------------------------
-    // Register encoding definitions
-    //----------------------------------------------------------------------
-    enum Encoding
-    {
-        eEncodingInvalid = 0,
-        eEncodingUint,               // unsigned integer
-        eEncodingSint,               // signed integer
-        eEncodingIEEE754,            // float
-        eEncodingVector              // vector registers
-    };
-
-    //----------------------------------------------------------------------
-    // Display format definitions
-    //----------------------------------------------------------------------
-    enum Format
-    {
-        eFormatDefault = 0,
-        eFormatInvalid = 0,
-        eFormatBoolean,
-        eFormatBinary,
-        eFormatBytes,
-        eFormatBytesWithASCII,
-        eFormatChar,
-        eFormatCharPrintable,   // Only printable characters, space if not printable
-        eFormatComplex,         // Floating point complex type
-        eFormatComplexFloat = eFormatComplex,
-        eFormatCString,         // NULL terminated C strings
-        eFormatDecimal,
-        eFormatEnum,
-        eFormatHex,
-        eFormatHexUppercase,
-        eFormatFloat,
-        eFormatOctal,
-        eFormatOSType,          // OS character codes encoded into an integer 'PICT' 'text' etc...
-        eFormatUnicode16,
-        eFormatUnicode32,
-        eFormatUnsigned,
-        eFormatPointer,
-        eFormatVectorOfChar,
-        eFormatVectorOfSInt8,
-        eFormatVectorOfUInt8,
-        eFormatVectorOfSInt16,
-        eFormatVectorOfUInt16,
-        eFormatVectorOfSInt32,
-        eFormatVectorOfUInt32,
-        eFormatVectorOfSInt64,
-        eFormatVectorOfUInt64,
-        eFormatVectorOfFloat16,
-        eFormatVectorOfFloat32,
-        eFormatVectorOfFloat64,
-        eFormatVectorOfUInt128,
-        eFormatComplexInteger,      // Integer complex type
-        eFormatCharArray,           // Print characters with no single quotes, used for character arrays that can contain non printable characters
-        eFormatAddressInfo,         // Describe what an address points to (func + offset with file/line, symbol + offset, data, etc)
-        eFormatHexFloat,            // ISO C99 hex float string
-        eFormatInstruction,         // Disassemble an opcode
-        eFormatVoid,                // Do not print this
-        kNumFormats
-    };
-
-    //----------------------------------------------------------------------
-    // Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls
-    //----------------------------------------------------------------------
-    enum DescriptionLevel
-    {
-        eDescriptionLevelBrief = 0,
-        eDescriptionLevelFull,
-        eDescriptionLevelVerbose,
-        eDescriptionLevelInitial,
-        kNumDescriptionLevels
-    };
-
-    //----------------------------------------------------------------------
-    // Script interpreter types
-    //----------------------------------------------------------------------
-    enum ScriptLanguage
-    {
-        eScriptLanguageNone,
-        eScriptLanguagePython,
-        eScriptLanguageDefault = eScriptLanguagePython
-    };
-
-    //----------------------------------------------------------------------
-    // Register numbering types
-    // See RegisterContext::ConvertRegisterKindToRegisterNumber to convert
-    // any of these to the lldb internal register numbering scheme 
-    // (eRegisterKindLLDB).
-    //----------------------------------------------------------------------
-    enum RegisterKind
-    {
-        eRegisterKindEHFrame = 0,   // the register numbers seen in eh_frame
-        eRegisterKindDWARF,         // the register numbers seen DWARF
-        eRegisterKindGeneric,       // insn ptr reg, stack ptr reg, etc not specific to any particular target
-        eRegisterKindProcessPlugin, // num used by the process plugin - e.g. by the remote gdb-protocol stub program
-        eRegisterKindLLDB,          // lldb's internal register numbers
-        kNumRegisterKinds
-    };
-
-    //----------------------------------------------------------------------
-    // Thread stop reasons
-    //----------------------------------------------------------------------
-    enum StopReason
-    {
-        eStopReasonInvalid = 0,
-        eStopReasonNone,
-        eStopReasonTrace,
-        eStopReasonBreakpoint,
-        eStopReasonWatchpoint,
-        eStopReasonSignal,
-        eStopReasonException,
-        eStopReasonExec,        // Program was re-exec'ed
-        eStopReasonPlanComplete,
-        eStopReasonThreadExiting,
-        eStopReasonInstrumentation
-    };
-
-    //----------------------------------------------------------------------
-    // Command Return Status Types
-    //----------------------------------------------------------------------
-    enum ReturnStatus
-    {
-        eReturnStatusInvalid,
-        eReturnStatusSuccessFinishNoResult,
-        eReturnStatusSuccessFinishResult,
-        eReturnStatusSuccessContinuingNoResult,
-        eReturnStatusSuccessContinuingResult,
-        eReturnStatusStarted,
-        eReturnStatusFailed,
-        eReturnStatusQuit
-    };
-
+//----------------------------------------------------------------------
+// Process and Thread States
+//----------------------------------------------------------------------
+enum StateType {
+  eStateInvalid = 0,
+  eStateUnloaded,  ///< Process is object is valid, but not currently loaded
+  eStateConnected, ///< Process is connected to remote debug services, but not
+                   ///launched or attached to anything yet
+  eStateAttaching, ///< Process is currently trying to attach
+  eStateLaunching, ///< Process is in the process of launching
+  eStateStopped,   ///< Process or thread is stopped and can be examined.
+  eStateRunning,   ///< Process or thread is running and can't be examined.
+  eStateStepping,  ///< Process or thread is in the process of stepping and can
+                   ///not be examined.
+  eStateCrashed,   ///< Process or thread has crashed and can be examined.
+  eStateDetached,  ///< Process has been detached and can't be examined.
+  eStateExited,    ///< Process has exited and can't be examined.
+  eStateSuspended  ///< Process or thread is in a suspended state as far
+                   ///< as the debugger is concerned while other processes
+                   ///< or threads get the chance to run.
+};
+
+//----------------------------------------------------------------------
+// Launch Flags
+//----------------------------------------------------------------------
+FLAGS_ENUM(LaunchFlags){
+    eLaunchFlagNone = 0u,
+    eLaunchFlagExec = (1u << 0),  ///< Exec when launching and turn the calling
+                                  ///process into a new process
+    eLaunchFlagDebug = (1u << 1), ///< Stop as soon as the process launches to
+                                  ///allow the process to be debugged
+    eLaunchFlagStopAtEntry = (1u << 2), ///< Stop at the program entry point
+                                        ///instead of auto-continuing when
+                                        ///launching or attaching at entry point
+    eLaunchFlagDisableASLR =
+        (1u << 3), ///< Disable Address Space Layout Randomization
+    eLaunchFlagDisableSTDIO =
+        (1u << 4), ///< Disable stdio for inferior process (e.g. for a GUI app)
+    eLaunchFlagLaunchInTTY =
+        (1u << 5), ///< Launch the process in a new TTY if supported by the host
+    eLaunchFlagLaunchInShell =
+        (1u << 6), ///< Launch the process inside a shell to get shell expansion
+    eLaunchFlagLaunchInSeparateProcessGroup =
+        (1u << 7), ///< Launch the process in a separate process group
+    eLaunchFlagDontSetExitStatus = (1u << 8), ///< If you are going to hand the
+                                              ///process off (e.g. to
+                                              ///debugserver)
+    ///< set this flag so lldb & the handee don't race to set its exit status.
+    eLaunchFlagDetachOnError = (1u << 9), ///< If set, then the client stub
+                                          ///should detach rather than killing
+                                          ///the debugee
+                                          ///< if it loses connection with lldb.
+    eLaunchFlagShellExpandArguments =
+        (1u << 10), ///< Perform shell-style argument expansion
+    eLaunchFlagCloseTTYOnExit = (1u << 11), ///< Close the open TTY on exit
+};
+
+//----------------------------------------------------------------------
+// Thread Run Modes
+//----------------------------------------------------------------------
+enum RunMode { eOnlyThisThread, eAllThreads, eOnlyDuringStepping };
+
+//----------------------------------------------------------------------
+// Byte ordering definitions
+//----------------------------------------------------------------------
+enum ByteOrder {
+  eByteOrderInvalid = 0,
+  eByteOrderBig = 1,
+  eByteOrderPDP = 2,
+  eByteOrderLittle = 4
+};
+
+//----------------------------------------------------------------------
+// Register encoding definitions
+//----------------------------------------------------------------------
+enum Encoding {
+  eEncodingInvalid = 0,
+  eEncodingUint,    // unsigned integer
+  eEncodingSint,    // signed integer
+  eEncodingIEEE754, // float
+  eEncodingVector   // vector registers
+};
+
+//----------------------------------------------------------------------
+// Display format definitions
+//----------------------------------------------------------------------
+enum Format {
+  eFormatDefault = 0,
+  eFormatInvalid = 0,
+  eFormatBoolean,
+  eFormatBinary,
+  eFormatBytes,
+  eFormatBytesWithASCII,
+  eFormatChar,
+  eFormatCharPrintable, // Only printable characters, space if not printable
+  eFormatComplex,       // Floating point complex type
+  eFormatComplexFloat = eFormatComplex,
+  eFormatCString, // NULL terminated C strings
+  eFormatDecimal,
+  eFormatEnum,
+  eFormatHex,
+  eFormatHexUppercase,
+  eFormatFloat,
+  eFormatOctal,
+  eFormatOSType, // OS character codes encoded into an integer 'PICT' 'text'
+                 // etc...
+  eFormatUnicode16,
+  eFormatUnicode32,
+  eFormatUnsigned,
+  eFormatPointer,
+  eFormatVectorOfChar,
+  eFormatVectorOfSInt8,
+  eFormatVectorOfUInt8,
+  eFormatVectorOfSInt16,
+  eFormatVectorOfUInt16,
+  eFormatVectorOfSInt32,
+  eFormatVectorOfUInt32,
+  eFormatVectorOfSInt64,
+  eFormatVectorOfUInt64,
+  eFormatVectorOfFloat16,
+  eFormatVectorOfFloat32,
+  eFormatVectorOfFloat64,
+  eFormatVectorOfUInt128,
+  eFormatComplexInteger, // Integer complex type
+  eFormatCharArray,      // Print characters with no single quotes, used for
+                         // character arrays that can contain non printable
+                         // characters
+  eFormatAddressInfo, // Describe what an address points to (func + offset with
+                      // file/line, symbol + offset, data, etc)
+  eFormatHexFloat,    // ISO C99 hex float string
+  eFormatInstruction, // Disassemble an opcode
+  eFormatVoid,        // Do not print this
+  kNumFormats
+};
+
+//----------------------------------------------------------------------
+// Description levels for "void GetDescription(Stream *, DescriptionLevel)"
+// calls
+//----------------------------------------------------------------------
+enum DescriptionLevel {
+  eDescriptionLevelBrief = 0,
+  eDescriptionLevelFull,
+  eDescriptionLevelVerbose,
+  eDescriptionLevelInitial,
+  kNumDescriptionLevels
+};
+
+//----------------------------------------------------------------------
+// Script interpreter types
+//----------------------------------------------------------------------
+enum ScriptLanguage {
+  eScriptLanguageNone,
+  eScriptLanguagePython,
+  eScriptLanguageDefault = eScriptLanguagePython
+};
+
+//----------------------------------------------------------------------
+// Register numbering types
+// See RegisterContext::ConvertRegisterKindToRegisterNumber to convert
+// any of these to the lldb internal register numbering scheme
+// (eRegisterKindLLDB).
+//----------------------------------------------------------------------
+enum RegisterKind {
+  eRegisterKindEHFrame = 0, // the register numbers seen in eh_frame
+  eRegisterKindDWARF,       // the register numbers seen DWARF
+  eRegisterKindGeneric, // insn ptr reg, stack ptr reg, etc not specific to any
+                        // particular target
+  eRegisterKindProcessPlugin, // num used by the process plugin - e.g. by the
+                              // remote gdb-protocol stub program
+  eRegisterKindLLDB,          // lldb's internal register numbers
+  kNumRegisterKinds
+};
+
+//----------------------------------------------------------------------
+// Thread stop reasons
+//----------------------------------------------------------------------
+enum StopReason {
+  eStopReasonInvalid = 0,
+  eStopReasonNone,
+  eStopReasonTrace,
+  eStopReasonBreakpoint,
+  eStopReasonWatchpoint,
+  eStopReasonSignal,
+  eStopReasonException,
+  eStopReasonExec, // Program was re-exec'ed
+  eStopReasonPlanComplete,
+  eStopReasonThreadExiting,
+  eStopReasonInstrumentation
+};
+
+//----------------------------------------------------------------------
+// Command Return Status Types
+//----------------------------------------------------------------------
+enum ReturnStatus {
+  eReturnStatusInvalid,
+  eReturnStatusSuccessFinishNoResult,
+  eReturnStatusSuccessFinishResult,
+  eReturnStatusSuccessContinuingNoResult,
+  eReturnStatusSuccessContinuingResult,
+  eReturnStatusStarted,
+  eReturnStatusFailed,
+  eReturnStatusQuit
+};
+
+//----------------------------------------------------------------------
+// The results of expression evaluation:
+//----------------------------------------------------------------------
+enum ExpressionResults {
+  eExpressionCompleted = 0,
+  eExpressionSetupError,
+  eExpressionParseError,
+  eExpressionDiscarded,
+  eExpressionInterrupted,
+  eExpressionHitBreakpoint,
+  eExpressionTimedOut,
+  eExpressionResultUnavailable,
+  eExpressionStoppedForDebug
+};
+
+//----------------------------------------------------------------------
+// Connection Status Types
+//----------------------------------------------------------------------
+enum ConnectionStatus {
+  eConnectionStatusSuccess,        // Success
+  eConnectionStatusEndOfFile,      // End-of-file encountered
+  eConnectionStatusError,          // Check GetError() for details
+  eConnectionStatusTimedOut,       // Request timed out
+  eConnectionStatusNoConnection,   // No connection
+  eConnectionStatusLostConnection, // Lost connection while connected to a valid
+                                   // connection
+  eConnectionStatusInterrupted     // Interrupted read
+};
+
+enum ErrorType {
+  eErrorTypeInvalid,
+  eErrorTypeGeneric,    ///< Generic errors that can be any value.
+  eErrorTypeMachKernel, ///< Mach kernel error codes.
+  eErrorTypePOSIX,      ///< POSIX error codes.
+  eErrorTypeExpression, ///< These are from the ExpressionResults enum.
+  eErrorTypeWin32       ///< Standard Win32 error codes.
+};
+
+enum ValueType {
+  eValueTypeInvalid = 0,
+  eValueTypeVariableGlobal = 1,   // globals variable
+  eValueTypeVariableStatic = 2,   // static variable
+  eValueTypeVariableArgument = 3, // function argument variables
+  eValueTypeVariableLocal = 4,    // function local variables
+  eValueTypeRegister = 5,         // stack frame register value
+  eValueTypeRegisterSet = 6,      // A collection of stack frame register values
+  eValueTypeConstResult = 7,      // constant result variables
+  eValueTypeVariableThreadLocal = 8 // thread local storage variable
+};
+
+//----------------------------------------------------------------------
+// Token size/granularities for Input Readers
+//----------------------------------------------------------------------
+
+enum InputReaderGranularity {
+  eInputReaderGranularityInvalid = 0,
+  eInputReaderGranularityByte,
+  eInputReaderGranularityWord,
+  eInputReaderGranularityLine,
+  eInputReaderGranularityAll
+};
+
+//------------------------------------------------------------------
+/// These mask bits allow a common interface for queries that can
+/// limit the amount of information that gets parsed to only the
+/// information that is requested. These bits also can indicate what
+/// actually did get resolved during query function calls.
+///
+/// Each definition corresponds to a one of the member variables
+/// in this class, and requests that that item be resolved, or
+/// indicates that the member did get resolved.
+//------------------------------------------------------------------
+FLAGS_ENUM(SymbolContextItem){
+    eSymbolContextTarget = (1u << 0), ///< Set when \a target is requested from
+                                      ///a query, or was located in query
+                                      ///results
+    eSymbolContextModule = (1u << 1), ///< Set when \a module is requested from
+                                      ///a query, or was located in query
+                                      ///results
+    eSymbolContextCompUnit = (1u << 2), ///< Set when \a comp_unit is requested
+                                        ///from a query, or was located in query
+                                        ///results
+    eSymbolContextFunction = (1u << 3), ///< Set when \a function is requested
+                                        ///from a query, or was located in query
+                                        ///results
+    eSymbolContextBlock = (1u << 4),    ///< Set when the deepest \a block is
+                                     ///requested from a query, or was located
+                                     ///in query results
+    eSymbolContextLineEntry = (1u << 5), ///< Set when \a line_entry is
+                                         ///requested from a query, or was
+                                         ///located in query results
+    eSymbolContextSymbol = (1u << 6), ///< Set when \a symbol is requested from
+                                      ///a query, or was located in query
+                                      ///results
+    eSymbolContextEverything = ((eSymbolContextSymbol << 1) -
+                                1u), ///< Indicates to try and lookup everything
+                                     ///up during a routine symbol context
+                                     ///query.
+    eSymbolContextVariable = (1u << 7) ///< Set when \a global or static
+                                       ///variable is requested from a query, or
+                                       ///was located in query results.
+    ///< eSymbolContextVariable is potentially expensive to lookup so it isn't
+    ///included in
+    ///< eSymbolContextEverything which stops it from being used during frame PC
+    ///lookups and
+    ///< many other potential address to symbol context lookups.
+};
+
+FLAGS_ENUM(Permissions){ePermissionsWritable = (1u << 0),
+                        ePermissionsReadable = (1u << 1),
+                        ePermissionsExecutable = (1u << 2)};
+
+enum InputReaderAction {
+  eInputReaderActivate, // reader is newly pushed onto the reader stack
+  eInputReaderAsynchronousOutputWritten, // an async output event occurred; the
+                                         // reader may want to do something
+  eInputReaderReactivate, // reader is on top of the stack again after another
+                          // reader was popped off
+  eInputReaderDeactivate, // another reader was pushed on the stack
+  eInputReaderGotToken,   // reader got one of its tokens (granularity)
+  eInputReaderInterrupt, // reader received an interrupt signal (probably from a
+                         // control-c)
+  eInputReaderEndOfFile, // reader received an EOF char (probably from a
+                         // control-d)
+  eInputReaderDone       // reader was just popped off the stack and is done
+};
+
+FLAGS_ENUM(BreakpointEventType){
+    eBreakpointEventTypeInvalidType = (1u << 0),
+    eBreakpointEventTypeAdded = (1u << 1),
+    eBreakpointEventTypeRemoved = (1u << 2),
+    eBreakpointEventTypeLocationsAdded = (1u << 3), // Locations added doesn't
+                                                    // get sent when the
+                                                    // breakpoint is created
+    eBreakpointEventTypeLocationsRemoved = (1u << 4),
+    eBreakpointEventTypeLocationsResolved = (1u << 5),
+    eBreakpointEventTypeEnabled = (1u << 6),
+    eBreakpointEventTypeDisabled = (1u << 7),
+    eBreakpointEventTypeCommandChanged = (1u << 8),
+    eBreakpointEventTypeConditionChanged = (1u << 9),
+    eBreakpointEventTypeIgnoreChanged = (1u << 10),
+    eBreakpointEventTypeThreadChanged = (1u << 11)};
+
+FLAGS_ENUM(WatchpointEventType){
+    eWatchpointEventTypeInvalidType = (1u << 0),
+    eWatchpointEventTypeAdded = (1u << 1),
+    eWatchpointEventTypeRemoved = (1u << 2),
+    eWatchpointEventTypeEnabled = (1u << 6),
+    eWatchpointEventTypeDisabled = (1u << 7),
+    eWatchpointEventTypeCommandChanged = (1u << 8),
+    eWatchpointEventTypeConditionChanged = (1u << 9),
+    eWatchpointEventTypeIgnoreChanged = (1u << 10),
+    eWatchpointEventTypeThreadChanged = (1u << 11),
+    eWatchpointEventTypeTypeChanged = (1u << 12)};
+
+//----------------------------------------------------------------------
+/// Programming language type.
+///
+/// These enumerations use the same language enumerations as the DWARF
+/// specification for ease of use and consistency.
+/// The enum -> string code is in Language.cpp, don't change this
+/// table without updating that code as well.
+//----------------------------------------------------------------------
+enum LanguageType {
+  eLanguageTypeUnknown = 0x0000,        ///< Unknown or invalid language value.
+  eLanguageTypeC89 = 0x0001,            ///< ISO C:1989.
+  eLanguageTypeC = 0x0002,              ///< Non-standardized C, such as K&R.
+  eLanguageTypeAda83 = 0x0003,          ///< ISO Ada:1983.
+  eLanguageTypeC_plus_plus = 0x0004,    ///< ISO C++:1998.
+  eLanguageTypeCobol74 = 0x0005,        ///< ISO Cobol:1974.
+  eLanguageTypeCobol85 = 0x0006,        ///< ISO Cobol:1985.
+  eLanguageTypeFortran77 = 0x0007,      ///< ISO Fortran 77.
+  eLanguageTypeFortran90 = 0x0008,      ///< ISO Fortran 90.
+  eLanguageTypePascal83 = 0x0009,       ///< ISO Pascal:1983.
+  eLanguageTypeModula2 = 0x000a,        ///< ISO Modula-2:1996.
+  eLanguageTypeJava = 0x000b,           ///< Java.
+  eLanguageTypeC99 = 0x000c,            ///< ISO C:1999.
+  eLanguageTypeAda95 = 0x000d,          ///< ISO Ada:1995.
+  eLanguageTypeFortran95 = 0x000e,      ///< ISO Fortran 95.
+  eLanguageTypePLI = 0x000f,            ///< ANSI PL/I:1976.
+  eLanguageTypeObjC = 0x0010,           ///< Objective-C.
+  eLanguageTypeObjC_plus_plus = 0x0011, ///< Objective-C++.
+  eLanguageTypeUPC = 0x0012,            ///< Unified Parallel C.
+  eLanguageTypeD = 0x0013,              ///< D.
+  eLanguageTypePython = 0x0014,         ///< Python.
+  // NOTE: The below are DWARF5 constants, subject to change upon
+  // completion of the DWARF5 specification
+  eLanguageTypeOpenCL = 0x0015,         ///< OpenCL.
+  eLanguageTypeGo = 0x0016,             ///< Go.
+  eLanguageTypeModula3 = 0x0017,        ///< Modula 3.
+  eLanguageTypeHaskell = 0x0018,        ///< Haskell.
+  eLanguageTypeC_plus_plus_03 = 0x0019, ///< ISO C++:2003.
+  eLanguageTypeC_plus_plus_11 = 0x001a, ///< ISO C++:2011.
+  eLanguageTypeOCaml = 0x001b,          ///< OCaml.
+  eLanguageTypeRust = 0x001c,           ///< Rust.
+  eLanguageTypeC11 = 0x001d,            ///< ISO C:2011.
+  eLanguageTypeSwift = 0x001e,          ///< Swift.
+  eLanguageTypeJulia = 0x001f,          ///< Julia.
+  eLanguageTypeDylan = 0x0020,          ///< Dylan.
+  eLanguageTypeC_plus_plus_14 = 0x0021, ///< ISO C++:2014.
+  eLanguageTypeFortran03 = 0x0022,      ///< ISO Fortran 2003.
+  eLanguageTypeFortran08 = 0x0023,      ///< ISO Fortran 2008.
+  // Vendor Extensions
+  // Note: Language::GetNameForLanguageType
+  // assumes these can be used as indexes into array language_names, and
+  // Language::SetLanguageFromCString and Language::AsCString
+  // assume these can be used as indexes into array g_languages.
+  eLanguageTypeMipsAssembler = 0x0024,   ///< Mips_Assembler.
+  eLanguageTypeExtRenderScript = 0x0025, ///< RenderScript.
+  eNumLanguageTypes
+};
+
+enum InstrumentationRuntimeType {
+  eInstrumentationRuntimeTypeAddressSanitizer = 0x0000,
+  eInstrumentationRuntimeTypeThreadSanitizer = 0x0001,
+  eNumInstrumentationRuntimeTypes
+};
+
+enum DynamicValueType {
+  eNoDynamicValues = 0,
+  eDynamicCanRunTarget = 1,
+  eDynamicDontRunTarget = 2
+};
+
+enum AccessType {
+  eAccessNone,
+  eAccessPublic,
+  eAccessPrivate,
+  eAccessProtected,
+  eAccessPackage
+};
+
+enum CommandArgumentType {
+  eArgTypeAddress = 0,
+  eArgTypeAddressOrExpression,
+  eArgTypeAliasName,
+  eArgTypeAliasOptions,
+  eArgTypeArchitecture,
+  eArgTypeBoolean,
+  eArgTypeBreakpointID,
+  eArgTypeBreakpointIDRange,
+  eArgTypeBreakpointName,
+  eArgTypeByteSize,
+  eArgTypeClassName,
+  eArgTypeCommandName,
+  eArgTypeCount,
+  eArgTypeDescriptionVerbosity,
+  eArgTypeDirectoryName,
+  eArgTypeDisassemblyFlavor,
+  eArgTypeEndAddress,
+  eArgTypeExpression,
+  eArgTypeExpressionPath,
+  eArgTypeExprFormat,
+  eArgTypeFilename,
+  eArgTypeFormat,
+  eArgTypeFrameIndex,
+  eArgTypeFullName,
+  eArgTypeFunctionName,
+  eArgTypeFunctionOrSymbol,
+  eArgTypeGDBFormat,
+  eArgTypeHelpText,
+  eArgTypeIndex,
+  eArgTypeLanguage,
+  eArgTypeLineNum,
+  eArgTypeLogCategory,
+  eArgTypeLogChannel,
+  eArgTypeMethod,
+  eArgTypeName,
+  eArgTypeNewPathPrefix,
+  eArgTypeNumLines,
+  eArgTypeNumberPerLine,
+  eArgTypeOffset,
+  eArgTypeOldPathPrefix,
+  eArgTypeOneLiner,
+  eArgTypePath,
+  eArgTypePermissionsNumber,
+  eArgTypePermissionsString,
+  eArgTypePid,
+  eArgTypePlugin,
+  eArgTypeProcessName,
+  eArgTypePythonClass,
+  eArgTypePythonFunction,
+  eArgTypePythonScript,
+  eArgTypeQueueName,
+  eArgTypeRegisterName,
+  eArgTypeRegularExpression,
+  eArgTypeRunArgs,
+  eArgTypeRunMode,
+  eArgTypeScriptedCommandSynchronicity,
+  eArgTypeScriptLang,
+  eArgTypeSearchWord,
+  eArgTypeSelector,
+  eArgTypeSettingIndex,
+  eArgTypeSettingKey,
+  eArgTypeSettingPrefix,
+  eArgTypeSettingVariableName,
+  eArgTypeShlibName,
+  eArgTypeSourceFile,
+  eArgTypeSortOrder,
+  eArgTypeStartAddress,
+  eArgTypeSummaryString,
+  eArgTypeSymbol,
+  eArgTypeThreadID,
+  eArgTypeThreadIndex,
+  eArgTypeThreadName,
+  eArgTypeTypeName,
+  eArgTypeUnsignedInteger,
+  eArgTypeUnixSignal,
+  eArgTypeVarName,
+  eArgTypeValue,
+  eArgTypeWidth,
+  eArgTypeNone,
+  eArgTypePlatform,
+  eArgTypeWatchpointID,
+  eArgTypeWatchpointIDRange,
+  eArgTypeWatchType,
+  eArgRawInput,
+  eArgTypeLastArg // Always keep this entry as the last entry in this
+                  // enumeration!!
+};
+
+//----------------------------------------------------------------------
+// Symbol types
+//----------------------------------------------------------------------
+enum SymbolType {
+  eSymbolTypeAny = 0,
+  eSymbolTypeInvalid = 0,
+  eSymbolTypeAbsolute,
+  eSymbolTypeCode,
+  eSymbolTypeResolver,
+  eSymbolTypeData,
+  eSymbolTypeTrampoline,
+  eSymbolTypeRuntime,
+  eSymbolTypeException,
+  eSymbolTypeSourceFile,
+  eSymbolTypeHeaderFile,
+  eSymbolTypeObjectFile,
+  eSymbolTypeCommonBlock,
+  eSymbolTypeBlock,
+  eSymbolTypeLocal,
+  eSymbolTypeParam,
+  eSymbolTypeVariable,
+  eSymbolTypeVariableType,
+  eSymbolTypeLineEntry,
+  eSymbolTypeLineHeader,
+  eSymbolTypeScopeBegin,
+  eSymbolTypeScopeEnd,
+  eSymbolTypeAdditional, // When symbols take more than one entry, the extra
+                         // entries get this type
+  eSymbolTypeCompiler,
+  eSymbolTypeInstrumentation,
+  eSymbolTypeUndefined,
+  eSymbolTypeObjCClass,
+  eSymbolTypeObjCMetaClass,
+  eSymbolTypeObjCIVar,
+  eSymbolTypeReExported
+};
+
+enum SectionType {
+  eSectionTypeInvalid,
+  eSectionTypeCode,
+  eSectionTypeContainer, // The section contains child sections
+  eSectionTypeData,
+  eSectionTypeDataCString,         // Inlined C string data
+  eSectionTypeDataCStringPointers, // Pointers to C string data
+  eSectionTypeDataSymbolAddress,   // Address of a symbol in the symbol table
+  eSectionTypeData4,
+  eSectionTypeData8,
+  eSectionTypeData16,
+  eSectionTypeDataPointers,
+  eSectionTypeDebug,
+  eSectionTypeZeroFill,
+  eSectionTypeDataObjCMessageRefs, // Pointer to function pointer + selector
+  eSectionTypeDataObjCCFStrings, // Objective C const CFString/NSString objects
+  eSectionTypeDWARFDebugAbbrev,
+  eSectionTypeDWARFDebugAddr,
+  eSectionTypeDWARFDebugAranges,
+  eSectionTypeDWARFDebugFrame,
+  eSectionTypeDWARFDebugInfo,
+  eSectionTypeDWARFDebugLine,
+  eSectionTypeDWARFDebugLoc,
+  eSectionTypeDWARFDebugMacInfo,
+  eSectionTypeDWARFDebugMacro,
+  eSectionTypeDWARFDebugPubNames,
+  eSectionTypeDWARFDebugPubTypes,
+  eSectionTypeDWARFDebugRanges,
+  eSectionTypeDWARFDebugStr,
+  eSectionTypeDWARFDebugStrOffsets,
+  eSectionTypeDWARFAppleNames,
+  eSectionTypeDWARFAppleTypes,
+  eSectionTypeDWARFAppleNamespaces,
+  eSectionTypeDWARFAppleObjC,
+  eSectionTypeELFSymbolTable,       // Elf SHT_SYMTAB section
+  eSectionTypeELFDynamicSymbols,    // Elf SHT_DYNSYM section
+  eSectionTypeELFRelocationEntries, // Elf SHT_REL or SHT_REL section
+  eSectionTypeELFDynamicLinkInfo,   // Elf SHT_DYNAMIC section
+  eSectionTypeEHFrame,
+  eSectionTypeARMexidx,
+  eSectionTypeARMextab,
+  eSectionTypeCompactUnwind, // compact unwind section in Mach-O,
+                             // __TEXT,__unwind_info
+  eSectionTypeGoSymtab,
+  eSectionTypeAbsoluteAddress, // Dummy section for symbols with absolute
+                               // address
+  eSectionTypeOther
+};
+
+FLAGS_ENUM(EmulateInstructionOptions){
+    eEmulateInstructionOptionNone = (0u),
+    eEmulateInstructionOptionAutoAdvancePC = (1u << 0),
+    eEmulateInstructionOptionIgnoreConditions = (1u << 1)};
+
+FLAGS_ENUM(FunctionNameType){
+    eFunctionNameTypeNone = 0u,
+    eFunctionNameTypeAuto =
+        (1u << 1), // Automatically figure out which FunctionNameType
+                   // bits to set based on the function name.
+    eFunctionNameTypeFull = (1u << 2), // The function name.
+    // For C this is the same as just the name of the function
+    // For C++ this is the mangled or demangled version of the mangled name.
+    // For ObjC this is the full function signature with the + or
+    // - and the square brackets and the class and selector
+    eFunctionNameTypeBase = (1u << 3), // The function name only, no namespaces
+                                       // or arguments and no class
+                                       // methods or selectors will be searched.
+    eFunctionNameTypeMethod = (1u << 4), // Find function by method name (C++)
+                                         // with no namespace or arguments
+    eFunctionNameTypeSelector =
+        (1u << 5), // Find function by selector name (ObjC) names
+    eFunctionNameTypeAny =
+        eFunctionNameTypeAuto // DEPRECATED: use eFunctionNameTypeAuto
+};
+
+//----------------------------------------------------------------------
+// Basic types enumeration for the public API SBType::GetBasicType()
+//----------------------------------------------------------------------
+enum BasicType {
+  eBasicTypeInvalid = 0,
+  eBasicTypeVoid = 1,
+  eBasicTypeChar,
+  eBasicTypeSignedChar,
+  eBasicTypeUnsignedChar,
+  eBasicTypeWChar,
+  eBasicTypeSignedWChar,
+  eBasicTypeUnsignedWChar,
+  eBasicTypeChar16,
+  eBasicTypeChar32,
+  eBasicTypeShort,
+  eBasicTypeUnsignedShort,
+  eBasicTypeInt,
+  eBasicTypeUnsignedInt,
+  eBasicTypeLong,
+  eBasicTypeUnsignedLong,
+  eBasicTypeLongLong,
+  eBasicTypeUnsignedLongLong,
+  eBasicTypeInt128,
+  eBasicTypeUnsignedInt128,
+  eBasicTypeBool,
+  eBasicTypeHalf,
+  eBasicTypeFloat,
+  eBasicTypeDouble,
+  eBasicTypeLongDouble,
+  eBasicTypeFloatComplex,
+  eBasicTypeDoubleComplex,
+  eBasicTypeLongDoubleComplex,
+  eBasicTypeObjCID,
+  eBasicTypeObjCClass,
+  eBasicTypeObjCSel,
+  eBasicTypeNullPtr,
+  eBasicTypeOther
+};
+
+FLAGS_ENUM(TypeClass){
+    eTypeClassInvalid = (0u), eTypeClassArray = (1u << 0),
+    eTypeClassBlockPointer = (1u << 1), eTypeClassBuiltin = (1u << 2),
+    eTypeClassClass = (1u << 3), eTypeClassComplexFloat = (1u << 4),
+    eTypeClassComplexInteger = (1u << 5), eTypeClassEnumeration = (1u << 6),
+    eTypeClassFunction = (1u << 7), eTypeClassMemberPointer = (1u << 8),
+    eTypeClassObjCObject = (1u << 9), eTypeClassObjCInterface = (1u << 10),
+    eTypeClassObjCObjectPointer = (1u << 11), eTypeClassPointer = (1u << 12),
+    eTypeClassReference = (1u << 13), eTypeClassStruct = (1u << 14),
+    eTypeClassTypedef = (1u << 15), eTypeClassUnion = (1u << 16),
+    eTypeClassVector = (1u << 17),
+    // Define the last type class as the MSBit of a 32 bit value
+    eTypeClassOther = (1u << 31),
+    // Define a mask that can be used for any type when finding types
+    eTypeClassAny = (0xffffffffu)};
+
+enum TemplateArgumentKind {
+  eTemplateArgumentKindNull = 0,
+  eTemplateArgumentKindType,
+  eTemplateArgumentKindDeclaration,
+  eTemplateArgumentKindIntegral,
+  eTemplateArgumentKindTemplate,
+  eTemplateArgumentKindTemplateExpansion,
+  eTemplateArgumentKindExpression,
+  eTemplateArgumentKindPack
+
+};
+
+//----------------------------------------------------------------------
+// Options that can be set for a formatter to alter its behavior
+// Not all of these are applicable to all formatter types
+//----------------------------------------------------------------------
+FLAGS_ENUM(TypeOptions){eTypeOptionNone = (0u),
+                        eTypeOptionCascade = (1u << 0),
+                        eTypeOptionSkipPointers = (1u << 1),
+                        eTypeOptionSkipReferences = (1u << 2),
+                        eTypeOptionHideChildren = (1u << 3),
+                        eTypeOptionHideValue = (1u << 4),
+                        eTypeOptionShowOneLiner = (1u << 5),
+                        eTypeOptionHideNames = (1u << 6),
+                        eTypeOptionNonCacheable = (1u << 7),
+                        eTypeOptionHideEmptyAggregates = (1u << 8)};
+
+//----------------------------------------------------------------------
+// This is the return value for frame comparisons.  If you are comparing frame A
+// to frame B
+// the following cases arise:
+// 1) When frame A pushes frame B (or a frame that ends up pushing B) A is Older
+// than B.
+// 2) When frame A pushed frame B (or if frame A is on the stack but B is not) A
+// is Younger than B
+// 3) When frame A and frame B have the same StackID, they are Equal.
+// 4) When frame A and frame B have the same immediate parent frame, but are not
+// equal, the comparison yields
+//    SameParent.
+// 5) If the two frames are on different threads or processes the comparison is
+// Invalid
+// 6) If for some reason we can't figure out what went on, we return Unknown.
+//----------------------------------------------------------------------
+enum FrameComparison {
+  eFrameCompareInvalid,
+  eFrameCompareUnknown,
+  eFrameCompareEqual,
+  eFrameCompareSameParent,
+  eFrameCompareYounger,
+  eFrameCompareOlder
+};
+
+//----------------------------------------------------------------------
+// Address Class
+//
+// A way of classifying an address used for disassembling and setting
+// breakpoints. Many object files can track exactly what parts of their
+// object files are code, data and other information. This is of course
+// above and beyond just looking at the section types. For example, code
+// might contain PC relative data and the object file might be able to
+// tell us that an address in code is data.
+//----------------------------------------------------------------------
+enum AddressClass {
+  eAddressClassInvalid,
+  eAddressClassUnknown,
+  eAddressClassCode,
+  eAddressClassCodeAlternateISA,
+  eAddressClassData,
+  eAddressClassDebug,
+  eAddressClassRuntime
+};
+
+//----------------------------------------------------------------------
+// File Permissions
+//
+// Designed to mimic the unix file permission bits so they can be
+// used with functions that set 'mode_t' to certain values for
+// permissions.
+//----------------------------------------------------------------------
+FLAGS_ENUM(FilePermissions){
+    eFilePermissionsUserRead = (1u << 8), eFilePermissionsUserWrite = (1u << 7),
+    eFilePermissionsUserExecute = (1u << 6),
+    eFilePermissionsGroupRead = (1u << 5),
+    eFilePermissionsGroupWrite = (1u << 4),
+    eFilePermissionsGroupExecute = (1u << 3),
+    eFilePermissionsWorldRead = (1u << 2),
+    eFilePermissionsWorldWrite = (1u << 1),
+    eFilePermissionsWorldExecute = (1u << 0),
+
+    eFilePermissionsUserRW = (eFilePermissionsUserRead |
+                              eFilePermissionsUserWrite | 0),
+    eFileFilePermissionsUserRX = (eFilePermissionsUserRead | 0 |
+                                  eFilePermissionsUserExecute),
+    eFilePermissionsUserRWX = (eFilePermissionsUserRead |
+                               eFilePermissionsUserWrite |
+                               eFilePermissionsUserExecute),
+
+    eFilePermissionsGroupRW = (eFilePermissionsGroupRead |
+                               eFilePermissionsGroupWrite | 0),
+    eFilePermissionsGroupRX = (eFilePermissionsGroupRead | 0 |
+                               eFilePermissionsGroupExecute),
+    eFilePermissionsGroupRWX = (eFilePermissionsGroupRead |
+                                eFilePermissionsGroupWrite |
+                                eFilePermissionsGroupExecute),
+
+    eFilePermissionsWorldRW = (eFilePermissionsWorldRead |
+                               eFilePermissionsWorldWrite | 0),
+    eFilePermissionsWorldRX = (eFilePermissionsWorldRead | 0 |
+                               eFilePermissionsWorldExecute),
+    eFilePermissionsWorldRWX = (eFilePermissionsWorldRead |
+                                eFilePermissionsWorldWrite |
+                                eFilePermissionsWorldExecute),
+
+    eFilePermissionsEveryoneR = (eFilePermissionsUserRead |
+                                 eFilePermissionsGroupRead |
+                                 eFilePermissionsWorldRead),
+    eFilePermissionsEveryoneW = (eFilePermissionsUserWrite |
+                                 eFilePermissionsGroupWrite |
+                                 eFilePermissionsWorldWrite),
+    eFilePermissionsEveryoneX = (eFilePermissionsUserExecute |
+                                 eFilePermissionsGroupExecute |
+                                 eFilePermissionsWorldExecute),
+
+    eFilePermissionsEveryoneRW = (eFilePermissionsEveryoneR |
+                                  eFilePermissionsEveryoneW | 0),
+    eFilePermissionsEveryoneRX = (eFilePermissionsEveryoneR | 0 |
+                                  eFilePermissionsEveryoneX),
+    eFilePermissionsEveryoneRWX = (eFilePermissionsEveryoneR |
+                                   eFilePermissionsEveryoneW |
+                                   eFilePermissionsEveryoneX),
+    eFilePermissionsFileDefault = eFilePermissionsUserRW,
+    eFilePermissionsDirectoryDefault = eFilePermissionsUserRWX,
+};
+
+//----------------------------------------------------------------------
+// Queue work item types
+//
+// The different types of work that can be enqueued on a libdispatch
+// aka Grand Central Dispatch (GCD) queue.
+//----------------------------------------------------------------------
+enum QueueItemKind {
+  eQueueItemKindUnknown = 0,
+  eQueueItemKindFunction,
+  eQueueItemKindBlock
+};
+
+//----------------------------------------------------------------------
+// Queue type
+// libdispatch aka Grand Central Dispatch (GCD) queues can be either serial
+// (executing on one thread) or concurrent (executing on multiple threads).
+//----------------------------------------------------------------------
+enum QueueKind {
+  eQueueKindUnknown = 0,
+  eQueueKindSerial,
+  eQueueKindConcurrent
+};
+
+//----------------------------------------------------------------------
+// Expression Evaluation Stages
+// These are the cancellable stages of expression evaluation, passed to the
+// expression evaluation callback, so that you can interrupt expression
+// evaluation at the various points in its lifecycle.
+//----------------------------------------------------------------------
+enum ExpressionEvaluationPhase {
+  eExpressionEvaluationParse = 0,
+  eExpressionEvaluationIRGen,
+  eExpressionEvaluationExecution,
+  eExpressionEvaluationComplete
+};
+
+//----------------------------------------------------------------------
+// Watchpoint Kind
+// Indicates what types of events cause the watchpoint to fire.
+// Used by Native*Protocol-related classes.
+//----------------------------------------------------------------------
+FLAGS_ENUM(WatchpointKind){eWatchpointKindRead = (1u << 0),
+                           eWatchpointKindWrite = (1u << 1)};
+
+enum GdbSignal {
+  eGdbSignalBadAccess = 0x91,
+  eGdbSignalBadInstruction = 0x92,
+  eGdbSignalArithmetic = 0x93,
+  eGdbSignalEmulation = 0x94,
+  eGdbSignalSoftware = 0x95,
+  eGdbSignalBreakpoint = 0x96
+};
+
+//----------------------------------------------------------------------
+// Used with SBHost::GetPath (lldb::PathType) to find files that are
+// related to LLDB on the current host machine. Most files are relative
+// to LLDB or are in known locations.
+//----------------------------------------------------------------------
+enum PathType {
+  ePathTypeLLDBShlibDir, // The directory where the lldb.so (unix) or LLDB
+                         // mach-o file in LLDB.framework (MacOSX) exists
+  ePathTypeSupportExecutableDir, // Find LLDB support executable directory
+                                 // (debugserver, etc)
+  ePathTypeHeaderDir,            // Find LLDB header file directory
+  ePathTypePythonDir,            // Find Python modules (PYTHONPATH) directory
+  ePathTypeLLDBSystemPlugins,    // System plug-ins directory
+  ePathTypeLLDBUserPlugins,      // User plug-ins directory
+  ePathTypeLLDBTempSystemDir,    // The LLDB temp directory for this system that
+                                 // will be cleaned up on exit
+  ePathTypeGlobalLLDBTempSystemDir, // The LLDB temp directory for this system,
+                                    // NOT cleaned up on a process exit.
+  ePathTypeClangDir                 // Find path to Clang builtin headers
+};
+
+//----------------------------------------------------------------------
+// Kind of member function
+// Used by the type system
+//----------------------------------------------------------------------
+enum MemberFunctionKind {
+  eMemberFunctionKindUnknown = 0,    // Not sure what the type of this is
+  eMemberFunctionKindConstructor,    // A function used to create instances
+  eMemberFunctionKindDestructor,     // A function used to tear down existing
+                                     // instances
+  eMemberFunctionKindInstanceMethod, // A function that applies to a specific
+                                     // instance
+  eMemberFunctionKindStaticMethod    // A function that applies to a type rather
+                                     // than any instance
+};
+
+//----------------------------------------------------------------------
+// String matching algorithm used by SBTarget
+//----------------------------------------------------------------------
+enum MatchType { eMatchTypeNormal, eMatchTypeRegex, eMatchTypeStartsWith };
+
+//----------------------------------------------------------------------
+// Bitmask that describes details about a type
+//----------------------------------------------------------------------
+FLAGS_ENUM(TypeFlags){
+    eTypeHasChildren = (1u << 0),       eTypeHasValue = (1u << 1),
+    eTypeIsArray = (1u << 2),           eTypeIsBlock = (1u << 3),
+    eTypeIsBuiltIn = (1u << 4),         eTypeIsClass = (1u << 5),
+    eTypeIsCPlusPlus = (1u << 6),       eTypeIsEnumeration = (1u << 7),
+    eTypeIsFuncPrototype = (1u << 8),   eTypeIsMember = (1u << 9),
+    eTypeIsObjC = (1u << 10),           eTypeIsPointer = (1u << 11),
+    eTypeIsReference = (1u << 12),      eTypeIsStructUnion = (1u << 13),
+    eTypeIsTemplate = (1u << 14),       eTypeIsTypedef = (1u << 15),
+    eTypeIsVector = (1u << 16),         eTypeIsScalar = (1u << 17),
+    eTypeIsInteger = (1u << 18),        eTypeIsFloat = (1u << 19),
+    eTypeIsComplex = (1u << 20),        eTypeIsSigned = (1u << 21),
+    eTypeInstanceIsPointer = (1u << 22)};
 
+FLAGS_ENUM(CommandFlags){
     //----------------------------------------------------------------------
-    // The results of expression evaluation:
-    //----------------------------------------------------------------------
-    enum ExpressionResults
-    {
-        eExpressionCompleted = 0,
-        eExpressionSetupError,
-        eExpressionParseError,
-        eExpressionDiscarded,
-        eExpressionInterrupted,
-        eExpressionHitBreakpoint,
-        eExpressionTimedOut,
-        eExpressionResultUnavailable,
-        eExpressionStoppedForDebug
-    };
-
-    //----------------------------------------------------------------------
-    // Connection Status Types
-    //----------------------------------------------------------------------
-    enum ConnectionStatus
-    {
-        eConnectionStatusSuccess,         // Success
-        eConnectionStatusEndOfFile,       // End-of-file encountered
-        eConnectionStatusError,           // Check GetError() for details
-        eConnectionStatusTimedOut,        // Request timed out
-        eConnectionStatusNoConnection,    // No connection
-        eConnectionStatusLostConnection,  // Lost connection while connected to a valid connection
-        eConnectionStatusInterrupted      // Interrupted read
-    };
-
-    enum ErrorType
-    {
-        eErrorTypeInvalid,
-        eErrorTypeGeneric,      ///< Generic errors that can be any value.
-        eErrorTypeMachKernel,   ///< Mach kernel error codes.
-        eErrorTypePOSIX,        ///< POSIX error codes.
-        eErrorTypeExpression,   ///< These are from the ExpressionResults enum.
-        eErrorTypeWin32         ///< Standard Win32 error codes.
-    };
-
-    enum ValueType
-    {
-        eValueTypeInvalid = 0,
-        eValueTypeVariableGlobal = 1,     // globals variable
-        eValueTypeVariableStatic = 2,     // static variable
-        eValueTypeVariableArgument = 3,   // function argument variables
-        eValueTypeVariableLocal = 4,      // function local variables
-        eValueTypeRegister = 5,           // stack frame register value
-        eValueTypeRegisterSet = 6,        // A collection of stack frame register values
-        eValueTypeConstResult = 7,        // constant result variables
-        eValueTypeVariableThreadLocal = 8 // thread local storage variable
-    };
-
-    //----------------------------------------------------------------------
-    // Token size/granularities for Input Readers
-    //----------------------------------------------------------------------
-
-    enum InputReaderGranularity
-    {
-        eInputReaderGranularityInvalid = 0,
-        eInputReaderGranularityByte,
-        eInputReaderGranularityWord,
-        eInputReaderGranularityLine,
-        eInputReaderGranularityAll
-    };
-
-    //------------------------------------------------------------------
-    /// These mask bits allow a common interface for queries that can
-    /// limit the amount of information that gets parsed to only the
-    /// information that is requested. These bits also can indicate what
-    /// actually did get resolved during query function calls.
-    ///
-    /// Each definition corresponds to a one of the member variables
-    /// in this class, and requests that that item be resolved, or
-    /// indicates that the member did get resolved.
-    //------------------------------------------------------------------
-    FLAGS_ENUM(SymbolContextItem)
-    {
-        eSymbolContextTarget     = (1u << 0), ///< Set when \a target is requested from a query, or was located in query results
-        eSymbolContextModule     = (1u << 1), ///< Set when \a module is requested from a query, or was located in query results
-        eSymbolContextCompUnit   = (1u << 2), ///< Set when \a comp_unit is requested from a query, or was located in query results
-        eSymbolContextFunction   = (1u << 3), ///< Set when \a function is requested from a query, or was located in query results
-        eSymbolContextBlock      = (1u << 4), ///< Set when the deepest \a block is requested from a query, or was located in query results
-        eSymbolContextLineEntry  = (1u << 5), ///< Set when \a line_entry is requested from a query, or was located in query results
-        eSymbolContextSymbol     = (1u << 6), ///< Set when \a symbol is requested from a query, or was located in query results
-        eSymbolContextEverything = ((eSymbolContextSymbol << 1) - 1u),  ///< Indicates to try and lookup everything up during a routine symbol context query.
-        eSymbolContextVariable   = (1u << 7)  ///< Set when \a global or static variable is requested from a query, or was located in query results.
-                                              ///< eSymbolContextVariable is potentially expensive to lookup so it isn't included in
-                                              ///< eSymbolContextEverything which stops it from being used during frame PC lookups and
-                                              ///< many other potential address to symbol context lookups.
-    };
-
-    FLAGS_ENUM(Permissions)
-    {
-        ePermissionsWritable    = (1u << 0),
-        ePermissionsReadable    = (1u << 1),
-        ePermissionsExecutable  = (1u << 2)
-    };
-
-    enum InputReaderAction
-    {
-        eInputReaderActivate,   // reader is newly pushed onto the reader stack 
-        eInputReaderAsynchronousOutputWritten, // an async output event occurred; the reader may want to do something
-        eInputReaderReactivate, // reader is on top of the stack again after another reader was popped off 
-        eInputReaderDeactivate, // another reader was pushed on the stack 
-        eInputReaderGotToken,   // reader got one of its tokens (granularity)
-        eInputReaderInterrupt,  // reader received an interrupt signal (probably from a control-c)
-        eInputReaderEndOfFile,  // reader received an EOF char (probably from a control-d)
-        eInputReaderDone        // reader was just popped off the stack and is done
-    };
-
-    FLAGS_ENUM(BreakpointEventType)
-    {
-        eBreakpointEventTypeInvalidType         = (1u << 0),
-        eBreakpointEventTypeAdded               = (1u << 1),
-        eBreakpointEventTypeRemoved             = (1u << 2),
-        eBreakpointEventTypeLocationsAdded      = (1u << 3),  // Locations added doesn't get sent when the breakpoint is created
-        eBreakpointEventTypeLocationsRemoved    = (1u << 4),
-        eBreakpointEventTypeLocationsResolved   = (1u << 5),
-        eBreakpointEventTypeEnabled             = (1u << 6),
-        eBreakpointEventTypeDisabled            = (1u << 7),
-        eBreakpointEventTypeCommandChanged      = (1u << 8),
-        eBreakpointEventTypeConditionChanged    = (1u << 9),
-        eBreakpointEventTypeIgnoreChanged       = (1u << 10),
-        eBreakpointEventTypeThreadChanged       = (1u << 11)
-    };
-
-    FLAGS_ENUM(WatchpointEventType)
-    {
-        eWatchpointEventTypeInvalidType         = (1u << 0),
-        eWatchpointEventTypeAdded               = (1u << 1),
-        eWatchpointEventTypeRemoved             = (1u << 2),
-        eWatchpointEventTypeEnabled             = (1u << 6),
-        eWatchpointEventTypeDisabled            = (1u << 7),
-        eWatchpointEventTypeCommandChanged      = (1u << 8),
-        eWatchpointEventTypeConditionChanged    = (1u << 9),
-        eWatchpointEventTypeIgnoreChanged       = (1u << 10),
-        eWatchpointEventTypeThreadChanged       = (1u << 11),
-        eWatchpointEventTypeTypeChanged         = (1u << 12)
-    };
-
-
-    //----------------------------------------------------------------------
-    /// Programming language type.
-    ///
-    /// These enumerations use the same language enumerations as the DWARF
-    /// specification for ease of use and consistency.
-    /// The enum -> string code is in Language.cpp, don't change this
-    /// table without updating that code as well.
-    //----------------------------------------------------------------------
-    enum LanguageType
-    {
-        eLanguageTypeUnknown         = 0x0000,   ///< Unknown or invalid language value.
-        eLanguageTypeC89             = 0x0001,   ///< ISO C:1989.
-        eLanguageTypeC               = 0x0002,   ///< Non-standardized C, such as K&R.
-        eLanguageTypeAda83           = 0x0003,   ///< ISO Ada:1983.
-        eLanguageTypeC_plus_plus     = 0x0004,   ///< ISO C++:1998.
-        eLanguageTypeCobol74         = 0x0005,   ///< ISO Cobol:1974.
-        eLanguageTypeCobol85         = 0x0006,   ///< ISO Cobol:1985.
-        eLanguageTypeFortran77       = 0x0007,   ///< ISO Fortran 77.
-        eLanguageTypeFortran90       = 0x0008,   ///< ISO Fortran 90.
-        eLanguageTypePascal83        = 0x0009,   ///< ISO Pascal:1983.
-        eLanguageTypeModula2         = 0x000a,   ///< ISO Modula-2:1996.
-        eLanguageTypeJava            = 0x000b,   ///< Java.
-        eLanguageTypeC99             = 0x000c,   ///< ISO C:1999.
-        eLanguageTypeAda95           = 0x000d,   ///< ISO Ada:1995.
-        eLanguageTypeFortran95       = 0x000e,   ///< ISO Fortran 95.
-        eLanguageTypePLI             = 0x000f,   ///< ANSI PL/I:1976.
-        eLanguageTypeObjC            = 0x0010,   ///< Objective-C.
-        eLanguageTypeObjC_plus_plus  = 0x0011,   ///< Objective-C++.
-        eLanguageTypeUPC             = 0x0012,   ///< Unified Parallel C.
-        eLanguageTypeD               = 0x0013,   ///< D.
-        eLanguageTypePython          = 0x0014,   ///< Python.
-        // NOTE: The below are DWARF5 constants, subject to change upon
-        // completion of the DWARF5 specification
-        eLanguageTypeOpenCL          = 0x0015,   ///< OpenCL.
-        eLanguageTypeGo              = 0x0016,   ///< Go.
-        eLanguageTypeModula3         = 0x0017,   ///< Modula 3.
-        eLanguageTypeHaskell         = 0x0018,   ///< Haskell.
-        eLanguageTypeC_plus_plus_03  = 0x0019,   ///< ISO C++:2003.
-        eLanguageTypeC_plus_plus_11  = 0x001a,   ///< ISO C++:2011.
-        eLanguageTypeOCaml           = 0x001b,   ///< OCaml.
-        eLanguageTypeRust            = 0x001c,   ///< Rust.
-        eLanguageTypeC11             = 0x001d,   ///< ISO C:2011.
-        eLanguageTypeSwift           = 0x001e,   ///< Swift.
-        eLanguageTypeJulia           = 0x001f,   ///< Julia.
-        eLanguageTypeDylan           = 0x0020,   ///< Dylan.
-        eLanguageTypeC_plus_plus_14  = 0x0021,   ///< ISO C++:2014.
-        eLanguageTypeFortran03       = 0x0022,   ///< ISO Fortran 2003.
-        eLanguageTypeFortran08       = 0x0023,   ///< ISO Fortran 2008.
-        // Vendor Extensions
-        // Note: Language::GetNameForLanguageType
-        // assumes these can be used as indexes into array language_names, and
-        // Language::SetLanguageFromCString and Language::AsCString
-        // assume these can be used as indexes into array g_languages.
-        eLanguageTypeMipsAssembler   = 0x0024,   ///< Mips_Assembler.
-        eLanguageTypeExtRenderScript = 0x0025,   ///< RenderScript.
-        eNumLanguageTypes
-    };
-    
-    enum InstrumentationRuntimeType
-    {
-        eInstrumentationRuntimeTypeAddressSanitizer = 0x0000,
-        eInstrumentationRuntimeTypeThreadSanitizer = 0x0001,
-        eNumInstrumentationRuntimeTypes
-    };
-
-    enum DynamicValueType
-    {
-        eNoDynamicValues = 0,
-        eDynamicCanRunTarget    = 1,
-        eDynamicDontRunTarget   = 2
-    };
-    
-    enum AccessType
-    {
-        eAccessNone,
-        eAccessPublic,
-        eAccessPrivate,
-        eAccessProtected,
-        eAccessPackage
-    };
-
-    enum CommandArgumentType
-    {
-        eArgTypeAddress = 0,
-        eArgTypeAddressOrExpression,
-        eArgTypeAliasName,
-        eArgTypeAliasOptions,
-        eArgTypeArchitecture,
-        eArgTypeBoolean,
-        eArgTypeBreakpointID,
-        eArgTypeBreakpointIDRange,
-        eArgTypeBreakpointName,
-        eArgTypeByteSize,
-        eArgTypeClassName,
-        eArgTypeCommandName,
-        eArgTypeCount,
-        eArgTypeDescriptionVerbosity,
-        eArgTypeDirectoryName,
-        eArgTypeDisassemblyFlavor,
-        eArgTypeEndAddress,
-        eArgTypeExpression,
-        eArgTypeExpressionPath,
-        eArgTypeExprFormat,
-        eArgTypeFilename,
-        eArgTypeFormat,
-        eArgTypeFrameIndex,
-        eArgTypeFullName,
-        eArgTypeFunctionName,
-        eArgTypeFunctionOrSymbol,
-        eArgTypeGDBFormat,
-        eArgTypeHelpText,
-        eArgTypeIndex,
-        eArgTypeLanguage,
-        eArgTypeLineNum,
-        eArgTypeLogCategory,
-        eArgTypeLogChannel,
-        eArgTypeMethod,
-        eArgTypeName,
-        eArgTypeNewPathPrefix,
-        eArgTypeNumLines,
-        eArgTypeNumberPerLine,
-        eArgTypeOffset,
-        eArgTypeOldPathPrefix,
-        eArgTypeOneLiner,
-        eArgTypePath,
-        eArgTypePermissionsNumber,
-        eArgTypePermissionsString,
-        eArgTypePid,
-        eArgTypePlugin,
-        eArgTypeProcessName,
-        eArgTypePythonClass,
-        eArgTypePythonFunction,
-        eArgTypePythonScript,
-        eArgTypeQueueName,
-        eArgTypeRegisterName,
-        eArgTypeRegularExpression,
-        eArgTypeRunArgs,
-        eArgTypeRunMode,
-        eArgTypeScriptedCommandSynchronicity,
-        eArgTypeScriptLang,
-        eArgTypeSearchWord,
-        eArgTypeSelector,
-        eArgTypeSettingIndex,
-        eArgTypeSettingKey,
-        eArgTypeSettingPrefix,
-        eArgTypeSettingVariableName,
-        eArgTypeShlibName,
-        eArgTypeSourceFile,
-        eArgTypeSortOrder,
-        eArgTypeStartAddress,
-        eArgTypeSummaryString,
-        eArgTypeSymbol,
-        eArgTypeThreadID,
-        eArgTypeThreadIndex,
-        eArgTypeThreadName,
-        eArgTypeTypeName,
-        eArgTypeUnsignedInteger,
-        eArgTypeUnixSignal,
-        eArgTypeVarName,
-        eArgTypeValue,
-        eArgTypeWidth,
-        eArgTypeNone,
-        eArgTypePlatform,
-        eArgTypeWatchpointID,
-        eArgTypeWatchpointIDRange,
-        eArgTypeWatchType,
-        eArgRawInput,
-        eArgTypeLastArg // Always keep this entry as the last entry in this enumeration!!
-    };
-
-    //----------------------------------------------------------------------
-    // Symbol types
-    //----------------------------------------------------------------------
-    enum SymbolType
-    {
-        eSymbolTypeAny = 0,
-        eSymbolTypeInvalid = 0,
-        eSymbolTypeAbsolute,
-        eSymbolTypeCode,
-        eSymbolTypeResolver,
-        eSymbolTypeData,
-        eSymbolTypeTrampoline,
-        eSymbolTypeRuntime,
-        eSymbolTypeException,
-        eSymbolTypeSourceFile,
-        eSymbolTypeHeaderFile,
-        eSymbolTypeObjectFile,
-        eSymbolTypeCommonBlock,
-        eSymbolTypeBlock,
-        eSymbolTypeLocal,
-        eSymbolTypeParam,
-        eSymbolTypeVariable,
-        eSymbolTypeVariableType,
-        eSymbolTypeLineEntry,
-        eSymbolTypeLineHeader,
-        eSymbolTypeScopeBegin,
-        eSymbolTypeScopeEnd,
-        eSymbolTypeAdditional, // When symbols take more than one entry, the extra entries get this type
-        eSymbolTypeCompiler,
-        eSymbolTypeInstrumentation,
-        eSymbolTypeUndefined,
-        eSymbolTypeObjCClass,
-        eSymbolTypeObjCMetaClass,
-        eSymbolTypeObjCIVar,
-        eSymbolTypeReExported
-    };
-    
-    enum SectionType
-    {
-        eSectionTypeInvalid,
-        eSectionTypeCode,
-        eSectionTypeContainer,              // The section contains child sections
-        eSectionTypeData,
-        eSectionTypeDataCString,            // Inlined C string data
-        eSectionTypeDataCStringPointers,    // Pointers to C string data
-        eSectionTypeDataSymbolAddress,      // Address of a symbol in the symbol table
-        eSectionTypeData4,
-        eSectionTypeData8,
-        eSectionTypeData16,
-        eSectionTypeDataPointers,
-        eSectionTypeDebug,
-        eSectionTypeZeroFill,
-        eSectionTypeDataObjCMessageRefs,    // Pointer to function pointer + selector
-        eSectionTypeDataObjCCFStrings,      // Objective C const CFString/NSString objects
-        eSectionTypeDWARFDebugAbbrev,
-        eSectionTypeDWARFDebugAddr,
-        eSectionTypeDWARFDebugAranges,
-        eSectionTypeDWARFDebugFrame,
-        eSectionTypeDWARFDebugInfo,
-        eSectionTypeDWARFDebugLine,
-        eSectionTypeDWARFDebugLoc,
-        eSectionTypeDWARFDebugMacInfo,
-        eSectionTypeDWARFDebugMacro,
-        eSectionTypeDWARFDebugPubNames,
-        eSectionTypeDWARFDebugPubTypes,
-        eSectionTypeDWARFDebugRanges,
-        eSectionTypeDWARFDebugStr,
-        eSectionTypeDWARFDebugStrOffsets,
-        eSectionTypeDWARFAppleNames,
-        eSectionTypeDWARFAppleTypes,
-        eSectionTypeDWARFAppleNamespaces,
-        eSectionTypeDWARFAppleObjC,
-        eSectionTypeELFSymbolTable,       // Elf SHT_SYMTAB section
-        eSectionTypeELFDynamicSymbols,    // Elf SHT_DYNSYM section
-        eSectionTypeELFRelocationEntries, // Elf SHT_REL or SHT_REL section
-        eSectionTypeELFDynamicLinkInfo,   // Elf SHT_DYNAMIC section
-        eSectionTypeEHFrame,
-        eSectionTypeARMexidx,
-        eSectionTypeARMextab,
-        eSectionTypeCompactUnwind,        // compact unwind section in Mach-O, __TEXT,__unwind_info
-        eSectionTypeGoSymtab,
-        eSectionTypeAbsoluteAddress,      // Dummy section for symbols with absolute address
-        eSectionTypeOther
-    };
-
-    FLAGS_ENUM(EmulateInstructionOptions)
-    {
-        eEmulateInstructionOptionNone               = (0u),
-        eEmulateInstructionOptionAutoAdvancePC      = (1u << 0),
-        eEmulateInstructionOptionIgnoreConditions   = (1u << 1)
-    };
-
-    FLAGS_ENUM(FunctionNameType)
-    {
-        eFunctionNameTypeNone       = 0u,
-        eFunctionNameTypeAuto       = (1u << 1),    // Automatically figure out which FunctionNameType
-                                                    // bits to set based on the function name.
-        eFunctionNameTypeFull       = (1u << 2),    // The function name.
-                                                    // For C this is the same as just the name of the function
-                                                    // For C++ this is the mangled or demangled version of the mangled name.
-                                                    // For ObjC this is the full function signature with the + or
-                                                    // - and the square brackets and the class and selector
-        eFunctionNameTypeBase       = (1u << 3),    // The function name only, no namespaces or arguments and no class 
-                                                    // methods or selectors will be searched.
-        eFunctionNameTypeMethod     = (1u << 4),    // Find function by method name (C++) with no namespace or arguments
-        eFunctionNameTypeSelector   = (1u << 5),    // Find function by selector name (ObjC) names
-        eFunctionNameTypeAny        = eFunctionNameTypeAuto // DEPRECATED: use eFunctionNameTypeAuto
-    };
-    
-    
-    //----------------------------------------------------------------------
-    // Basic types enumeration for the public API SBType::GetBasicType()
-    //----------------------------------------------------------------------
-    enum BasicType
-    {
-		eBasicTypeInvalid = 0,
-        eBasicTypeVoid = 1,
-        eBasicTypeChar,
-        eBasicTypeSignedChar,
-        eBasicTypeUnsignedChar,
-        eBasicTypeWChar,
-        eBasicTypeSignedWChar,
-        eBasicTypeUnsignedWChar,
-        eBasicTypeChar16,
-        eBasicTypeChar32,
-        eBasicTypeShort,
-        eBasicTypeUnsignedShort,
-        eBasicTypeInt,
-        eBasicTypeUnsignedInt,
-        eBasicTypeLong,
-        eBasicTypeUnsignedLong,
-        eBasicTypeLongLong,
-        eBasicTypeUnsignedLongLong,
-        eBasicTypeInt128,
-        eBasicTypeUnsignedInt128,
-        eBasicTypeBool,
-        eBasicTypeHalf,
-        eBasicTypeFloat,
-        eBasicTypeDouble,
-        eBasicTypeLongDouble,
-        eBasicTypeFloatComplex,
-        eBasicTypeDoubleComplex,
-        eBasicTypeLongDoubleComplex,
-        eBasicTypeObjCID,
-        eBasicTypeObjCClass,
-        eBasicTypeObjCSel,
-        eBasicTypeNullPtr,
-        eBasicTypeOther
-    };
-
-    FLAGS_ENUM(TypeClass)
-    {
-        eTypeClassInvalid           = (0u),
-        eTypeClassArray             = (1u << 0),
-        eTypeClassBlockPointer      = (1u << 1),
-        eTypeClassBuiltin           = (1u << 2),
-        eTypeClassClass             = (1u << 3),
-        eTypeClassComplexFloat      = (1u << 4),
-        eTypeClassComplexInteger    = (1u << 5),
-        eTypeClassEnumeration       = (1u << 6),
-        eTypeClassFunction          = (1u << 7),
-        eTypeClassMemberPointer     = (1u << 8),
-        eTypeClassObjCObject        = (1u << 9),
-        eTypeClassObjCInterface     = (1u << 10),
-        eTypeClassObjCObjectPointer = (1u << 11),
-        eTypeClassPointer           = (1u << 12),
-        eTypeClassReference         = (1u << 13),
-        eTypeClassStruct            = (1u << 14),
-        eTypeClassTypedef           = (1u << 15),
-        eTypeClassUnion             = (1u << 16),
-        eTypeClassVector            = (1u << 17),
-        // Define the last type class as the MSBit of a 32 bit value
-        eTypeClassOther             = (1u << 31),
-        // Define a mask that can be used for any type when finding types
-        eTypeClassAny               = (0xffffffffu)
-    };
-
-    enum TemplateArgumentKind
-    {
-        eTemplateArgumentKindNull = 0,
-        eTemplateArgumentKindType,
-        eTemplateArgumentKindDeclaration,
-        eTemplateArgumentKindIntegral,
-        eTemplateArgumentKindTemplate,
-        eTemplateArgumentKindTemplateExpansion,
-        eTemplateArgumentKindExpression,
-        eTemplateArgumentKindPack
-
-    };
-
-    //----------------------------------------------------------------------
-    // Options that can be set for a formatter to alter its behavior
-    // Not all of these are applicable to all formatter types
-    //----------------------------------------------------------------------
-    FLAGS_ENUM(TypeOptions)
-    {
-        eTypeOptionNone                = (0u),
-        eTypeOptionCascade             = (1u << 0),
-        eTypeOptionSkipPointers        = (1u << 1),
-        eTypeOptionSkipReferences      = (1u << 2),
-        eTypeOptionHideChildren        = (1u << 3),
-        eTypeOptionHideValue           = (1u << 4),
-        eTypeOptionShowOneLiner        = (1u << 5),
-        eTypeOptionHideNames           = (1u << 6),
-        eTypeOptionNonCacheable        = (1u << 7),
-        eTypeOptionHideEmptyAggregates = (1u << 8)
-    };
-
-   //----------------------------------------------------------------------
-   // This is the return value for frame comparisons.  If you are comparing frame A to frame B
-   // the following cases arise:
-   // 1) When frame A pushes frame B (or a frame that ends up pushing B) A is Older than B.
-   // 2) When frame A pushed frame B (or if frame A is on the stack but B is not) A is Younger than B
-   // 3) When frame A and frame B have the same StackID, they are Equal.
-   // 4) When frame A and frame B have the same immediate parent frame, but are not equal, the comparison yields
-   //    SameParent.
-   // 5) If the two frames are on different threads or processes the comparison is Invalid
-   // 6) If for some reason we can't figure out what went on, we return Unknown.
-   //----------------------------------------------------------------------
-   enum FrameComparison
-   {
-       eFrameCompareInvalid,
-       eFrameCompareUnknown,
-       eFrameCompareEqual,
-       eFrameCompareSameParent,
-       eFrameCompareYounger,
-       eFrameCompareOlder
-   };
-   
-    //----------------------------------------------------------------------
-    // Address Class
+    // eCommandRequiresTarget
     //
-    // A way of classifying an address used for disassembling and setting 
-    // breakpoints. Many object files can track exactly what parts of their
-    // object files are code, data and other information. This is of course
-    // above and beyond just looking at the section types. For example, code
-    // might contain PC relative data and the object file might be able to
-    // tell us that an address in code is data.
+    // Ensures a valid target is contained in m_exe_ctx prior to executing
+    // the command. If a target doesn't exist or is invalid, the command
+    // will fail and CommandObject::GetInvalidTargetDescription() will be
+    // returned as the error. CommandObject subclasses can override the
+    // virtual function for GetInvalidTargetDescription() to provide custom
+    // strings when needed.
     //----------------------------------------------------------------------
-    enum AddressClass
-    {
-        eAddressClassInvalid,
-        eAddressClassUnknown,
-        eAddressClassCode,
-        eAddressClassCodeAlternateISA,
-        eAddressClassData,
-        eAddressClassDebug,
-        eAddressClassRuntime
-    };
-
+    eCommandRequiresTarget = (1u << 0),
     //----------------------------------------------------------------------
-    // File Permissions
+    // eCommandRequiresProcess
     //
-    // Designed to mimic the unix file permission bits so they can be
-    // used with functions that set 'mode_t' to certain values for
-    // permissions.
+    // Ensures a valid process is contained in m_exe_ctx prior to executing
+    // the command. If a process doesn't exist or is invalid, the command
+    // will fail and CommandObject::GetInvalidProcessDescription() will be
+    // returned as the error. CommandObject subclasses can override the
+    // virtual function for GetInvalidProcessDescription() to provide custom
+    // strings when needed.
     //----------------------------------------------------------------------
-    FLAGS_ENUM(FilePermissions)
-    {
-        eFilePermissionsUserRead        = (1u << 8),
-        eFilePermissionsUserWrite       = (1u << 7),
-        eFilePermissionsUserExecute     = (1u << 6),
-        eFilePermissionsGroupRead       = (1u << 5),
-        eFilePermissionsGroupWrite      = (1u << 4),
-        eFilePermissionsGroupExecute    = (1u << 3),
-        eFilePermissionsWorldRead       = (1u << 2),
-        eFilePermissionsWorldWrite      = (1u << 1),
-        eFilePermissionsWorldExecute    = (1u << 0),
-        
-        eFilePermissionsUserRW      = (eFilePermissionsUserRead    | eFilePermissionsUserWrite      | 0                             ),
-        eFileFilePermissionsUserRX  = (eFilePermissionsUserRead    | 0                              | eFilePermissionsUserExecute   ),
-        eFilePermissionsUserRWX     = (eFilePermissionsUserRead    | eFilePermissionsUserWrite      | eFilePermissionsUserExecute   ),
-            
-        eFilePermissionsGroupRW     = (eFilePermissionsGroupRead   | eFilePermissionsGroupWrite     | 0                             ),
-        eFilePermissionsGroupRX     = (eFilePermissionsGroupRead   | 0                              | eFilePermissionsGroupExecute  ),
-        eFilePermissionsGroupRWX    = (eFilePermissionsGroupRead   | eFilePermissionsGroupWrite     | eFilePermissionsGroupExecute  ),
-        
-        eFilePermissionsWorldRW     = (eFilePermissionsWorldRead   | eFilePermissionsWorldWrite     | 0                             ),
-        eFilePermissionsWorldRX     = (eFilePermissionsWorldRead   | 0                              | eFilePermissionsWorldExecute  ),
-        eFilePermissionsWorldRWX    = (eFilePermissionsWorldRead   | eFilePermissionsWorldWrite     | eFilePermissionsWorldExecute  ),
-        
-        eFilePermissionsEveryoneR   = (eFilePermissionsUserRead    | eFilePermissionsGroupRead      | eFilePermissionsWorldRead     ),
-        eFilePermissionsEveryoneW   = (eFilePermissionsUserWrite   | eFilePermissionsGroupWrite     | eFilePermissionsWorldWrite    ),
-        eFilePermissionsEveryoneX   = (eFilePermissionsUserExecute | eFilePermissionsGroupExecute   | eFilePermissionsWorldExecute  ),
-        
-        eFilePermissionsEveryoneRW  = (eFilePermissionsEveryoneR   | eFilePermissionsEveryoneW      | 0                             ),
-        eFilePermissionsEveryoneRX  = (eFilePermissionsEveryoneR   | 0                              | eFilePermissionsEveryoneX     ),
-        eFilePermissionsEveryoneRWX = (eFilePermissionsEveryoneR   | eFilePermissionsEveryoneW      | eFilePermissionsEveryoneX     ),
-        eFilePermissionsFileDefault = eFilePermissionsUserRW,
-        eFilePermissionsDirectoryDefault = eFilePermissionsUserRWX,
-    };
-
+    eCommandRequiresProcess = (1u << 1),
     //----------------------------------------------------------------------
-    // Queue work item types
+    // eCommandRequiresThread
     //
-    // The different types of work that can be enqueued on a libdispatch
-    // aka Grand Central Dispatch (GCD) queue.
+    // Ensures a valid thread is contained in m_exe_ctx prior to executing
+    // the command. If a thread doesn't exist or is invalid, the command
+    // will fail and CommandObject::GetInvalidThreadDescription() will be
+    // returned as the error. CommandObject subclasses can override the
+    // virtual function for GetInvalidThreadDescription() to provide custom
+    // strings when needed.
     //----------------------------------------------------------------------
-    enum QueueItemKind
-    {
-        eQueueItemKindUnknown = 0,
-        eQueueItemKindFunction,
-        eQueueItemKindBlock
-    };
-
+    eCommandRequiresThread = (1u << 2),
     //----------------------------------------------------------------------
-    // Queue type
-    // libdispatch aka Grand Central Dispatch (GCD) queues can be either serial
-    // (executing on one thread) or concurrent (executing on multiple threads).
+    // eCommandRequiresFrame
+    //
+    // Ensures a valid frame is contained in m_exe_ctx prior to executing
+    // the command. If a frame doesn't exist or is invalid, the command
+    // will fail and CommandObject::GetInvalidFrameDescription() will be
+    // returned as the error. CommandObject subclasses can override the
+    // virtual function for GetInvalidFrameDescription() to provide custom
+    // strings when needed.
     //----------------------------------------------------------------------
-    enum QueueKind
-    {
-        eQueueKindUnknown = 0,
-        eQueueKindSerial,
-        eQueueKindConcurrent
-    };
-    
+    eCommandRequiresFrame = (1u << 3),
     //----------------------------------------------------------------------
-    // Expression Evaluation Stages
-    // These are the cancellable stages of expression evaluation, passed to the
-    // expression evaluation callback, so that you can interrupt expression
-    // evaluation at the various points in its lifecycle.
+    // eCommandRequiresRegContext
+    //
+    // Ensures a valid register context (from the selected frame if there
+    // is a frame in m_exe_ctx, or from the selected thread from m_exe_ctx)
+    // is available from m_exe_ctx prior to executing the command. If a
+    // target doesn't exist or is invalid, the command will fail and
+    // CommandObject::GetInvalidRegContextDescription() will be returned as
+    // the error. CommandObject subclasses can override the virtual function
+    // for GetInvalidRegContextDescription() to provide custom strings when
+    // needed.
     //----------------------------------------------------------------------
-    enum ExpressionEvaluationPhase
-    {
-        eExpressionEvaluationParse = 0,
-        eExpressionEvaluationIRGen,
-        eExpressionEvaluationExecution,
-        eExpressionEvaluationComplete
-    };
-    
-
+    eCommandRequiresRegContext = (1u << 4),
     //----------------------------------------------------------------------
-    // Watchpoint Kind
-    // Indicates what types of events cause the watchpoint to fire.
-    // Used by Native*Protocol-related classes.
+    // eCommandTryTargetAPILock
+    //
+    // Attempts to acquire the target lock if a target is selected in the
+    // command interpreter. If the command object fails to acquire the API
+    // lock, the command will fail with an appropriate error message.
     //----------------------------------------------------------------------
-    FLAGS_ENUM(WatchpointKind)
-    {
-        eWatchpointKindRead = (1u << 0),
-        eWatchpointKindWrite = (1u << 1)
-    };
-
-    enum GdbSignal
-    {
-        eGdbSignalBadAccess      = 0x91,
-        eGdbSignalBadInstruction = 0x92,
-        eGdbSignalArithmetic     = 0x93,
-        eGdbSignalEmulation      = 0x94,
-        eGdbSignalSoftware       = 0x95,
-        eGdbSignalBreakpoint     = 0x96
-    };
-
+    eCommandTryTargetAPILock = (1u << 5),
     //----------------------------------------------------------------------
-    // Used with SBHost::GetPath (lldb::PathType) to find files that are
-    // related to LLDB on the current host machine. Most files are relative
-    // to LLDB or are in known locations.
+    // eCommandProcessMustBeLaunched
+    //
+    // Verifies that there is a launched process in m_exe_ctx, if there
+    // isn't, the command will fail with an appropriate error message.
     //----------------------------------------------------------------------
-    enum PathType
-    {
-        ePathTypeLLDBShlibDir,            // The directory where the lldb.so (unix) or LLDB mach-o file in LLDB.framework (MacOSX) exists
-        ePathTypeSupportExecutableDir,    // Find LLDB support executable directory (debugserver, etc)
-        ePathTypeHeaderDir,               // Find LLDB header file directory
-        ePathTypePythonDir,               // Find Python modules (PYTHONPATH) directory
-        ePathTypeLLDBSystemPlugins,       // System plug-ins directory
-        ePathTypeLLDBUserPlugins,         // User plug-ins directory
-        ePathTypeLLDBTempSystemDir,       // The LLDB temp directory for this system that will be cleaned up on exit
-        ePathTypeGlobalLLDBTempSystemDir, // The LLDB temp directory for this system, NOT cleaned up on a process exit.
-        ePathTypeClangDir                 // Find path to Clang builtin headers
-    };
-    
+    eCommandProcessMustBeLaunched = (1u << 6),
     //----------------------------------------------------------------------
-    // Kind of member function
-    // Used by the type system
+    // eCommandProcessMustBePaused
+    //
+    // Verifies that there is a paused process in m_exe_ctx, if there
+    // isn't, the command will fail with an appropriate error message.
     //----------------------------------------------------------------------
-    enum MemberFunctionKind
-    {
-        eMemberFunctionKindUnknown = 0,     // Not sure what the type of this is
-        eMemberFunctionKindConstructor,     // A function used to create instances
-        eMemberFunctionKindDestructor,      // A function used to tear down existing instances
-        eMemberFunctionKindInstanceMethod,  // A function that applies to a specific instance
-        eMemberFunctionKindStaticMethod     // A function that applies to a type rather than any instance
-    };
-
+    eCommandProcessMustBePaused = (1u << 7)};
 
-    //----------------------------------------------------------------------
-    // String matching algorithm used by SBTarget
-    //----------------------------------------------------------------------
-    enum MatchType
-    {
-        eMatchTypeNormal,
-        eMatchTypeRegex,
-        eMatchTypeStartsWith
-    };
-    
-    //----------------------------------------------------------------------
-    // Bitmask that describes details about a type
-    //----------------------------------------------------------------------
-    FLAGS_ENUM(TypeFlags)
-    {
-        eTypeHasChildren        = (1u <<  0),
-        eTypeHasValue           = (1u <<  1),
-        eTypeIsArray            = (1u <<  2),
-        eTypeIsBlock            = (1u <<  3),
-        eTypeIsBuiltIn          = (1u <<  4),
-        eTypeIsClass            = (1u <<  5),
-        eTypeIsCPlusPlus        = (1u <<  6),
-        eTypeIsEnumeration      = (1u <<  7),
-        eTypeIsFuncPrototype    = (1u <<  8),
-        eTypeIsMember           = (1u <<  9),
-        eTypeIsObjC             = (1u << 10),
-        eTypeIsPointer          = (1u << 11),
-        eTypeIsReference        = (1u << 12),
-        eTypeIsStructUnion      = (1u << 13),
-        eTypeIsTemplate         = (1u << 14),
-        eTypeIsTypedef          = (1u << 15),
-        eTypeIsVector           = (1u << 16),
-        eTypeIsScalar           = (1u << 17),
-        eTypeIsInteger          = (1u << 18),
-        eTypeIsFloat            = (1u << 19),
-        eTypeIsComplex          = (1u << 20),
-        eTypeIsSigned           = (1u << 21),
-        eTypeInstanceIsPointer  = (1u << 22)
-    };
-    
-    FLAGS_ENUM(CommandFlags)
-    {
-        //----------------------------------------------------------------------
-        // eCommandRequiresTarget
-        //
-        // Ensures a valid target is contained in m_exe_ctx prior to executing
-        // the command. If a target doesn't exist or is invalid, the command
-        // will fail and CommandObject::GetInvalidTargetDescription() will be
-        // returned as the error. CommandObject subclasses can override the
-        // virtual function for GetInvalidTargetDescription() to provide custom
-        // strings when needed.
-        //----------------------------------------------------------------------
-        eCommandRequiresTarget         = (1u << 0),
-        //----------------------------------------------------------------------
-        // eCommandRequiresProcess
-        //
-        // Ensures a valid process is contained in m_exe_ctx prior to executing
-        // the command. If a process doesn't exist or is invalid, the command
-        // will fail and CommandObject::GetInvalidProcessDescription() will be
-        // returned as the error. CommandObject subclasses can override the
-        // virtual function for GetInvalidProcessDescription() to provide custom
-        // strings when needed.
-        //----------------------------------------------------------------------
-        eCommandRequiresProcess        = (1u << 1),
-        //----------------------------------------------------------------------
-        // eCommandRequiresThread
-        //
-        // Ensures a valid thread is contained in m_exe_ctx prior to executing
-        // the command. If a thread doesn't exist or is invalid, the command
-        // will fail and CommandObject::GetInvalidThreadDescription() will be
-        // returned as the error. CommandObject subclasses can override the
-        // virtual function for GetInvalidThreadDescription() to provide custom
-        // strings when needed.
-        //----------------------------------------------------------------------
-        eCommandRequiresThread         = (1u << 2),
-        //----------------------------------------------------------------------
-        // eCommandRequiresFrame
-        //
-        // Ensures a valid frame is contained in m_exe_ctx prior to executing
-        // the command. If a frame doesn't exist or is invalid, the command
-        // will fail and CommandObject::GetInvalidFrameDescription() will be
-        // returned as the error. CommandObject subclasses can override the
-        // virtual function for GetInvalidFrameDescription() to provide custom
-        // strings when needed.
-        //----------------------------------------------------------------------
-        eCommandRequiresFrame          = (1u << 3),
-        //----------------------------------------------------------------------
-        // eCommandRequiresRegContext
-        //
-        // Ensures a valid register context (from the selected frame if there
-        // is a frame in m_exe_ctx, or from the selected thread from m_exe_ctx)
-        // is available from m_exe_ctx prior to executing the command. If a
-        // target doesn't exist or is invalid, the command will fail and
-        // CommandObject::GetInvalidRegContextDescription() will be returned as
-        // the error. CommandObject subclasses can override the virtual function
-        // for GetInvalidRegContextDescription() to provide custom strings when
-        // needed.
-        //----------------------------------------------------------------------
-        eCommandRequiresRegContext     = (1u << 4),
-        //----------------------------------------------------------------------
-        // eCommandTryTargetAPILock
-        //
-        // Attempts to acquire the target lock if a target is selected in the
-        // command interpreter. If the command object fails to acquire the API
-        // lock, the command will fail with an appropriate error message.
-        //----------------------------------------------------------------------
-        eCommandTryTargetAPILock       = (1u << 5),
-        //----------------------------------------------------------------------
-        // eCommandProcessMustBeLaunched
-        //
-        // Verifies that there is a launched process in m_exe_ctx, if there
-        // isn't, the command will fail with an appropriate error message.
-        //----------------------------------------------------------------------
-        eCommandProcessMustBeLaunched  = (1u << 6),
-        //----------------------------------------------------------------------
-        // eCommandProcessMustBePaused
-        //
-        // Verifies that there is a paused process in m_exe_ctx, if there
-        // isn't, the command will fail with an appropriate error message.
-        //----------------------------------------------------------------------
-        eCommandProcessMustBePaused    = (1u << 7)
-    };
-    
-    //----------------------------------------------------------------------
-    // Whether a summary should cap how much data it returns to users or not
-    //----------------------------------------------------------------------
-    enum TypeSummaryCapping
-    {
-        eTypeSummaryCapped = true,
-        eTypeSummaryUncapped = false
-    };
+//----------------------------------------------------------------------
+// Whether a summary should cap how much data it returns to users or not
+//----------------------------------------------------------------------
+enum TypeSummaryCapping {
+  eTypeSummaryCapped = true,
+  eTypeSummaryUncapped = false
+};
 
 } // namespace lldb
 
-#endif  // LLDB_lldb_enumerations_h_
+#endif // LLDB_lldb_enumerations_h_

Modified: lldb/trunk/include/lldb/lldb-forward.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-forward.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-forward.h (original)
+++ lldb/trunk/include/lldb/lldb-forward.h Tue Sep  6 15:57:50 2016
@@ -19,282 +19,282 @@
 //----------------------------------------------------------------------
 namespace lldb_private {
 
-class   ABI;
-class   Address;
-class   AddressImpl;
-class   AddressRange;
-class   AddressResolver;
-class   ArchSpec;
-class   ArmUnwindInfo;
-class   Args;
-class   ASTResultSynthesizer;
-class   ASTStructExtractor;
-class   Baton;
-class   Block;
-class   Breakpoint;
-class   BreakpointID;
-class   BreakpointIDList;
-class   BreakpointList;
-class   BreakpointLocation;
-class   BreakpointLocationCollection;
-class   BreakpointLocationList;
-class   BreakpointOptions;
-class   BreakpointResolver;
-class   BreakpointSite;
-class   BreakpointSiteList;
-class   BroadcastEventSpec;
-class   Broadcaster;
-class   BroadcasterManager;
-class   CPPLanguageRuntime;
-class   ClangASTContext;
-class   ClangASTImporter;
-class   ClangASTMetadata;
-class   ClangASTSource;
-class   ClangExpressionDeclMap;
-class   ClangExpressionParser;
-class   ClangExpressionVariable;
-class   ClangExpressionVariables;
-class   ClangModulesDeclVendor;
-class   ClangPersistentVariables;
-class   CommandInterpreter;
-class   CommandInterpreterRunOptions;
-class   CommandObject;
-class   CommandObjectMultiword;
-class   CommandReturnObject;
-class   Communication;
-class   CompactUnwindInfo;
-struct  CompilerContext;
-class   CompilerDecl;
-class   CompilerDeclContext;
-class   CompilerType;
-class   CompileUnit;
-class   Condition;
-class   Connection;
-class   ConnectionFileDescriptor;
-class   ConstString;
-class   CXXSyntheticChildren;
-class   DWARFCallFrameInfo;
-class   DWARFExpression;
-class   DataBuffer;
-class   DataEncoder;
-class   DataExtractor;
-class   Debugger;
-class   Declaration;
-class   DiagnosticManager;
-class   Disassembler;
-class   DumpValueObjectOptions;
-class   DynamicCheckerFunctions;
-class   DynamicLoader;
-class   Editline;
-class   EmulateInstruction;
-class   Error;
-class   EvaluateExpressionOptions;
-class   Event;
-class   EventData;
-class   EventDataStructuredData;
-class   ExecutionContext;
-class   ExecutionContextRef;
-class   ExecutionContextRefLocker;
-class   ExecutionContextScope;
-class   Expression;
-class   ExpressionVariable;
-class   ExpressionVariableList;
-class   ExpressionTypeSystemHelper;
-class   File;
-class   FileSpec;
-class   FileSpecList;
-class   Flags;
-class   GoASTContext;
-class   TypeCategoryImpl;
-class   FormatManager;
-class   FormattersMatchCandidate;
-class   FuncUnwinders;
-class   Function;
-class   FunctionInfo;
-class   InlineFunctionInfo;
-class   Instruction;
-class   InstructionList;
-class   InstrumentationRuntime;
-class   IOHandler;
-class   IOObject;
-class   IRExecutionUnit;
-class   JITLoader;
-class   JITLoaderList;
-class   Language;
-class   LanguageCategory;
-class   LanguageRuntime;
-class   MemoryRegionInfo;
-class   LineTable;
-class   Listener;
-class   Log;
-class   LogChannel;
-class   Mangled;
-class   Materializer;
-class   MemoryHistory;
-class   Module;
-class   ModuleList;
-class   ModuleSpec;
-class   ModuleSpecList;
-class   Mutex;
-struct  NameSearchContext;
-class   ObjCLanguageRuntime;
-class   ObjCRuntimeSyntheticProvider;
-class   ObjectContainer;
-class   OptionGroup;
-class   OptionGroupOptions;
-class   OptionGroupPlatform;
-class   ObjectFile;
-class   ObjectFileJITDelegate;
-class   OperatingSystem;
-class   Options;
-class   OptionValue;
-class   OptionValueArch;
-class   OptionValueArgs;
-class   OptionValueArray;
-class   OptionValueBoolean;
-class   OptionValueChar;
-class   OptionValueDictionary;
-class   OptionValueEnumeration;
-class   OptionValueFileSpec;
-class   OptionValueFileSpecList;
-class   OptionValueFormat;
-class   OptionValueLanguage;
-class   OptionValueFormatEntity;
-class   OptionValuePathMappings;
-class   OptionValueProperties;
-class   OptionValueRegex;
-class   OptionValueSInt64;
-class   OptionValueString;
-class   OptionValueUInt64;
-class   OptionValueUUID;
-class   NamedOption;
-class   PathMappingList;
-class   FunctionCaller;
-class   PersistentExpressionState;
-class   Platform;
-class   Process;
-class   ProcessAttachInfo;
-class   ProcessModID;
-class   ProcessInfo;
-class   ProcessInstanceInfo;
-class   ProcessInstanceInfoList;
-class   ProcessInstanceInfoMatch;
-class   ProcessLaunchInfo;
-class   Property;
-struct  PropertyDefinition;
-class   RegisterCheckpoint;
-class   RegisterContext;
-class   RegisterLocation;
-class   RegisterLocationList;
-class   RegisterValue;
-class   RegularExpression;
-class   REPL;
-class   Scalar;
-class   ScriptInterpreter;
-class   ScriptInterpreterLocker;
-struct  ScriptSummaryFormat;
-class   SearchFilter;
-class   Section;
-class   SectionImpl;
-class   SectionList;
-class   SectionLoadHistory;
-class   SectionLoadList;
-class   Settings;
-class   SourceManager;
-class   SourceManagerImpl;
-class   StackFrame;
-class   StackFrameImpl;
-class   StackFrameList;
-class   StackID;
-class   StopInfo;
-class   Stoppoint;
-class   StoppointCallbackContext;
-class   StoppointLocation;
-class   Stream;
+class ABI;
+class Address;
+class AddressImpl;
+class AddressRange;
+class AddressResolver;
+class ArchSpec;
+class ArmUnwindInfo;
+class Args;
+class ASTResultSynthesizer;
+class ASTStructExtractor;
+class Baton;
+class Block;
+class Breakpoint;
+class BreakpointID;
+class BreakpointIDList;
+class BreakpointList;
+class BreakpointLocation;
+class BreakpointLocationCollection;
+class BreakpointLocationList;
+class BreakpointOptions;
+class BreakpointResolver;
+class BreakpointSite;
+class BreakpointSiteList;
+class BroadcastEventSpec;
+class Broadcaster;
+class BroadcasterManager;
+class CPPLanguageRuntime;
+class ClangASTContext;
+class ClangASTImporter;
+class ClangASTMetadata;
+class ClangASTSource;
+class ClangExpressionDeclMap;
+class ClangExpressionParser;
+class ClangExpressionVariable;
+class ClangExpressionVariables;
+class ClangModulesDeclVendor;
+class ClangPersistentVariables;
+class CommandInterpreter;
+class CommandInterpreterRunOptions;
+class CommandObject;
+class CommandObjectMultiword;
+class CommandReturnObject;
+class Communication;
+class CompactUnwindInfo;
+struct CompilerContext;
+class CompilerDecl;
+class CompilerDeclContext;
+class CompilerType;
+class CompileUnit;
+class Condition;
+class Connection;
+class ConnectionFileDescriptor;
+class ConstString;
+class CXXSyntheticChildren;
+class DWARFCallFrameInfo;
+class DWARFExpression;
+class DataBuffer;
+class DataEncoder;
+class DataExtractor;
+class Debugger;
+class Declaration;
+class DiagnosticManager;
+class Disassembler;
+class DumpValueObjectOptions;
+class DynamicCheckerFunctions;
+class DynamicLoader;
+class Editline;
+class EmulateInstruction;
+class Error;
+class EvaluateExpressionOptions;
+class Event;
+class EventData;
+class EventDataStructuredData;
+class ExecutionContext;
+class ExecutionContextRef;
+class ExecutionContextRefLocker;
+class ExecutionContextScope;
+class Expression;
+class ExpressionVariable;
+class ExpressionVariableList;
+class ExpressionTypeSystemHelper;
+class File;
+class FileSpec;
+class FileSpecList;
+class Flags;
+class GoASTContext;
+class TypeCategoryImpl;
+class FormatManager;
+class FormattersMatchCandidate;
+class FuncUnwinders;
+class Function;
+class FunctionInfo;
+class InlineFunctionInfo;
+class Instruction;
+class InstructionList;
+class InstrumentationRuntime;
+class IOHandler;
+class IOObject;
+class IRExecutionUnit;
+class JITLoader;
+class JITLoaderList;
+class Language;
+class LanguageCategory;
+class LanguageRuntime;
+class MemoryRegionInfo;
+class LineTable;
+class Listener;
+class Log;
+class LogChannel;
+class Mangled;
+class Materializer;
+class MemoryHistory;
+class Module;
+class ModuleList;
+class ModuleSpec;
+class ModuleSpecList;
+class Mutex;
+struct NameSearchContext;
+class ObjCLanguageRuntime;
+class ObjCRuntimeSyntheticProvider;
+class ObjectContainer;
+class OptionGroup;
+class OptionGroupOptions;
+class OptionGroupPlatform;
+class ObjectFile;
+class ObjectFileJITDelegate;
+class OperatingSystem;
+class Options;
+class OptionValue;
+class OptionValueArch;
+class OptionValueArgs;
+class OptionValueArray;
+class OptionValueBoolean;
+class OptionValueChar;
+class OptionValueDictionary;
+class OptionValueEnumeration;
+class OptionValueFileSpec;
+class OptionValueFileSpecList;
+class OptionValueFormat;
+class OptionValueLanguage;
+class OptionValueFormatEntity;
+class OptionValuePathMappings;
+class OptionValueProperties;
+class OptionValueRegex;
+class OptionValueSInt64;
+class OptionValueString;
+class OptionValueUInt64;
+class OptionValueUUID;
+class NamedOption;
+class PathMappingList;
+class FunctionCaller;
+class PersistentExpressionState;
+class Platform;
+class Process;
+class ProcessAttachInfo;
+class ProcessModID;
+class ProcessInfo;
+class ProcessInstanceInfo;
+class ProcessInstanceInfoList;
+class ProcessInstanceInfoMatch;
+class ProcessLaunchInfo;
+class Property;
+struct PropertyDefinition;
+class RegisterCheckpoint;
+class RegisterContext;
+class RegisterLocation;
+class RegisterLocationList;
+class RegisterValue;
+class RegularExpression;
+class REPL;
+class Scalar;
+class ScriptInterpreter;
+class ScriptInterpreterLocker;
+struct ScriptSummaryFormat;
+class SearchFilter;
+class Section;
+class SectionImpl;
+class SectionList;
+class SectionLoadHistory;
+class SectionLoadList;
+class Settings;
+class SourceManager;
+class SourceManagerImpl;
+class StackFrame;
+class StackFrameImpl;
+class StackFrameList;
+class StackID;
+class StopInfo;
+class Stoppoint;
+class StoppointCallbackContext;
+class StoppointLocation;
+class Stream;
 template <unsigned N> class StreamBuffer;
-class   StreamFile;
-class   StreamString;
-class   StringList;
-struct  StringSummaryFormat;
-class   StructuredDataPlugin;
-class   SystemRuntime;
-class   TypeSummaryImpl;
-class   TypeSummaryOptions;
-class   Symbol;
-class   SymbolContext;
-class   SymbolContextList;
-class   SymbolContextScope;
-class   SymbolContextSpecifier;
-class   SymbolFile;
-class   SymbolFileType;
-class   SymbolVendor;
-class   Symtab;
-class   SyntheticChildren;
-class   SyntheticChildrenFrontEnd;
-class   TypeFilterImpl;
-class   TypeSystem;
+class StreamFile;
+class StreamString;
+class StringList;
+struct StringSummaryFormat;
+class StructuredDataPlugin;
+class SystemRuntime;
+class TypeSummaryImpl;
+class TypeSummaryOptions;
+class Symbol;
+class SymbolContext;
+class SymbolContextList;
+class SymbolContextScope;
+class SymbolContextSpecifier;
+class SymbolFile;
+class SymbolFileType;
+class SymbolVendor;
+class Symtab;
+class SyntheticChildren;
+class SyntheticChildrenFrontEnd;
+class TypeFilterImpl;
+class TypeSystem;
 #ifndef LLDB_DISABLE_PYTHON
-class   ScriptedSyntheticChildren;
+class ScriptedSyntheticChildren;
 #endif
-class   Queue;
-class   QueueItem;
-class   QueueImpl;
-class   Target;
-class   TargetList;
-class   TargetProperties;
-class   Thread;
-class   ThreadCollection;
-class   ThreadList;
-class   ThreadPlan;
-class   ThreadPlanBase;
-class   ThreadPlanRunToAddress;
-class   ThreadPlanStepInstruction;
-class   ThreadPlanStepOut;
-class   ThreadPlanStepOverBreakpoint;
-class   ThreadPlanStepRange;
-class   ThreadPlanStepThrough;
-class   ThreadPlanTracer;
-class   ThreadSpec;
-class   TimeValue;
-class   Type;
-class   TypeAndOrName;
-class   TypeCategoryMap;
-class   TypeImpl;
-class   TypeList;
-class   TypeMap;
-class   TypeListImpl;
-class   TypeMemberImpl;
-class   TypeMemberFunctionImpl;
-class   TypeEnumMemberImpl;
-class   TypeEnumMemberListImpl;
-class   TypeFormatImpl;
-class   TypeNameSpecifierImpl;
-class   TypePair;
-class   TypeValidatorImpl;
-class   UUID;
-class   UnixSignals;
-class   Unwind;
-class   UnwindAssembly;
-class   UnwindPlan;
-class   UnwindTable;
-class   UserExpression;
-class   UtilityFunction;
-class   VMRange;
-class   Value;
-class   ValueList;
-class   ValueObject;
-class   ValueObjectChild;
-class   ValueObjectConstResult;
-class   ValueObjectConstResultChild;
-class   ValueObjectConstResultImpl;
-class   ValueObjectList;
-class   ValueObjectPrinter;
-class   Variable;
-class   VariableList;
-class   Watchpoint;
-class   WatchpointList;
-class   WatchpointOptions;
-struct  LineEntry;
+class Queue;
+class QueueItem;
+class QueueImpl;
+class Target;
+class TargetList;
+class TargetProperties;
+class Thread;
+class ThreadCollection;
+class ThreadList;
+class ThreadPlan;
+class ThreadPlanBase;
+class ThreadPlanRunToAddress;
+class ThreadPlanStepInstruction;
+class ThreadPlanStepOut;
+class ThreadPlanStepOverBreakpoint;
+class ThreadPlanStepRange;
+class ThreadPlanStepThrough;
+class ThreadPlanTracer;
+class ThreadSpec;
+class TimeValue;
+class Type;
+class TypeAndOrName;
+class TypeCategoryMap;
+class TypeImpl;
+class TypeList;
+class TypeMap;
+class TypeListImpl;
+class TypeMemberImpl;
+class TypeMemberFunctionImpl;
+class TypeEnumMemberImpl;
+class TypeEnumMemberListImpl;
+class TypeFormatImpl;
+class TypeNameSpecifierImpl;
+class TypePair;
+class TypeValidatorImpl;
+class UUID;
+class UnixSignals;
+class Unwind;
+class UnwindAssembly;
+class UnwindPlan;
+class UnwindTable;
+class UserExpression;
+class UtilityFunction;
+class VMRange;
+class Value;
+class ValueList;
+class ValueObject;
+class ValueObjectChild;
+class ValueObjectConstResult;
+class ValueObjectConstResultChild;
+class ValueObjectConstResultImpl;
+class ValueObjectList;
+class ValueObjectPrinter;
+class Variable;
+class VariableList;
+class Watchpoint;
+class WatchpointList;
+class WatchpointOptions;
+struct LineEntry;
 
 } // namespace lldb_private
 
@@ -302,172 +302,191 @@ struct  LineEntry;
 // lldb forward declarations
 //----------------------------------------------------------------------
 namespace lldb {
-    
-    typedef std::shared_ptr<lldb_private::ABI> ABISP;
-    typedef std::shared_ptr<lldb_private::Baton> BatonSP;
-    typedef std::shared_ptr<lldb_private::Block> BlockSP;
-    typedef std::shared_ptr<lldb_private::Breakpoint> BreakpointSP;
-    typedef std::weak_ptr<lldb_private::Breakpoint> BreakpointWP;
-    typedef std::shared_ptr<lldb_private::BreakpointSite> BreakpointSiteSP;
-    typedef std::weak_ptr<lldb_private::BreakpointSite> BreakpointSiteWP;
-    typedef std::shared_ptr<lldb_private::BreakpointLocation> BreakpointLocationSP;
-    typedef std::weak_ptr<lldb_private::BreakpointLocation> BreakpointLocationWP;
-    typedef std::shared_ptr<lldb_private::BreakpointResolver> BreakpointResolverSP;
-    typedef std::shared_ptr<lldb_private::Broadcaster> BroadcasterSP;
-    typedef std::shared_ptr<lldb_private::BroadcasterManager> BroadcasterManagerSP;
-    typedef std::weak_ptr<lldb_private::BroadcasterManager> BroadcasterManagerWP;
-    typedef std::unique_ptr<lldb_private::ClangASTContext> ClangASTContextUP;
-    typedef std::shared_ptr<lldb_private::ClangASTImporter> ClangASTImporterSP;
-    typedef std::unique_ptr<lldb_private::ClangModulesDeclVendor> ClangModulesDeclVendorUP;
-    typedef std::unique_ptr<lldb_private::ClangPersistentVariables> ClangPersistentVariablesUP;
-    typedef std::shared_ptr<lldb_private::UserExpression> UserExpressionSP;
-    typedef std::shared_ptr<lldb_private::CommandObject> CommandObjectSP;
-    typedef std::shared_ptr<lldb_private::Communication> CommunicationSP;
-    typedef std::shared_ptr<lldb_private::Connection> ConnectionSP;
-    typedef std::shared_ptr<lldb_private::CompileUnit> CompUnitSP;
-    typedef std::shared_ptr<lldb_private::DataBuffer> DataBufferSP;
-    typedef std::shared_ptr<lldb_private::DataExtractor> DataExtractorSP;
-    typedef std::shared_ptr<lldb_private::Debugger> DebuggerSP;
-    typedef std::weak_ptr<lldb_private::Debugger> DebuggerWP;
-    typedef std::shared_ptr<lldb_private::Disassembler> DisassemblerSP;
-    typedef std::unique_ptr<lldb_private::DynamicCheckerFunctions> DynamicCheckerFunctionsUP;
-    typedef std::shared_ptr<lldb_private::DynamicLoader> DynamicLoaderSP;
-    typedef std::unique_ptr<lldb_private::DynamicLoader> DynamicLoaderUP;
-    typedef std::shared_ptr<lldb_private::Event> EventSP;
-    typedef std::shared_ptr<lldb_private::EventData> EventDataSP;
-    typedef std::shared_ptr<lldb_private::EventDataStructuredData> EventDataStructuredDataSP;
-    typedef std::shared_ptr<lldb_private::ExecutionContextRef> ExecutionContextRefSP;
-    typedef std::shared_ptr<lldb_private::ExpressionVariable> ExpressionVariableSP;
-    typedef std::shared_ptr<lldb_private::File> FileSP;
-    typedef std::shared_ptr<lldb_private::Function> FunctionSP;
-    typedef std::shared_ptr<lldb_private::FunctionCaller> FunctionCallerSP;
-    typedef std::shared_ptr<lldb_private::FuncUnwinders> FuncUnwindersSP;
-    typedef std::unique_ptr<lldb_private::GoASTContext> GoASTContextUP;
-    typedef std::shared_ptr<lldb_private::InlineFunctionInfo> InlineFunctionInfoSP;
-    typedef std::shared_ptr<lldb_private::Instruction> InstructionSP;
-    typedef std::shared_ptr<lldb_private::InstrumentationRuntime> InstrumentationRuntimeSP;
-    typedef std::shared_ptr<lldb_private::IOHandler> IOHandlerSP;
-    typedef std::shared_ptr<lldb_private::IOObject> IOObjectSP;
-    typedef std::shared_ptr<lldb_private::IRExecutionUnit> IRExecutionUnitSP;
-    typedef std::shared_ptr<lldb_private::JITLoader> JITLoaderSP;
-    typedef std::unique_ptr<lldb_private::JITLoaderList> JITLoaderListUP;
-    typedef std::shared_ptr<lldb_private::LanguageRuntime> LanguageRuntimeSP;
-    typedef std::shared_ptr<lldb_private::SystemRuntime> SystemRuntimeSP;
-    typedef std::unique_ptr<lldb_private::SystemRuntime> SystemRuntimeUP;
-    typedef std::shared_ptr<lldb_private::LineTable> LineTableSP;
-    typedef std::shared_ptr<lldb_private::Listener> ListenerSP;
-    typedef std::weak_ptr<lldb_private::Listener> ListenerWP;
-    typedef std::shared_ptr<lldb_private::LogChannel> LogChannelSP;
-    typedef std::shared_ptr<lldb_private::MemoryHistory> MemoryHistorySP;
-    typedef std::shared_ptr<lldb_private::MemoryRegionInfo> MemoryRegionInfoSP;
-    typedef std::unique_ptr<lldb_private::MemoryRegionInfo> MemoryRegionInfoUP;
-    typedef std::shared_ptr<lldb_private::Module> ModuleSP;
-    typedef std::weak_ptr<lldb_private::Module> ModuleWP;
-    typedef std::shared_ptr<lldb_private::ObjectFile> ObjectFileSP;
-    typedef std::weak_ptr<lldb_private::ObjectFile> ObjectFileWP;
-    typedef std::shared_ptr<lldb_private::ObjectFileJITDelegate> ObjectFileJITDelegateSP;
-    typedef std::weak_ptr<lldb_private::ObjectFileJITDelegate> ObjectFileJITDelegateWP;
-    typedef std::unique_ptr<lldb_private::OperatingSystem> OperatingSystemUP;
-    typedef std::shared_ptr<lldb_private::OptionValue> OptionValueSP;
-    typedef std::weak_ptr<lldb_private::OptionValue> OptionValueWP;
-    typedef std::shared_ptr<lldb_private::OptionValueArch> OptionValueArchSP;
-    typedef std::shared_ptr<lldb_private::OptionValueArgs> OptionValueArgsSP;
-    typedef std::shared_ptr<lldb_private::OptionValueArray> OptionValueArraySP;
-    typedef std::shared_ptr<lldb_private::OptionValueBoolean> OptionValueBooleanSP;
-    typedef std::shared_ptr<lldb_private::OptionValueDictionary> OptionValueDictionarySP;
-    typedef std::shared_ptr<lldb_private::OptionValueFileSpec> OptionValueFileSpecSP;
-    typedef std::shared_ptr<lldb_private::OptionValueFileSpecList> OptionValueFileSpecListSP;
-    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::shared_ptr<lldb_private::OptionValueRegex> OptionValueRegexSP;
-    typedef std::shared_ptr<lldb_private::OptionValueSInt64> OptionValueSInt64SP;
-    typedef std::shared_ptr<lldb_private::OptionValueString> OptionValueStringSP;
-    typedef std::shared_ptr<lldb_private::OptionValueUInt64> OptionValueUInt64SP;
-    typedef std::shared_ptr<lldb_private::OptionValueUUID> OptionValueUUIDSP;
-    typedef std::shared_ptr<lldb_private::Platform> PlatformSP;
-    typedef std::shared_ptr<lldb_private::Process> ProcessSP;
-    typedef std::shared_ptr<lldb_private::ProcessAttachInfo> ProcessAttachInfoSP;
-    typedef std::shared_ptr<lldb_private::ProcessLaunchInfo> ProcessLaunchInfoSP;
-    typedef std::weak_ptr<lldb_private::Process> ProcessWP;
-    typedef std::shared_ptr<lldb_private::Property> PropertySP;
-    typedef std::shared_ptr<lldb_private::RegisterCheckpoint> RegisterCheckpointSP;
-    typedef std::shared_ptr<lldb_private::RegisterContext> RegisterContextSP;
-    typedef std::shared_ptr<lldb_private::RegularExpression> RegularExpressionSP;
-    typedef std::shared_ptr<lldb_private::Queue> QueueSP;
-    typedef std::weak_ptr<lldb_private::Queue> QueueWP;
-    typedef std::shared_ptr<lldb_private::QueueItem> QueueItemSP;
-    typedef std::shared_ptr<lldb_private::REPL> REPLSP;
-    typedef std::shared_ptr<lldb_private::ScriptSummaryFormat> ScriptSummaryFormatSP;
-    typedef std::shared_ptr<lldb_private::ScriptInterpreter> ScriptInterpreterSP;
-    typedef std::unique_ptr<lldb_private::ScriptInterpreter> ScriptInterpreterUP;
-    typedef std::shared_ptr<lldb_private::Section> SectionSP;
-    typedef std::unique_ptr<lldb_private::SectionList> SectionListUP;
-    typedef std::weak_ptr<lldb_private::Section> SectionWP;
-    typedef std::shared_ptr<lldb_private::SectionLoadList> SectionLoadListSP;
-    typedef std::shared_ptr<lldb_private::SearchFilter> SearchFilterSP;
-    typedef std::shared_ptr<lldb_private::Settings> SettingsSP;
-    typedef std::unique_ptr<lldb_private::SourceManager> SourceManagerUP;
-    typedef std::shared_ptr<lldb_private::StackFrame> StackFrameSP;
-    typedef std::unique_ptr<lldb_private::StackFrame> StackFrameUP;
-    typedef std::weak_ptr<lldb_private::StackFrame> StackFrameWP;
-    typedef std::shared_ptr<lldb_private::StackFrameList> StackFrameListSP;
-    typedef std::shared_ptr<lldb_private::StopInfo> StopInfoSP;
-    typedef std::shared_ptr<lldb_private::StoppointLocation> StoppointLocationSP;
-    typedef std::shared_ptr<lldb_private::Stream> StreamSP;
-    typedef std::weak_ptr<lldb_private::Stream> StreamWP;
-    typedef std::shared_ptr<lldb_private::StreamFile> StreamFileSP;
-    typedef std::shared_ptr<lldb_private::StringSummaryFormat> StringTypeSummaryImplSP;
-    typedef std::shared_ptr<lldb_private::StructuredDataPlugin>
-        StructuredDataPluginSP;
-    typedef std::weak_ptr<lldb_private::StructuredDataPlugin>
+
+typedef std::shared_ptr<lldb_private::ABI> ABISP;
+typedef std::shared_ptr<lldb_private::Baton> BatonSP;
+typedef std::shared_ptr<lldb_private::Block> BlockSP;
+typedef std::shared_ptr<lldb_private::Breakpoint> BreakpointSP;
+typedef std::weak_ptr<lldb_private::Breakpoint> BreakpointWP;
+typedef std::shared_ptr<lldb_private::BreakpointSite> BreakpointSiteSP;
+typedef std::weak_ptr<lldb_private::BreakpointSite> BreakpointSiteWP;
+typedef std::shared_ptr<lldb_private::BreakpointLocation> BreakpointLocationSP;
+typedef std::weak_ptr<lldb_private::BreakpointLocation> BreakpointLocationWP;
+typedef std::shared_ptr<lldb_private::BreakpointResolver> BreakpointResolverSP;
+typedef std::shared_ptr<lldb_private::Broadcaster> BroadcasterSP;
+typedef std::shared_ptr<lldb_private::BroadcasterManager> BroadcasterManagerSP;
+typedef std::weak_ptr<lldb_private::BroadcasterManager> BroadcasterManagerWP;
+typedef std::unique_ptr<lldb_private::ClangASTContext> ClangASTContextUP;
+typedef std::shared_ptr<lldb_private::ClangASTImporter> ClangASTImporterSP;
+typedef std::unique_ptr<lldb_private::ClangModulesDeclVendor>
+    ClangModulesDeclVendorUP;
+typedef std::unique_ptr<lldb_private::ClangPersistentVariables>
+    ClangPersistentVariablesUP;
+typedef std::shared_ptr<lldb_private::UserExpression> UserExpressionSP;
+typedef std::shared_ptr<lldb_private::CommandObject> CommandObjectSP;
+typedef std::shared_ptr<lldb_private::Communication> CommunicationSP;
+typedef std::shared_ptr<lldb_private::Connection> ConnectionSP;
+typedef std::shared_ptr<lldb_private::CompileUnit> CompUnitSP;
+typedef std::shared_ptr<lldb_private::DataBuffer> DataBufferSP;
+typedef std::shared_ptr<lldb_private::DataExtractor> DataExtractorSP;
+typedef std::shared_ptr<lldb_private::Debugger> DebuggerSP;
+typedef std::weak_ptr<lldb_private::Debugger> DebuggerWP;
+typedef std::shared_ptr<lldb_private::Disassembler> DisassemblerSP;
+typedef std::unique_ptr<lldb_private::DynamicCheckerFunctions>
+    DynamicCheckerFunctionsUP;
+typedef std::shared_ptr<lldb_private::DynamicLoader> DynamicLoaderSP;
+typedef std::unique_ptr<lldb_private::DynamicLoader> DynamicLoaderUP;
+typedef std::shared_ptr<lldb_private::Event> EventSP;
+typedef std::shared_ptr<lldb_private::EventData> EventDataSP;
+typedef std::shared_ptr<lldb_private::EventDataStructuredData>
+    EventDataStructuredDataSP;
+typedef std::shared_ptr<lldb_private::ExecutionContextRef>
+    ExecutionContextRefSP;
+typedef std::shared_ptr<lldb_private::ExpressionVariable> ExpressionVariableSP;
+typedef std::shared_ptr<lldb_private::File> FileSP;
+typedef std::shared_ptr<lldb_private::Function> FunctionSP;
+typedef std::shared_ptr<lldb_private::FunctionCaller> FunctionCallerSP;
+typedef std::shared_ptr<lldb_private::FuncUnwinders> FuncUnwindersSP;
+typedef std::unique_ptr<lldb_private::GoASTContext> GoASTContextUP;
+typedef std::shared_ptr<lldb_private::InlineFunctionInfo> InlineFunctionInfoSP;
+typedef std::shared_ptr<lldb_private::Instruction> InstructionSP;
+typedef std::shared_ptr<lldb_private::InstrumentationRuntime>
+    InstrumentationRuntimeSP;
+typedef std::shared_ptr<lldb_private::IOHandler> IOHandlerSP;
+typedef std::shared_ptr<lldb_private::IOObject> IOObjectSP;
+typedef std::shared_ptr<lldb_private::IRExecutionUnit> IRExecutionUnitSP;
+typedef std::shared_ptr<lldb_private::JITLoader> JITLoaderSP;
+typedef std::unique_ptr<lldb_private::JITLoaderList> JITLoaderListUP;
+typedef std::shared_ptr<lldb_private::LanguageRuntime> LanguageRuntimeSP;
+typedef std::shared_ptr<lldb_private::SystemRuntime> SystemRuntimeSP;
+typedef std::unique_ptr<lldb_private::SystemRuntime> SystemRuntimeUP;
+typedef std::shared_ptr<lldb_private::LineTable> LineTableSP;
+typedef std::shared_ptr<lldb_private::Listener> ListenerSP;
+typedef std::weak_ptr<lldb_private::Listener> ListenerWP;
+typedef std::shared_ptr<lldb_private::LogChannel> LogChannelSP;
+typedef std::shared_ptr<lldb_private::MemoryHistory> MemoryHistorySP;
+typedef std::shared_ptr<lldb_private::MemoryRegionInfo> MemoryRegionInfoSP;
+typedef std::unique_ptr<lldb_private::MemoryRegionInfo> MemoryRegionInfoUP;
+typedef std::shared_ptr<lldb_private::Module> ModuleSP;
+typedef std::weak_ptr<lldb_private::Module> ModuleWP;
+typedef std::shared_ptr<lldb_private::ObjectFile> ObjectFileSP;
+typedef std::weak_ptr<lldb_private::ObjectFile> ObjectFileWP;
+typedef std::shared_ptr<lldb_private::ObjectFileJITDelegate>
+    ObjectFileJITDelegateSP;
+typedef std::weak_ptr<lldb_private::ObjectFileJITDelegate>
+    ObjectFileJITDelegateWP;
+typedef std::unique_ptr<lldb_private::OperatingSystem> OperatingSystemUP;
+typedef std::shared_ptr<lldb_private::OptionValue> OptionValueSP;
+typedef std::weak_ptr<lldb_private::OptionValue> OptionValueWP;
+typedef std::shared_ptr<lldb_private::OptionValueArch> OptionValueArchSP;
+typedef std::shared_ptr<lldb_private::OptionValueArgs> OptionValueArgsSP;
+typedef std::shared_ptr<lldb_private::OptionValueArray> OptionValueArraySP;
+typedef std::shared_ptr<lldb_private::OptionValueBoolean> OptionValueBooleanSP;
+typedef std::shared_ptr<lldb_private::OptionValueDictionary>
+    OptionValueDictionarySP;
+typedef std::shared_ptr<lldb_private::OptionValueFileSpec>
+    OptionValueFileSpecSP;
+typedef std::shared_ptr<lldb_private::OptionValueFileSpecList>
+    OptionValueFileSpecListSP;
+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::shared_ptr<lldb_private::OptionValueRegex> OptionValueRegexSP;
+typedef std::shared_ptr<lldb_private::OptionValueSInt64> OptionValueSInt64SP;
+typedef std::shared_ptr<lldb_private::OptionValueString> OptionValueStringSP;
+typedef std::shared_ptr<lldb_private::OptionValueUInt64> OptionValueUInt64SP;
+typedef std::shared_ptr<lldb_private::OptionValueUUID> OptionValueUUIDSP;
+typedef std::shared_ptr<lldb_private::Platform> PlatformSP;
+typedef std::shared_ptr<lldb_private::Process> ProcessSP;
+typedef std::shared_ptr<lldb_private::ProcessAttachInfo> ProcessAttachInfoSP;
+typedef std::shared_ptr<lldb_private::ProcessLaunchInfo> ProcessLaunchInfoSP;
+typedef std::weak_ptr<lldb_private::Process> ProcessWP;
+typedef std::shared_ptr<lldb_private::Property> PropertySP;
+typedef std::shared_ptr<lldb_private::RegisterCheckpoint> RegisterCheckpointSP;
+typedef std::shared_ptr<lldb_private::RegisterContext> RegisterContextSP;
+typedef std::shared_ptr<lldb_private::RegularExpression> RegularExpressionSP;
+typedef std::shared_ptr<lldb_private::Queue> QueueSP;
+typedef std::weak_ptr<lldb_private::Queue> QueueWP;
+typedef std::shared_ptr<lldb_private::QueueItem> QueueItemSP;
+typedef std::shared_ptr<lldb_private::REPL> REPLSP;
+typedef std::shared_ptr<lldb_private::ScriptSummaryFormat>
+    ScriptSummaryFormatSP;
+typedef std::shared_ptr<lldb_private::ScriptInterpreter> ScriptInterpreterSP;
+typedef std::unique_ptr<lldb_private::ScriptInterpreter> ScriptInterpreterUP;
+typedef std::shared_ptr<lldb_private::Section> SectionSP;
+typedef std::unique_ptr<lldb_private::SectionList> SectionListUP;
+typedef std::weak_ptr<lldb_private::Section> SectionWP;
+typedef std::shared_ptr<lldb_private::SectionLoadList> SectionLoadListSP;
+typedef std::shared_ptr<lldb_private::SearchFilter> SearchFilterSP;
+typedef std::shared_ptr<lldb_private::Settings> SettingsSP;
+typedef std::unique_ptr<lldb_private::SourceManager> SourceManagerUP;
+typedef std::shared_ptr<lldb_private::StackFrame> StackFrameSP;
+typedef std::unique_ptr<lldb_private::StackFrame> StackFrameUP;
+typedef std::weak_ptr<lldb_private::StackFrame> StackFrameWP;
+typedef std::shared_ptr<lldb_private::StackFrameList> StackFrameListSP;
+typedef std::shared_ptr<lldb_private::StopInfo> StopInfoSP;
+typedef std::shared_ptr<lldb_private::StoppointLocation> StoppointLocationSP;
+typedef std::shared_ptr<lldb_private::Stream> StreamSP;
+typedef std::weak_ptr<lldb_private::Stream> StreamWP;
+typedef std::shared_ptr<lldb_private::StreamFile> StreamFileSP;
+typedef std::shared_ptr<lldb_private::StringSummaryFormat>
+    StringTypeSummaryImplSP;
+typedef std::shared_ptr<lldb_private::StructuredDataPlugin>
+    StructuredDataPluginSP;
+typedef std::weak_ptr<lldb_private::StructuredDataPlugin>
     StructuredDataPluginWP;
-    typedef std::shared_ptr<lldb_private::SymbolFile> SymbolFileSP;
-    typedef std::shared_ptr<lldb_private::SymbolFileType> SymbolFileTypeSP;
-    typedef std::weak_ptr<lldb_private::SymbolFileType> SymbolFileTypeWP;
-    typedef std::shared_ptr<lldb_private::SymbolContextSpecifier> SymbolContextSpecifierSP;
-    typedef std::unique_ptr<lldb_private::SymbolVendor> SymbolVendorUP;
-    typedef std::shared_ptr<lldb_private::SyntheticChildren> SyntheticChildrenSP;
-    typedef std::shared_ptr<lldb_private::SyntheticChildrenFrontEnd> SyntheticChildrenFrontEndSP;
-    typedef std::shared_ptr<lldb_private::Target> TargetSP;
-    typedef std::weak_ptr<lldb_private::Target> TargetWP;
-    typedef std::shared_ptr<lldb_private::TargetProperties> TargetPropertiesSP;
-    typedef std::shared_ptr<lldb_private::Thread> ThreadSP;
-    typedef std::weak_ptr<lldb_private::Thread> ThreadWP;
-    typedef std::shared_ptr<lldb_private::ThreadCollection> ThreadCollectionSP;
-    typedef std::shared_ptr<lldb_private::ThreadPlan> ThreadPlanSP;
-    typedef std::shared_ptr<lldb_private::ThreadPlanTracer> ThreadPlanTracerSP;
-    typedef std::shared_ptr<lldb_private::Type> TypeSP;
-    typedef std::weak_ptr<lldb_private::Type> TypeWP;
-    typedef std::shared_ptr<lldb_private::TypeCategoryImpl> TypeCategoryImplSP;
-    typedef std::shared_ptr<lldb_private::TypeImpl> TypeImplSP;
-    typedef std::shared_ptr<lldb_private::TypeMemberFunctionImpl> TypeMemberFunctionImplSP;
-    typedef std::shared_ptr<lldb_private::TypeEnumMemberImpl> TypeEnumMemberImplSP;
-    typedef std::shared_ptr<lldb_private::TypeFilterImpl> TypeFilterImplSP;
-    typedef std::shared_ptr<lldb_private::TypeSystem> TypeSystemSP;
-    typedef std::shared_ptr<lldb_private::TypeFormatImpl> TypeFormatImplSP;
-    typedef std::shared_ptr<lldb_private::TypeNameSpecifierImpl> TypeNameSpecifierImplSP;
-    typedef std::shared_ptr<lldb_private::TypeSummaryImpl> TypeSummaryImplSP;
-    typedef std::shared_ptr<lldb_private::TypeSummaryOptions> TypeSummaryOptionsSP;
-    typedef std::shared_ptr<lldb_private::TypeValidatorImpl> TypeValidatorImplSP;
+typedef std::shared_ptr<lldb_private::SymbolFile> SymbolFileSP;
+typedef std::shared_ptr<lldb_private::SymbolFileType> SymbolFileTypeSP;
+typedef std::weak_ptr<lldb_private::SymbolFileType> SymbolFileTypeWP;
+typedef std::shared_ptr<lldb_private::SymbolContextSpecifier>
+    SymbolContextSpecifierSP;
+typedef std::unique_ptr<lldb_private::SymbolVendor> SymbolVendorUP;
+typedef std::shared_ptr<lldb_private::SyntheticChildren> SyntheticChildrenSP;
+typedef std::shared_ptr<lldb_private::SyntheticChildrenFrontEnd>
+    SyntheticChildrenFrontEndSP;
+typedef std::shared_ptr<lldb_private::Target> TargetSP;
+typedef std::weak_ptr<lldb_private::Target> TargetWP;
+typedef std::shared_ptr<lldb_private::TargetProperties> TargetPropertiesSP;
+typedef std::shared_ptr<lldb_private::Thread> ThreadSP;
+typedef std::weak_ptr<lldb_private::Thread> ThreadWP;
+typedef std::shared_ptr<lldb_private::ThreadCollection> ThreadCollectionSP;
+typedef std::shared_ptr<lldb_private::ThreadPlan> ThreadPlanSP;
+typedef std::shared_ptr<lldb_private::ThreadPlanTracer> ThreadPlanTracerSP;
+typedef std::shared_ptr<lldb_private::Type> TypeSP;
+typedef std::weak_ptr<lldb_private::Type> TypeWP;
+typedef std::shared_ptr<lldb_private::TypeCategoryImpl> TypeCategoryImplSP;
+typedef std::shared_ptr<lldb_private::TypeImpl> TypeImplSP;
+typedef std::shared_ptr<lldb_private::TypeMemberFunctionImpl>
+    TypeMemberFunctionImplSP;
+typedef std::shared_ptr<lldb_private::TypeEnumMemberImpl> TypeEnumMemberImplSP;
+typedef std::shared_ptr<lldb_private::TypeFilterImpl> TypeFilterImplSP;
+typedef std::shared_ptr<lldb_private::TypeSystem> TypeSystemSP;
+typedef std::shared_ptr<lldb_private::TypeFormatImpl> TypeFormatImplSP;
+typedef std::shared_ptr<lldb_private::TypeNameSpecifierImpl>
+    TypeNameSpecifierImplSP;
+typedef std::shared_ptr<lldb_private::TypeSummaryImpl> TypeSummaryImplSP;
+typedef std::shared_ptr<lldb_private::TypeSummaryOptions> TypeSummaryOptionsSP;
+typedef std::shared_ptr<lldb_private::TypeValidatorImpl> TypeValidatorImplSP;
 #ifndef LLDB_DISABLE_PYTHON
-    typedef std::shared_ptr<lldb_private::ScriptedSyntheticChildren> ScriptedSyntheticChildrenSP;
+typedef std::shared_ptr<lldb_private::ScriptedSyntheticChildren>
+    ScriptedSyntheticChildrenSP;
 #endif
-    typedef std::shared_ptr<lldb_private::UnixSignals> UnixSignalsSP;
-    typedef std::weak_ptr<lldb_private::UnixSignals> UnixSignalsWP;
-    typedef std::shared_ptr<lldb_private::UnwindAssembly> UnwindAssemblySP;
-    typedef std::shared_ptr<lldb_private::UnwindPlan> UnwindPlanSP;
-    typedef std::shared_ptr<lldb_private::UtilityFunction> UtilityFunctionSP;
-    typedef lldb_private::SharingPtr<lldb_private::ValueObject> ValueObjectSP;
-    typedef std::shared_ptr<lldb_private::Value> ValueSP;
-    typedef std::shared_ptr<lldb_private::ValueList> ValueListSP;
-    typedef std::shared_ptr<lldb_private::Variable> VariableSP;
-    typedef std::shared_ptr<lldb_private::VariableList> VariableListSP;
-    typedef std::shared_ptr<lldb_private::ValueObjectList> ValueObjectListSP;
-    typedef std::shared_ptr<lldb_private::Watchpoint> WatchpointSP;
+typedef std::shared_ptr<lldb_private::UnixSignals> UnixSignalsSP;
+typedef std::weak_ptr<lldb_private::UnixSignals> UnixSignalsWP;
+typedef std::shared_ptr<lldb_private::UnwindAssembly> UnwindAssemblySP;
+typedef std::shared_ptr<lldb_private::UnwindPlan> UnwindPlanSP;
+typedef std::shared_ptr<lldb_private::UtilityFunction> UtilityFunctionSP;
+typedef lldb_private::SharingPtr<lldb_private::ValueObject> ValueObjectSP;
+typedef std::shared_ptr<lldb_private::Value> ValueSP;
+typedef std::shared_ptr<lldb_private::ValueList> ValueListSP;
+typedef std::shared_ptr<lldb_private::Variable> VariableSP;
+typedef std::shared_ptr<lldb_private::VariableList> VariableListSP;
+typedef std::shared_ptr<lldb_private::ValueObjectList> ValueObjectListSP;
+typedef std::shared_ptr<lldb_private::Watchpoint> WatchpointSP;
 
 } // namespace lldb
 
-
-#endif  // #if defined(__cplusplus)
-#endif  // LLDB_lldb_forward_h_
+#endif // #if defined(__cplusplus)
+#endif // LLDB_lldb_forward_h_

Modified: lldb/trunk/include/lldb/lldb-private-defines.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-private-defines.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-private-defines.h (original)
+++ lldb/trunk/include/lldb/lldb-private-defines.h Tue Sep  6 15:57:50 2016
@@ -12,14 +12,15 @@
 
 #if defined(__cplusplus)
 
-// Include Compiler.h here so we don't define LLVM_FALLTHROUGH and then Compiler.h
+// Include Compiler.h here so we don't define LLVM_FALLTHROUGH and then
+// Compiler.h
 // later tries to redefine it.
 #include "llvm/Support/Compiler.h"
 
 #ifndef LLVM_FALLTHROUGH
 
 #ifndef __has_cpp_attribute
-# define __has_cpp_attribute(x) 0
+#define __has_cpp_attribute(x) 0
 #endif
 
 /// \macro LLVM_FALLTHROUGH
@@ -32,8 +33,6 @@
 
 #endif // ifndef LLVM_FALLTHROUGH
 
+#endif // #if defined(__cplusplus)
 
-
-#endif  // #if defined(__cplusplus)
-
-#endif  // liblldb_lldb_private_defines_h_
+#endif // liblldb_lldb_private_defines_h_

Modified: lldb/trunk/include/lldb/lldb-private-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-private-enumerations.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-private-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-private-enumerations.h Tue Sep  6 15:57:50 2016
@@ -15,45 +15,40 @@ namespace lldb_private {
 //----------------------------------------------------------------------
 // Thread Step Types
 //----------------------------------------------------------------------
-typedef enum StepType
-{
-    eStepTypeNone,
-    eStepTypeTrace,     ///< Single step one instruction.
-    eStepTypeTraceOver, ///< Single step one instruction, stepping over.
-    eStepTypeInto,      ///< Single step into a specified context.
-    eStepTypeOver,      ///< Single step over a specified context.
-    eStepTypeOut,       ///< Single step out a specified context.
-    eStepTypeScripted   ///< A step type implemented by the script interpreter.
+typedef enum StepType {
+  eStepTypeNone,
+  eStepTypeTrace,     ///< Single step one instruction.
+  eStepTypeTraceOver, ///< Single step one instruction, stepping over.
+  eStepTypeInto,      ///< Single step into a specified context.
+  eStepTypeOver,      ///< Single step over a specified context.
+  eStepTypeOut,       ///< Single step out a specified context.
+  eStepTypeScripted   ///< A step type implemented by the script interpreter.
 } StepType;
 
 //----------------------------------------------------------------------
 // Address Types
 //----------------------------------------------------------------------
-typedef enum AddressType
-{
-    eAddressTypeInvalid = 0,
-    eAddressTypeFile, ///< Address is an address as found in an object or symbol file
-    eAddressTypeLoad, ///< Address is an address as in the current target inferior process
-    eAddressTypeHost  ///< Address is an address in the process that is running this code
+typedef enum AddressType {
+  eAddressTypeInvalid = 0,
+  eAddressTypeFile, ///< Address is an address as found in an object or symbol
+                    ///file
+  eAddressTypeLoad, ///< Address is an address as in the current target inferior
+                    ///process
+  eAddressTypeHost  ///< Address is an address in the process that is running
+                    ///this code
 } AddressType;
 
 //----------------------------------------------------------------------
 // Votes - Need a tri-state, yes, no, no opinion...
 //----------------------------------------------------------------------
-typedef enum Vote
-{
-    eVoteNo         = -1,
-    eVoteNoOpinion  =  0,
-    eVoteYes        =  1
-} Vote;
-
-typedef enum ArchitectureType 
-{
-    eArchTypeInvalid,
-    eArchTypeMachO,
-    eArchTypeELF,
-    eArchTypeCOFF,
-    kNumArchTypes
+typedef enum Vote { eVoteNo = -1, eVoteNoOpinion = 0, eVoteYes = 1 } Vote;
+
+typedef enum ArchitectureType {
+  eArchTypeInvalid,
+  eArchTypeMachO,
+  eArchTypeELF,
+  eArchTypeCOFF,
+  kNumArchTypes
 } ArchitectureType;
 
 //----------------------------------------------------------------------
@@ -61,7 +56,7 @@ typedef enum ArchitectureType
 ///
 //----------------------------------------------------------------------
 
-//typedef enum SettableVariableType
+// typedef enum SettableVariableType
 //{
 //    eSetVarTypeInt,
 //    eSetVarTypeBoolean,
@@ -72,38 +67,37 @@ typedef enum ArchitectureType
 //    eSetVarTypeNone
 //} SettableVariableType;
 
-typedef enum VarSetOperationType
-{
-    eVarSetOperationReplace,
-    eVarSetOperationInsertBefore,
-    eVarSetOperationInsertAfter,
-    eVarSetOperationRemove,
-    eVarSetOperationAppend,
-    eVarSetOperationClear,
-    eVarSetOperationAssign,
-    eVarSetOperationInvalid
+typedef enum VarSetOperationType {
+  eVarSetOperationReplace,
+  eVarSetOperationInsertBefore,
+  eVarSetOperationInsertAfter,
+  eVarSetOperationRemove,
+  eVarSetOperationAppend,
+  eVarSetOperationClear,
+  eVarSetOperationAssign,
+  eVarSetOperationInvalid
 } VarSetOperationType;
 
-typedef enum ArgumentRepetitionType
-{
-    eArgRepeatPlain,            // Exactly one occurrence
-    eArgRepeatOptional,         // At most one occurrence, but it's optional
-    eArgRepeatPlus,             // One or more occurrences
-    eArgRepeatStar,             // Zero or more occurrences
-    eArgRepeatRange,            // Repetition of same argument, from 1 to n
-    eArgRepeatPairPlain,        // A pair of arguments that must always go together ([arg-type arg-value]), occurs exactly once
-    eArgRepeatPairOptional,     // A pair that occurs at most once (optional)
-    eArgRepeatPairPlus,         // One or more occurrences of a pair
-    eArgRepeatPairStar,         // Zero or more occurrences of a pair
-    eArgRepeatPairRange,        // A pair that repeats from 1 to n
-    eArgRepeatPairRangeOptional // A pair that repeats from 1 to n, but is optional
+typedef enum ArgumentRepetitionType {
+  eArgRepeatPlain,        // Exactly one occurrence
+  eArgRepeatOptional,     // At most one occurrence, but it's optional
+  eArgRepeatPlus,         // One or more occurrences
+  eArgRepeatStar,         // Zero or more occurrences
+  eArgRepeatRange,        // Repetition of same argument, from 1 to n
+  eArgRepeatPairPlain,    // A pair of arguments that must always go together
+                          // ([arg-type arg-value]), occurs exactly once
+  eArgRepeatPairOptional, // A pair that occurs at most once (optional)
+  eArgRepeatPairPlus,     // One or more occurrences of a pair
+  eArgRepeatPairStar,     // Zero or more occurrences of a pair
+  eArgRepeatPairRange,    // A pair that repeats from 1 to n
+  eArgRepeatPairRangeOptional // A pair that repeats from 1 to n, but is
+                              // optional
 } ArgumentRepetitionType;
 
-typedef enum SortOrder
-{
-    eSortOrderNone,
-    eSortOrderByAddress,
-    eSortOrderByName
+typedef enum SortOrder {
+  eSortOrderNone,
+  eSortOrderByAddress,
+  eSortOrderByName
 } SortOrder;
 
 //----------------------------------------------------------------------
@@ -112,157 +106,155 @@ typedef enum SortOrder
 // calculated once and set to eLazyBoolNo or eLazyBoolYes.
 //----------------------------------------------------------------------
 typedef enum LazyBool {
-    eLazyBoolCalculate  = -1,
-    eLazyBoolNo         = 0,
-    eLazyBoolYes        = 1
+  eLazyBoolCalculate = -1,
+  eLazyBoolNo = 0,
+  eLazyBoolYes = 1
 } LazyBool;
 
 //------------------------------------------------------------------
 /// Name matching
 //------------------------------------------------------------------
-typedef enum NameMatchType
-{
-    eNameMatchIgnore,
-    eNameMatchEquals,
-    eNameMatchContains,
-    eNameMatchStartsWith,
-    eNameMatchEndsWith,
-    eNameMatchRegularExpression
-    
-} NameMatchType;
+typedef enum NameMatchType {
+  eNameMatchIgnore,
+  eNameMatchEquals,
+  eNameMatchContains,
+  eNameMatchStartsWith,
+  eNameMatchEndsWith,
+  eNameMatchRegularExpression
 
+} NameMatchType;
 
 //------------------------------------------------------------------
 /// Instruction types
-//------------------------------------------------------------------    
-typedef enum InstructionType
-{
-    eInstructionTypeAny,                // Support for any instructions at all (at least one)
-    eInstructionTypePrologueEpilogue,   // All prologue and epilogue instructions that push and pop register values and modify sp/fp
-    eInstructionTypePCModifying,        // Any instruction that modifies the program counter/instruction pointer
-    eInstructionTypeAll                 // All instructions of any kind
-
-}  InstructionType;
-    
-    
+//------------------------------------------------------------------
+typedef enum InstructionType {
+  eInstructionTypeAny, // Support for any instructions at all (at least one)
+  eInstructionTypePrologueEpilogue, // All prologue and epilogue instructions
+                                    // that push and pop register values and
+                                    // modify sp/fp
+  eInstructionTypePCModifying,      // Any instruction that modifies the program
+                                    // counter/instruction pointer
+  eInstructionTypeAll               // All instructions of any kind
+
+} InstructionType;
+
 //------------------------------------------------------------------
 /// Format category entry types
-//------------------------------------------------------------------    
-typedef enum FormatCategoryItem
-{
-    eFormatCategoryItemSummary =         0x0001,
-    eFormatCategoryItemRegexSummary =    0x0002,
-    eFormatCategoryItemFilter =          0x0004,
-    eFormatCategoryItemRegexFilter =     0x0008,
-    eFormatCategoryItemSynth =           0x0010,
-    eFormatCategoryItemRegexSynth =      0x0020,
-    eFormatCategoryItemValue =           0x0040,
-    eFormatCategoryItemRegexValue =      0x0080,
-    eFormatCategoryItemValidator =       0x0100,
-    eFormatCategoryItemRegexValidator =  0x0200
+//------------------------------------------------------------------
+typedef enum FormatCategoryItem {
+  eFormatCategoryItemSummary = 0x0001,
+  eFormatCategoryItemRegexSummary = 0x0002,
+  eFormatCategoryItemFilter = 0x0004,
+  eFormatCategoryItemRegexFilter = 0x0008,
+  eFormatCategoryItemSynth = 0x0010,
+  eFormatCategoryItemRegexSynth = 0x0020,
+  eFormatCategoryItemValue = 0x0040,
+  eFormatCategoryItemRegexValue = 0x0080,
+  eFormatCategoryItemValidator = 0x0100,
+  eFormatCategoryItemRegexValidator = 0x0200
 } FormatCategoryItem;
 
 //------------------------------------------------------------------
 /// Expression execution policies
 //------------------------------------------------------------------
 typedef enum {
-    eExecutionPolicyOnlyWhenNeeded,
-    eExecutionPolicyNever,
-    eExecutionPolicyAlways,
-    eExecutionPolicyTopLevel // used for top-level code
+  eExecutionPolicyOnlyWhenNeeded,
+  eExecutionPolicyNever,
+  eExecutionPolicyAlways,
+  eExecutionPolicyTopLevel // used for top-level code
 } ExecutionPolicy;
 
 //----------------------------------------------------------------------
 // Ways that the FormatManager picks a particular format for a type
 //----------------------------------------------------------------------
-typedef enum FormatterChoiceCriterion
-{
-    eFormatterChoiceCriterionDirectChoice =                  0x00000000,
-    eFormatterChoiceCriterionStrippedPointerReference =      0x00000001,
-    eFormatterChoiceCriterionNavigatedTypedefs =             0x00000002,
-    eFormatterChoiceCriterionRegularExpressionSummary =      0x00000004,
-    eFormatterChoiceCriterionRegularExpressionFilter =       0x00000004,
-    eFormatterChoiceCriterionLanguagePlugin =                0x00000008,
-    eFormatterChoiceCriterionStrippedBitField =              0x00000010,
-    eFormatterChoiceCriterionWentToStaticValue =             0x00000020
+typedef enum FormatterChoiceCriterion {
+  eFormatterChoiceCriterionDirectChoice = 0x00000000,
+  eFormatterChoiceCriterionStrippedPointerReference = 0x00000001,
+  eFormatterChoiceCriterionNavigatedTypedefs = 0x00000002,
+  eFormatterChoiceCriterionRegularExpressionSummary = 0x00000004,
+  eFormatterChoiceCriterionRegularExpressionFilter = 0x00000004,
+  eFormatterChoiceCriterionLanguagePlugin = 0x00000008,
+  eFormatterChoiceCriterionStrippedBitField = 0x00000010,
+  eFormatterChoiceCriterionWentToStaticValue = 0x00000020
 } FormatterChoiceCriterion;
 
 //----------------------------------------------------------------------
 // Synchronicity behavior of scripted commands
 //----------------------------------------------------------------------
-typedef enum ScriptedCommandSynchronicity
-{
-    eScriptedCommandSynchronicitySynchronous,
-    eScriptedCommandSynchronicityAsynchronous,
-    eScriptedCommandSynchronicityCurrentValue // use whatever the current synchronicity is
+typedef enum ScriptedCommandSynchronicity {
+  eScriptedCommandSynchronicitySynchronous,
+  eScriptedCommandSynchronicityAsynchronous,
+  eScriptedCommandSynchronicityCurrentValue // use whatever the current
+                                            // synchronicity is
 } ScriptedCommandSynchronicity;
 
 //----------------------------------------------------------------------
 // Verbosity mode of "po" output
 //----------------------------------------------------------------------
-typedef enum LanguageRuntimeDescriptionDisplayVerbosity
-{
-    eLanguageRuntimeDescriptionDisplayVerbosityCompact, // only print the description string, if any
-    eLanguageRuntimeDescriptionDisplayVerbosityFull,    // print the full-blown output
+typedef enum LanguageRuntimeDescriptionDisplayVerbosity {
+  eLanguageRuntimeDescriptionDisplayVerbosityCompact, // only print the
+                                                      // description string, if
+                                                      // any
+  eLanguageRuntimeDescriptionDisplayVerbosityFull,    // print the full-blown
+                                                      // output
 } LanguageRuntimeDescriptionDisplayVerbosity;
 
 //----------------------------------------------------------------------
 // Loading modules from memory
 //----------------------------------------------------------------------
 typedef enum MemoryModuleLoadLevel {
-    eMemoryModuleLoadLevelMinimal,  // Load sections only
-    eMemoryModuleLoadLevelPartial,  // Load function bounds but no symbols
-    eMemoryModuleLoadLevelComplete, // Load sections and all symbols
+  eMemoryModuleLoadLevelMinimal,  // Load sections only
+  eMemoryModuleLoadLevelPartial,  // Load function bounds but no symbols
+  eMemoryModuleLoadLevelComplete, // Load sections and all symbols
 } MemoryModuleLoadLevel;
-    
 
 //----------------------------------------------------------------------
 // Result enums for when reading multiple lines from IOHandlers
 //----------------------------------------------------------------------
 enum class LineStatus {
-    Success,    // The line that was just edited if good and should be added to the lines
-    Error,      // There is an error with the current line and it needs to be re-edited before it can be accepted
-    Done        // Lines are complete
+  Success, // The line that was just edited if good and should be added to the
+           // lines
+  Error, // There is an error with the current line and it needs to be re-edited
+         // before it can be accepted
+  Done   // Lines are complete
 };
 
 //----------------------------------------------------------------------
 // Exit Type for inferior processes
 //----------------------------------------------------------------------
 typedef enum ExitType {
-    eExitTypeInvalid,
-    eExitTypeExit,    // The exit status represents the return code from normal program exit (i.e. WIFEXITED() was true)
-    eExitTypeSignal,  // The exit status represents the signal number that caused the program to exit (i.e. WIFSIGNALED() was true)
-    eExitTypeStop,    // The exit status represents the stop signal that caused the program to exit (i.e. WIFSTOPPED() was true)
+  eExitTypeInvalid,
+  eExitTypeExit,   // The exit status represents the return code from normal
+                   // program exit (i.e. WIFEXITED() was true)
+  eExitTypeSignal, // The exit status represents the signal number that caused
+                   // the program to exit (i.e. WIFSIGNALED() was true)
+  eExitTypeStop,   // The exit status represents the stop signal that caused the
+                   // program to exit (i.e. WIFSTOPPED() was true)
 } ExitType;
 
 //----------------------------------------------------------------------
 // Boolean result of running a Type Validator
 //----------------------------------------------------------------------
-enum class TypeValidatorResult : bool {
-    Success = true,
-    Failure = false
-};
+enum class TypeValidatorResult : bool { Success = true, Failure = false };
 
 //----------------------------------------------------------------------
 // Enumerations that can be used to specify scopes types when looking up
 // types.
 //----------------------------------------------------------------------
-enum class CompilerContextKind
-{
-    Invalid = 0,
-    TranslationUnit,
-    Module,
-    Namespace,
-    Class,
-    Structure,
-    Union,
-    Function,
-    Variable,
-    Enumeration,
-    Typedef
+enum class CompilerContextKind {
+  Invalid = 0,
+  TranslationUnit,
+  Module,
+  Namespace,
+  Class,
+  Structure,
+  Union,
+  Function,
+  Variable,
+  Enumeration,
+  Typedef
 };
-    
-} // namespace lldb_private
 
+} // namespace lldb_private
 
-#endif  // LLDB_lldb_private_enumerations_h_
+#endif // LLDB_lldb_private_enumerations_h_

Modified: lldb/trunk/include/lldb/lldb-private-forward.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-private-forward.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-private-forward.h (original)
+++ lldb/trunk/include/lldb/lldb-private-forward.h Tue Sep  6 15:57:50 2016
@@ -14,27 +14,30 @@
 
 #include <memory>
 
-namespace lldb_private
-{
-    // ---------------------------------------------------------------
-    // Class forward decls.
-    // ---------------------------------------------------------------
-    class NativeBreakpoint;
-    class NativeBreakpointList;
-    class NativeProcessProtocol;
-    class NativeRegisterContext;
-    class NativeThreadProtocol;
-    class ResumeActionList;
-    class UnixSignals;
+namespace lldb_private {
+// ---------------------------------------------------------------
+// Class forward decls.
+// ---------------------------------------------------------------
+class NativeBreakpoint;
+class NativeBreakpointList;
+class NativeProcessProtocol;
+class NativeRegisterContext;
+class NativeThreadProtocol;
+class ResumeActionList;
+class UnixSignals;
 
-    // ---------------------------------------------------------------
-    // SP/WP decls.
-    // ---------------------------------------------------------------
-    typedef std::shared_ptr<NativeBreakpoint> NativeBreakpointSP;
-    typedef std::shared_ptr<lldb_private::NativeProcessProtocol> NativeProcessProtocolSP;
-    typedef std::weak_ptr<lldb_private::NativeProcessProtocol> NativeProcessProtocolWP;
-    typedef std::shared_ptr<lldb_private::NativeRegisterContext> NativeRegisterContextSP;
-    typedef std::shared_ptr<lldb_private::NativeThreadProtocol> NativeThreadProtocolSP;
+// ---------------------------------------------------------------
+// SP/WP decls.
+// ---------------------------------------------------------------
+typedef std::shared_ptr<NativeBreakpoint> NativeBreakpointSP;
+typedef std::shared_ptr<lldb_private::NativeProcessProtocol>
+    NativeProcessProtocolSP;
+typedef std::weak_ptr<lldb_private::NativeProcessProtocol>
+    NativeProcessProtocolWP;
+typedef std::shared_ptr<lldb_private::NativeRegisterContext>
+    NativeRegisterContextSP;
+typedef std::shared_ptr<lldb_private::NativeThreadProtocol>
+    NativeThreadProtocolSP;
 }
 
 #endif // #if defined(__cplusplus)

Modified: lldb/trunk/include/lldb/lldb-private-interfaces.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-private-interfaces.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-private-interfaces.h (original)
+++ lldb/trunk/include/lldb/lldb-private-interfaces.h Tue Sep  6 15:57:50 2016
@@ -18,50 +18,97 @@
 
 #include <set>
 
-namespace lldb_private
-{
-    typedef lldb::ABISP (*ABICreateInstance) (const ArchSpec &arch);
-    typedef Disassembler* (*DisassemblerCreateInstance) (const ArchSpec &arch, const char *flavor);
-    typedef DynamicLoader* (*DynamicLoaderCreateInstance) (Process* process, bool force);
-    typedef lldb::JITLoaderSP (*JITLoaderCreateInstance) (Process *process, bool force);
-    typedef ObjectContainer* (*ObjectContainerCreateInstance) (const lldb::ModuleSP &module_sp, lldb::DataBufferSP& data_sp, lldb::offset_t data_offset, const FileSpec *file, lldb::offset_t offset, lldb::offset_t length);
-    typedef size_t (*ObjectFileGetModuleSpecifications) (const FileSpec &file, lldb::DataBufferSP& data_sp, lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, ModuleSpecList &module_specs);
-    typedef ObjectFile* (*ObjectFileCreateInstance) (const lldb::ModuleSP &module_sp, lldb::DataBufferSP& data_sp, lldb::offset_t data_offset, const FileSpec* file, lldb::offset_t file_offset, lldb::offset_t length);
-    typedef ObjectFile* (*ObjectFileCreateMemoryInstance) (const lldb::ModuleSP &module_sp, lldb::DataBufferSP& data_sp, const lldb::ProcessSP &process_sp, lldb::addr_t offset);
-    typedef bool (*ObjectFileSaveCore) (const lldb::ProcessSP &process_sp, const FileSpec &outfile, Error &error);
-    typedef LogChannel* (*LogChannelCreateInstance) ();
-    typedef EmulateInstruction * (*EmulateInstructionCreateInstance) (const ArchSpec &arch, InstructionType inst_type);
-    typedef OperatingSystem* (*OperatingSystemCreateInstance) (Process *process, bool force);
-    typedef Language *(*LanguageCreateInstance) (lldb::LanguageType language);
-    typedef LanguageRuntime *(*LanguageRuntimeCreateInstance) (Process *process, lldb::LanguageType language);
-    typedef lldb::CommandObjectSP (*LanguageRuntimeGetCommandObject) (CommandInterpreter& interpreter);
-    typedef lldb::StructuredDataPluginSP (*StructuredDataPluginCreateInstance)
-        (Process &process);
-    typedef Error (*StructuredDataFilterLaunchInfo)(ProcessLaunchInfo &launch_info, Target *target);
-    typedef SystemRuntime *(*SystemRuntimeCreateInstance) (Process *process);
-    typedef lldb::PlatformSP (*PlatformCreateInstance) (bool force, const ArchSpec *arch);
-    typedef lldb::ProcessSP (*ProcessCreateInstance) (lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const FileSpec *crash_file_path);
-    typedef lldb::ScriptInterpreterSP (*ScriptInterpreterCreateInstance)(CommandInterpreter &interpreter);
-    typedef SymbolFile* (*SymbolFileCreateInstance) (ObjectFile* obj_file);
-    typedef SymbolVendor* (*SymbolVendorCreateInstance) (const lldb::ModuleSP &module_sp, lldb_private::Stream *feedback_strm);   // Module can be NULL for default system symbol vendor
-    typedef bool (*BreakpointHitCallback) (void *baton, StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id);
-    typedef bool (*WatchpointHitCallback) (void *baton, StoppointCallbackContext *context, lldb::user_id_t watch_id);
-    typedef void (*OptionValueChangedCallback) (void *baton, OptionValue *option_value);
-    typedef bool (*ThreadPlanShouldStopHereCallback) (ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation, void *baton);
-    typedef lldb::ThreadPlanSP (*ThreadPlanStepFromHereCallback) (ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation, void *baton);
-    typedef UnwindAssembly* (*UnwindAssemblyCreateInstance) (const ArchSpec &arch);
-    typedef lldb::MemoryHistorySP (*MemoryHistoryCreateInstance) (const lldb::ProcessSP &process_sp);
-    typedef lldb::InstrumentationRuntimeType (*InstrumentationRuntimeGetType) ();
-    typedef lldb::InstrumentationRuntimeSP (*InstrumentationRuntimeCreateInstance) (const lldb::ProcessSP &process_sp);
-    typedef lldb::TypeSystemSP (*TypeSystemCreateInstance) (lldb::LanguageType language, Module *module, Target *target);
-    typedef lldb::REPLSP (*REPLCreateInstance) (Error &error, lldb::LanguageType language, Debugger *debugger, Target *target, const char *repl_options);
-    typedef void (*TypeSystemEnumerateSupportedLanguages) (std::set<lldb::LanguageType> &languages_for_types, std::set<lldb::LanguageType> &languages_for_expressions);
-    typedef void (*REPLEnumerateSupportedLanguages) (std::set<lldb::LanguageType> &languages);
-    typedef int (*ComparisonFunction)(const void *, const void *);
-    typedef void (*DebuggerInitializeCallback)(Debugger &debugger);
+namespace lldb_private {
+typedef lldb::ABISP (*ABICreateInstance)(const ArchSpec &arch);
+typedef Disassembler *(*DisassemblerCreateInstance)(const ArchSpec &arch,
+                                                    const char *flavor);
+typedef DynamicLoader *(*DynamicLoaderCreateInstance)(Process *process,
+                                                      bool force);
+typedef lldb::JITLoaderSP (*JITLoaderCreateInstance)(Process *process,
+                                                     bool force);
+typedef ObjectContainer *(*ObjectContainerCreateInstance)(
+    const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp,
+    lldb::offset_t data_offset, const FileSpec *file, lldb::offset_t offset,
+    lldb::offset_t length);
+typedef size_t (*ObjectFileGetModuleSpecifications)(
+    const FileSpec &file, lldb::DataBufferSP &data_sp,
+    lldb::offset_t data_offset, lldb::offset_t file_offset,
+    lldb::offset_t length, ModuleSpecList &module_specs);
+typedef ObjectFile *(*ObjectFileCreateInstance)(const lldb::ModuleSP &module_sp,
+                                                lldb::DataBufferSP &data_sp,
+                                                lldb::offset_t data_offset,
+                                                const FileSpec *file,
+                                                lldb::offset_t file_offset,
+                                                lldb::offset_t length);
+typedef ObjectFile *(*ObjectFileCreateMemoryInstance)(
+    const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp,
+    const lldb::ProcessSP &process_sp, lldb::addr_t offset);
+typedef bool (*ObjectFileSaveCore)(const lldb::ProcessSP &process_sp,
+                                   const FileSpec &outfile, Error &error);
+typedef LogChannel *(*LogChannelCreateInstance)();
+typedef EmulateInstruction *(*EmulateInstructionCreateInstance)(
+    const ArchSpec &arch, InstructionType inst_type);
+typedef OperatingSystem *(*OperatingSystemCreateInstance)(Process *process,
+                                                          bool force);
+typedef Language *(*LanguageCreateInstance)(lldb::LanguageType language);
+typedef LanguageRuntime *(*LanguageRuntimeCreateInstance)(
+    Process *process, lldb::LanguageType language);
+typedef lldb::CommandObjectSP (*LanguageRuntimeGetCommandObject)(
+    CommandInterpreter &interpreter);
+typedef lldb::StructuredDataPluginSP (*StructuredDataPluginCreateInstance)(
+    Process &process);
+typedef Error (*StructuredDataFilterLaunchInfo)(ProcessLaunchInfo &launch_info,
+                                                Target *target);
+typedef SystemRuntime *(*SystemRuntimeCreateInstance)(Process *process);
+typedef lldb::PlatformSP (*PlatformCreateInstance)(bool force,
+                                                   const ArchSpec *arch);
+typedef lldb::ProcessSP (*ProcessCreateInstance)(
+    lldb::TargetSP target_sp, lldb::ListenerSP listener_sp,
+    const FileSpec *crash_file_path);
+typedef lldb::ScriptInterpreterSP (*ScriptInterpreterCreateInstance)(
+    CommandInterpreter &interpreter);
+typedef SymbolFile *(*SymbolFileCreateInstance)(ObjectFile *obj_file);
+typedef SymbolVendor *(*SymbolVendorCreateInstance)(
+    const lldb::ModuleSP &module_sp,
+    lldb_private::Stream
+        *feedback_strm); // Module can be NULL for default system symbol vendor
+typedef bool (*BreakpointHitCallback)(void *baton,
+                                      StoppointCallbackContext *context,
+                                      lldb::user_id_t break_id,
+                                      lldb::user_id_t break_loc_id);
+typedef bool (*WatchpointHitCallback)(void *baton,
+                                      StoppointCallbackContext *context,
+                                      lldb::user_id_t watch_id);
+typedef void (*OptionValueChangedCallback)(void *baton,
+                                           OptionValue *option_value);
+typedef bool (*ThreadPlanShouldStopHereCallback)(
+    ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation,
+    void *baton);
+typedef lldb::ThreadPlanSP (*ThreadPlanStepFromHereCallback)(
+    ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation,
+    void *baton);
+typedef UnwindAssembly *(*UnwindAssemblyCreateInstance)(const ArchSpec &arch);
+typedef lldb::MemoryHistorySP (*MemoryHistoryCreateInstance)(
+    const lldb::ProcessSP &process_sp);
+typedef lldb::InstrumentationRuntimeType (*InstrumentationRuntimeGetType)();
+typedef lldb::InstrumentationRuntimeSP (*InstrumentationRuntimeCreateInstance)(
+    const lldb::ProcessSP &process_sp);
+typedef lldb::TypeSystemSP (*TypeSystemCreateInstance)(
+    lldb::LanguageType language, Module *module, Target *target);
+typedef lldb::REPLSP (*REPLCreateInstance)(Error &error,
+                                           lldb::LanguageType language,
+                                           Debugger *debugger, Target *target,
+                                           const char *repl_options);
+typedef void (*TypeSystemEnumerateSupportedLanguages)(
+    std::set<lldb::LanguageType> &languages_for_types,
+    std::set<lldb::LanguageType> &languages_for_expressions);
+typedef void (*REPLEnumerateSupportedLanguages)(
+    std::set<lldb::LanguageType> &languages);
+typedef int (*ComparisonFunction)(const void *, const void *);
+typedef void (*DebuggerInitializeCallback)(Debugger &debugger);
 
 } // namespace lldb_private
 
-#endif  // #if defined(__cplusplus)
+#endif // #if defined(__cplusplus)
 
-#endif  // liblldb_lldb_private_interfaces_h_
+#endif // liblldb_lldb_private_interfaces_h_

Modified: lldb/trunk/include/lldb/lldb-private-types.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-private-types.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-private-types.h (original)
+++ lldb/trunk/include/lldb/lldb-private-types.h Tue Sep  6 15:57:50 2016
@@ -14,103 +14,108 @@
 
 #include "lldb/lldb-private.h"
 
-namespace llvm
-{
-namespace sys
-{
+namespace llvm {
+namespace sys {
 class DynamicLibrary;
 }
 }
 
-namespace lldb_private
-{
-    class Platform;
-    class ExecutionContext;
-
-    typedef llvm::sys::DynamicLibrary (*LoadPluginCallbackType)(const lldb::DebuggerSP &debugger_sp,
-                                                                const FileSpec &spec, Error &error);
-
-    //----------------------------------------------------------------------
-    // Every register is described in detail including its name, alternate
-    // name (optional), encoding, size in bytes and the default display
-    // format.
-    //----------------------------------------------------------------------
-    struct RegisterInfo
-    {
-        const char *name;        // Name of this register, can't be NULL
-        const char *alt_name;    // Alternate name of this register, can be NULL
-        uint32_t byte_size;      // Size in bytes of the register
-        uint32_t byte_offset;    // The byte offset in the register context data where this register's value is found.
-                                 // This is optional, and can be 0 if a particular RegisterContext does not need to
-                                 // address its registers by byte offset.
-        lldb::Encoding encoding; // Encoding of the register bits
-        lldb::Format format;     // Default display format
-        uint32_t kinds[lldb::kNumRegisterKinds]; // Holds all of the various register numbers for all register kinds
-        uint32_t *value_regs;      // List of registers (terminated with LLDB_INVALID_REGNUM).  If this value is not
-                                   // null, all registers in this list will be read first, at which point the value 
-                                   // for this register will be valid.  For example, the value list for ah
-                                   // would be eax (x86) or rax (x64).
-        uint32_t *invalidate_regs; // List of registers (terminated with LLDB_INVALID_REGNUM).  If this value is not
-                                   // null, all registers in this list will be invalidated when the value of this
-                                   // register changes.  For example, the invalidate list for eax would be rax
-                                   // ax, ah, and al.
-        const uint8_t *dynamic_size_dwarf_expr_bytes; // A DWARF expression that when evaluated gives 
-                                                      // the byte size of this register.
-        size_t dynamic_size_dwarf_len; // The length of the DWARF expression in bytes
-                                       // in the dynamic_size_dwarf_expr_bytes member. 
-    };
-
-    //----------------------------------------------------------------------
-    // Registers are grouped into register sets
-    //----------------------------------------------------------------------
-    struct RegisterSet
-    {
-        const char *name;           // Name of this register set
-        const char *short_name;     // A short name for this register set
-        size_t num_registers;       // The number of registers in REGISTERS array below
-        const uint32_t *registers;  // An array of register indices in this set.  The values in this array are
-                                    // *indices* (not register numbers) into a particular RegisterContext's
-                                    // register array.  For example, if eax is defined at index 4 for a
-                                    // particular RegisterContext, eax would be included in this RegisterSet
-                                    // by adding the value 4.  Not by adding the value lldb_eax_i386.
-    };
-
-    struct OptionEnumValueElement
-    {
-        int64_t value;
-        const char *string_value;
-        const char *usage;
-    };
-
-    struct OptionValidator
-    {
-        virtual ~OptionValidator() { }
-        virtual bool IsValid(Platform &platform, const ExecutionContext &target) const = 0;
-        virtual const char * ShortConditionString() const = 0;
-        virtual const char * LongConditionString() const = 0;
-    };
-
-    struct OptionDefinition
-    {
-        uint32_t usage_mask;                     // Used to mark options that can be used together.  If (1 << n & usage_mask) != 0
-                                                 // then this option belongs to option set n.
-        bool required;                           // This option is required (in the current usage level)
-        const char *long_option;                 // Full name for this option.
-        int short_option;                        // Single character for this option.
-        int option_has_arg;                      // no_argument, required_argument or optional_argument
-        OptionValidator* validator;              // If non-NULL, option is valid iff |validator->IsValid()|, otherwise always valid.
-        OptionEnumValueElement *enum_values;     // If non-NULL an array of enum values.
-        uint32_t completion_type;                // Cookie the option class can use to do define the argument completion.
-        lldb::CommandArgumentType argument_type; // Type of argument this option takes
-        const char *usage_text;                  // Full text explaining what this options does and what (if any) argument to
-                                                 // pass it.
-    };
+namespace lldb_private {
+class Platform;
+class ExecutionContext;
+
+typedef llvm::sys::DynamicLibrary (*LoadPluginCallbackType)(
+    const lldb::DebuggerSP &debugger_sp, const FileSpec &spec, Error &error);
+
+//----------------------------------------------------------------------
+// Every register is described in detail including its name, alternate
+// name (optional), encoding, size in bytes and the default display
+// format.
+//----------------------------------------------------------------------
+struct RegisterInfo {
+  const char *name;     // Name of this register, can't be NULL
+  const char *alt_name; // Alternate name of this register, can be NULL
+  uint32_t byte_size;   // Size in bytes of the register
+  uint32_t byte_offset; // The byte offset in the register context data where
+                        // this register's value is found.
+  // This is optional, and can be 0 if a particular RegisterContext does not
+  // need to
+  // address its registers by byte offset.
+  lldb::Encoding encoding;                 // Encoding of the register bits
+  lldb::Format format;                     // Default display format
+  uint32_t kinds[lldb::kNumRegisterKinds]; // Holds all of the various register
+                                           // numbers for all register kinds
+  uint32_t *value_regs;                    // List of registers (terminated with
+                        // LLDB_INVALID_REGNUM).  If this value is not
+  // null, all registers in this list will be read first, at which point the
+  // value
+  // for this register will be valid.  For example, the value list for ah
+  // would be eax (x86) or rax (x64).
+  uint32_t *invalidate_regs; // List of registers (terminated with
+                             // LLDB_INVALID_REGNUM).  If this value is not
+  // null, all registers in this list will be invalidated when the value of this
+  // register changes.  For example, the invalidate list for eax would be rax
+  // ax, ah, and al.
+  const uint8_t *dynamic_size_dwarf_expr_bytes; // A DWARF expression that when
+                                                // evaluated gives
+  // the byte size of this register.
+  size_t dynamic_size_dwarf_len; // The length of the DWARF expression in bytes
+                                 // in the dynamic_size_dwarf_expr_bytes member.
+};
+
+//----------------------------------------------------------------------
+// Registers are grouped into register sets
+//----------------------------------------------------------------------
+struct RegisterSet {
+  const char *name;          // Name of this register set
+  const char *short_name;    // A short name for this register set
+  size_t num_registers;      // The number of registers in REGISTERS array below
+  const uint32_t *registers; // An array of register indices in this set.  The
+                             // values in this array are
+  // *indices* (not register numbers) into a particular RegisterContext's
+  // register array.  For example, if eax is defined at index 4 for a
+  // particular RegisterContext, eax would be included in this RegisterSet
+  // by adding the value 4.  Not by adding the value lldb_eax_i386.
+};
+
+struct OptionEnumValueElement {
+  int64_t value;
+  const char *string_value;
+  const char *usage;
+};
+
+struct OptionValidator {
+  virtual ~OptionValidator() {}
+  virtual bool IsValid(Platform &platform,
+                       const ExecutionContext &target) const = 0;
+  virtual const char *ShortConditionString() const = 0;
+  virtual const char *LongConditionString() const = 0;
+};
+
+struct OptionDefinition {
+  uint32_t usage_mask; // Used to mark options that can be used together.  If (1
+                       // << n & usage_mask) != 0
+                       // then this option belongs to option set n.
+  bool required;       // This option is required (in the current usage level)
+  const char *long_option; // Full name for this option.
+  int short_option;        // Single character for this option.
+  int option_has_arg; // no_argument, required_argument or optional_argument
+  OptionValidator *validator; // If non-NULL, option is valid iff
+                              // |validator->IsValid()|, otherwise always valid.
+  OptionEnumValueElement *enum_values; // If non-NULL an array of enum values.
+  uint32_t completion_type; // Cookie the option class can use to do define the
+                            // argument completion.
+  lldb::CommandArgumentType argument_type; // Type of argument this option takes
+  const char *usage_text; // Full text explaining what this options does and
+                          // what (if any) argument to
+                          // pass it.
+};
 
-    typedef struct type128 { uint64_t x[2]; } type128;
-    typedef struct type256 { uint64_t x[4]; } type256;
+typedef struct type128 { uint64_t x[2]; } type128;
+typedef struct type256 { uint64_t x[4]; } type256;
 
 } // namespace lldb_private
 
-#endif  // #if defined(__cplusplus)
+#endif // #if defined(__cplusplus)
 
-#endif  // liblldb_lldb_private_types_h_
+#endif // liblldb_lldb_private_types_h_

Modified: lldb/trunk/include/lldb/lldb-private.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-private.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-private.h (original)
+++ lldb/trunk/include/lldb/lldb-private.h Tue Sep  6 15:57:50 2016
@@ -12,21 +12,18 @@
 
 #if defined(__cplusplus)
 
-#include "lldb/lldb-public.h"
+#include "lldb/lldb-private-defines.h"
 #include "lldb/lldb-private-enumerations.h"
 #include "lldb/lldb-private-interfaces.h"
 #include "lldb/lldb-private-types.h"
-#include "lldb/lldb-private-defines.h"
+#include "lldb/lldb-public.h"
 
 namespace lldb_private {
 
-const char *
-GetVersion ();
+const char *GetVersion();
 
 } // namespace lldb_private
 
+#endif // defined(__cplusplus)
 
-#endif  // defined(__cplusplus)
-
-
-#endif  // lldb_lldb_private_h_
+#endif // lldb_lldb_private_h_

Modified: lldb/trunk/include/lldb/lldb-public.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-public.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-public.h (original)
+++ lldb/trunk/include/lldb/lldb-public.h Tue Sep  6 15:57:50 2016
@@ -15,4 +15,4 @@
 #include "lldb/lldb-forward.h"
 #include "lldb/lldb-types.h"
 
-#endif  // LLDB_lldb_h_
+#endif // LLDB_lldb_h_

Modified: lldb/trunk/include/lldb/lldb-types.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-types.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-types.h (original)
+++ lldb/trunk/include/lldb/lldb-types.h Tue Sep  6 15:57:50 2016
@@ -19,12 +19,18 @@
 
 //----------------------------------------------------------------------
 // All host systems must define:
-//  lldb::condition_t       The native condition type (or a substitute class) for conditions on the host system.
-//  lldb::mutex_t           The native mutex type for mutex objects on the host system.
-//  lldb::thread_t          The native thread type for spawned threads on the system
-//  lldb::thread_arg_t      The type of the one any only thread creation argument for the host system
-//  lldb::thread_result_t   The return type that gets returned when a thread finishes.
-//  lldb::thread_func_t     The function prototype used to spawn a thread on the host system.
+//  lldb::condition_t       The native condition type (or a substitute class)
+//  for conditions on the host system.
+//  lldb::mutex_t           The native mutex type for mutex objects on the host
+//  system.
+//  lldb::thread_t          The native thread type for spawned threads on the
+//  system
+//  lldb::thread_arg_t      The type of the one any only thread creation
+//  argument for the host system
+//  lldb::thread_result_t   The return type that gets returned when a thread
+//  finishes.
+//  lldb::thread_func_t     The function prototype used to spawn a thread on the
+//  host system.
 //  #define LLDB_INVALID_PROCESS_ID ...
 //  #define LLDB_INVALID_THREAD_ID ...
 //  #define LLDB_INVALID_HOST_THREAD ...
@@ -44,75 +50,71 @@
 
 #include <process.h>
 
-namespace lldb
-{
-    typedef void*               mutex_t;
-    typedef void*               condition_t;
-    typedef void*               rwlock_t;
-    typedef void*               process_t;                  // Process type is HANDLE
-    typedef void*               thread_t;                   // Host thread type
-    typedef void*               file_t;                     // Host file type
-    typedef void*               pipe_t;                     // Host pipe type
-    typedef unsigned int __w64  socket_t;                   // Host socket type
-    typedef uint32_t            thread_key_t;
-    typedef void*               thread_arg_t;               // Host thread argument type
-    typedef unsigned            thread_result_t;            // Host thread result type
-    typedef thread_result_t     (*thread_func_t)(void *);   // Host thread function type
+namespace lldb {
+typedef void *mutex_t;
+typedef void *condition_t;
+typedef void *rwlock_t;
+typedef void *process_t;             // Process type is HANDLE
+typedef void *thread_t;              // Host thread type
+typedef void *file_t;                // Host file type
+typedef void *pipe_t;                // Host pipe type
+typedef unsigned int __w64 socket_t; // Host socket type
+typedef uint32_t thread_key_t;
+typedef void *thread_arg_t;                       // Host thread argument type
+typedef unsigned thread_result_t;                 // Host thread result type
+typedef thread_result_t (*thread_func_t)(void *); // Host thread function type
 }
 
 #else
 
 #include <pthread.h>
 
-namespace lldb
-{
-    //----------------------------------------------------------------------
-    // MacOSX Types
-    //----------------------------------------------------------------------
-    typedef ::pthread_mutex_t   mutex_t;
-    typedef pthread_cond_t      condition_t;
-    typedef pthread_rwlock_t    rwlock_t;
-    typedef uint64_t            process_t;                  // Process type is just a pid.
-    typedef pthread_t           thread_t;                   // Host thread type
-    typedef int                 file_t;                     // Host file type
-    typedef int                 pipe_t;                     // Host pipe type
-    typedef int                 socket_t;                   // Host socket type
-    typedef pthread_key_t       thread_key_t;
-    typedef void *              thread_arg_t;               // Host thread argument type
-    typedef void *              thread_result_t;            // Host thread result type
-    typedef void *              (*thread_func_t)(void *);   // Host thread function type
+namespace lldb {
+//----------------------------------------------------------------------
+// MacOSX Types
+//----------------------------------------------------------------------
+typedef ::pthread_mutex_t mutex_t;
+typedef pthread_cond_t condition_t;
+typedef pthread_rwlock_t rwlock_t;
+typedef uint64_t process_t; // Process type is just a pid.
+typedef pthread_t thread_t; // Host thread type
+typedef int file_t;         // Host file type
+typedef int pipe_t;         // Host pipe type
+typedef int socket_t;       // Host socket type
+typedef pthread_key_t thread_key_t;
+typedef void *thread_arg_t;             // Host thread argument type
+typedef void *thread_result_t;          // Host thread result type
+typedef void *(*thread_func_t)(void *); // Host thread function type
 } // namespace lldb
 
 #endif
 
-namespace lldb
-{
-    typedef void                (*LogOutputCallback) (const char *, void *baton);
-    typedef bool                (*CommandOverrideCallback)(void *baton, const char **argv);
-    typedef bool                (*CommandOverrideCallbackWithResult)(void *baton,
-                                                                     const char **argv,
-                                                                     lldb_private::CommandReturnObject &result);
-    typedef bool                (*ExpressionCancelCallback) (ExpressionEvaluationPhase phase, void *baton);
+namespace lldb {
+typedef void (*LogOutputCallback)(const char *, void *baton);
+typedef bool (*CommandOverrideCallback)(void *baton, const char **argv);
+typedef bool (*CommandOverrideCallbackWithResult)(
+    void *baton, const char **argv, lldb_private::CommandReturnObject &result);
+typedef bool (*ExpressionCancelCallback)(ExpressionEvaluationPhase phase,
+                                         void *baton);
 }
 
-#define LLDB_INVALID_PROCESS             ((lldb::process_t)-1)
-#define LLDB_INVALID_HOST_THREAD         ((lldb::thread_t)NULL)
-#define IS_VALID_LLDB_HOST_THREAD(t)     ((t) != LLDB_INVALID_HOST_THREAD)
-
-#define LLDB_INVALID_HOST_TIME           { 0, 0 }
-
-namespace lldb 
-{
-    typedef uint64_t    addr_t;
-    typedef uint64_t    user_id_t;
-    typedef uint64_t    pid_t;
-    typedef uint64_t    tid_t;
-    typedef uint64_t    offset_t;
-    typedef int32_t     break_id_t;
-    typedef int32_t     watch_id_t;
-    typedef void *      opaque_compiler_type_t;
-    typedef uint64_t    queue_id_t;
+#define LLDB_INVALID_PROCESS ((lldb::process_t)-1)
+#define LLDB_INVALID_HOST_THREAD ((lldb::thread_t)NULL)
+#define IS_VALID_LLDB_HOST_THREAD(t) ((t) != LLDB_INVALID_HOST_THREAD)
+
+#define LLDB_INVALID_HOST_TIME                                                 \
+  { 0, 0 }
+
+namespace lldb {
+typedef uint64_t addr_t;
+typedef uint64_t user_id_t;
+typedef uint64_t pid_t;
+typedef uint64_t tid_t;
+typedef uint64_t offset_t;
+typedef int32_t break_id_t;
+typedef int32_t watch_id_t;
+typedef void *opaque_compiler_type_t;
+typedef uint64_t queue_id_t;
 }
 
-
-#endif  // LLDB_lldb_types_h_
+#endif // LLDB_lldb_types_h_

Modified: lldb/trunk/include/lldb/lldb-versioning.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-versioning.h?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-versioning.h (original)
+++ lldb/trunk/include/lldb/lldb-versioning.h Tue Sep  6 15:57:50 2016
@@ -1,4 +1,5 @@
-//===-- lldb-versioning.h ----------------------------------------*- C++ -*-===//
+//===-- lldb-versioning.h ----------------------------------------*- C++
+//-*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -19,64 +20,87 @@
 /*
   API versioning
  ---------------------------------
- 
+
  The LLDB API is versioned independently of the LLDB source base
  Our API version numbers are composed of a major and a minor number
 
- The major number means a complete and stable revision of the API. Major numbers are compatibility breakers
- (i.e. when we change the API major number, there is no promise of compatibility with the previous major version
+ The major number means a complete and stable revision of the API. Major numbers
+ are compatibility breakers
+ (i.e. when we change the API major number, there is no promise of compatibility
+ with the previous major version
   and we are free to remove and/or change any APIs)
- Minor numbers are a work-in-progress evolution of the API. APIs will not be removed or changed across minor versions
- (minors do not break compatibility). However, we can deprecate APIs in minor versions or add new APIs in minor versions
- A deprecated API is supposedly going to be removed in the next major version and will generate a warning if used
- APIs we add in minor versions will not be removed (at least until the following major) but they might theoretically be deprecated
+ Minor numbers are a work-in-progress evolution of the API. APIs will not be
+ removed or changed across minor versions
+ (minors do not break compatibility). However, we can deprecate APIs in minor
+ versions or add new APIs in minor versions
+ A deprecated API is supposedly going to be removed in the next major version
+ and will generate a warning if used
+ APIs we add in minor versions will not be removed (at least until the following
+ major) but they might theoretically be deprecated
  in a following minor version
- Users are discouraged from using the LLDB version number to test for API features and should instead use the API version checking
+ Users are discouraged from using the LLDB version number to test for API
+ features and should instead use the API version checking
  as discussed below
- 
+
   API version checking
  ---------------------------------
- 
+
  You can (optionally) sign into an API version checking feature
  To do so you need to define three macros:
  LLDB_API_CHECK_VERSIONING - define to any value (or no value)
- LLDB_API_MAJOR_VERSION_WANTED - which major version of the LLDB API you are targeting
- LLDB_API_MINOR_VERSION_WANTED - which minor version of the LLDB API you are targeting
- 
+ LLDB_API_MAJOR_VERSION_WANTED - which major version of the LLDB API you are
+ targeting
+ LLDB_API_MINOR_VERSION_WANTED - which minor version of the LLDB API you are
+ targeting
+
  If these macros exist - LLDB will enable version checking of the public API
- 
- If LLDB_API_MAJOR_VERSION is not equal to LLDB_API_MAJOR_VERSION_WANTED we will immediately halt your compilation with an error
- This is by design, since we do not make any promise of compatibility across major versions - if you really want to test your luck, disable the versioning altogether
- 
- If the major version test passes, you have signed up for a specific minor version of the API
- Whenever we add or deprecate an API in a minor version, we will mark it with either
+
+ If LLDB_API_MAJOR_VERSION is not equal to LLDB_API_MAJOR_VERSION_WANTED we will
+ immediately halt your compilation with an error
+ This is by design, since we do not make any promise of compatibility across
+ major versions - if you really want to test your luck, disable the versioning
+ altogether
+
+ If the major version test passes, you have signed up for a specific minor
+ version of the API
+ Whenever we add or deprecate an API in a minor version, we will mark it with
+ either
  LLDB_API_NEW_IN_DOT_x - this API is new in LLDB .x
  LLDB_API_DEPRECATED_IN_DOT_x - this API is deprecated as of .x
- 
+
  If you are using an API new in DOT_x
-  if LLDB_API_MINOR_VERSION_WANTED >= x then all is well, else you will get a compilation error
-   This is meant to prevent you from using APIs that are newer than whatever LLDB you want to target
+  if LLDB_API_MINOR_VERSION_WANTED >= x then all is well, else you will get a
+ compilation error
+   This is meant to prevent you from using APIs that are newer than whatever
+ LLDB you want to target
 
  If you are using an API deprecated in DOT_x
-  if LLDB_API_MINOR_VERSION_WANTED >= x then you will get a compilation warning, else all is well
-  This is meant to let you know that you are using an API that is deprecated and might go away
- 
+  if LLDB_API_MINOR_VERSION_WANTED >= x then you will get a compilation warning,
+ else all is well
+  This is meant to let you know that you are using an API that is deprecated and
+ might go away
+
   Caveats
  ---------------------------------
- 
- Version checking only works on clang on OSX - you will get an error if you try to enable it on any other OS/compiler
- If you want to enable version checking on other platforms, you will need to define appropriate implementations for
- LLDB_API_IMPL_DEPRECATED and LLDB_API_IMPL_TOONEW and any other infrastructure your compiler needs for this purpose
- 
+
+ Version checking only works on clang on OSX - you will get an error if you try
+ to enable it on any other OS/compiler
+ If you want to enable version checking on other platforms, you will need to
+ define appropriate implementations for
+ LLDB_API_IMPL_DEPRECATED and LLDB_API_IMPL_TOONEW and any other infrastructure
+ your compiler needs for this purpose
+
  We have no deprecation-as-error mode
- 
+
  There is no support for API versioning in Python
- 
- We reserve to use macros whose names begin with LLDB_API_ and you should not use them in your source code as they might conflict
+
+ We reserve to use macros whose names begin with LLDB_API_ and you should not
+ use them in your source code as they might conflict
  with present or future macro names we are using to implement versioning
 */
 
-// if you want the version checking to work on other OS/compiler, define appropriate IMPL_DEPRECATED/IMPL_TOONEW
+// if you want the version checking to work on other OS/compiler, define
+// appropriate IMPL_DEPRECATED/IMPL_TOONEW
 // and define LLDB_API_CHECK_VERSIONING_WORKS when you are ready to go live
 #if defined(__APPLE__) && defined(__clang__)
 #define LLDB_API_IMPL_DEPRECATED __attribute__((deprecated))
@@ -84,18 +108,26 @@
 #define LLDB_API_CHECK_VERSIONING_WORKS
 #endif
 
-#if defined(LLDB_API_CHECK_VERSIONING) && !defined(LLDB_API_CHECK_VERSIONING_WORKS)
-#error "API version checking will not work here - please disable or create and submit patches to lldb-versioning.h"
-#endif
-
-#if defined(LLDB_API_CHECK_VERSIONING_WORKS) && (!defined(LLDB_API_IMPL_DEPRECATED) || !defined(LLDB_API_IMPL_TOONEW))
-#error "LLDB_API_CHECK_VERSIONING_WORKS needs LLDB_API_IMPL_DEPRECATED and LLDB_API_IMPL_TOONEW to be defined"
-#endif
-
-#if defined(LLDB_API_CHECK_VERSIONING) && defined(LLDB_API_MAJOR_VERSION_WANTED) && defined(LLDB_API_MINOR_VERSION_WANTED)
-
-#if defined (LLDB_API_MAJOR_VERSION) && (LLDB_API_MAJOR_VERSION != LLDB_API_MAJOR_VERSION_WANTED)
-#error "Cannot link using this LLDB version - public API versions are incompatible"
+#if defined(LLDB_API_CHECK_VERSIONING) &&                                      \
+    !defined(LLDB_API_CHECK_VERSIONING_WORKS)
+#error                                                                         \
+    "API version checking will not work here - please disable or create and submit patches to lldb-versioning.h"
+#endif
+
+#if defined(LLDB_API_CHECK_VERSIONING_WORKS) &&                                \
+    (!defined(LLDB_API_IMPL_DEPRECATED) || !defined(LLDB_API_IMPL_TOONEW))
+#error                                                                         \
+    "LLDB_API_CHECK_VERSIONING_WORKS needs LLDB_API_IMPL_DEPRECATED and LLDB_API_IMPL_TOONEW to be defined"
+#endif
+
+#if defined(LLDB_API_CHECK_VERSIONING) &&                                      \
+    defined(LLDB_API_MAJOR_VERSION_WANTED) &&                                  \
+    defined(LLDB_API_MINOR_VERSION_WANTED)
+
+#if defined(LLDB_API_MAJOR_VERSION) &&                                         \
+    (LLDB_API_MAJOR_VERSION != LLDB_API_MAJOR_VERSION_WANTED)
+#error                                                                         \
+    "Cannot link using this LLDB version - public API versions are incompatible"
 #endif
 
 #define LLDB_API_MINOR_VERSION_DOT_0 0
@@ -205,7 +237,6 @@
 #define LLDB_API_NEW_IN_DOT_0
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_0
 #define LLDB_API_DEPRECATED_IN_DOT_0 LLDB_API_IMPL_DEPRECATED
 #else
@@ -217,7 +248,6 @@
 #define LLDB_API_NEW_IN_DOT_1
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_1
 #define LLDB_API_DEPRECATED_IN_DOT_1 LLDB_API_IMPL_DEPRECATED
 #else
@@ -229,7 +259,6 @@
 #define LLDB_API_NEW_IN_DOT_2
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_2
 #define LLDB_API_DEPRECATED_IN_DOT_2 LLDB_API_IMPL_DEPRECATED
 #else
@@ -241,7 +270,6 @@
 #define LLDB_API_NEW_IN_DOT_3
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_3
 #define LLDB_API_DEPRECATED_IN_DOT_3 LLDB_API_IMPL_DEPRECATED
 #else
@@ -253,7 +281,6 @@
 #define LLDB_API_NEW_IN_DOT_4
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_4
 #define LLDB_API_DEPRECATED_IN_DOT_4 LLDB_API_IMPL_DEPRECATED
 #else
@@ -265,7 +292,6 @@
 #define LLDB_API_NEW_IN_DOT_5
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_5
 #define LLDB_API_DEPRECATED_IN_DOT_5 LLDB_API_IMPL_DEPRECATED
 #else
@@ -277,7 +303,6 @@
 #define LLDB_API_NEW_IN_DOT_6
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_6
 #define LLDB_API_DEPRECATED_IN_DOT_6 LLDB_API_IMPL_DEPRECATED
 #else
@@ -289,7 +314,6 @@
 #define LLDB_API_NEW_IN_DOT_7
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_7
 #define LLDB_API_DEPRECATED_IN_DOT_7 LLDB_API_IMPL_DEPRECATED
 #else
@@ -301,7 +325,6 @@
 #define LLDB_API_NEW_IN_DOT_8
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_8
 #define LLDB_API_DEPRECATED_IN_DOT_8 LLDB_API_IMPL_DEPRECATED
 #else
@@ -313,7 +336,6 @@
 #define LLDB_API_NEW_IN_DOT_9
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_9
 #define LLDB_API_DEPRECATED_IN_DOT_9 LLDB_API_IMPL_DEPRECATED
 #else
@@ -325,7 +347,6 @@
 #define LLDB_API_NEW_IN_DOT_10
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_10
 #define LLDB_API_DEPRECATED_IN_DOT_10 LLDB_API_IMPL_DEPRECATED
 #else
@@ -337,7 +358,6 @@
 #define LLDB_API_NEW_IN_DOT_11
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_11
 #define LLDB_API_DEPRECATED_IN_DOT_11 LLDB_API_IMPL_DEPRECATED
 #else
@@ -349,7 +369,6 @@
 #define LLDB_API_NEW_IN_DOT_12
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_12
 #define LLDB_API_DEPRECATED_IN_DOT_12 LLDB_API_IMPL_DEPRECATED
 #else
@@ -361,7 +380,6 @@
 #define LLDB_API_NEW_IN_DOT_13
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_13
 #define LLDB_API_DEPRECATED_IN_DOT_13 LLDB_API_IMPL_DEPRECATED
 #else
@@ -373,7 +391,6 @@
 #define LLDB_API_NEW_IN_DOT_14
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_14
 #define LLDB_API_DEPRECATED_IN_DOT_14 LLDB_API_IMPL_DEPRECATED
 #else
@@ -385,7 +402,6 @@
 #define LLDB_API_NEW_IN_DOT_15
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_15
 #define LLDB_API_DEPRECATED_IN_DOT_15 LLDB_API_IMPL_DEPRECATED
 #else
@@ -397,7 +413,6 @@
 #define LLDB_API_NEW_IN_DOT_16
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_16
 #define LLDB_API_DEPRECATED_IN_DOT_16 LLDB_API_IMPL_DEPRECATED
 #else
@@ -409,7 +424,6 @@
 #define LLDB_API_NEW_IN_DOT_17
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_17
 #define LLDB_API_DEPRECATED_IN_DOT_17 LLDB_API_IMPL_DEPRECATED
 #else
@@ -421,7 +435,6 @@
 #define LLDB_API_NEW_IN_DOT_18
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_18
 #define LLDB_API_DEPRECATED_IN_DOT_18 LLDB_API_IMPL_DEPRECATED
 #else
@@ -433,7 +446,6 @@
 #define LLDB_API_NEW_IN_DOT_19
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_19
 #define LLDB_API_DEPRECATED_IN_DOT_19 LLDB_API_IMPL_DEPRECATED
 #else
@@ -445,7 +457,6 @@
 #define LLDB_API_NEW_IN_DOT_20
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_20
 #define LLDB_API_DEPRECATED_IN_DOT_20 LLDB_API_IMPL_DEPRECATED
 #else
@@ -457,7 +468,6 @@
 #define LLDB_API_NEW_IN_DOT_21
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_21
 #define LLDB_API_DEPRECATED_IN_DOT_21 LLDB_API_IMPL_DEPRECATED
 #else
@@ -469,7 +479,6 @@
 #define LLDB_API_NEW_IN_DOT_22
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_22
 #define LLDB_API_DEPRECATED_IN_DOT_22 LLDB_API_IMPL_DEPRECATED
 #else
@@ -481,7 +490,6 @@
 #define LLDB_API_NEW_IN_DOT_23
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_23
 #define LLDB_API_DEPRECATED_IN_DOT_23 LLDB_API_IMPL_DEPRECATED
 #else
@@ -493,7 +501,6 @@
 #define LLDB_API_NEW_IN_DOT_24
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_24
 #define LLDB_API_DEPRECATED_IN_DOT_24 LLDB_API_IMPL_DEPRECATED
 #else
@@ -505,7 +512,6 @@
 #define LLDB_API_NEW_IN_DOT_25
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_25
 #define LLDB_API_DEPRECATED_IN_DOT_25 LLDB_API_IMPL_DEPRECATED
 #else
@@ -517,7 +523,6 @@
 #define LLDB_API_NEW_IN_DOT_26
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_26
 #define LLDB_API_DEPRECATED_IN_DOT_26 LLDB_API_IMPL_DEPRECATED
 #else
@@ -529,7 +534,6 @@
 #define LLDB_API_NEW_IN_DOT_27
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_27
 #define LLDB_API_DEPRECATED_IN_DOT_27 LLDB_API_IMPL_DEPRECATED
 #else
@@ -541,7 +545,6 @@
 #define LLDB_API_NEW_IN_DOT_28
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_28
 #define LLDB_API_DEPRECATED_IN_DOT_28 LLDB_API_IMPL_DEPRECATED
 #else
@@ -553,7 +556,6 @@
 #define LLDB_API_NEW_IN_DOT_29
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_29
 #define LLDB_API_DEPRECATED_IN_DOT_29 LLDB_API_IMPL_DEPRECATED
 #else
@@ -565,7 +567,6 @@
 #define LLDB_API_NEW_IN_DOT_30
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_30
 #define LLDB_API_DEPRECATED_IN_DOT_30 LLDB_API_IMPL_DEPRECATED
 #else
@@ -577,7 +578,6 @@
 #define LLDB_API_NEW_IN_DOT_31
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_31
 #define LLDB_API_DEPRECATED_IN_DOT_31 LLDB_API_IMPL_DEPRECATED
 #else
@@ -589,7 +589,6 @@
 #define LLDB_API_NEW_IN_DOT_32
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_32
 #define LLDB_API_DEPRECATED_IN_DOT_32 LLDB_API_IMPL_DEPRECATED
 #else
@@ -601,7 +600,6 @@
 #define LLDB_API_NEW_IN_DOT_33
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_33
 #define LLDB_API_DEPRECATED_IN_DOT_33 LLDB_API_IMPL_DEPRECATED
 #else
@@ -613,7 +611,6 @@
 #define LLDB_API_NEW_IN_DOT_34
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_34
 #define LLDB_API_DEPRECATED_IN_DOT_34 LLDB_API_IMPL_DEPRECATED
 #else
@@ -625,7 +622,6 @@
 #define LLDB_API_NEW_IN_DOT_35
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_35
 #define LLDB_API_DEPRECATED_IN_DOT_35 LLDB_API_IMPL_DEPRECATED
 #else
@@ -637,7 +633,6 @@
 #define LLDB_API_NEW_IN_DOT_36
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_36
 #define LLDB_API_DEPRECATED_IN_DOT_36 LLDB_API_IMPL_DEPRECATED
 #else
@@ -649,7 +644,6 @@
 #define LLDB_API_NEW_IN_DOT_37
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_37
 #define LLDB_API_DEPRECATED_IN_DOT_37 LLDB_API_IMPL_DEPRECATED
 #else
@@ -661,7 +655,6 @@
 #define LLDB_API_NEW_IN_DOT_38
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_38
 #define LLDB_API_DEPRECATED_IN_DOT_38 LLDB_API_IMPL_DEPRECATED
 #else
@@ -673,7 +666,6 @@
 #define LLDB_API_NEW_IN_DOT_39
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_39
 #define LLDB_API_DEPRECATED_IN_DOT_39 LLDB_API_IMPL_DEPRECATED
 #else
@@ -685,7 +677,6 @@
 #define LLDB_API_NEW_IN_DOT_40
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_40
 #define LLDB_API_DEPRECATED_IN_DOT_40 LLDB_API_IMPL_DEPRECATED
 #else
@@ -697,7 +688,6 @@
 #define LLDB_API_NEW_IN_DOT_41
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_41
 #define LLDB_API_DEPRECATED_IN_DOT_41 LLDB_API_IMPL_DEPRECATED
 #else
@@ -709,7 +699,6 @@
 #define LLDB_API_NEW_IN_DOT_42
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_42
 #define LLDB_API_DEPRECATED_IN_DOT_42 LLDB_API_IMPL_DEPRECATED
 #else
@@ -721,7 +710,6 @@
 #define LLDB_API_NEW_IN_DOT_43
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_43
 #define LLDB_API_DEPRECATED_IN_DOT_43 LLDB_API_IMPL_DEPRECATED
 #else
@@ -733,7 +721,6 @@
 #define LLDB_API_NEW_IN_DOT_44
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_44
 #define LLDB_API_DEPRECATED_IN_DOT_44 LLDB_API_IMPL_DEPRECATED
 #else
@@ -745,7 +732,6 @@
 #define LLDB_API_NEW_IN_DOT_45
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_45
 #define LLDB_API_DEPRECATED_IN_DOT_45 LLDB_API_IMPL_DEPRECATED
 #else
@@ -757,7 +743,6 @@
 #define LLDB_API_NEW_IN_DOT_46
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_46
 #define LLDB_API_DEPRECATED_IN_DOT_46 LLDB_API_IMPL_DEPRECATED
 #else
@@ -769,7 +754,6 @@
 #define LLDB_API_NEW_IN_DOT_47
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_47
 #define LLDB_API_DEPRECATED_IN_DOT_47 LLDB_API_IMPL_DEPRECATED
 #else
@@ -781,7 +765,6 @@
 #define LLDB_API_NEW_IN_DOT_48
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_48
 #define LLDB_API_DEPRECATED_IN_DOT_48 LLDB_API_IMPL_DEPRECATED
 #else
@@ -793,7 +776,6 @@
 #define LLDB_API_NEW_IN_DOT_49
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_49
 #define LLDB_API_DEPRECATED_IN_DOT_49 LLDB_API_IMPL_DEPRECATED
 #else
@@ -805,7 +787,6 @@
 #define LLDB_API_NEW_IN_DOT_50
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_50
 #define LLDB_API_DEPRECATED_IN_DOT_50 LLDB_API_IMPL_DEPRECATED
 #else
@@ -817,7 +798,6 @@
 #define LLDB_API_NEW_IN_DOT_51
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_51
 #define LLDB_API_DEPRECATED_IN_DOT_51 LLDB_API_IMPL_DEPRECATED
 #else
@@ -829,7 +809,6 @@
 #define LLDB_API_NEW_IN_DOT_52
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_52
 #define LLDB_API_DEPRECATED_IN_DOT_52 LLDB_API_IMPL_DEPRECATED
 #else
@@ -841,7 +820,6 @@
 #define LLDB_API_NEW_IN_DOT_53
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_53
 #define LLDB_API_DEPRECATED_IN_DOT_53 LLDB_API_IMPL_DEPRECATED
 #else
@@ -853,7 +831,6 @@
 #define LLDB_API_NEW_IN_DOT_54
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_54
 #define LLDB_API_DEPRECATED_IN_DOT_54 LLDB_API_IMPL_DEPRECATED
 #else
@@ -865,7 +842,6 @@
 #define LLDB_API_NEW_IN_DOT_55
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_55
 #define LLDB_API_DEPRECATED_IN_DOT_55 LLDB_API_IMPL_DEPRECATED
 #else
@@ -877,7 +853,6 @@
 #define LLDB_API_NEW_IN_DOT_56
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_56
 #define LLDB_API_DEPRECATED_IN_DOT_56 LLDB_API_IMPL_DEPRECATED
 #else
@@ -889,7 +864,6 @@
 #define LLDB_API_NEW_IN_DOT_57
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_57
 #define LLDB_API_DEPRECATED_IN_DOT_57 LLDB_API_IMPL_DEPRECATED
 #else
@@ -901,7 +875,6 @@
 #define LLDB_API_NEW_IN_DOT_58
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_58
 #define LLDB_API_DEPRECATED_IN_DOT_58 LLDB_API_IMPL_DEPRECATED
 #else
@@ -913,7 +886,6 @@
 #define LLDB_API_NEW_IN_DOT_59
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_59
 #define LLDB_API_DEPRECATED_IN_DOT_59 LLDB_API_IMPL_DEPRECATED
 #else
@@ -925,7 +897,6 @@
 #define LLDB_API_NEW_IN_DOT_60
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_60
 #define LLDB_API_DEPRECATED_IN_DOT_60 LLDB_API_IMPL_DEPRECATED
 #else
@@ -937,7 +908,6 @@
 #define LLDB_API_NEW_IN_DOT_61
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_61
 #define LLDB_API_DEPRECATED_IN_DOT_61 LLDB_API_IMPL_DEPRECATED
 #else
@@ -949,7 +919,6 @@
 #define LLDB_API_NEW_IN_DOT_62
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_62
 #define LLDB_API_DEPRECATED_IN_DOT_62 LLDB_API_IMPL_DEPRECATED
 #else
@@ -961,7 +930,6 @@
 #define LLDB_API_NEW_IN_DOT_63
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_63
 #define LLDB_API_DEPRECATED_IN_DOT_63 LLDB_API_IMPL_DEPRECATED
 #else
@@ -973,7 +941,6 @@
 #define LLDB_API_NEW_IN_DOT_64
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_64
 #define LLDB_API_DEPRECATED_IN_DOT_64 LLDB_API_IMPL_DEPRECATED
 #else
@@ -985,7 +952,6 @@
 #define LLDB_API_NEW_IN_DOT_65
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_65
 #define LLDB_API_DEPRECATED_IN_DOT_65 LLDB_API_IMPL_DEPRECATED
 #else
@@ -997,7 +963,6 @@
 #define LLDB_API_NEW_IN_DOT_66
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_66
 #define LLDB_API_DEPRECATED_IN_DOT_66 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1009,7 +974,6 @@
 #define LLDB_API_NEW_IN_DOT_67
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_67
 #define LLDB_API_DEPRECATED_IN_DOT_67 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1021,7 +985,6 @@
 #define LLDB_API_NEW_IN_DOT_68
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_68
 #define LLDB_API_DEPRECATED_IN_DOT_68 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1033,7 +996,6 @@
 #define LLDB_API_NEW_IN_DOT_69
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_69
 #define LLDB_API_DEPRECATED_IN_DOT_69 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1045,7 +1007,6 @@
 #define LLDB_API_NEW_IN_DOT_70
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_70
 #define LLDB_API_DEPRECATED_IN_DOT_70 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1057,7 +1018,6 @@
 #define LLDB_API_NEW_IN_DOT_71
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_71
 #define LLDB_API_DEPRECATED_IN_DOT_71 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1069,7 +1029,6 @@
 #define LLDB_API_NEW_IN_DOT_72
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_72
 #define LLDB_API_DEPRECATED_IN_DOT_72 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1081,7 +1040,6 @@
 #define LLDB_API_NEW_IN_DOT_73
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_73
 #define LLDB_API_DEPRECATED_IN_DOT_73 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1093,7 +1051,6 @@
 #define LLDB_API_NEW_IN_DOT_74
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_74
 #define LLDB_API_DEPRECATED_IN_DOT_74 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1105,7 +1062,6 @@
 #define LLDB_API_NEW_IN_DOT_75
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_75
 #define LLDB_API_DEPRECATED_IN_DOT_75 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1117,7 +1073,6 @@
 #define LLDB_API_NEW_IN_DOT_76
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_76
 #define LLDB_API_DEPRECATED_IN_DOT_76 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1129,7 +1084,6 @@
 #define LLDB_API_NEW_IN_DOT_77
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_77
 #define LLDB_API_DEPRECATED_IN_DOT_77 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1141,7 +1095,6 @@
 #define LLDB_API_NEW_IN_DOT_78
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_78
 #define LLDB_API_DEPRECATED_IN_DOT_78 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1153,7 +1106,6 @@
 #define LLDB_API_NEW_IN_DOT_79
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_79
 #define LLDB_API_DEPRECATED_IN_DOT_79 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1165,7 +1117,6 @@
 #define LLDB_API_NEW_IN_DOT_80
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_80
 #define LLDB_API_DEPRECATED_IN_DOT_80 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1177,7 +1128,6 @@
 #define LLDB_API_NEW_IN_DOT_81
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_81
 #define LLDB_API_DEPRECATED_IN_DOT_81 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1189,7 +1139,6 @@
 #define LLDB_API_NEW_IN_DOT_82
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_82
 #define LLDB_API_DEPRECATED_IN_DOT_82 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1201,7 +1150,6 @@
 #define LLDB_API_NEW_IN_DOT_83
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_83
 #define LLDB_API_DEPRECATED_IN_DOT_83 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1213,7 +1161,6 @@
 #define LLDB_API_NEW_IN_DOT_84
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_84
 #define LLDB_API_DEPRECATED_IN_DOT_84 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1225,7 +1172,6 @@
 #define LLDB_API_NEW_IN_DOT_85
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_85
 #define LLDB_API_DEPRECATED_IN_DOT_85 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1237,7 +1183,6 @@
 #define LLDB_API_NEW_IN_DOT_86
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_86
 #define LLDB_API_DEPRECATED_IN_DOT_86 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1249,7 +1194,6 @@
 #define LLDB_API_NEW_IN_DOT_87
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_87
 #define LLDB_API_DEPRECATED_IN_DOT_87 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1261,7 +1205,6 @@
 #define LLDB_API_NEW_IN_DOT_88
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_88
 #define LLDB_API_DEPRECATED_IN_DOT_88 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1273,7 +1216,6 @@
 #define LLDB_API_NEW_IN_DOT_89
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_89
 #define LLDB_API_DEPRECATED_IN_DOT_89 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1285,7 +1227,6 @@
 #define LLDB_API_NEW_IN_DOT_90
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_90
 #define LLDB_API_DEPRECATED_IN_DOT_90 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1297,7 +1238,6 @@
 #define LLDB_API_NEW_IN_DOT_91
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_91
 #define LLDB_API_DEPRECATED_IN_DOT_91 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1309,7 +1249,6 @@
 #define LLDB_API_NEW_IN_DOT_92
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_92
 #define LLDB_API_DEPRECATED_IN_DOT_92 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1321,7 +1260,6 @@
 #define LLDB_API_NEW_IN_DOT_93
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_93
 #define LLDB_API_DEPRECATED_IN_DOT_93 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1333,7 +1271,6 @@
 #define LLDB_API_NEW_IN_DOT_94
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_94
 #define LLDB_API_DEPRECATED_IN_DOT_94 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1345,7 +1282,6 @@
 #define LLDB_API_NEW_IN_DOT_95
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_95
 #define LLDB_API_DEPRECATED_IN_DOT_95 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1357,7 +1293,6 @@
 #define LLDB_API_NEW_IN_DOT_96
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_96
 #define LLDB_API_DEPRECATED_IN_DOT_96 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1369,7 +1304,6 @@
 #define LLDB_API_NEW_IN_DOT_97
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_97
 #define LLDB_API_DEPRECATED_IN_DOT_97 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1381,7 +1315,6 @@
 #define LLDB_API_NEW_IN_DOT_98
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_98
 #define LLDB_API_DEPRECATED_IN_DOT_98 LLDB_API_IMPL_DEPRECATED
 #else
@@ -1393,14 +1326,16 @@
 #define LLDB_API_NEW_IN_DOT_99
 #endif
 
-
 #if LLDB_API_MINOR_VERSION_WANTED >= LLDB_API_MINOR_VERSION_DOT_99
 #define LLDB_API_DEPRECATED_IN_DOT_99 LLDB_API_IMPL_DEPRECATED
 #else
 #define LLDB_API_DEPRECATED_IN_DOT_99
 #endif
 
-#else // defined(LLDB_CHECK_API_VERSIONING) && defined(LLDB_API_MAJOR_VERSION_WANTED) && defined(LLDB_API_MINOR_VERSION_WANTED) && defined (LLDB_API_MAJOR_VERSION)
+#else // defined(LLDB_CHECK_API_VERSIONING) &&
+      // defined(LLDB_API_MAJOR_VERSION_WANTED) &&
+      // defined(LLDB_API_MINOR_VERSION_WANTED) && defined
+      // (LLDB_API_MAJOR_VERSION)
 
 #define LLDB_API_NEW_IN_DOT_0
 #define LLDB_API_DEPRECATED_IN_DOT_0
@@ -1602,6 +1537,9 @@
 #define LLDB_API_DEPRECATED_IN_DOT_98
 #define LLDB_API_NEW_IN_DOT_99
 #define LLDB_API_DEPRECATED_IN_DOT_99
-#endif // defined(LLDB_CHECK_API_VERSIONING) && defined(LLDB_API_MAJOR_VERSION_WANTED) && defined(LLDB_API_MINOR_VERSION_WANTED) && defined (LLDB_API_MAJOR_VERSION)
+#endif // defined(LLDB_CHECK_API_VERSIONING) &&
+       // defined(LLDB_API_MAJOR_VERSION_WANTED) &&
+       // defined(LLDB_API_MINOR_VERSION_WANTED) && defined
+       // (LLDB_API_MAJOR_VERSION)
 
 #endif // LLDB_lldb_versioning_h_

Modified: lldb/trunk/packages/Python/lldbsuite/__init__.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/__init__.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/__init__.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/__init__.py Tue Sep  6 15:57:50 2016
@@ -4,6 +4,7 @@ import inspect
 import os
 import sys
 
+
 def find_lldb_root():
     lldb_root = os.path.dirname(inspect.getfile(inspect.currentframe()))
     while True:

Modified: lldb/trunk/packages/Python/lldbsuite/support/encoded_file.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/support/encoded_file.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/support/encoded_file.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/support/encoded_file.py Tue Sep  6 15:57:50 2016
@@ -14,6 +14,7 @@ import io
 # Third party modules
 import six
 
+
 def _encoded_read(old_read, encoding):
     def impl(size):
         result = old_read(size)
@@ -24,6 +25,7 @@ def _encoded_read(old_read, encoding):
         return result
     return impl
 
+
 def _encoded_write(old_write, encoding):
     def impl(s):
         # If we were asked to write a `str` (in Py2) or a `bytes` (in Py3) decode it
@@ -38,9 +40,24 @@ Create a Text I/O file object that can b
 under Python 2 and Python 3, and automatically encodes and decodes as necessary to return the
 native string type for the current Python version
 '''
-def open(file, encoding, mode='r', buffering=-1, errors=None, newline=None, closefd=True):
-    wrapped_file = io.open(file, mode=mode, buffering=buffering, encoding=encoding,
-                           errors=errors, newline=newline, closefd=closefd)
+
+
+def open(
+        file,
+        encoding,
+        mode='r',
+        buffering=-1,
+        errors=None,
+        newline=None,
+        closefd=True):
+    wrapped_file = io.open(
+        file,
+        mode=mode,
+        buffering=buffering,
+        encoding=encoding,
+        errors=errors,
+        newline=newline,
+        closefd=closefd)
     new_read = _encoded_read(getattr(wrapped_file, 'read'), encoding)
     new_write = _encoded_write(getattr(wrapped_file, 'write'), encoding)
     setattr(wrapped_file, 'read', new_read)

Modified: lldb/trunk/packages/Python/lldbsuite/support/fs.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/support/fs.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/support/fs.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/support/fs.py Tue Sep  6 15:57:50 2016
@@ -31,6 +31,7 @@ def _find_file_in_paths(paths, exe_basen
             return os.path.normcase(trial_exe_path)
     return None
 
+
 def find_executable(executable):
     """Finds the specified executable in the PATH or known good locations."""
 
@@ -59,6 +60,6 @@ def find_executable(executable):
 
     if not result or len(result) < 1:
         raise os.OSError(
-            "failed to find exe='%s' in paths='%s'" % (executable, paths_to_check))
+            "failed to find exe='%s' in paths='%s'" %
+            (executable, paths_to_check))
     return result
-

Modified: lldb/trunk/packages/Python/lldbsuite/support/funcutils.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/support/funcutils.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/support/funcutils.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/support/funcutils.py Tue Sep  6 15:57:50 2016
@@ -8,9 +8,17 @@ import inspect
 
 # LLDB modules
 
+
 def requires_self(func):
     func_argc = len(inspect.getargspec(func).args)
-    if func_argc == 0 or (getattr(func,'im_self', None) is not None) or (hasattr(func, '__self__')):
+    if func_argc == 0 or (
+        getattr(
+            func,
+            'im_self',
+            None) is not None) or (
+            hasattr(
+                func,
+                '__self__')):
         return False
     else:
         return True

Modified: lldb/trunk/packages/Python/lldbsuite/support/gmodules.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/support/gmodules.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/support/gmodules.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/support/gmodules.py Tue Sep  6 15:57:50 2016
@@ -22,9 +22,8 @@ def is_compiler_clang_with_gmodules(comp
         else:
             # Check the compiler help for the -gmodules option.
             clang_help = os.popen("%s --help" % compiler_path).read()
-            return GMODULES_HELP_REGEX.search(clang_help, re.DOTALL) is not None
+            return GMODULES_HELP_REGEX.search(
+                clang_help, re.DOTALL) is not None
 
     GMODULES_SUPPORT_MAP[compiler_path] = _gmodules_supported_internal()
     return GMODULES_SUPPORT_MAP[compiler_path]
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/support/optional_with.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/support/optional_with.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/support/optional_with.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/support/optional_with.py Tue Sep  6 15:57:50 2016
@@ -2,6 +2,7 @@
 # Provides a with-style resource handler for optionally-None resources
 # ====================================================================
 
+
 class optional_with(object):
     # pylint: disable=too-few-public-methods
     # This is a wrapper - it is not meant to provide any extra methods.
@@ -39,6 +40,7 @@ class optional_with(object):
     forget the try/finally using optional_with(), since
     the with syntax can be used.
     """
+
     def __init__(self, wrapped_object):
         self.wrapped_object = wrapped_object
 

Modified: lldb/trunk/packages/Python/lldbsuite/support/seven.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/support/seven.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/support/seven.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/support/seven.py Tue Sep  6 15:57:50 2016
@@ -10,11 +10,16 @@ else:
     def get_command_status_output(command):
         try:
             import subprocess
-            return (0, subprocess.check_output(command, shell=True, universal_newlines=True))
+            return (
+                0,
+                subprocess.check_output(
+                    command,
+                    shell=True,
+                    universal_newlines=True))
         except subprocess.CalledProcessError as e:
             return (e.returncode, e.output)
 
     def get_command_output(command):
         return get_command_status_output(command)[1]
 
-    cmp_ = lambda x, y: (x > y) - (x < y)
\ No newline at end of file
+    cmp_ = lambda x, y: (x > y) - (x < y)

Modified: lldb/trunk/packages/Python/lldbsuite/support/sockutil.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/support/sockutil.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/support/sockutil.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/support/sockutil.py Tue Sep  6 15:57:50 2016
@@ -14,6 +14,7 @@ import socket
 # LLDB modules
 import use_lldb_suite
 
+
 def recvall(sock, size):
     bytes = io.BytesIO()
     while size > 0:

Modified: lldb/trunk/packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,13 @@ Verify the default cache line size for a
 from __future__ import print_function
 
 
-
 import os
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class DefaultCacheLineSizeTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -24,15 +24,23 @@ class DefaultCacheLineSizeTestCase(TestB
         self.assertTrue(target and target.IsValid(), "Target is valid")
 
         breakpoint = target.BreakpointCreateByName("main")
-        self.assertTrue(breakpoint and breakpoint.IsValid(), "Breakpoint is valid")
+        self.assertTrue(
+            breakpoint and breakpoint.IsValid(),
+            "Breakpoint is valid")
 
         # Run the program.
-        process = target.LaunchSimple(None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process and process.IsValid(), PROCESS_IS_VALID)
-        self.assertEqual(process.GetState(), lldb.eStateStopped, PROCESS_STOPPED)
+        self.assertEqual(
+            process.GetState(),
+            lldb.eStateStopped,
+            PROCESS_STOPPED)
 
         # check the setting value
-        self.expect("settings show target.process.memory-cache-line-size", patterns=[" = 2048"])
+        self.expect(
+            "settings show target.process.memory-cache-line-size",
+            patterns=[" = 2048"])
 
         # Run to completion.
         process.Continue()

Modified: lldb/trunk/packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py Tue Sep  6 15:57:50 2016
@@ -6,12 +6,13 @@ should compile and link with the LLDB fr
 from __future__ import print_function
 
 
-
-import os, re
+import os
+import re
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class SBDirCheckerCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -30,7 +31,8 @@ class SBDirCheckerCase(TestBase):
         if not (self.platformIsDarwin() and self.getArchitecture() == "x86_64"):
             self.skipTest("This test is only for LLDB.framework built 64-bit")
         if self.getArchitecture() == "i386":
-            self.skipTest("LLDB is 64-bit and cannot be linked to 32-bit test program.")
+            self.skipTest(
+                "LLDB is 64-bit and cannot be linked to 32-bit test program.")
 
         # Generate main.cpp, build it, and execute.
         self.generate_main_cpp()
@@ -43,7 +45,8 @@ class SBDirCheckerCase(TestBase):
         with open(temp, 'r') as f:
             content = f.read()
 
-        public_api_dir = os.path.join(os.environ["LLDB_SRC"], "include", "lldb", "API")
+        public_api_dir = os.path.join(
+            os.environ["LLDB_SRC"], "include", "lldb", "API")
 
         # Look under the include/lldb/API directory and add #include statements
         # for all the SB API headers.
@@ -51,10 +54,11 @@ class SBDirCheckerCase(TestBase):
         # For different platforms, the include statement can vary.
         if self.platformIsDarwin():
             include_stmt = "'#include <%s>' % os.path.join('LLDB', header)"
-        if self.getPlatform() == "freebsd" or self.getPlatform() == "linux" or os.environ.get('LLDB_BUILD_TYPE') == 'Makefile':
+        if self.getPlatform() == "freebsd" or self.getPlatform(
+        ) == "linux" or os.environ.get('LLDB_BUILD_TYPE') == 'Makefile':
             include_stmt = "'#include <%s>' % os.path.join(public_api_dir, header)"
-        list = [eval(include_stmt) for header in public_headers if (header.startswith("SB") and
-                                                                    header.endswith(".h"))]
+        list = [eval(include_stmt) for header in public_headers if (
+            header.startswith("SB") and header.endswith(".h"))]
         includes = '\n'.join(list)
         new_content = content.replace('%include_SB_APIs%', includes)
         src = os.path.join(os.getcwd(), self.source)
@@ -69,21 +73,27 @@ class SBDirCheckerCase(TestBase):
         exe = os.path.join(os.getcwd(), exe_name)
         self.runCmd("file %s" % exe, CURRENT_EXECUTABLE_SET)
 
-        self.line_to_break = line_number(self.source, '// Set breakpoint here.')
+        self.line_to_break = line_number(
+            self.source, '// Set breakpoint here.')
 
-        env_cmd = "settings set target.env-vars %s=%s" %(self.dylibPath, self.getLLDBLibraryEnvVal())
+        env_cmd = "settings set target.env-vars %s=%s" % (
+            self.dylibPath, self.getLLDBLibraryEnvVal())
         if self.TraceOn():
             print("Set environment to: ", env_cmd)
         self.runCmd(env_cmd)
-        self.addTearDownHook(lambda: self.dbg.HandleCommand("settings remove target.env-vars %s" % self.dylibPath))
+        self.addTearDownHook(
+            lambda: self.dbg.HandleCommand(
+                "settings remove target.env-vars %s" %
+                self.dylibPath))
 
-        lldbutil.run_break_set_by_file_and_line (self, self.source, self.line_to_break, num_expected_locations = -1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, self.source, self.line_to_break, num_expected_locations=-1)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         self.runCmd('frame variable')

Modified: lldb/trunk/packages/Python/lldbsuite/test/api/listeners/TestListener.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/api/listeners/TestListener.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/api/listeners/TestListener.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/api/listeners/TestListener.py Tue Sep  6 15:57:50 2016
@@ -15,6 +15,7 @@ from lldbsuite.test import lldbutil
 
 import six
 
+
 class ListenToModuleLoadedEvents (TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -24,14 +25,17 @@ class ListenToModuleLoadedEvents (TestBa
         TestBase.setUp(self)
         self.build()
 
-    def test_receiving_breakpoint_added (self):
+    def test_receiving_breakpoint_added(self):
         """Test that we get breakpoint added events, waiting on event classes on the debugger"""
 
         my_listener = lldb.SBListener("test_listener")
-        
-        my_listener.StartListeningForEventClass(self.dbg, lldb.SBTarget.GetBroadcasterClassName(), lldb.SBTarget.eBroadcastBitBreakpointChanged)
 
-        exe = os.path.join (os.getcwd(), "a.out")
+        my_listener.StartListeningForEventClass(
+            self.dbg,
+            lldb.SBTarget.GetBroadcasterClassName(),
+            lldb.SBTarget.eBroadcastBitBreakpointChanged)
+
+        exe = os.path.join(os.getcwd(), "a.out")
 
         target = self.dbg.CreateTarget(exe)
 
@@ -39,17 +43,29 @@ class ListenToModuleLoadedEvents (TestBa
 
         event = lldb.SBEvent()
         my_listener.WaitForEvent(1, event)
-        
+
         self.assertTrue(event.IsValid(), "Got a valid event.")
-        self.assertTrue(lldb.SBBreakpoint.EventIsBreakpointEvent(event), "It is a breakpoint event.")
-        self.assertTrue(lldb.SBBreakpoint.GetBreakpointEventTypeFromEvent(event) == lldb.eBreakpointEventTypeAdded, "It is a breakpoint added event.")
-        self.assertTrue(bkpt == lldb.SBBreakpoint.GetBreakpointFromEvent(event), "It is our breakpoint.")
+        self.assertTrue(
+            lldb.SBBreakpoint.EventIsBreakpointEvent(event),
+            "It is a breakpoint event.")
+        self.assertTrue(lldb.SBBreakpoint.GetBreakpointEventTypeFromEvent(
+            event) == lldb.eBreakpointEventTypeAdded, "It is a breakpoint added event.")
+        self.assertTrue(
+            bkpt == lldb.SBBreakpoint.GetBreakpointFromEvent(event),
+            "It is our breakpoint.")
 
         # Now make sure if we stop listening for events we don't get them:
 
-        my_listener.StopListeningForEventClass(self.dbg, lldb.SBTarget.GetBroadcasterClassName(), lldb.SBTarget.eBroadcastBitBreakpointChanged)
-        my_listener.StopListeningForEvents(target.GetBroadcaster(), lldb.SBTarget.eBroadcastBitBreakpointChanged)
+        my_listener.StopListeningForEventClass(
+            self.dbg,
+            lldb.SBTarget.GetBroadcasterClassName(),
+            lldb.SBTarget.eBroadcastBitBreakpointChanged)
+        my_listener.StopListeningForEvents(
+            target.GetBroadcaster(),
+            lldb.SBTarget.eBroadcastBitBreakpointChanged)
 
         bkpt2 = target.BreakpointCreateByName("main")
         my_listener.WaitForEvent(1, event)
-        self.assertTrue(not event.IsValid(), "We don't get events we aren't listening to.")
+        self.assertTrue(
+            not event.IsValid(),
+            "We don't get events we aren't listening to.")

Modified: lldb/trunk/packages/Python/lldbsuite/test/api/multiple-debuggers/TestMultipleDebuggers.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/api/multiple-debuggers/TestMultipleDebuggers.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/api/multiple-debuggers/TestMultipleDebuggers.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/api/multiple-debuggers/TestMultipleDebuggers.py Tue Sep  6 15:57:50 2016
@@ -3,8 +3,8 @@
 from __future__ import print_function
 
 
-
-import os, re
+import os
+import re
 import subprocess
 
 import lldb
@@ -12,16 +12,24 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestMultipleSimultaneousDebuggers(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
     @skipIfNoSBHeaders
     @expectedFlakeyDarwin()
-    @expectedFailureAll(archs="i[3-6]86", bugnumber="multi-process-driver.cpp creates an x64 target")
-    @expectedFailureAll(oslist=["windows", "linux", "freebsd"], bugnumber="llvm.org/pr20282")
+    @expectedFailureAll(
+        archs="i[3-6]86",
+        bugnumber="multi-process-driver.cpp creates an x64 target")
+    @expectedFailureAll(
+        oslist=[
+            "windows",
+            "linux",
+            "freebsd"],
+        bugnumber="llvm.org/pr20282")
     def test_multiple_debuggers(self):
-        env = {self.dylibPath : self.getLLDBLibraryEnvVal()}
+        env = {self.dylibPath: self.getLLDBLibraryEnvVal()}
 
         self.driver_exe = os.path.join(os.getcwd(), "multi-process-driver")
         self.buildDriver('multi-process-driver.cpp', self.driver_exe)
@@ -41,4 +49,5 @@ class TestMultipleSimultaneousDebuggers(
             check_call([self.driver_exe, self.inferior_exe], env=env)
         else:
             with open(os.devnull, 'w') as fnull:
-                check_call([self.driver_exe, self.inferior_exe], env=env, stdout=fnull, stderr=fnull)
+                check_call([self.driver_exe, self.inferior_exe],
+                           env=env, stdout=fnull, stderr=fnull)

Modified: lldb/trunk/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py Tue Sep  6 15:57:50 2016
@@ -5,19 +5,22 @@ from __future__ import print_function
 # __package__ = "lldbsuite.test"
 
 
-import os, re
+import os
+import re
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 import subprocess
 
+
 class SBBreakpointCallbackCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
     @skipIfRemote
     @skipIfNoSBHeaders
-    @skipIfWindows # clang-cl does not support throw or catch (llvm.org/pr24538)
+    # clang-cl does not support throw or catch (llvm.org/pr24538)
+    @skipIfWindows
     def test_breakpoint_callback(self):
         """Test the that SBBreakpoint callback is invoked when a breakpoint is hit. """
         self.build_and_test('driver.cpp test_breakpoint_callback.cpp',
@@ -25,40 +28,52 @@ class SBBreakpointCallbackCase(TestBase)
 
     @skipIfRemote
     @skipIfNoSBHeaders
-    @skipIfWindows # clang-cl does not support throw or catch (llvm.org/pr24538)
+    # clang-cl does not support throw or catch (llvm.org/pr24538)
+    @skipIfWindows
     @expectedFlakeyFreeBSD
     def test_sb_api_listener_event_description(self):
         """ Test the description of an SBListener breakpoint event is valid."""
-        self.build_and_test('driver.cpp listener_test.cpp test_listener_event_description.cpp',
-                            'test_listener_event_description')
+        self.build_and_test(
+            'driver.cpp listener_test.cpp test_listener_event_description.cpp',
+            'test_listener_event_description')
         pass
 
     @skipIfRemote
     @skipIfNoSBHeaders
-    @skipIfWindows # clang-cl does not support throw or catch (llvm.org/pr24538)
+    # clang-cl does not support throw or catch (llvm.org/pr24538)
+    @skipIfWindows
     @expectedFlakeyFreeBSD
-    @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["x86_64"])
+    @expectedFailureAll(
+        "llvm.org/pr23139",
+        oslist=["linux"],
+        compiler="gcc",
+        compiler_version=[
+            ">=",
+            "4.9"],
+        archs=["x86_64"])
     def test_sb_api_listener_event_process_state(self):
         """ Test that a registered SBListener receives events when a process
             changes state.
         """
-        self.build_and_test('driver.cpp listener_test.cpp test_listener_event_process_state.cpp',
-                            'test_listener_event_process_state')
+        self.build_and_test(
+            'driver.cpp listener_test.cpp test_listener_event_process_state.cpp',
+            'test_listener_event_process_state')
         pass
 
-
     @skipIfRemote
     @skipIfNoSBHeaders
-    @skipIfWindows # clang-cl does not support throw or catch (llvm.org/pr24538)
+    # clang-cl does not support throw or catch (llvm.org/pr24538)
+    @skipIfWindows
     @expectedFlakeyFreeBSD
     @expectedFailureAll(oslist=["linux"])
     def test_sb_api_listener_resume(self):
         """ Test that a process can be resumed from a non-main thread. """
-        self.build_and_test('driver.cpp listener_test.cpp test_listener_resume.cpp',
-                            'test_listener_resume')
+        self.build_and_test(
+            'driver.cpp listener_test.cpp test_listener_resume.cpp',
+            'test_listener_resume')
         pass
 
-    def build_and_test(self, sources, test_name, args = None):
+    def build_and_test(self, sources, test_name, args=None):
         """ Build LLDB test from sources, and run expecting 0 exit code """
 
         # These tests link against host lldb API.
@@ -66,7 +81,8 @@ class SBBreakpointCallbackCase(TestBase)
         # because remote is disabled, we can assume that the os is the same
         # still need to check architecture
         if self.getLldbArchitecture() != self.getArchitecture():
-            self.skipTest("This test is only run if the target arch is the same as the lldb binary arch")
+            self.skipTest(
+                "This test is only run if the target arch is the same as the lldb binary arch")
 
         self.inferior = 'inferior_program'
         self.buildProgram('inferior.cpp', self.inferior)
@@ -79,7 +95,7 @@ class SBBreakpointCallbackCase(TestBase)
         self.signBinary(test_exe)
         exe = [test_exe, self.inferior]
 
-        env = {self.dylibPath : self.getLLDBLibraryEnvVal()}
+        env = {self.dylibPath: self.getLLDBLibraryEnvVal()}
         if self.TraceOn():
             print("Running test %s" % " ".join(exe))
             check_call(exe, env=env)

Modified: lldb/trunk/packages/Python/lldbsuite/test/arm_emulation/TestEmulations.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/arm_emulation/TestEmulations.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/arm_emulation/TestEmulations.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/arm_emulation/TestEmulations.py Tue Sep  6 15:57:50 2016
@@ -5,52 +5,53 @@ Test some ARM instruction emulation.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ARMEmulationTestCase(TestBase):
-    
+
     mydir = TestBase.compute_mydir(__file__)
 
     @no_debug_info_test
-    def test_thumb_emulations (self):
-        current_dir = os.getcwd();
-        test_dir = os.path.join (current_dir, "new-test-files")
-        files = os.listdir (test_dir)
+    def test_thumb_emulations(self):
+        current_dir = os.getcwd()
+        test_dir = os.path.join(current_dir, "new-test-files")
+        files = os.listdir(test_dir)
         thumb_files = list()
         for f in files:
             if '-thumb.dat' in f:
-                thumb_files.append (f)
-                
+                thumb_files.append(f)
+
         for f in thumb_files:
-            test_file = os.path.join (test_dir, f)
-            self.run_a_single_test (test_file)
+            test_file = os.path.join(test_dir, f)
+            self.run_a_single_test(test_file)
 
     @no_debug_info_test
-    def test_arm_emulations (self):
-        current_dir = os.getcwd();
-        test_dir = os.path.join (current_dir, "new-test-files")
-        files = os.listdir (test_dir)
+    def test_arm_emulations(self):
+        current_dir = os.getcwd()
+        test_dir = os.path.join(current_dir, "new-test-files")
+        files = os.listdir(test_dir)
         arm_files = list()
         for f in files:
             if '-arm.dat' in f:
-                arm_files.append (f)
-                
+                arm_files.append(f)
+
         for f in arm_files:
-            test_file = os.path.join (test_dir, f)
-            self.run_a_single_test (test_file)
+            test_file = os.path.join(test_dir, f)
+            self.run_a_single_test(test_file)
 
-    def run_a_single_test (self, filename):
-        insn = lldb.SBInstruction ();
-        stream = lldb.SBStream ();
-        success = insn.TestEmulation (stream, filename);
-        output = stream.GetData();
+    def run_a_single_test(self, filename):
+        insn = lldb.SBInstruction()
+        stream = lldb.SBStream()
+        success = insn.TestEmulation(stream, filename)
+        output = stream.GetData()
         if self.TraceOn():
             print('\nRunning test ' + os.path.basename(filename))
             print(output)
 
-        self.assertTrue (success, 'Emulation test succeeded.')
+        self.assertTrue(success, 'Emulation test succeeded.')

Modified: lldb/trunk/packages/Python/lldbsuite/test/attic/tester.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/attic/tester.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/attic/tester.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/attic/tester.py Tue Sep  6 15:57:50 2016
@@ -3,112 +3,146 @@
 
 from __future__ import print_function
 
-import math, os.path, re, sys, time, unittest
+import math
+import os.path
+import re
+import sys
+import time
+import unittest
+
 
 def setupSysPath():
-  testPath = sys.path[0]
-  rem = re.match("(^.*/)test$", testPath)
-  if not rem:
-    print("This script expects to reside in .../test.")
-    sys.exit(-1)
-  lldbBasePath = rem.group(1)
-  lldbDebugPythonPath = "build/Debug/LLDB.framework/Resources/Python"
-  lldbReleasePythonPath = "build/Release/LLDB.framework/Resources/Python"
-  lldbPythonPath = None
-  if os.path.isfile(lldbDebugPythonPath + "/lldb.py"):
-    lldbPythonPath = lldbDebugPythonPath
-  if os.path.isfile(lldbReleasePythonPath + "/lldb.py"):
-    lldbPythonPath = lldbReleasePythonPath
-  if not lldbPythonPath:
-    print("This script requires lldb.py to be in either " + lldbDebugPythonPath, end='')
-    print("or" + lldbReleasePythonPath)
-    sys.exit(-1)
-  sys.path.append(lldbPythonPath)
+    testPath = sys.path[0]
+    rem = re.match("(^.*/)test$", testPath)
+    if not rem:
+        print("This script expects to reside in .../test.")
+        sys.exit(-1)
+    lldbBasePath = rem.group(1)
+    lldbDebugPythonPath = "build/Debug/LLDB.framework/Resources/Python"
+    lldbReleasePythonPath = "build/Release/LLDB.framework/Resources/Python"
+    lldbPythonPath = None
+    if os.path.isfile(lldbDebugPythonPath + "/lldb.py"):
+        lldbPythonPath = lldbDebugPythonPath
+    if os.path.isfile(lldbReleasePythonPath + "/lldb.py"):
+        lldbPythonPath = lldbReleasePythonPath
+    if not lldbPythonPath:
+        print(
+            "This script requires lldb.py to be in either " +
+            lldbDebugPythonPath,
+            end='')
+        print("or" + lldbReleasePythonPath)
+        sys.exit(-1)
+    sys.path.append(lldbPythonPath)
+
 
 def prettyTime(t):
-  if t == 0.0:
-    return "0s"
-  if t < 0.000001:
-    return ("%.3f" % (t * 1000000000.0)) + "ns"
-  if t < 0.001:
-    return ("%.3f" % (t * 1000000.0)) + "µs"
-  if t < 1:
-    return ("%.3f" % (t * 1000.0)) + "ms"
-  return str(t) + "s"
+    if t == 0.0:
+        return "0s"
+    if t < 0.000001:
+        return ("%.3f" % (t * 1000000000.0)) + "ns"
+    if t < 0.001:
+        return ("%.3f" % (t * 1000000.0)) + "µs"
+    if t < 1:
+        return ("%.3f" % (t * 1000.0)) + "ms"
+    return str(t) + "s"
+
 
 class ExecutionTimes:
-  @classmethod
-  def executionTimes(cls):
-    if cls.m_executionTimes == None:
-      cls.m_executionTimes = ExecutionTimes()
-      for i in range(100):
-        cls.m_executionTimes.start()
-        cls.m_executionTimes.end("null")
-    return cls.m_executionTimes
-  def __init__(self):
-    self.m_times = dict()
-  def start(self):
-    self.m_start = time.time()
-  def end(self, component):
-    e = time.time()
-    if component not in self.m_times:
-      self.m_times[component] = list()
-    self.m_times[component].append(e - self.m_start)
-  def dumpStats(self):
-    for key in list(self.m_times.keys()):
-      if len(self.m_times[key]):
-        sampleMin = float('inf')
-        sampleMax = float('-inf')
-        sampleSum = 0.0
-        sampleCount = 0.0
-        for time in self.m_times[key]:
-          if time > sampleMax:
-            sampleMax = time
-          if time < sampleMin:
-            sampleMin = time
-          sampleSum += time
-          sampleCount += 1.0
-        sampleMean = sampleSum / sampleCount
-        sampleVariance = 0
-        for time in self.m_times[key]:
-          sampleVariance += (time - sampleMean) ** 2
-        sampleVariance /= sampleCount
-        sampleStandardDeviation = math.sqrt(sampleVariance)
-        print(key + ": [" + prettyTime(sampleMin) + ", " + prettyTime(sampleMax) + "] ", end='')
-        print("µ " + prettyTime(sampleMean) + ", σ " + prettyTime(sampleStandardDeviation))
-  m_executionTimes = None
+
+    @classmethod
+    def executionTimes(cls):
+        if cls.m_executionTimes is None:
+            cls.m_executionTimes = ExecutionTimes()
+            for i in range(100):
+                cls.m_executionTimes.start()
+                cls.m_executionTimes.end("null")
+        return cls.m_executionTimes
+
+    def __init__(self):
+        self.m_times = dict()
+
+    def start(self):
+        self.m_start = time.time()
+
+    def end(self, component):
+        e = time.time()
+        if component not in self.m_times:
+            self.m_times[component] = list()
+        self.m_times[component].append(e - self.m_start)
+
+    def dumpStats(self):
+        for key in list(self.m_times.keys()):
+            if len(self.m_times[key]):
+                sampleMin = float('inf')
+                sampleMax = float('-inf')
+                sampleSum = 0.0
+                sampleCount = 0.0
+                for time in self.m_times[key]:
+                    if time > sampleMax:
+                        sampleMax = time
+                    if time < sampleMin:
+                        sampleMin = time
+                    sampleSum += time
+                    sampleCount += 1.0
+                sampleMean = sampleSum / sampleCount
+                sampleVariance = 0
+                for time in self.m_times[key]:
+                    sampleVariance += (time - sampleMean) ** 2
+                sampleVariance /= sampleCount
+                sampleStandardDeviation = math.sqrt(sampleVariance)
+                print(
+                    key +
+                    ": [" +
+                    prettyTime(sampleMin) +
+                    ", " +
+                    prettyTime(sampleMax) +
+                    "] ",
+                    end='')
+                print(
+                    "µ " +
+                    prettyTime(sampleMean) +
+                    ", σ " +
+                    prettyTime(sampleStandardDeviation))
+    m_executionTimes = None
 
 setupSysPath()
 
 import lldb
 
+
 class LLDBTestCase(unittest.TestCase):
-  def setUp(self):
-    debugger = lldb.SBDebugger.Create()
-    debugger.SetAsync(True)
-    self.m_commandInterpreter = debugger.GetCommandInterpreter()
-    if not self.m_commandInterpreter:
-      print("Couldn't get the command interpreter")
-      sys.exit(-1)
-  def runCommand(self, command, component):
-    res = lldb.SBCommandReturnObject()
-    ExecutionTimes.executionTimes().start()
-    self.m_commandInterpreter.HandleCommand(command, res, False)
-    ExecutionTimes.executionTimes().end(component)
-    if res.Succeeded():
-      return res.GetOutput()
-    else:
-      self.fail("Command " + command + " returned an error")
-      return None
-  def getCategories(self):
-    return []
+
+    def setUp(self):
+        debugger = lldb.SBDebugger.Create()
+        debugger.SetAsync(True)
+        self.m_commandInterpreter = debugger.GetCommandInterpreter()
+        if not self.m_commandInterpreter:
+            print("Couldn't get the command interpreter")
+            sys.exit(-1)
+
+    def runCommand(self, command, component):
+        res = lldb.SBCommandReturnObject()
+        ExecutionTimes.executionTimes().start()
+        self.m_commandInterpreter.HandleCommand(command, res, False)
+        ExecutionTimes.executionTimes().end(component)
+        if res.Succeeded():
+            return res.GetOutput()
+        else:
+            self.fail("Command " + command + " returned an error")
+            return None
+
+    def getCategories(self):
+        return []
+
 
 class SanityCheckTestCase(LLDBTestCase):
-  def runTest(self):
-    ret = self.runCommand("show arch", "show-arch")
-    #print(ret)
-  def getCategories(self):
-    return []
+
+    def runTest(self):
+        ret = self.runCommand("show arch", "show-arch")
+        # print(ret)
+
+    def getCategories(self):
+        return []
 
 suite = unittest.TestLoader().loadTestsFromTestCase(SanityCheckTestCase)
 unittest.TextTestRunner(verbosity=2).run(suite)

Modified: lldb/trunk/packages/Python/lldbsuite/test/bench.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/bench.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/bench.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/bench.py Tue Sep  6 15:57:50 2016
@@ -17,14 +17,16 @@ See also bench-history.
 from __future__ import print_function
 from __future__ import absolute_import
 
-import os, sys
+import os
+import sys
 import re
 from optparse import OptionParser
 
 # dotest.py invocation with no '-e exe-path' uses lldb as the inferior program,
 # unless there is a mentioning of custom executable program.
 benches = [
-    # Measure startup delays creating a target, setting a breakpoint, and run to breakpoint stop.
+    # Measure startup delays creating a target, setting a breakpoint, and run
+    # to breakpoint stop.
     './dotest.py -v +b %E %X -n -p TestStartupDelays.py',
 
     # Measure 'frame variable' response after stopping at a breakpoint.
@@ -40,6 +42,7 @@ benches = [
     './dotest.py -v +b -n %E -p TestDoAttachThenDisassembly.py'
 ]
 
+
 def main():
     """Read the items from 'benches' and run the command line one by one."""
     parser = OptionParser(usage="""\
@@ -57,14 +60,14 @@ Run the standard benchmarks defined in t
 
     # Parses the options, if any.
     opts, args = parser.parse_args()
-                          
+
     print("Starting bench runner....")
 
     for item in benches:
         command = item.replace('%E',
                                '-e "%s"' % opts.exe if opts.exe else '')
-        command = command.replace('%X',
-                               '-x "%s"' % opts.break_spec if opts.break_spec else '')
+        command = command.replace('%X', '-x "%s"' %
+                                  opts.break_spec if opts.break_spec else '')
         print("Running %s" % (command))
         os.system(command)
 

Modified: lldb/trunk/packages/Python/lldbsuite/test/benchmarks/continue/TestBenchmarkContinue.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/benchmarks/continue/TestBenchmarkContinue.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/benchmarks/continue/TestBenchmarkContinue.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/benchmarks/continue/TestBenchmarkContinue.py Tue Sep  6 15:57:50 2016
@@ -5,14 +5,15 @@ Test lldb data formatter subsystem.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbbench import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestBenchmarkContinue(BenchBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -31,14 +32,16 @@ class TestBenchmarkContinue(BenchBase):
         """Benchmark different ways to continue a process"""
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        bkpt = self.target().FindBreakpointByID(lldbutil.run_break_set_by_source_regexp (self, "// break here"))
+        bkpt = self.target().FindBreakpointByID(
+            lldbutil.run_break_set_by_source_regexp(
+                self, "// break here"))
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # This is the function to remove the custom formats in order to have a
         # clean slate for the next test case.
@@ -47,22 +50,24 @@ class TestBenchmarkContinue(BenchBase):
             self.runCmd('type summary clear', check=False)
             self.runCmd('type filter clear', check=False)
             self.runCmd('type synth clear', check=False)
-            self.runCmd("settings set target.max-children-count 256", check=False)
+            self.runCmd(
+                "settings set target.max-children-count 256",
+                check=False)
 
         # Execute the cleanup function during test case tear down.
         self.addTearDownHook(cleanup)
-        
+
         runCmd_sw = Stopwatch()
         lldbutil_sw = Stopwatch()
 
-        for i in range(0,15):
+        for i in range(0, 15):
             runCmd_sw.start()
             self.runCmd("continue")
             runCmd_sw.stop()
-        
-        for i in range(0,15):
+
+        for i in range(0, 15):
             lldbutil_sw.start()
             lldbutil.continue_to_breakpoint(self.process(), bkpt)
             lldbutil_sw.stop()
-            
-        print("runCmd: %s\nlldbutil: %s" % (runCmd_sw,lldbutil_sw))
+
+        print("runCmd: %s\nlldbutil: %s" % (runCmd_sw, lldbutil_sw))

Modified: lldb/trunk/packages/Python/lldbsuite/test/benchmarks/disassembly/TestDisassembly.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/benchmarks/disassembly/TestDisassembly.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/benchmarks/disassembly/TestDisassembly.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/benchmarks/disassembly/TestDisassembly.py Tue Sep  6 15:57:50 2016
@@ -3,18 +3,20 @@
 from __future__ import print_function
 
 
-
-import os, sys
+import os
+import sys
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbbench import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 def is_exe(fpath):
     """Returns true if fpath is an executable."""
     return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
 
+
 class DisassembleDriverMainLoop(BenchBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -42,7 +44,9 @@ class DisassembleDriverMainLoop(BenchBas
 
     @benchmarks_test
     @no_debug_info_test
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
     def test_run_lldb_then_gdb(self):
         """Test disassembly on a large function with lldb vs. gdb."""
         print()
@@ -54,11 +58,13 @@ class DisassembleDriverMainLoop(BenchBas
         print("lldb benchmark:", self.stopwatch)
         self.run_gdb_disassembly(self.exe, self.function, self.count)
         print("gdb benchmark:", self.stopwatch)
-        print("lldb_avg/gdb_avg: %f" % (self.lldb_avg/self.gdb_avg))
+        print("lldb_avg/gdb_avg: %f" % (self.lldb_avg / self.gdb_avg))
 
     @benchmarks_test
     @no_debug_info_test
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
     def test_run_gdb_then_lldb(self):
         """Test disassembly on a large function with lldb vs. gdb."""
         print()
@@ -70,7 +76,7 @@ class DisassembleDriverMainLoop(BenchBas
         print("gdb benchmark:", self.stopwatch)
         self.run_lldb_disassembly(self.exe, self.function, self.count)
         print("lldb benchmark:", self.stopwatch)
-        print("lldb_avg/gdb_avg: %f" % (self.lldb_avg/self.gdb_avg))
+        print("lldb_avg/gdb_avg: %f" % (self.lldb_avg / self.gdb_avg))
 
     def run_lldb_disassembly(self, exe, function, count):
         import pexpect
@@ -79,7 +85,9 @@ class DisassembleDriverMainLoop(BenchBas
         prompt = self.child_prompt
 
         # So that the child gets torn down after the test.
-        self.child = pexpect.spawn('%s %s %s' % (lldbtest_config.lldbExec, self.lldbOption, exe))
+        self.child = pexpect.spawn(
+            '%s %s %s' %
+            (lldbtest_config.lldbExec, self.lldbOption, exe))
         child = self.child
 
         # Turn on logging for what the child sends back.

Modified: lldb/trunk/packages/Python/lldbsuite/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ inferior and traverses the stack for thr
 from __future__ import print_function
 
 
-
-import os, sys
+import os
+import sys
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbbench import *
 from lldbsuite.test.lldbtest import *
 
+
 class AttachThenDisassemblyBench(BenchBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -32,10 +33,11 @@ class AttachThenDisassemblyBench(BenchBa
     def run_lldb_attach_then_disassembly(self, exe, count):
         target = self.dbg.CreateTarget(exe)
 
-        # Spawn a new process and don't display the stdout if not in TraceOn() mode.
+        # Spawn a new process and don't display the stdout if not in TraceOn()
+        # mode.
         import subprocess
-        popen = subprocess.Popen([exe, self.lldbOption],
-                                 stdout = open(os.devnull, 'w') if not self.TraceOn() else None)
+        popen = subprocess.Popen([exe, self.lldbOption], stdout=open(
+            os.devnull, 'w') if not self.TraceOn() else None)
         if self.TraceOn():
             print("pid of spawned process: %d" % popen.pid)
 
@@ -51,7 +53,7 @@ class AttachThenDisassemblyBench(BenchBa
         i = 0
         found = False
         for f in thread0:
-            #print("frame#%d %s" % (i, f.GetFunctionName()))
+            # print("frame#%d %s" % (i, f.GetFunctionName()))
             if "MainLoop" in f.GetFunctionName():
                 found = True
                 thread0.SetSelectedFrame(i)
@@ -59,7 +61,7 @@ class AttachThenDisassemblyBench(BenchBa
                     print("Found frame#%d for function 'MainLoop'" % i)
                 break
             i += 1
-            
+
         # Reset the stopwatch now.
         self.stopwatch.reset()
         for i in range(count):

Modified: lldb/trunk/packages/Python/lldbsuite/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py Tue Sep  6 15:57:50 2016
@@ -3,8 +3,8 @@
 from __future__ import print_function
 
 
-
-import os, sys
+import os
+import sys
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbbench import *
@@ -12,6 +12,7 @@ from lldbsuite.test.lldbtest import *
 from lldbsuite.test import configuration
 from lldbsuite.test import lldbutil
 
+
 class XCode41Vs42GDBDisassembly(BenchBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -28,31 +29,53 @@ class XCode41Vs42GDBDisassembly(BenchBas
 
     @benchmarks_test
     @no_debug_info_test
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
     def test_run_41_then_42(self):
         """Test disassembly on a large function with 4.1 vs. 4.2's gdb."""
         print()
-        self.run_gdb_disassembly(self.gdb_41_exe, self.exe, self.function, self.count)
+        self.run_gdb_disassembly(
+            self.gdb_41_exe,
+            self.exe,
+            self.function,
+            self.count)
         print("4.1 gdb benchmark:", self.stopwatch)
         self.gdb_41_avg = self.stopwatch.avg()
-        self.run_gdb_disassembly(self.gdb_42_exe, self.exe, self.function, self.count)
+        self.run_gdb_disassembly(
+            self.gdb_42_exe,
+            self.exe,
+            self.function,
+            self.count)
         print("4.2 gdb benchmark:", self.stopwatch)
         self.gdb_42_avg = self.stopwatch.avg()
-        print("gdb_42_avg/gdb_41_avg: %f" % (self.gdb_42_avg/self.gdb_41_avg))
+        print("gdb_42_avg/gdb_41_avg: %f" %
+              (self.gdb_42_avg / self.gdb_41_avg))
 
     @benchmarks_test
     @no_debug_info_test
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
     def test_run_42_then_41(self):
         """Test disassembly on a large function with 4.1 vs. 4.2's gdb."""
         print()
-        self.run_gdb_disassembly(self.gdb_42_exe, self.exe, self.function, self.count)
+        self.run_gdb_disassembly(
+            self.gdb_42_exe,
+            self.exe,
+            self.function,
+            self.count)
         print("4.2 gdb benchmark:", self.stopwatch)
         self.gdb_42_avg = self.stopwatch.avg()
-        self.run_gdb_disassembly(self.gdb_41_exe, self.exe, self.function, self.count)
+        self.run_gdb_disassembly(
+            self.gdb_41_exe,
+            self.exe,
+            self.function,
+            self.count)
         print("4.1 gdb benchmark:", self.stopwatch)
         self.gdb_41_avg = self.stopwatch.avg()
-        print("gdb_42_avg/gdb_41_avg: %f" % (self.gdb_42_avg/self.gdb_41_avg))
+        print("gdb_42_avg/gdb_41_avg: %f" %
+              (self.gdb_42_avg / self.gdb_41_avg))
 
     def run_gdb_disassembly(self, gdb_exe_path, exe, function, count):
         import pexpect

Modified: lldb/trunk/packages/Python/lldbsuite/test/benchmarks/expression/TestExpressionCmd.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/benchmarks/expression/TestExpressionCmd.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/benchmarks/expression/TestExpressionCmd.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/benchmarks/expression/TestExpressionCmd.py Tue Sep  6 15:57:50 2016
@@ -3,8 +3,8 @@
 from __future__ import print_function
 
 
-
-import os, sys
+import os
+import sys
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbbench import *
@@ -12,6 +12,7 @@ from lldbsuite.test.lldbtest import *
 from lldbsuite.test import configuration
 from lldbsuite.test import lldbutil
 
+
 class ExpressionEvaluationCase(BenchBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -19,11 +20,14 @@ class ExpressionEvaluationCase(BenchBase
     def setUp(self):
         BenchBase.setUp(self)
         self.source = 'main.cpp'
-        self.line_to_break = line_number(self.source, '// Set breakpoint here.')
+        self.line_to_break = line_number(
+            self.source, '// Set breakpoint here.')
         self.count = 25
 
     @benchmarks_test
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
     def test_expr_cmd(self):
         """Test lldb's expression commands and collect statistics."""
         self.build()
@@ -45,7 +49,9 @@ class ExpressionEvaluationCase(BenchBase
         self.stopwatch.reset()
         for i in range(count):
             # So that the child gets torn down after the test.
-            self.child = pexpect.spawn('%s %s %s' % (lldbtest_config.lldbExec, self.lldbOption, exe))
+            self.child = pexpect.spawn(
+                '%s %s %s' %
+                (lldbtest_config.lldbExec, self.lldbOption, exe))
             child = self.child
 
             # Turn on logging for what the child sends back.
@@ -53,7 +59,9 @@ class ExpressionEvaluationCase(BenchBase
                 child.logfile_read = sys.stdout
 
             child.expect_exact(prompt)
-            child.sendline('breakpoint set -f %s -l %d' % (self.source, self.line_to_break))
+            child.sendline(
+                'breakpoint set -f %s -l %d' %
+                (self.source, self.line_to_break))
             child.expect_exact(prompt)
             child.sendline('run')
             child.expect_exact(prompt)

Modified: lldb/trunk/packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py Tue Sep  6 15:57:50 2016
@@ -3,8 +3,8 @@
 from __future__ import print_function
 
 
-
-import os, sys
+import os
+import sys
 import lldb
 from lldbsuite.test.lldbbench import BenchBase
 from lldbsuite.test.decorators import *
@@ -12,6 +12,7 @@ from lldbsuite.test.lldbtest import *
 from lldbsuite.test import configuration
 from lldbsuite.test import lldbutil
 
+
 class RepeatedExprsCase(BenchBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -19,13 +20,16 @@ class RepeatedExprsCase(BenchBase):
     def setUp(self):
         BenchBase.setUp(self)
         self.source = 'main.cpp'
-        self.line_to_break = line_number(self.source, '// Set breakpoint here.')
+        self.line_to_break = line_number(
+            self.source, '// Set breakpoint here.')
         self.lldb_avg = None
         self.gdb_avg = None
         self.count = 100
 
     @benchmarks_test
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
     def test_compare_lldb_to_gdb(self):
         """Test repeated expressions with lldb vs. gdb."""
         self.build()
@@ -36,7 +40,7 @@ class RepeatedExprsCase(BenchBase):
         print("lldb benchmark:", self.stopwatch)
         self.run_gdb_repeated_exprs(self.exe_name, self.count)
         print("gdb benchmark:", self.stopwatch)
-        print("lldb_avg/gdb_avg: %f" % (self.lldb_avg/self.gdb_avg))
+        print("lldb_avg/gdb_avg: %f" % (self.lldb_avg / self.gdb_avg))
 
     def run_lldb_repeated_exprs(self, exe_name, count):
         import pexpect
@@ -47,7 +51,9 @@ class RepeatedExprsCase(BenchBase):
         prompt = self.child_prompt
 
         # So that the child gets torn down after the test.
-        self.child = pexpect.spawn('%s %s %s' % (lldbtest_config.lldbExec, self.lldbOption, exe))
+        self.child = pexpect.spawn(
+            '%s %s %s' %
+            (lldbtest_config.lldbExec, self.lldbOption, exe))
         child = self.child
 
         # Turn on logging for what the child sends back.
@@ -55,7 +61,9 @@ class RepeatedExprsCase(BenchBase):
             child.logfile_read = sys.stdout
 
         child.expect_exact(prompt)
-        child.sendline('breakpoint set -f %s -l %d' % (self.source, self.line_to_break))
+        child.sendline(
+            'breakpoint set -f %s -l %d' %
+            (self.source, self.line_to_break))
         child.expect_exact(prompt)
         child.sendline('run')
         child.expect_exact(prompt)
@@ -71,7 +79,7 @@ class RepeatedExprsCase(BenchBase):
                 child.sendline(expr_cmd2)
                 child.expect_exact(prompt)
             child.sendline('process continue')
-            child.expect_exact(prompt)        
+            child.expect_exact(prompt)
 
         child.sendline('quit')
         try:
@@ -117,7 +125,7 @@ class RepeatedExprsCase(BenchBase):
                 child.sendline(expr_cmd2)
                 child.expect_exact(prompt)
             child.sendline('continue')
-            child.expect_exact(prompt)        
+            child.expect_exact(prompt)
 
         child.sendline('quit')
         child.expect_exact('The program is running.  Exit anyway?')

Modified: lldb/trunk/packages/Python/lldbsuite/test/benchmarks/frame_variable/TestFrameVariableResponse.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/benchmarks/frame_variable/TestFrameVariableResponse.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/benchmarks/frame_variable/TestFrameVariableResponse.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/benchmarks/frame_variable/TestFrameVariableResponse.py Tue Sep  6 15:57:50 2016
@@ -3,14 +3,15 @@
 from __future__ import print_function
 
 
-
-import os, sys
+import os
+import sys
 import lldb
 from lldbsuite.test import configuration
 from lldbsuite.test import lldbtest_config
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbbench import *
 
+
 class FrameVariableResponseBench(BenchBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -23,7 +24,9 @@ class FrameVariableResponseBench(BenchBa
 
     @benchmarks_test
     @no_debug_info_test
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
     def test_startup_delay(self):
         """Test response time for the 'frame variable' command."""
         print()
@@ -40,7 +43,9 @@ class FrameVariableResponseBench(BenchBa
         self.stopwatch.reset()
         for i in range(count):
             # So that the child gets torn down after the test.
-            self.child = pexpect.spawn('%s %s %s' % (lldbtest_config.lldbExec, self.lldbOption, exe))
+            self.child = pexpect.spawn(
+                '%s %s %s' %
+                (lldbtest_config.lldbExec, self.lldbOption, exe))
             child = self.child
 
             # Turn on logging for what the child sends back.
@@ -52,9 +57,9 @@ class FrameVariableResponseBench(BenchBa
             child.expect_exact(prompt)
 
             # Run the target and expect it to be stopped due to breakpoint.
-            child.sendline('run') # Aka 'process launch'.
+            child.sendline('run')  # Aka 'process launch'.
             child.expect_exact(prompt)
-        
+
             with self.stopwatch:
                 # Measure the 'frame variable' response time.
                 child.sendline('frame variable')

Modified: lldb/trunk/packages/Python/lldbsuite/test/benchmarks/libcxxlist/TestBenchmarkLibcxxList.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/benchmarks/libcxxlist/TestBenchmarkLibcxxList.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/benchmarks/libcxxlist/TestBenchmarkLibcxxList.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/benchmarks/libcxxlist/TestBenchmarkLibcxxList.py Tue Sep  6 15:57:50 2016
@@ -5,14 +5,15 @@ Test lldb data formatter subsystem.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbbench import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestBenchmarkLibcxxList(BenchBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -31,14 +32,16 @@ class TestBenchmarkLibcxxList(BenchBase)
         """Benchmark the std::list data formatter (libc++)"""
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        bkpt = self.target().FindBreakpointByID(lldbutil.run_break_set_by_source_regexp (self, "break here"))
+        bkpt = self.target().FindBreakpointByID(
+            lldbutil.run_break_set_by_source_regexp(
+                self, "break here"))
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # This is the function to remove the custom formats in order to have a
         # clean slate for the next test case.
@@ -47,15 +50,17 @@ class TestBenchmarkLibcxxList(BenchBase)
             self.runCmd('type summary clear', check=False)
             self.runCmd('type filter clear', check=False)
             self.runCmd('type synth clear', check=False)
-            self.runCmd("settings set target.max-children-count 256", check=False)
+            self.runCmd(
+                "settings set target.max-children-count 256",
+                check=False)
 
         # Execute the cleanup function during test case tear down.
         self.addTearDownHook(cleanup)
-        
+
         sw = Stopwatch()
-        
+
         sw.start()
         self.expect('frame variable -A list', substrs=['[300]', '300'])
         sw.stop()
-            
+
         print("time to print: %s" % (sw))

Modified: lldb/trunk/packages/Python/lldbsuite/test/benchmarks/libcxxmap/TestBenchmarkLibcxxMap.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/benchmarks/libcxxmap/TestBenchmarkLibcxxMap.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/benchmarks/libcxxmap/TestBenchmarkLibcxxMap.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/benchmarks/libcxxmap/TestBenchmarkLibcxxMap.py Tue Sep  6 15:57:50 2016
@@ -5,14 +5,15 @@ Test lldb data formatter subsystem.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbbench import *
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestBenchmarkLibcxxMap(BenchBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -31,14 +32,16 @@ class TestBenchmarkLibcxxMap(BenchBase):
         """Benchmark the std::map data formatter (libc++)"""
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        bkpt = self.target().FindBreakpointByID(lldbutil.run_break_set_by_source_regexp (self, "break here"))
+        bkpt = self.target().FindBreakpointByID(
+            lldbutil.run_break_set_by_source_regexp(
+                self, "break here"))
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # This is the function to remove the custom formats in order to have a
         # clean slate for the next test case.
@@ -47,15 +50,17 @@ class TestBenchmarkLibcxxMap(BenchBase):
             self.runCmd('type summary clear', check=False)
             self.runCmd('type filter clear', check=False)
             self.runCmd('type synth clear', check=False)
-            self.runCmd("settings set target.max-children-count 256", check=False)
+            self.runCmd(
+                "settings set target.max-children-count 256",
+                check=False)
 
         # Execute the cleanup function during test case tear down.
         self.addTearDownHook(cleanup)
-        
+
         sw = Stopwatch()
-        
+
         sw.start()
         self.expect('frame variable -A map', substrs=['[300]', '300'])
         sw.stop()
-            
+
         print("time to print: %s" % (sw))

Modified: lldb/trunk/packages/Python/lldbsuite/test/benchmarks/startup/TestStartupDelays.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/benchmarks/startup/TestStartupDelays.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/benchmarks/startup/TestStartupDelays.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/benchmarks/startup/TestStartupDelays.py Tue Sep  6 15:57:50 2016
@@ -3,14 +3,15 @@
 from __future__ import print_function
 
 
-
-import os, sys
+import os
+import sys
 import lldb
 from lldbsuite.test import configuration
 from lldbsuite.test import lldbtest_config
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbbench import *
 
+
 class StartupDelaysBench(BenchBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -28,14 +29,22 @@ class StartupDelaysBench(BenchBase):
 
     @benchmarks_test
     @no_debug_info_test
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
     def test_startup_delay(self):
         """Test start up delays creating a target, setting a breakpoint, and run to breakpoint stop."""
         print()
         self.run_startup_delays_bench(self.exe, self.break_spec, self.count)
-        print("lldb startup delay (create fresh target) benchmark:", self.stopwatch)
-        print("lldb startup delay (set first breakpoint) benchmark:", self.stopwatch2)
-        print("lldb startup delay (run to breakpoint) benchmark:", self.stopwatch3)
+        print(
+            "lldb startup delay (create fresh target) benchmark:",
+            self.stopwatch)
+        print(
+            "lldb startup delay (set first breakpoint) benchmark:",
+            self.stopwatch2)
+        print(
+            "lldb startup delay (run to breakpoint) benchmark:",
+            self.stopwatch3)
 
     def run_startup_delays_bench(self, exe, break_spec, count):
         import pexpect
@@ -48,7 +57,9 @@ class StartupDelaysBench(BenchBase):
         self.stopwatch2.reset()
         for i in range(count):
             # So that the child gets torn down after the test.
-            self.child = pexpect.spawn('%s %s' % (lldbtest_config.lldbExec, self.lldbOption))
+            self.child = pexpect.spawn(
+                '%s %s' %
+                (lldbtest_config.lldbExec, self.lldbOption))
             child = self.child
 
             # Turn on logging for what the child sends back.
@@ -57,7 +68,7 @@ class StartupDelaysBench(BenchBase):
 
             with self.stopwatch:
                 # Create a fresh target.
-                child.sendline('file %s' % exe) # Aka 'target create'.
+                child.sendline('file %s' % exe)  # Aka 'target create'.
                 child.expect_exact(prompt)
 
             with self.stopwatch2:

Modified: lldb/trunk/packages/Python/lldbsuite/test/benchmarks/stepping/TestSteppingSpeed.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/benchmarks/stepping/TestSteppingSpeed.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/benchmarks/stepping/TestSteppingSpeed.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/benchmarks/stepping/TestSteppingSpeed.py Tue Sep  6 15:57:50 2016
@@ -2,7 +2,8 @@
 
 from __future__ import print_function
 
-import os, sys
+import os
+import sys
 import lldb
 from lldbsuite.test import configuration
 from lldbsuite.test import lldbtest_config
@@ -11,6 +12,7 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class SteppingSpeedBench(BenchBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -26,7 +28,9 @@ class SteppingSpeedBench(BenchBase):
 
     @benchmarks_test
     @no_debug_info_test
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
     def test_run_lldb_steppings(self):
         """Test lldb steppings on a large executable."""
         print()
@@ -40,7 +44,9 @@ class SteppingSpeedBench(BenchBase):
         prompt = self.child_prompt
 
         # So that the child gets torn down after the test.
-        self.child = pexpect.spawn('%s %s %s' % (lldbtest_config.lldbExec, self.lldbOption, exe))
+        self.child = pexpect.spawn(
+            '%s %s %s' %
+            (lldbtest_config.lldbExec, self.lldbOption, exe))
         child = self.child
 
         # Turn on logging for what the child sends back.
@@ -58,7 +64,7 @@ class SteppingSpeedBench(BenchBase):
         for i in range(count):
             with self.stopwatch:
                 # Disassemble the function.
-                child.sendline('next') # Aka 'thread step-over'.
+                child.sendline('next')  # Aka 'thread step-over'.
                 child.expect_exact(prompt)
 
         child.sendline('quit')

Modified: lldb/trunk/packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py Tue Sep  6 15:57:50 2016
@@ -3,8 +3,8 @@
 from __future__ import print_function
 
 
-
-import os, sys
+import os
+import sys
 import lldb
 from lldbsuite.test.lldbbench import *
 from lldbsuite.test.decorators import *
@@ -12,6 +12,7 @@ from lldbsuite.test.lldbtest import *
 from lldbsuite.test import configuration
 from lldbsuite.test import lldbutil
 
+
 class CompileRunToBreakpointBench(BenchBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -27,7 +28,9 @@ class CompileRunToBreakpointBench(BenchB
 
     @benchmarks_test
     @no_debug_info_test
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
     def test_run_lldb_then_gdb(self):
         """Benchmark turnaround time with lldb vs. gdb."""
         print()
@@ -35,15 +38,18 @@ class CompileRunToBreakpointBench(BenchB
         print("lldb turnaround benchmark:", self.stopwatch)
         self.run_gdb_turnaround(self.exe, self.function, self.count)
         print("gdb turnaround benchmark:", self.stopwatch)
-        print("lldb_avg/gdb_avg: %f" % (self.lldb_avg/self.gdb_avg))
+        print("lldb_avg/gdb_avg: %f" % (self.lldb_avg / self.gdb_avg))
 
     def run_lldb_turnaround(self, exe, function, count):
         import pexpect
+
         def run_one_round():
             prompt = self.child_prompt
 
             # So that the child gets torn down after the test.
-            self.child = pexpect.spawn('%s %s %s' % (lldbtest_config.lldbExec, self.lldbOption, exe))
+            self.child = pexpect.spawn(
+                '%s %s %s' %
+                (lldbtest_config.lldbExec, self.lldbOption, exe))
             child = self.child
 
             # Turn on logging for what the child sends back.
@@ -62,7 +68,8 @@ class CompileRunToBreakpointBench(BenchB
         self.stopwatch.reset()
 
         for i in range(count + 1):
-            # Ignore the first invoke lldb and run to the breakpoint turnaround time.
+            # Ignore the first invoke lldb and run to the breakpoint turnaround
+            # time.
             if i == 0:
                 run_one_round()
             else:
@@ -80,6 +87,7 @@ class CompileRunToBreakpointBench(BenchB
 
     def run_gdb_turnaround(self, exe, function, count):
         import pexpect
+
         def run_one_round():
             prompt = self.child_prompt
 
@@ -102,8 +110,9 @@ class CompileRunToBreakpointBench(BenchB
         # Reset the stopwatch now.
         self.stopwatch.reset()
 
-        for i in range(count+1):
-            # Ignore the first invoke lldb and run to the breakpoint turnaround time.
+        for i in range(count + 1):
+            # Ignore the first invoke lldb and run to the breakpoint turnaround
+            # time.
             if i == 0:
                 run_one_round()
             else:

Modified: lldb/trunk/packages/Python/lldbsuite/test/concurrent_base.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/concurrent_base.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/concurrent_base.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/concurrent_base.py Tue Sep  6 15:57:50 2016
@@ -13,14 +13,15 @@ verified to match the expected number of
 from __future__ import print_function
 
 
-
 import unittest2
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ConcurrentEventsBase(TestBase):
 
     # Concurrency is the primary test factor here, not debug info variants.
@@ -49,18 +50,24 @@ class ConcurrentEventsBase(TestBase):
             if reason == lldb.eStopReasonBreakpoint:
                 bpid = x.GetStopReasonDataAtIndex(0)
                 bp = self.inferior_target.FindBreakpointByID(bpid)
-                reason_str = "%s hit %d times" % (lldbutil.get_description(bp), bp.GetHitCount())
+                reason_str = "%s hit %d times" % (
+                    lldbutil.get_description(bp), bp.GetHitCount())
             elif reason == lldb.eStopReasonWatchpoint:
                 watchid = x.GetStopReasonDataAtIndex(0)
                 watch = self.inferior_target.FindWatchpointByID(watchid)
-                reason_str = "%s hit %d times" % (lldbutil.get_description(watch), watch.GetHitCount())
+                reason_str = "%s hit %d times" % (
+                    lldbutil.get_description(watch), watch.GetHitCount())
             elif reason == lldb.eStopReasonSignal:
                 signals = self.inferior_process.GetUnixSignals()
-                signal_name = signals.GetSignalAsCString(x.GetStopReasonDataAtIndex(0))
+                signal_name = signals.GetSignalAsCString(
+                    x.GetStopReasonDataAtIndex(0))
                 reason_str = "signal %s" % signal_name
 
-            location = "\t".join([lldbutil.get_description(x.GetFrameAtIndex(i)) for i in range(x.GetNumFrames())])
-            ret.append("thread %d %s due to %s at\n\t%s" % (id, status, reason_str, location))
+            location = "\t".join([lldbutil.get_description(
+                x.GetFrameAtIndex(i)) for i in range(x.GetNumFrames())])
+            ret.append(
+                "thread %d %s due to %s at\n\t%s" %
+                (id, status, reason_str, location))
         return ret
 
     def add_breakpoint(self, line, descriptions):
@@ -68,35 +75,39 @@ class ConcurrentEventsBase(TestBase):
             returns the LLDB SBBreakpoint object.
         """
 
-        bpno = lldbutil.run_break_set_by_file_and_line(self, self.filename, line, num_expected_locations=-1)
+        bpno = lldbutil.run_break_set_by_file_and_line(
+            self, self.filename, line, num_expected_locations=-1)
         bp = self.inferior_target.FindBreakpointByID(bpno)
-        descriptions.append(": file = 'main.cpp', line = %d" % self.finish_breakpoint_line)
+        descriptions.append(
+            ": file = 'main.cpp', line = %d" %
+            self.finish_breakpoint_line)
         return bp
 
     def inferior_done(self):
-        """ Returns true if the inferior is done executing all the event threads (and is stopped at self.finish_breakpoint, 
+        """ Returns true if the inferior is done executing all the event threads (and is stopped at self.finish_breakpoint,
             or has terminated execution.
         """
         return self.finish_breakpoint.GetHitCount() > 0 or \
-                self.crash_count > 0 or \
-                self.inferior_process.GetState() == lldb.eStateExited
+            self.crash_count > 0 or \
+            self.inferior_process.GetState() == lldb.eStateExited
 
     def count_signaled_threads(self):
         count = 0
         for thread in self.inferior_process:
-            if thread.GetStopReason() == lldb.eStopReasonSignal and thread.GetStopReasonDataAtIndex(0) == self.inferior_process.GetUnixSignals().GetSignalNumberFromName('SIGUSR1'):
+            if thread.GetStopReason() == lldb.eStopReasonSignal and thread.GetStopReasonDataAtIndex(
+                    0) == self.inferior_process.GetUnixSignals().GetSignalNumberFromName('SIGUSR1'):
                 count += 1
         return count
 
     def do_thread_actions(self,
-                          num_breakpoint_threads = 0,
-                          num_signal_threads = 0,
-                          num_watchpoint_threads = 0,
-                          num_crash_threads = 0,
-                          num_delay_breakpoint_threads = 0,
-                          num_delay_signal_threads = 0,
-                          num_delay_watchpoint_threads = 0,
-                          num_delay_crash_threads = 0):
+                          num_breakpoint_threads=0,
+                          num_signal_threads=0,
+                          num_watchpoint_threads=0,
+                          num_crash_threads=0,
+                          num_delay_breakpoint_threads=0,
+                          num_delay_signal_threads=0,
+                          num_delay_watchpoint_threads=0,
+                          num_delay_crash_threads=0):
         """ Sets a breakpoint in the main thread where test parameters (numbers of threads) can be adjusted, runs the inferior
             to that point, and modifies the locals that control the event thread counts. Also sets a breakpoint in
             breakpoint_func (the function executed by each 'breakpoint' thread) and a watchpoint on a global modified in
@@ -112,105 +123,166 @@ class ConcurrentEventsBase(TestBase):
         expected_bps = []
 
         # Initialize all the breakpoints (main thread/aux thread)
-        self.setup_breakpoint = self.add_breakpoint(self.setup_breakpoint_line, expected_bps)
-        self.finish_breakpoint = self.add_breakpoint(self.finish_breakpoint_line, expected_bps)
+        self.setup_breakpoint = self.add_breakpoint(
+            self.setup_breakpoint_line, expected_bps)
+        self.finish_breakpoint = self.add_breakpoint(
+            self.finish_breakpoint_line, expected_bps)
 
         # Set the thread breakpoint
         if num_breakpoint_threads + num_delay_breakpoint_threads > 0:
-            self.thread_breakpoint = self.add_breakpoint(self.thread_breakpoint_line, expected_bps)
+            self.thread_breakpoint = self.add_breakpoint(
+                self.thread_breakpoint_line, expected_bps)
 
         # Verify breakpoints
-        self.expect("breakpoint list -f", "Breakpoint locations shown correctly", substrs = expected_bps)
+        self.expect(
+            "breakpoint list -f",
+            "Breakpoint locations shown correctly",
+            substrs=expected_bps)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
 
         # Check we are at line self.setup_breakpoint
         self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ["stop reason = breakpoint 1."])
+                    substrs=["stop reason = breakpoint 1."])
 
         # Initialize the (single) watchpoint on the global variable (g_watchme)
         if num_watchpoint_threads + num_delay_watchpoint_threads > 0:
             self.runCmd("watchpoint set variable g_watchme")
             for w in self.inferior_target.watchpoint_iter():
                 self.thread_watchpoint = w
-                self.assertTrue("g_watchme" in str(self.thread_watchpoint), "Watchpoint location not shown correctly")
+                self.assertTrue(
+                    "g_watchme" in str(
+                        self.thread_watchpoint),
+                    "Watchpoint location not shown correctly")
 
         # Get the process
         self.inferior_process = self.inferior_target.GetProcess()
 
         # We should be stopped at the setup site where we can set the number of
         # threads doing each action (break/crash/signal/watch)
-        self.assertEqual(self.inferior_process.GetNumThreads(), 1, 'Expected to stop before any additional threads are spawned.')
+        self.assertEqual(
+            self.inferior_process.GetNumThreads(),
+            1,
+            'Expected to stop before any additional threads are spawned.')
 
         self.runCmd("expr num_breakpoint_threads=%d" % num_breakpoint_threads)
         self.runCmd("expr num_crash_threads=%d" % num_crash_threads)
         self.runCmd("expr num_signal_threads=%d" % num_signal_threads)
         self.runCmd("expr num_watchpoint_threads=%d" % num_watchpoint_threads)
 
-        self.runCmd("expr num_delay_breakpoint_threads=%d" % num_delay_breakpoint_threads)
-        self.runCmd("expr num_delay_crash_threads=%d" % num_delay_crash_threads)
-        self.runCmd("expr num_delay_signal_threads=%d" % num_delay_signal_threads)
-        self.runCmd("expr num_delay_watchpoint_threads=%d" % num_delay_watchpoint_threads)
+        self.runCmd(
+            "expr num_delay_breakpoint_threads=%d" %
+            num_delay_breakpoint_threads)
+        self.runCmd(
+            "expr num_delay_crash_threads=%d" %
+            num_delay_crash_threads)
+        self.runCmd(
+            "expr num_delay_signal_threads=%d" %
+            num_delay_signal_threads)
+        self.runCmd(
+            "expr num_delay_watchpoint_threads=%d" %
+            num_delay_watchpoint_threads)
 
         # Continue the inferior so threads are spawned
         self.runCmd("continue")
 
         # Make sure we see all the threads. The inferior program's threads all synchronize with a pseudo-barrier; that is,
-        # the inferior program ensures all threads are started and running before any thread triggers its 'event'.
+        # the inferior program ensures all threads are started and running
+        # before any thread triggers its 'event'.
         num_threads = self.inferior_process.GetNumThreads()
         expected_num_threads = num_breakpoint_threads + num_delay_breakpoint_threads \
-                             + num_signal_threads + num_delay_signal_threads \
-                             + num_watchpoint_threads + num_delay_watchpoint_threads \
-                             + num_crash_threads + num_delay_crash_threads + 1
-        self.assertEqual(num_threads, expected_num_threads,
-            'Expected to see %d threads, but seeing %d. Details:\n%s' % (expected_num_threads,
-                                                                         num_threads,
-                                                                         "\n\t".join(self.describe_threads())))
+            + num_signal_threads + num_delay_signal_threads \
+            + num_watchpoint_threads + num_delay_watchpoint_threads \
+            + num_crash_threads + num_delay_crash_threads + 1
+        self.assertEqual(
+            num_threads,
+            expected_num_threads,
+            'Expected to see %d threads, but seeing %d. Details:\n%s' %
+            (expected_num_threads,
+             num_threads,
+             "\n\t".join(
+                 self.describe_threads())))
 
         self.signal_count = self.count_signaled_threads()
-        self.crash_count = len(lldbutil.get_crashed_threads(self, self.inferior_process))
+        self.crash_count = len(
+            lldbutil.get_crashed_threads(
+                self, self.inferior_process))
 
         # Run to completion (or crash)
-        while not self.inferior_done(): 
+        while not self.inferior_done():
             if self.TraceOn():
                 self.runCmd("thread backtrace all")
             self.runCmd("continue")
             self.signal_count += self.count_signaled_threads()
-            self.crash_count += len(lldbutil.get_crashed_threads(self, self.inferior_process))
+            self.crash_count += len(
+                lldbutil.get_crashed_threads(
+                    self, self.inferior_process))
 
         if num_crash_threads > 0 or num_delay_crash_threads > 0:
             # Expecting a crash
-            self.assertTrue(self.crash_count > 0,
-                "Expecting at least one thread to crash. Details: %s" % "\t\n".join(self.describe_threads()))
+            self.assertTrue(
+                self.crash_count > 0,
+                "Expecting at least one thread to crash. Details: %s" %
+                "\t\n".join(
+                    self.describe_threads()))
 
             # Ensure the zombie process is reaped
             self.runCmd("process kill")
 
         elif num_crash_threads == 0 and num_delay_crash_threads == 0:
-            # There should be a single active thread (the main one) which hit the breakpoint after joining
-            self.assertEqual(1, self.finish_breakpoint.GetHitCount(), "Expected main thread (finish) breakpoint to be hit once")
+            # There should be a single active thread (the main one) which hit
+            # the breakpoint after joining
+            self.assertEqual(
+                1,
+                self.finish_breakpoint.GetHitCount(),
+                "Expected main thread (finish) breakpoint to be hit once")
 
             num_threads = self.inferior_process.GetNumThreads()
-            self.assertEqual(1, num_threads, "Expecting 1 thread but seeing %d. Details:%s" % (num_threads,
-                                                                                             "\n\t".join(self.describe_threads())))
+            self.assertEqual(
+                1,
+                num_threads,
+                "Expecting 1 thread but seeing %d. Details:%s" %
+                (num_threads,
+                 "\n\t".join(
+                     self.describe_threads())))
             self.runCmd("continue")
 
             # The inferior process should have exited without crashing
-            self.assertEqual(0, self.crash_count, "Unexpected thread(s) in crashed state")
-            self.assertEqual(self.inferior_process.GetState(), lldb.eStateExited, PROCESS_EXITED)
+            self.assertEqual(
+                0,
+                self.crash_count,
+                "Unexpected thread(s) in crashed state")
+            self.assertEqual(
+                self.inferior_process.GetState(),
+                lldb.eStateExited,
+                PROCESS_EXITED)
 
             # Verify the number of actions took place matches expected numbers
             expected_breakpoint_threads = num_delay_breakpoint_threads + num_breakpoint_threads
-            breakpoint_hit_count = self.thread_breakpoint.GetHitCount() if expected_breakpoint_threads > 0 else 0
-            self.assertEqual(expected_breakpoint_threads, breakpoint_hit_count,
-                "Expected %d breakpoint hits, but got %d" % (expected_breakpoint_threads, breakpoint_hit_count))
+            breakpoint_hit_count = self.thread_breakpoint.GetHitCount(
+            ) if expected_breakpoint_threads > 0 else 0
+            self.assertEqual(
+                expected_breakpoint_threads,
+                breakpoint_hit_count,
+                "Expected %d breakpoint hits, but got %d" %
+                (expected_breakpoint_threads,
+                 breakpoint_hit_count))
 
             expected_signal_threads = num_delay_signal_threads + num_signal_threads
-            self.assertEqual(expected_signal_threads, self.signal_count,
-                "Expected %d stops due to signal delivery, but got %d" % (expected_signal_threads, self.signal_count))
+            self.assertEqual(
+                expected_signal_threads,
+                self.signal_count,
+                "Expected %d stops due to signal delivery, but got %d" %
+                (expected_signal_threads,
+                 self.signal_count))
 
             expected_watchpoint_threads = num_delay_watchpoint_threads + num_watchpoint_threads
-            watchpoint_hit_count = self.thread_watchpoint.GetHitCount() if expected_watchpoint_threads > 0 else 0
-            self.assertEqual(expected_watchpoint_threads, watchpoint_hit_count,
-                "Expected %d watchpoint hits, got %d" % (expected_watchpoint_threads, watchpoint_hit_count))
+            watchpoint_hit_count = self.thread_watchpoint.GetHitCount(
+            ) if expected_watchpoint_threads > 0 else 0
+            self.assertEqual(
+                expected_watchpoint_threads,
+                watchpoint_hit_count,
+                "Expected %d watchpoint hits, got %d" %
+                (expected_watchpoint_threads,
+                 watchpoint_hit_count))

Modified: lldb/trunk/packages/Python/lldbsuite/test/configuration.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/configuration.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/configuration.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/configuration.py Tue Sep  6 15:57:50 2016
@@ -23,26 +23,31 @@ import unittest2
 # LLDB Modules
 import lldbsuite
 
+
 def __setCrashInfoHook_Mac(text):
     from . import crashinfo
     crashinfo.setCrashReporterDescription(text)
 
+
 def setupCrashInfoHook():
     if platform.system() == "Darwin":
         from . import lock
         test_dir = os.environ['LLDB_TEST']
         if not test_dir or not os.path.exists(test_dir):
             return
-        dylib_lock = os.path.join(test_dir,"crashinfo.lock")
-        dylib_src = os.path.join(test_dir,"crashinfo.c")
-        dylib_dst = os.path.join(test_dir,"crashinfo.so")
+        dylib_lock = os.path.join(test_dir, "crashinfo.lock")
+        dylib_src = os.path.join(test_dir, "crashinfo.c")
+        dylib_dst = os.path.join(test_dir, "crashinfo.so")
         try:
             compile_lock = lock.Lock(dylib_lock)
             compile_lock.acquire()
-            if not os.path.isfile(dylib_dst) or os.path.getmtime(dylib_dst) < os.path.getmtime(dylib_src):
+            if not os.path.isfile(dylib_dst) or os.path.getmtime(
+                    dylib_dst) < os.path.getmtime(dylib_src):
                 # we need to compile
-                cmd = "SDKROOT= xcrun clang %s -o %s -framework Python -Xlinker -dylib -iframework /System/Library/Frameworks/ -Xlinker -F /System/Library/Frameworks/" % (dylib_src,dylib_dst)
-                if subprocess.call(cmd,shell=True) != 0 or not os.path.isfile(dylib_dst):
+                cmd = "SDKROOT= xcrun clang %s -o %s -framework Python -Xlinker -dylib -iframework /System/Library/Frameworks/ -Xlinker -F /System/Library/Frameworks/" % (
+                    dylib_src, dylib_dst)
+                if subprocess.call(
+                        cmd, shell=True) != 0 or not os.path.isfile(dylib_dst):
                     raise Exception('command failed: "{}"'.format(cmd))
         finally:
             compile_lock.release()
@@ -92,7 +97,8 @@ skip_long_running_test = True
 # prints machine-readable output similar to what clang tests produce.
 parsable = False
 
-# The regular expression pattern to match against eligible filenames as our test cases.
+# The regular expression pattern to match against eligible filenames as
+# our test cases.
 regexp = None
 
 # By default, recorded session info for errored/failed test are dumped into its
@@ -121,7 +127,7 @@ verbose = 0
 # By default, search from the script directory.
 # We can't use sys.path[0] to determine the script directory
 # because it doesn't work under a debugger
-testdirs = [ os.path.dirname(os.path.realpath(__file__)) ]
+testdirs = [os.path.dirname(os.path.realpath(__file__))]
 
 # Separator string.
 separator = '-' * 70
@@ -152,15 +158,18 @@ test_result = None
 rerun_all_issues = False
 rerun_max_file_threhold = 0
 
-# The names of all tests. Used to assert we don't have two tests with the same base name.
+# The names of all tests. Used to assert we don't have two tests with the
+# same base name.
 all_tests = set()
 
 # safe default
-setCrashInfoHook = lambda x : None
+setCrashInfoHook = lambda x: None
+
 
 def shouldSkipBecauseOfCategories(test_categories):
     if useCategories:
-        if len(test_categories) == 0 or len(categoriesList & set(test_categories)) == 0:
+        if len(test_categories) == 0 or len(
+                categoriesList & set(test_categories)) == 0:
             return True
 
     for category in skipCategories:

Modified: lldb/trunk/packages/Python/lldbsuite/test/darwin_log.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/darwin_log.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/darwin_log.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/darwin_log.py Tue Sep  6 15:57:50 2016
@@ -46,9 +46,9 @@ class DarwinLogTestBase(lldbtest.TestBas
         # or greater.
         version = platform.mac_ver()[0].split('.')
         if ((int(version[0]) == 10) and (int(version[1]) < 12) or
-            (int(version[0]) < 10)):
-                self.skipTest("DarwinLog tests currently require macOS 10.12+")
-                return
+                (int(version[0]) < 10)):
+            self.skipTest("DarwinLog tests currently require macOS 10.12+")
+            return
 
         self.child = None
         self.child_prompt = '(lldb) '
@@ -73,8 +73,9 @@ class DarwinLogTestBase(lldbtest.TestBas
 
         if self.enable_process_monitor_logging:
             if platform.system() == 'Darwin':
-                self.runCmd("settings set target.process.extra-startup-command "
-                            "QSetLogging:bitmask=LOG_DARWIN_LOG;")
+                self.runCmd(
+                    "settings set target.process.extra-startup-command "
+                    "QSetLogging:bitmask=LOG_DARWIN_LOG;")
                 self.expect_prompt()
 
         # Run the enable command if we have one.
@@ -98,7 +99,8 @@ class DarwinLogTestBase(lldbtest.TestBas
 
         # Prevent mirroring of NSLog/os_log content to stderr.  We want log
         # messages to come exclusively through our log channel.
-        self.runCmd("settings set target.env-vars IDE_DISABLED_OS_ACTIVITY_DT_MODE=1")
+        self.runCmd(
+            "settings set target.env-vars IDE_DISABLED_OS_ACTIVITY_DT_MODE=1")
         self.expect_prompt()
 
         # Run any darwin-log settings commands now, before we enable logging.
@@ -176,7 +178,7 @@ class DarwinLogTestBase(lldbtest.TestBas
             expect_regexes = (
                 [re.compile(r"source-log-([^-]+)-(\S+)"),
                  re.compile(r"exited with status")
-                ])
+                 ])
         self.expect(expect_regexes)
 
 
@@ -193,8 +195,11 @@ class DarwinLogEventBasedTestBase(lldbte
     NO_DEBUG_INFO_TESTCASE = True
 
     class EventListenerThread(threading.Thread):
+
         def __init__(self, listener, process, trace_on, max_entry_count):
-            super(DarwinLogEventBasedTestBase.EventListenerThread, self).__init__()
+            super(
+                DarwinLogEventBasedTestBase.EventListenerThread,
+                self).__init__()
             self.process = process
             self.listener = listener
             self.trace_on = trace_on
@@ -301,9 +306,9 @@ class DarwinLogEventBasedTestBase(lldbte
         # or greater.
         version = platform.mac_ver()[0].split('.')
         if ((int(version[0]) == 10) and (int(version[1]) < 12) or
-            (int(version[0]) < 10)):
-                self.skipTest("DarwinLog tests currently require macOS 10.12+")
-                return
+                (int(version[0]) < 10)):
+            self.skipTest("DarwinLog tests currently require macOS 10.12+")
+            return
 
         # Source filename.
         self.source = 'main.c'
@@ -406,8 +411,8 @@ class DarwinLogEventBasedTestBase(lldbte
         listener = lldb.SBListener("SBStructuredData listener")
         self.assertIsNotNone(listener)
 
-        rc = broadcaster.AddListener(listener,
-                                     lldb.SBProcess.eBroadcastBitStructuredData)
+        rc = broadcaster.AddListener(
+            listener, lldb.SBProcess.eBroadcastBitStructuredData)
         self.assertTrue(rc, "Successfully add listener to process broadcaster")
 
         # Start the listening thread to retrieve the events.

Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/decorators.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/decorators.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/decorators.py Tue Sep  6 15:57:50 2016
@@ -24,24 +24,33 @@ from lldbsuite.support import funcutils
 from lldbsuite.test import lldbplatform
 from lldbsuite.test import lldbplatformutil
 
+
 class DecorateMode:
     Skip, Xfail = range(2)
 
-    
+
 # You can use no_match to reverse the test of the conditional that is used to match keyword
 # arguments in the skip / xfail decorators.  If oslist=["windows", "linux"] skips windows
-# and linux, oslist=no_match(["windows", "linux"]) skips *unless* windows or linux.
+# and linux, oslist=no_match(["windows", "linux"]) skips *unless* windows
+# or linux.
 class no_match:
+
     def __init__(self, item):
         self.item = item
 
+
 def _check_expected_version(comparison, expected, actual):
-    def fn_leq(x,y): return x <= y
-    def fn_less(x,y): return x < y
-    def fn_geq(x,y): return x >= y
-    def fn_greater(x,y): return x > y
-    def fn_eq(x,y): return x == y
-    def fn_neq(x,y): return x != y
+    def fn_leq(x, y): return x <= y
+
+    def fn_less(x, y): return x < y
+
+    def fn_geq(x, y): return x >= y
+
+    def fn_greater(x, y): return x > y
+
+    def fn_eq(x, y): return x == y
+
+    def fn_neq(x, y): return x != y
 
     op_lookup = {
         "==": fn_eq,
@@ -52,11 +61,14 @@ def _check_expected_version(comparison,
         "<": fn_less,
         ">=": fn_geq,
         "<=": fn_leq
-        }
+    }
     expected_str = '.'.join([str(x) for x in expected])
     actual_str = '.'.join([str(x) for x in actual])
 
-    return op_lookup[comparison](LooseVersion(actual_str), LooseVersion(expected_str))
+    return op_lookup[comparison](
+        LooseVersion(actual_str),
+        LooseVersion(expected_str))
+
 
 def _match_decorator_property(expected, actual):
     if actual is None or expected is None:
@@ -64,17 +76,21 @@ def _match_decorator_property(expected,
 
     if isinstance(expected, no_match):
         return not _match_decorator_property(expected.item, actual)
-    elif isinstance(expected, (re._pattern_type,)+six.string_types):
+    elif isinstance(expected, (re._pattern_type,) + six.string_types):
         return re.search(expected, actual) is not None
     elif hasattr(expected, "__iter__"):
-        return any([x is not None and _match_decorator_property(x, actual) for x in expected])
+        return any([x is not None and _match_decorator_property(x, actual)
+                    for x in expected])
     else:
         return expected == actual
 
+
 def expectedFailure(expected_fn, bugnumber=None):
     def expectedFailure_impl(func):
         if isinstance(func, type) and issubclass(func, unittest2.TestCase):
-            raise Exception("Decorator can only be used to decorate a test method")
+            raise Exception(
+                "Decorator can only be used to decorate a test method")
+
         @wraps(func)
         def wrapper(*args, **kwargs):
             self = args[0]
@@ -102,10 +118,12 @@ def expectedFailure(expected_fn, bugnumb
     else:
         return expectedFailure_impl
 
+
 def skipTestIfFn(expected_fn, bugnumber=None):
     def skipTestIfFn_impl(func):
         if isinstance(func, type) and issubclass(func, unittest2.TestCase):
-            raise Exception("@skipTestIfFn can only be used to decorate a test method")
+            raise Exception(
+                "@skipTestIfFn can only be used to decorate a test method")
 
         @wraps(func)
         def wrapper(*args, **kwargs):
@@ -116,7 +134,7 @@ def skipTestIfFn(expected_fn, bugnumber=
                 reason = expected_fn()
 
             if reason is not None:
-               self.skipTest(reason)
+                self.skipTest(reason)
             else:
                 func(*args, **kwargs)
         return wrapper
@@ -124,30 +142,50 @@ def skipTestIfFn(expected_fn, bugnumber=
     # Some decorators can be called both with no arguments (e.g. @expectedFailureWindows)
     # or with arguments (e.g. @expectedFailureWindows(compilers=['gcc'])).  When called
     # the first way, the first argument will be the actual function because decorators are
-    # weird like that.  So this is basically a check that says "how was the decorator used"
+    # weird like that.  So this is basically a check that says "how was the
+    # decorator used"
     if six.callable(bugnumber):
         return skipTestIfFn_impl(bugnumber)
     else:
         return skipTestIfFn_impl
 
+
 def _decorateTest(mode,
-                 bugnumber=None, oslist=None, hostoslist=None,
-                 compiler=None, compiler_version=None,
-                 archs=None, triple=None,
-                 debug_info=None,
-                 swig_version=None, py_version=None,
-                 remote=None):
+                  bugnumber=None, oslist=None, hostoslist=None,
+                  compiler=None, compiler_version=None,
+                  archs=None, triple=None,
+                  debug_info=None,
+                  swig_version=None, py_version=None,
+                  remote=None):
     def fn(self):
-        skip_for_os = _match_decorator_property(lldbplatform.translate(oslist), self.getPlatform())
-        skip_for_hostos = _match_decorator_property(lldbplatform.translate(hostoslist), lldbplatformutil.getHostPlatform())
-        skip_for_compiler = _match_decorator_property(compiler, self.getCompiler()) and self.expectedCompilerVersion(compiler_version)
-        skip_for_arch = _match_decorator_property(archs, self.getArchitecture())
-        skip_for_debug_info = _match_decorator_property(debug_info, self.debug_info)
-        skip_for_triple = _match_decorator_property(triple, lldb.DBG.GetSelectedPlatform().GetTriple())
-        skip_for_remote = _match_decorator_property(remote, lldb.remote_platform is not None)
-
-        skip_for_swig_version = (swig_version is None) or (not hasattr(lldb, 'swig_version')) or (_check_expected_version(swig_version[0], swig_version[1], lldb.swig_version))
-        skip_for_py_version = (py_version is None) or _check_expected_version(py_version[0], py_version[1], sys.version_info)
+        skip_for_os = _match_decorator_property(
+            lldbplatform.translate(oslist), self.getPlatform())
+        skip_for_hostos = _match_decorator_property(
+            lldbplatform.translate(hostoslist),
+            lldbplatformutil.getHostPlatform())
+        skip_for_compiler = _match_decorator_property(
+            compiler, self.getCompiler()) and self.expectedCompilerVersion(compiler_version)
+        skip_for_arch = _match_decorator_property(
+            archs, self.getArchitecture())
+        skip_for_debug_info = _match_decorator_property(
+            debug_info, self.debug_info)
+        skip_for_triple = _match_decorator_property(
+            triple, lldb.DBG.GetSelectedPlatform().GetTriple())
+        skip_for_remote = _match_decorator_property(
+            remote, lldb.remote_platform is not None)
+
+        skip_for_swig_version = (
+            swig_version is None) or (
+            not hasattr(
+                lldb,
+                'swig_version')) or (
+                _check_expected_version(
+                    swig_version[0],
+                    swig_version[1],
+                    lldb.swig_version))
+        skip_for_py_version = (
+            py_version is None) or _check_expected_version(
+            py_version[0], py_version[1], sys.version_info)
 
         # For the test to be skipped, all specified (e.g. not None) parameters must be True.
         # An unspecified parameter means "any", so those are marked skip by default.  And we skip
@@ -169,10 +207,13 @@ def _decorateTest(mode,
                 reasons.append(this_condition[2])
         reason_str = None
         if final_skip_result:
-            mode_str = {DecorateMode.Skip : "skipping", DecorateMode.Xfail : "xfailing"}[mode]
+            mode_str = {
+                DecorateMode.Skip: "skipping",
+                DecorateMode.Xfail: "xfailing"}[mode]
             if len(reasons) > 0:
                 reason_str = ",".join(reasons)
-                reason_str = "{} due to the following parameter(s): {}".format(mode_str, reason_str)
+                reason_str = "{} due to the following parameter(s): {}".format(
+                    mode_str, reason_str)
             else:
                 reason_str = "{} unconditionally"
             if bugnumber is not None and not six.callable(bugnumber):
@@ -192,6 +233,8 @@ def _decorateTest(mode,
 # @expectedFailureAll, xfail for all platform/compiler/arch,
 # @expectedFailureAll(compiler='gcc'), xfail for gcc on all platform/architecture
 # @expectedFailureAll(bugnumber, ["linux"], "gcc", ['>=', '4.9'], ['i386']), xfail for gcc>=4.9 on linux with i386
+
+
 def expectedFailureAll(bugnumber=None,
                        oslist=None, hostoslist=None,
                        compiler=None, compiler_version=None,
@@ -200,13 +243,13 @@ def expectedFailureAll(bugnumber=None,
                        swig_version=None, py_version=None,
                        remote=None):
     return _decorateTest(DecorateMode.Xfail,
-                        bugnumber=bugnumber,
-                        oslist=oslist, hostoslist=hostoslist,
-                        compiler=compiler, compiler_version=compiler_version,
-                        archs=archs, triple=triple,
-                        debug_info=debug_info,
-                        swig_version=swig_version, py_version=py_version,
-                        remote=remote)
+                         bugnumber=bugnumber,
+                         oslist=oslist, hostoslist=hostoslist,
+                         compiler=compiler, compiler_version=compiler_version,
+                         archs=archs, triple=triple,
+                         debug_info=debug_info,
+                         swig_version=swig_version, py_version=py_version,
+                         remote=remote)
 
 
 # provide a function to skip on defined oslist, compiler version, and archs
@@ -223,26 +266,31 @@ def skipIf(bugnumber=None,
            swig_version=None, py_version=None,
            remote=None):
     return _decorateTest(DecorateMode.Skip,
-                        bugnumber=bugnumber,
-                        oslist=oslist, hostoslist=hostoslist,
-                        compiler=compiler, compiler_version=compiler_version,
-                        archs=archs, triple=triple,
-                        debug_info=debug_info,
-                        swig_version=swig_version, py_version=py_version,
-                        remote=remote)
+                         bugnumber=bugnumber,
+                         oslist=oslist, hostoslist=hostoslist,
+                         compiler=compiler, compiler_version=compiler_version,
+                         archs=archs, triple=triple,
+                         debug_info=debug_info,
+                         swig_version=swig_version, py_version=py_version,
+                         remote=remote)
+
 
 def _skip_for_android(reason, api_levels, archs):
     def impl(obj):
-        result = lldbplatformutil.match_android_device(obj.getArchitecture(), valid_archs=archs, valid_api_levels=api_levels)
+        result = lldbplatformutil.match_android_device(
+            obj.getArchitecture(), valid_archs=archs, valid_api_levels=api_levels)
         return reason if result else None
     return impl
 
+
 def add_test_categories(cat):
     """Add test categories to a TestCase method"""
     cat = test_categories.validate(cat, True)
+
     def impl(func):
         if isinstance(func, type) and issubclass(func, unittest2.TestCase):
-            raise Exception("@add_test_categories can only be used to decorate a test method")
+            raise Exception(
+                "@add_test_categories can only be used to decorate a test method")
         if hasattr(func, "categories"):
             cat.extend(func.categories)
         func.categories = cat
@@ -250,6 +298,7 @@ def add_test_categories(cat):
 
     return impl
 
+
 def benchmarks_test(func):
     """Decorate the item as a benchmarks test."""
     def should_skip_benchmarks_test():
@@ -260,11 +309,14 @@ def benchmarks_test(func):
     result.__benchmarks_test__ = True
     return result
 
+
 def no_debug_info_test(func):
     """Decorate the item as a test what don't use any debug info. If this annotation is specified
        then the test runner won't generate a separate test for each debug info format. """
     if isinstance(func, type) and issubclass(func, unittest2.TestCase):
-        raise Exception("@no_debug_info_test can only be used to decorate a test method")
+        raise Exception(
+            "@no_debug_info_test can only be used to decorate a test method")
+
     @wraps(func)
     def wrapper(self, *args, **kwargs):
         return func(self, *args, **kwargs)
@@ -273,30 +325,51 @@ def no_debug_info_test(func):
     wrapper.__no_debug_info_test__ = True
     return wrapper
 
+
 def debugserver_test(func):
     """Decorate the item as a debugserver test."""
     def should_skip_debugserver_test():
         return "debugserver tests" if configuration.dont_do_debugserver_test else None
     return skipTestIfFn(should_skip_debugserver_test)(func)
 
+
 def llgs_test(func):
     """Decorate the item as a lldb-server test."""
     def should_skip_llgs_tests():
         return "llgs tests" if configuration.dont_do_llgs_test else None
     return skipTestIfFn(should_skip_llgs_tests)(func)
 
+
 def not_remote_testsuite_ready(func):
     """Decorate the item as a test which is not ready yet for remote testsuite."""
     def is_remote():
         return "Not ready for remote testsuite" if lldb.remote_platform else None
     return skipTestIfFn(is_remote)(func)
 
-def expectedFailureOS(oslist, bugnumber=None, compilers=None, debug_info=None, archs=None):
-    return expectedFailureAll(oslist=oslist, bugnumber=bugnumber, compiler=compilers, archs=archs, debug_info=debug_info)
+
+def expectedFailureOS(
+        oslist,
+        bugnumber=None,
+        compilers=None,
+        debug_info=None,
+        archs=None):
+    return expectedFailureAll(
+        oslist=oslist,
+        bugnumber=bugnumber,
+        compiler=compilers,
+        archs=archs,
+        debug_info=debug_info)
+
 
 def expectedFailureDarwin(bugnumber=None, compilers=None, debug_info=None):
-    # For legacy reasons, we support both "darwin" and "macosx" as OS X triples.
-    return expectedFailureOS(lldbplatform.darwin_all, bugnumber, compilers, debug_info=debug_info)
+    # For legacy reasons, we support both "darwin" and "macosx" as OS X
+    # triples.
+    return expectedFailureOS(
+        lldbplatform.darwin_all,
+        bugnumber,
+        compilers,
+        debug_info=debug_info)
+
 
 def expectedFailureAndroid(bugnumber=None, api_levels=None, archs=None):
     """ Mark a test as xfail for Android.
@@ -308,10 +381,17 @@ def expectedFailureAndroid(bugnumber=Non
         arch - A sequence of architecture names specifying the architectures
             for which a test is expected to fail. None means all architectures.
     """
-    return expectedFailure(_skip_for_android("xfailing on android", api_levels, archs), bugnumber)
+    return expectedFailure(
+        _skip_for_android(
+            "xfailing on android",
+            api_levels,
+            archs),
+        bugnumber)
 
 # Flakey tests get two chances to run. If they fail the first time round, the result formatter
 # makes sure it is run one more time.
+
+
 def expectedFlakey(expected_fn, bugnumber=None):
     def expectedFailure_impl(func):
         @wraps(func)
@@ -335,52 +415,76 @@ def expectedFlakey(expected_fn, bugnumbe
     else:
         return expectedFailure_impl
 
+
 def expectedFlakeyDwarf(bugnumber=None):
     def fn(self):
         return self.debug_info == "dwarf"
     return expectedFlakey(fn, bugnumber)
 
+
 def expectedFlakeyDsym(bugnumber=None):
     def fn(self):
         return self.debug_info == "dwarf"
     return expectedFlakey(fn, bugnumber)
 
+
 def expectedFlakeyOS(oslist, bugnumber=None, compilers=None):
     def fn(self):
         return (self.getPlatform() in oslist and
                 self.expectedCompiler(compilers))
     return expectedFlakey(fn, bugnumber)
 
+
 def expectedFlakeyDarwin(bugnumber=None, compilers=None):
-    # For legacy reasons, we support both "darwin" and "macosx" as OS X triples.
-    return expectedFlakeyOS(lldbplatformutil.getDarwinOSTriples(), bugnumber, compilers)
+    # For legacy reasons, we support both "darwin" and "macosx" as OS X
+    # triples.
+    return expectedFlakeyOS(
+        lldbplatformutil.getDarwinOSTriples(),
+        bugnumber,
+        compilers)
+
 
 def expectedFlakeyFreeBSD(bugnumber=None, compilers=None):
     return expectedFlakeyOS(['freebsd'], bugnumber, compilers)
 
+
 def expectedFlakeyLinux(bugnumber=None, compilers=None):
     return expectedFlakeyOS(['linux'], bugnumber, compilers)
 
+
 def expectedFlakeyNetBSD(bugnumber=None, compilers=None):
     return expectedFlakeyOS(['netbsd'], bugnumber, compilers)
 
+
 def expectedFlakeyCompiler(compiler, compiler_version=None, bugnumber=None):
     if compiler_version is None:
-        compiler_version=['=', None]
+        compiler_version = ['=', None]
+
     def fn(self):
         return compiler in self.getCompiler() and self.expectedCompilerVersion(compiler_version)
     return expectedFlakey(fn, bugnumber)
 
 # @expectedFlakeyClang('bugnumber', ['<=', '3.4'])
+
+
 def expectedFlakeyClang(bugnumber=None, compiler_version=None):
     return expectedFlakeyCompiler('clang', compiler_version, bugnumber)
 
 # @expectedFlakeyGcc('bugnumber', ['<=', '3.4'])
+
+
 def expectedFlakeyGcc(bugnumber=None, compiler_version=None):
     return expectedFlakeyCompiler('gcc', compiler_version, bugnumber)
 
+
 def expectedFlakeyAndroid(bugnumber=None, api_levels=None, archs=None):
-    return expectedFlakey(_skip_for_android("flakey on android", api_levels, archs), bugnumber)
+    return expectedFlakey(
+        _skip_for_android(
+            "flakey on android",
+            api_levels,
+            archs),
+        bugnumber)
+
 
 def skipIfRemote(func):
     """Decorate the item to skip tests if testing remotely."""
@@ -388,61 +492,86 @@ def skipIfRemote(func):
         return "skip on remote platform" if lldb.remote_platform else None
     return skipTestIfFn(is_remote)(func)
 
+
 def skipIfRemoteDueToDeadlock(func):
     """Decorate the item to skip tests if testing remotely due to the test deadlocking."""
     def is_remote():
         return "skip on remote platform (deadlocks)" if lldb.remote_platform else None
     return skipTestIfFn(is_remote)(func)
 
+
 def skipIfNoSBHeaders(func):
     """Decorate the item to mark tests that should be skipped when LLDB is built with no SB API headers."""
     def are_sb_headers_missing():
         if lldbplatformutil.getHostPlatform() == 'darwin':
-            header = os.path.join(os.environ["LLDB_LIB_DIR"], 'LLDB.framework', 'Versions','Current','Headers','LLDB.h')
+            header = os.path.join(
+                os.environ["LLDB_LIB_DIR"],
+                'LLDB.framework',
+                'Versions',
+                'Current',
+                'Headers',
+                'LLDB.h')
         else:
-            header = os.path.join(os.environ["LLDB_SRC"], "include", "lldb", "API", "LLDB.h")
+            header = os.path.join(
+                os.environ["LLDB_SRC"],
+                "include",
+                "lldb",
+                "API",
+                "LLDB.h")
         if not os.path.exists(header):
             return "skip because LLDB.h header not found"
         return None
 
     return skipTestIfFn(are_sb_headers_missing)(func)
 
+
 def skipIfiOSSimulator(func):
     """Decorate the item to skip tests that should be skipped on the iOS Simulator."""
     def is_ios_simulator():
         return "skip on the iOS Simulator" if configuration.lldb_platform_name == 'ios-simulator' else None
     return skipTestIfFn(is_ios_simulator)(func)
 
+
 def skipIfFreeBSD(func):
     """Decorate the item to skip tests that should be skipped on FreeBSD."""
     return skipIfPlatform(["freebsd"])(func)
 
+
 def skipIfNetBSD(func):
     """Decorate the item to skip tests that should be skipped on NetBSD."""
     return skipIfPlatform(["netbsd"])(func)
 
+
 def skipIfDarwin(func):
     """Decorate the item to skip tests that should be skipped on Darwin."""
-    return skipIfPlatform(lldbplatform.translate(lldbplatform.darwin_all))(func)
+    return skipIfPlatform(
+        lldbplatform.translate(
+            lldbplatform.darwin_all))(func)
+
 
 def skipIfLinux(func):
     """Decorate the item to skip tests that should be skipped on Linux."""
     return skipIfPlatform(["linux"])(func)
 
+
 def skipIfWindows(func):
     """Decorate the item to skip tests that should be skipped on Windows."""
     return skipIfPlatform(["windows"])(func)
 
+
 def skipUnlessWindows(func):
     """Decorate the item to skip tests that should be skipped on any non-Windows platform."""
     return skipUnlessPlatform(["windows"])(func)
 
+
 def skipUnlessDarwin(func):
     """Decorate the item to skip tests that should be skipped on any non Darwin platform."""
     return skipUnlessPlatform(lldbplatformutil.getDarwinOSTriples())(func)
 
+
 def skipUnlessGoInstalled(func):
     """Decorate the item to skip tests when no Go compiler is available."""
+
     def is_go_missing(self):
         compiler = self.getGoCompilerVersion()
         if not compiler:
@@ -450,7 +579,8 @@ def skipUnlessGoInstalled(func):
         match_version = re.search(r"(\d+\.\d+(\.\d+)?)", compiler)
         if not match_version:
             # Couldn't determine version.
-            return "skipping because go version could not be parsed out of {}".format(compiler)
+            return "skipping because go version could not be parsed out of {}".format(
+                compiler)
         else:
             min_strict_version = StrictVersion("1.4.0")
             compiler_strict_version = StrictVersion(match_version.group(1))
@@ -460,20 +590,26 @@ def skipUnlessGoInstalled(func):
         return None
     return skipTestIfFn(is_go_missing)(func)
 
+
 def skipIfHostIncompatibleWithRemote(func):
     """Decorate the item to skip tests if binaries built on this host are incompatible."""
+
     def is_host_incompatible_with_remote(self):
         host_arch = self.getLldbArchitecture()
         host_platform = lldbplatformutil.getHostPlatform()
         target_arch = self.getArchitecture()
         target_platform = 'darwin' if self.platformIsDarwin() else self.getPlatform()
-        if not (target_arch == 'x86_64' and host_arch == 'i386') and host_arch != target_arch:
-            return "skipping because target %s is not compatible with host architecture %s" % (target_arch, host_arch)
+        if not (target_arch == 'x86_64' and host_arch ==
+                'i386') and host_arch != target_arch:
+            return "skipping because target %s is not compatible with host architecture %s" % (
+                target_arch, host_arch)
         elif target_platform != host_platform:
-            return "skipping because target is %s but host is %s" % (target_platform, host_platform)
+            return "skipping because target is %s but host is %s" % (
+                target_platform, host_platform)
         return None
     return skipTestIfFn(is_host_incompatible_with_remote)(func)
 
+
 def skipIfPlatform(oslist):
     """Decorate the item to skip tests if running on one of the listed platforms."""
     # This decorator cannot be ported to `skipIf` yet because it is used on entire
@@ -481,6 +617,7 @@ def skipIfPlatform(oslist):
     return unittest2.skipIf(lldbplatformutil.getPlatform() in oslist,
                             "skip on %s" % (", ".join(oslist)))
 
+
 def skipUnlessPlatform(oslist):
     """Decorate the item to skip tests unless running on one of the listed platforms."""
     # This decorator cannot be ported to `skipIf` yet because it is used on entire
@@ -488,6 +625,7 @@ def skipUnlessPlatform(oslist):
     return unittest2.skipUnless(lldbplatformutil.getPlatform() in oslist,
                                 "requires one of %s" % (", ".join(oslist)))
 
+
 def skipIfTargetAndroid(api_levels=None, archs=None):
     """Decorator to skip tests when the target is Android.
 
@@ -497,17 +635,33 @@ def skipIfTargetAndroid(api_levels=None,
         arch - A sequence of architecture names specifying the architectures
             for which a test is skipped. None means all architectures.
     """
-    return skipTestIfFn(_skip_for_android("skipping for android", api_levels, archs))
+    return skipTestIfFn(
+        _skip_for_android(
+            "skipping for android",
+            api_levels,
+            archs))
+
 
 def skipUnlessCompilerRt(func):
     """Decorate the item to skip tests if testing remotely."""
     def is_compiler_rt_missing():
-        compilerRtPath = os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", "llvm","projects","compiler-rt")
-        return "compiler-rt not found" if not os.path.exists(compilerRtPath) else None
+        compilerRtPath = os.path.join(
+            os.path.dirname(__file__),
+            "..",
+            "..",
+            "..",
+            "..",
+            "llvm",
+            "projects",
+            "compiler-rt")
+        return "compiler-rt not found" if not os.path.exists(
+            compilerRtPath) else None
     return skipTestIfFn(is_compiler_rt_missing)(func)
 
+
 def skipUnlessThreadSanitizer(func):
     """Decorate the item to skip test unless Clang -fsanitize=thread is supported."""
+
     def is_compiler_clang_with_thread_sanitizer(self):
         compiler_path = self.getCompiler()
         compiler = os.path.basename(compiler_path)
@@ -515,10 +669,10 @@ def skipUnlessThreadSanitizer(func):
             return "Test requires clang as compiler"
         f = tempfile.NamedTemporaryFile()
         cmd = "echo 'int main() {}' | %s -x c -o %s -" % (compiler_path, f.name)
-        if os.popen(cmd).close() != None:
+        if os.popen(cmd).close() is not None:
             return None  # The compiler cannot compile at all, let's *not* skip the test
         cmd = "echo 'int main() {}' | %s -fsanitize=thread -x c -o %s -" % (compiler_path, f.name)
-        if os.popen(cmd).close() != None:
+        if os.popen(cmd).close() is not None:
             return "Compiler cannot compile with -fsanitize=thread"
         return None
     return skipTestIfFn(is_compiler_clang_with_thread_sanitizer)(func)

Modified: lldb/trunk/packages/Python/lldbsuite/test/dosep.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dosep.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/dosep.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dosep.py Tue Sep  6 15:57:50 2016
@@ -104,6 +104,7 @@ def setup_global_variables(
         global GET_WORKER_INDEX
         GET_WORKER_INDEX = get_worker_index_use_pid
 
+
 def report_test_failure(name, command, output, timeout):
     global output_lock
     with output_lock:
@@ -152,14 +153,15 @@ def parse_test_results(output):
                                result, re.MULTILINE)
         error_count = re.search("^RESULT:.*([0-9]+) errors",
                                 result, re.MULTILINE)
-        unexpected_success_count = re.search("^RESULT:.*([0-9]+) unexpected successes",
-                                             result, re.MULTILINE)
+        unexpected_success_count = re.search(
+            "^RESULT:.*([0-9]+) unexpected successes", result, re.MULTILINE)
         if pass_count is not None:
             passes = passes + int(pass_count.group(1))
         if fail_count is not None:
             failures = failures + int(fail_count.group(1))
         if unexpected_success_count is not None:
-            unexpected_successes = unexpected_successes + int(unexpected_success_count.group(1))
+            unexpected_successes = unexpected_successes + \
+                int(unexpected_success_count.group(1))
         if error_count is not None:
             failures = failures + int(error_count.group(1))
     return passes, failures, unexpected_successes
@@ -167,6 +169,7 @@ def parse_test_results(output):
 
 class DoTestProcessDriver(process_control.ProcessDriver):
     """Drives the dotest.py inferior process and handles bookkeeping."""
+
     def __init__(self, output_file, output_file_lock, pid_events, file_name,
                  soft_terminate_timeout):
         super(DoTestProcessDriver, self).__init__(
@@ -210,7 +213,11 @@ class DoTestProcessDriver(process_contro
             # only stderr does.
             report_test_pass(self.file_name, output[1])
         else:
-            report_test_failure(self.file_name, command, output[1], was_timeout)
+            report_test_failure(
+                self.file_name,
+                command,
+                output[1],
+                was_timeout)
 
         # Save off the results for the caller.
         self.results = (
@@ -635,8 +642,13 @@ def initialize_global_vars_common(num_th
     test_counter = multiprocessing.Value('i', 0)
     test_name_len = multiprocessing.Value('i', 0)
     if not (RESULTS_FORMATTER and RESULTS_FORMATTER.is_using_terminal()):
-        print("Testing: %d test suites, %d thread%s" % (
-            total_tests, num_threads, (num_threads > 1) * "s"), file=sys.stderr)
+        print(
+            "Testing: %d test suites, %d thread%s" %
+            (total_tests,
+             num_threads,
+             (num_threads > 1) *
+                "s"),
+            file=sys.stderr)
     update_progress()
 
 
@@ -671,7 +683,6 @@ def initialize_global_vars_threading(num
                 index_map[thread_id] = len(index_map)
             return index_map[thread_id]
 
-
     global GET_WORKER_INDEX
     GET_WORKER_INDEX = get_worker_index_threading
 
@@ -1079,6 +1090,7 @@ def inprocess_exec_test_runner(test_work
 
     return test_results
 
+
 def walk_and_invoke(test_files, dotest_argv, num_workers, test_runner_func):
     """Invokes the test runner on each test file specified by test_files.
 
@@ -1278,7 +1290,7 @@ def _remove_option(
                 removal_count = 2
             else:
                 removal_count = 1
-            del args[index:index+removal_count]
+            del args[index:index + removal_count]
             return True
         except ValueError:
             # Thanks to argparse not handling options with known arguments
@@ -1516,7 +1528,8 @@ def main(num_threads, test_subdir, test_
     if test_subdir and len(test_subdir) > 0:
         test_subdir = os.path.join(test_directory, test_subdir)
         if not os.path.isdir(test_subdir):
-          print('specified test subdirectory {} is not a valid directory\n'.format(test_subdir))
+            print(
+                'specified test subdirectory {} is not a valid directory\n'.format(test_subdir))
     else:
         test_subdir = test_directory
 
@@ -1662,7 +1675,9 @@ def main(num_threads, test_subdir, test_
             unexpected_successes.sort()
             print("\nUnexpected Successes (%d)" % len(unexpected_successes))
             for u in unexpected_successes:
-                print("UNEXPECTED SUCCESS: LLDB (suite) :: %s (%s)" % (u, system_info))
+                print(
+                    "UNEXPECTED SUCCESS: LLDB (suite) :: %s (%s)" %
+                    (u, system_info))
 
     sys.exit(exit_code)
 

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Tue Sep  6 15:57:50 2016
@@ -46,10 +46,12 @@ from . import test_result
 from lldbsuite.test_event.event_builder import EventBuilder
 from ..support import seven
 
+
 def is_exe(fpath):
     """Returns true if fpath is an executable."""
     return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
 
+
 def which(program):
     """Returns the full path to a program; None otherwise."""
     fpath, fname = os.path.split(program)
@@ -63,24 +65,28 @@ def which(program):
                 return exe_file
     return None
 
+
 class _WritelnDecorator(object):
     """Used to decorate file-like objects with a handy 'writeln' method"""
-    def __init__(self,stream):
+
+    def __init__(self, stream):
         self.stream = stream
 
     def __getattr__(self, attr):
         if attr in ('stream', '__getstate__'):
             raise AttributeError(attr)
-        return getattr(self.stream,attr)
+        return getattr(self.stream, attr)
 
     def writeln(self, arg=None):
         if arg:
             self.write(arg)
-        self.write('\n') # text-mode streams translate to \r\n if needed
+        self.write('\n')  # text-mode streams translate to \r\n if needed
 
 #
 # Global variables:
 #
+
+
 def usage(parser):
     parser.print_help()
     if configuration.verbose > 0:
@@ -195,6 +201,7 @@ o GDB_REMOTE_LOG: if defined, specifies
 """)
     sys.exit(0)
 
+
 def parseOptionsAndInitTestdirs():
     """Initialize the list of directories containing our unittest scripts.
 
@@ -213,9 +220,10 @@ def parseOptionsAndInitTestdirs():
         for env_var in args.unset_env_varnames:
             if env_var in os.environ:
                 # From Python Doc: When unsetenv() is supported, deletion of items in os.environ
-                # is automatically translated into a corresponding call to unsetenv().
+                # is automatically translated into a corresponding call to
+                # unsetenv().
                 del os.environ[env_var]
-                #os.unsetenv(env_var)
+                # os.unsetenv(env_var)
 
     if args.set_env_vars:
         for env_var in args.set_env_vars:
@@ -235,9 +243,13 @@ def parseOptionsAndInitTestdirs():
     if args.compilers:
         configuration.compilers = args.compilers
     else:
-        # Use a compiler appropriate appropriate for the Apple SDK if one was specified
+        # Use a compiler appropriate appropriate for the Apple SDK if one was
+        # specified
         if platform_system == 'Darwin' and args.apple_sdk:
-            configuration.compilers = [seven.get_command_output('xcrun -sdk "%s" -find clang 2> /dev/null' % (args.apple_sdk))]
+            configuration.compilers = [
+                seven.get_command_output(
+                    'xcrun -sdk "%s" -find clang 2> /dev/null' %
+                    (args.apple_sdk))]
         else:
             # 'clang' on ubuntu 14.04 is 3.4 so we try clang-3.5 first
             candidateCompilers = ['clang-3.5', 'clang', 'gcc']
@@ -254,33 +266,43 @@ def parseOptionsAndInitTestdirs():
 
     # Set SDKROOT if we are using an Apple SDK
     if platform_system == 'Darwin' and args.apple_sdk:
-        os.environ['SDKROOT'] = seven.get_command_output('xcrun --sdk "%s" --show-sdk-path 2> /dev/null' % (args.apple_sdk))
+        os.environ['SDKROOT'] = seven.get_command_output(
+            'xcrun --sdk "%s" --show-sdk-path 2> /dev/null' %
+            (args.apple_sdk))
 
     if args.archs:
         configuration.archs = args.archs
         for arch in configuration.archs:
-            if arch.startswith('arm') and platform_system == 'Darwin' and not args.apple_sdk:
-                os.environ['SDKROOT'] = seven.get_command_output('xcrun --sdk iphoneos.internal --show-sdk-path 2> /dev/null')
+            if arch.startswith(
+                    'arm') and platform_system == 'Darwin' and not args.apple_sdk:
+                os.environ['SDKROOT'] = seven.get_command_output(
+                    'xcrun --sdk iphoneos.internal --show-sdk-path 2> /dev/null')
                 if not os.path.exists(os.environ['SDKROOT']):
-                    os.environ['SDKROOT'] = seven.get_command_output('xcrun --sdk iphoneos --show-sdk-path 2> /dev/null')
+                    os.environ['SDKROOT'] = seven.get_command_output(
+                        'xcrun --sdk iphoneos --show-sdk-path 2> /dev/null')
     else:
         configuration.archs = [platform_machine]
 
     if args.categoriesList:
-        configuration.categoriesList = set(test_categories.validate(args.categoriesList, False))
+        configuration.categoriesList = set(
+            test_categories.validate(
+                args.categoriesList, False))
         configuration.useCategories = True
     else:
         configuration.categoriesList = []
 
     if args.skipCategories:
-        configuration.skipCategories = test_categories.validate(args.skipCategories, False)
+        configuration.skipCategories = test_categories.validate(
+            args.skipCategories, False)
 
     if args.E:
         cflags_extras = args.E
         os.environ['CFLAGS_EXTRAS'] = cflags_extras
 
     if args.d:
-        sys.stdout.write("Suspending the process %d to wait for debugger to attach...\n" % os.getpid())
+        sys.stdout.write(
+            "Suspending the process %d to wait for debugger to attach...\n" %
+            os.getpid())
         sys.stdout.flush()
         os.kill(os.getpid(), signal.SIGSTOP)
 
@@ -334,10 +356,11 @@ def parseOptionsAndInitTestdirs():
         configuration.count = args.sharp
 
     if sys.platform.startswith('win32'):
-        os.environ['LLDB_DISABLE_CRASH_DIALOG'] = str(args.disable_crash_dialog)
+        os.environ['LLDB_DISABLE_CRASH_DIALOG'] = str(
+            args.disable_crash_dialog)
         os.environ['LLDB_LAUNCH_INFERIORS_WITHOUT_CONSOLE'] = str(True)
 
-    if do_help == True:
+    if do_help:
         usage(parser)
 
     if args.no_multiprocess:
@@ -415,12 +438,14 @@ def parseOptionsAndInitTestdirs():
 
     # Gather all the dirs passed on the command line.
     if len(args.args) > 0:
-        configuration.testdirs = list(map(lambda x: os.path.realpath(os.path.abspath(x)), args.args))
+        configuration.testdirs = list(
+            map(lambda x: os.path.realpath(os.path.abspath(x)), args.args))
         # Shut off multiprocessing mode when test directories are specified.
         configuration.no_multiprocess_test_runner = True
 
     #print("testdirs:", testdirs)
 
+
 def getXcodeOutputPaths(lldbRootDirectory):
     result = []
 
@@ -428,11 +453,16 @@ def getXcodeOutputPaths(lldbRootDirector
     xcode3_build_dir = ['build']
     xcode4_build_dir = ['build', 'lldb', 'Build', 'Products']
 
-    configurations = [['Debug'], ['DebugClang'], ['Release'], ['BuildAndIntegration']]
+    configurations = [
+        ['Debug'],
+        ['DebugClang'],
+        ['Release'],
+        ['BuildAndIntegration']]
     xcode_build_dirs = [xcode3_build_dir, xcode4_build_dir]
     for configuration in configurations:
         for xcode_build_dir in xcode_build_dirs:
-            outputPath = os.path.join(lldbRootDirectory, *(xcode_build_dir+configuration) )
+            outputPath = os.path.join(
+                lldbRootDirectory, *(xcode_build_dir + configuration))
             result.append(outputPath)
 
     return result
@@ -499,17 +529,24 @@ def getOutputPaths(lldbRootDirectory):
 
     # cmake builds?  look for build or build/host folder next to llvm directory
     # lldb is located in llvm/tools/lldb so we need to go up three levels
-    llvmParentDir = os.path.abspath(os.path.join(lldbRootDirectory, os.pardir, os.pardir, os.pardir))
+    llvmParentDir = os.path.abspath(
+        os.path.join(
+            lldbRootDirectory,
+            os.pardir,
+            os.pardir,
+            os.pardir))
     result.append(os.path.join(llvmParentDir, 'build', 'bin'))
     result.append(os.path.join(llvmParentDir, 'build', 'host', 'bin'))
 
-    # some cmake developers keep their build directory beside their lldb directory
+    # some cmake developers keep their build directory beside their lldb
+    # directory
     lldbParentDir = os.path.abspath(os.path.join(lldbRootDirectory, os.pardir))
     result.append(os.path.join(lldbParentDir, 'build', 'bin'))
     result.append(os.path.join(lldbParentDir, 'build', 'host', 'bin'))
 
     return result
 
+
 def setupSysPath():
     """
     Add LLDB.framework/Resources/Python to the search paths for modules.
@@ -535,12 +572,15 @@ def setupSysPath():
     toolsLLDBMIPath = os.path.join(scriptPath, 'tools', 'lldb-mi')
     toolsLLDBServerPath = os.path.join(scriptPath, 'tools', 'lldb-server')
 
-    # Insert script dir, plugin dir, lldb-mi dir and lldb-server dir to the sys.path.
+    # Insert script dir, plugin dir, lldb-mi dir and lldb-server dir to the
+    # sys.path.
     sys.path.insert(0, pluginPath)
-    sys.path.insert(0, toolsLLDBMIPath)      # Adding test/tools/lldb-mi to the path makes it easy
-                                             # to "import lldbmi_testcase" from the MI tests
-    sys.path.insert(0, toolsLLDBServerPath)  # Adding test/tools/lldb-server to the path makes it easy
-                                             # to "import lldbgdbserverutils" from the lldb-server tests
+    # Adding test/tools/lldb-mi to the path makes it easy
+    sys.path.insert(0, toolsLLDBMIPath)
+    # to "import lldbmi_testcase" from the MI tests
+    # Adding test/tools/lldb-server to the path makes it easy
+    sys.path.insert(0, toolsLLDBServerPath)
+    # to "import lldbgdbserverutils" from the lldb-server tests
 
     # This is the root of the lldb git/svn checkout
     # When this changes over to a package instead of a standalone script, this
@@ -572,16 +612,22 @@ def setupSysPath():
         lldbtest_config.lldbExec = which('lldb')
 
     if lldbtest_config.lldbExec and not is_exe(lldbtest_config.lldbExec):
-        print("'{}' is not a path to a valid executable".format(lldbtest_config.lldbExec))
+        print(
+            "'{}' is not a path to a valid executable".format(
+                lldbtest_config.lldbExec))
         lldbtest_config.lldbExec = None
 
     if not lldbtest_config.lldbExec:
         print("The 'lldb' executable cannot be located.  Some of the tests may not be run as a result.")
         sys.exit(-1)
 
-    lldbLibDir = os.path.dirname(lldbtest_config.lldbExec)  # confusingly, this is the "bin" directory
+    # confusingly, this is the "bin" directory
+    lldbLibDir = os.path.dirname(lldbtest_config.lldbExec)
     os.environ["LLDB_LIB_DIR"] = lldbLibDir
-    lldbImpLibDir = os.path.join(lldbLibDir, '..', 'lib') if sys.platform.startswith('win32') else lldbLibDir
+    lldbImpLibDir = os.path.join(
+        lldbLibDir,
+        '..',
+        'lib') if sys.platform.startswith('win32') else lldbLibDir
     os.environ["LLDB_IMPLIB_DIR"] = lldbImpLibDir
     print("LLDB library dir:", os.environ["LLDB_LIB_DIR"])
     print("LLDB import library dir:", os.environ["LLDB_IMPLIB_DIR"])
@@ -594,27 +640,32 @@ def setupSysPath():
         lldbMiExec = lldbtest_config.lldbExec + "-mi"
     if not lldbMiExec:
         if not configuration.shouldSkipBecauseOfCategories(["lldb-mi"]):
-            print("The 'lldb-mi' executable cannot be located.  The lldb-mi tests can not be run as a result.")
+            print(
+                "The 'lldb-mi' executable cannot be located.  The lldb-mi tests can not be run as a result.")
             configuration.skipCategories.append("lldb-mi")
     else:
         os.environ["LLDBMI_EXEC"] = lldbMiExec
 
-    lldbPythonDir = None # The directory that contains 'lldb/__init__.py'
+    lldbPythonDir = None  # The directory that contains 'lldb/__init__.py'
     if configuration.lldbFrameworkPath:
-        candidatePath = os.path.join(configuration.lldbFrameworkPath, 'Resources', 'Python')
+        candidatePath = os.path.join(
+            configuration.lldbFrameworkPath, 'Resources', 'Python')
         if os.path.isfile(os.path.join(candidatePath, 'lldb/__init__.py')):
             lldbPythonDir = candidatePath
         if not lldbPythonDir:
-            print('Resources/Python/lldb/__init__.py was not found in ' + configuration.lldbFrameworkPath)
+            print(
+                'Resources/Python/lldb/__init__.py was not found in ' +
+                configuration.lldbFrameworkPath)
             sys.exit(-1)
     else:
         # If our lldb supports the -P option, use it to find the python path:
         init_in_python_dir = os.path.join('lldb', '__init__.py')
 
-        lldb_dash_p_result = subprocess.check_output([lldbtest_config.lldbExec, "-P"], stderr=subprocess.STDOUT, universal_newlines=True)
+        lldb_dash_p_result = subprocess.check_output(
+            [lldbtest_config.lldbExec, "-P"], stderr=subprocess.STDOUT, universal_newlines=True)
 
-        if lldb_dash_p_result and not lldb_dash_p_result.startswith(("<", "lldb: invalid option:")) \
-							  and not lldb_dash_p_result.startswith("Traceback"):
+        if lldb_dash_p_result and not lldb_dash_p_result.startswith(
+                ("<", "lldb: invalid option:")) and not lldb_dash_p_result.startswith("Traceback"):
             lines = lldb_dash_p_result.splitlines()
 
             # Workaround for readline vs libedit issue on FreeBSD.  If stdout
@@ -625,55 +676,73 @@ def setupSysPath():
             # because cpython commit f0ab6f9f0603 added a #ifndef __APPLE__
             # around the call.  See http://bugs.python.org/issue19884 for more
             # information.  For now we just discard the warning output.
-            if len(lines) >= 1 and lines[0].startswith("bind: Invalid command"):
+            if len(lines) >= 1 and lines[0].startswith(
+                    "bind: Invalid command"):
                 lines.pop(0)
 
             # Taking the last line because lldb outputs
             # 'Cannot read termcap database;\nusing dumb terminal settings.\n'
             # before the path
-            if len(lines) >= 1 and os.path.isfile(os.path.join(lines[-1], init_in_python_dir)):
+            if len(lines) >= 1 and os.path.isfile(
+                    os.path.join(lines[-1], init_in_python_dir)):
                 lldbPythonDir = lines[-1]
                 if "freebsd" in sys.platform or "linux" in sys.platform:
-                    os.environ['LLDB_LIB_DIR'] = os.path.join(lldbPythonDir, '..', '..')
-        
+                    os.environ['LLDB_LIB_DIR'] = os.path.join(
+                        lldbPythonDir, '..', '..')
+
         if not lldbPythonDir:
             if platform.system() == "Darwin":
                 python_resource_dir = ['LLDB.framework', 'Resources', 'Python']
                 outputPaths = getXcodeOutputPaths(lldbRootDirectory)
                 for outputPath in outputPaths:
-                    candidatePath = os.path.join(outputPath, *python_resource_dir)
-                    if os.path.isfile(os.path.join(candidatePath, init_in_python_dir)):
+                    candidatePath = os.path.join(
+                        outputPath, *python_resource_dir)
+                    if os.path.isfile(
+                        os.path.join(
+                            candidatePath,
+                            init_in_python_dir)):
                         lldbPythonDir = candidatePath
                         break
 
                 if not lldbPythonDir:
                     print("lldb.py is not found, some tests may fail.")
             else:
-                print("Unable to load lldb extension module.  Possible reasons for this include:")
+                print(
+                    "Unable to load lldb extension module.  Possible reasons for this include:")
                 print("  1) LLDB was built with LLDB_DISABLE_PYTHON=1")
-                print("  2) PYTHONPATH and PYTHONHOME are not set correctly.  PYTHONHOME should refer to")
-                print("     the version of Python that LLDB built and linked against, and PYTHONPATH")
-                print("     should contain the Lib directory for the same python distro, as well as the")
+                print(
+                    "  2) PYTHONPATH and PYTHONHOME are not set correctly.  PYTHONHOME should refer to")
+                print(
+                    "     the version of Python that LLDB built and linked against, and PYTHONPATH")
+                print(
+                    "     should contain the Lib directory for the same python distro, as well as the")
                 print("     location of LLDB\'s site-packages folder.")
-                print("  3) A different version of Python than that which was built against is exported in")
+                print(
+                    "  3) A different version of Python than that which was built against is exported in")
                 print("     the system\'s PATH environment variable, causing conflicts.")
-                print("  4) The executable '%s' could not be found.  Please check " % lldbtest_config.lldbExec)
+                print(
+                    "  4) The executable '%s' could not be found.  Please check " %
+                    lldbtest_config.lldbExec)
                 print("     that it exists and is executable.")
 
     if lldbPythonDir:
         lldbPythonDir = os.path.normpath(lldbPythonDir)
-        # Some of the code that uses this path assumes it hasn't resolved the Versions... link.  
-        # If the path we've constructed looks like that, then we'll strip out the Versions/A part.
-        (before, frameWithVersion, after) = lldbPythonDir.rpartition("LLDB.framework/Versions/A")
-        if frameWithVersion != "" :
+        # Some of the code that uses this path assumes it hasn't resolved the Versions... link.
+        # If the path we've constructed looks like that, then we'll strip out
+        # the Versions/A part.
+        (before, frameWithVersion, after) = lldbPythonDir.rpartition(
+            "LLDB.framework/Versions/A")
+        if frameWithVersion != "":
             lldbPythonDir = before + "LLDB.framework" + after
 
         lldbPythonDir = os.path.abspath(lldbPythonDir)
 
         # If tests need to find LLDB_FRAMEWORK, now they can do it
-        os.environ["LLDB_FRAMEWORK"] = os.path.dirname(os.path.dirname(lldbPythonDir))
+        os.environ["LLDB_FRAMEWORK"] = os.path.dirname(
+            os.path.dirname(lldbPythonDir))
 
-        # This is to locate the lldb.py module.  Insert it right after sys.path[0].
+        # This is to locate the lldb.py module.  Insert it right after
+        # sys.path[0].
         sys.path[1:1] = [lldbPythonDir]
 
 
@@ -713,7 +782,8 @@ def visit_file(dir, name):
         if filtered:
             # print("adding filter spec %s to module %s" % (filterspec, module))
             configuration.suite.addTests(
-                unittest2.defaultTestLoader.loadTestsFromName(filterspec, module))
+                unittest2.defaultTestLoader.loadTestsFromName(
+                    filterspec, module))
             continue
 
     # Forgo this module if the (base, filterspec) combo is invalid
@@ -724,7 +794,8 @@ def visit_file(dir, name):
         # Add the entire file's worth of tests since we're not filtered.
         # Also the fail-over case when the filterspec branch
         # (base, filterspec) combo doesn't make sense.
-        configuration.suite.addTests(unittest2.defaultTestLoader.loadTestsFromName(base))
+        configuration.suite.addTests(
+            unittest2.defaultTestLoader.loadTestsFromName(base))
 
 
 def visit(prefix, dir, names):
@@ -774,10 +845,14 @@ def disabledynamics():
     import lldb
     ci = lldb.DBG.GetCommandInterpreter()
     res = lldb.SBCommandReturnObject()
-    ci.HandleCommand("setting set target.prefer-dynamic-value no-dynamic-values", res, False)    
+    ci.HandleCommand(
+        "setting set target.prefer-dynamic-value no-dynamic-values",
+        res,
+        False)
     if not res.Succeeded():
         raise Exception('disabling dynamic type support failed')
 
+
 def lldbLoggings():
     import lldb
     """Check and do lldb loggings if necessary."""
@@ -793,7 +868,10 @@ def lldbLoggings():
         else:
             lldb_log_option = "event process expr state api"
         ci.HandleCommand(
-            "log enable -n -f " + os.environ["LLDB_LOG"] + " lldb " + lldb_log_option,
+            "log enable -n -f " +
+            os.environ["LLDB_LOG"] +
+            " lldb " +
+            lldb_log_option,
             res)
         if not res.Succeeded():
             raise Exception('log enable failed (check LLDB_LOG env variable)')
@@ -805,11 +883,15 @@ def lldbLoggings():
         else:
             lldb_log_option = "event process expr state api"
         ci.HandleCommand(
-            "log enable -n -f " + os.environ["LLDB_LINUX_LOG"] + " linux " + lldb_log_option,
+            "log enable -n -f " +
+            os.environ["LLDB_LINUX_LOG"] +
+            " linux " +
+            lldb_log_option,
             res)
         if not res.Succeeded():
-            raise Exception('log enable failed (check LLDB_LINUX_LOG env variable)')
- 
+            raise Exception(
+                'log enable failed (check LLDB_LINUX_LOG env variable)')
+
     # Ditto for gdb-remote logging if ${GDB_REMOTE_LOG} environment variable is defined.
     # Use ${GDB_REMOTE_LOG} to specify the log file.
     if ("GDB_REMOTE_LOG" in os.environ):
@@ -822,7 +904,9 @@ def lldbLoggings():
             + gdb_remote_log_option,
             res)
         if not res.Succeeded():
-            raise Exception('log enable failed (check GDB_REMOTE_LOG env variable)')
+            raise Exception(
+                'log enable failed (check GDB_REMOTE_LOG env variable)')
+
 
 def getMyCommandLine():
     return ' '.join(sys.argv)
@@ -833,18 +917,24 @@ def getMyCommandLine():
 #                                          #
 # ======================================== #
 
+
 def checkDsymForUUIDIsNotOn():
     cmd = ["defaults", "read", "com.apple.DebugSymbols"]
-    pipe = subprocess.Popen(cmd, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
+    pipe = subprocess.Popen(
+        cmd,
+        stdout=subprocess.PIPE,
+        stderr=subprocess.STDOUT)
     cmd_output = pipe.stdout.read()
     if cmd_output and "DBGFileMappedPaths = " in cmd_output:
         print("%s =>" % ' '.join(cmd))
         print(cmd_output)
-        print("Disable automatic lookup and caching of dSYMs before running the test suite!")
+        print(
+            "Disable automatic lookup and caching of dSYMs before running the test suite!")
         print("Exiting...")
         sys.exit(0)
 
-def exitTestSuite(exitCode = None):
+
+def exitTestSuite(exitCode=None):
     import lldb
     lldb.SBDebugger.Terminate()
     if exitCode:
@@ -856,7 +946,9 @@ def isMultiprocessTestRunner():
     # the inferior (as specified by the multiprocess test
     # runner) OR we've been told to skip using the multiprocess
     # test runner
-    return not (configuration.is_inferior_test_runner or configuration.no_multiprocess_test_runner)
+    return not (
+        configuration.is_inferior_test_runner or configuration.no_multiprocess_test_runner)
+
 
 def getVersionForSDK(sdk):
     sdk = str.lower(sdk)
@@ -867,19 +959,24 @@ def getVersionForSDK(sdk):
     ver = basename.replace(sdk, '')
     return ver
 
+
 def getPathForSDK(sdk):
     sdk = str.lower(sdk)
     full_path = seven.get_command_output('xcrun -sdk %s --show-sdk-path' % sdk)
-    if os.path.exists(full_path): return full_path
+    if os.path.exists(full_path):
+        return full_path
     return None
 
+
 def setDefaultTripleForPlatform():
     if configuration.lldb_platform_name == 'ios-simulator':
-        triple_str = 'x86_64-apple-ios%s' % (getVersionForSDK('iphonesimulator'))
+        triple_str = 'x86_64-apple-ios%s' % (
+            getVersionForSDK('iphonesimulator'))
         os.environ['TRIPLE'] = triple_str
-        return {'TRIPLE':triple_str}
+        return {'TRIPLE': triple_str}
     return {}
 
+
 def run_suite():
     # On MacOS X, check to make sure that domain for com.apple.DebugSymbols defaults
     # does not exist before proceeding to running the test suite.
@@ -900,8 +997,11 @@ def run_suite():
     # multiprocess test runner here.
     if isMultiprocessTestRunner():
         from . import dosep
-        dosep.main(configuration.num_threads, configuration.multiprocess_test_subdir,
-                   configuration.test_runner_name, configuration.results_formatter_object)
+        dosep.main(
+            configuration.num_threads,
+            configuration.multiprocess_test_subdir,
+            configuration.test_runner_name,
+            configuration.results_formatter_object)
         raise Exception("should never get here")
     elif configuration.is_inferior_test_runner:
         # Shut off Ctrl-C processing in inferiors.  The parallel
@@ -924,20 +1024,29 @@ def run_suite():
     lldb.DBG = lldb.SBDebugger.Create()
 
     if configuration.lldb_platform_name:
-        print("Setting up remote platform '%s'" % (configuration.lldb_platform_name))
-        lldb.remote_platform = lldb.SBPlatform(configuration.lldb_platform_name)
+        print("Setting up remote platform '%s'" %
+              (configuration.lldb_platform_name))
+        lldb.remote_platform = lldb.SBPlatform(
+            configuration.lldb_platform_name)
         if not lldb.remote_platform.IsValid():
-            print("error: unable to create the LLDB platform named '%s'." % (configuration.lldb_platform_name))
+            print(
+                "error: unable to create the LLDB platform named '%s'." %
+                (configuration.lldb_platform_name))
             exitTestSuite(1)
         if configuration.lldb_platform_url:
-            # We must connect to a remote platform if a LLDB platform URL was specified
-            print("Connecting to remote platform '%s' at '%s'..." % (configuration.lldb_platform_name, configuration.lldb_platform_url))
-            platform_connect_options = lldb.SBPlatformConnectOptions(configuration.lldb_platform_url)
+            # We must connect to a remote platform if a LLDB platform URL was
+            # specified
+            print(
+                "Connecting to remote platform '%s' at '%s'..." %
+                (configuration.lldb_platform_name, configuration.lldb_platform_url))
+            platform_connect_options = lldb.SBPlatformConnectOptions(
+                configuration.lldb_platform_url)
             err = lldb.remote_platform.ConnectRemote(platform_connect_options)
             if err.Success():
                 print("Connected.")
             else:
-                print("error: failed to connect to remote platform using URL '%s': %s" % (configuration.lldb_platform_url, err))
+                print("error: failed to connect to remote platform using URL '%s': %s" % (
+                    configuration.lldb_platform_url, err))
                 exitTestSuite(1)
         else:
             configuration.lldb_platform_url = None
@@ -948,11 +1057,13 @@ def run_suite():
         if first:
             print("Environment variables setup for platform support:")
             first = False
-        print("%s = %s" % (key,platform_changes[key]))
+        print("%s = %s" % (key, platform_changes[key]))
 
     if configuration.lldb_platform_working_dir:
-        print("Setting remote platform working directory to '%s'..." % (configuration.lldb_platform_working_dir))
-        lldb.remote_platform.SetWorkingDirectory(configuration.lldb_platform_working_dir)
+        print("Setting remote platform working directory to '%s'..." %
+              (configuration.lldb_platform_working_dir))
+        lldb.remote_platform.SetWorkingDirectory(
+            configuration.lldb_platform_working_dir)
         lldb.DBG.SetSelectedPlatform(lldb.remote_platform)
     else:
         lldb.remote_platform = None
@@ -998,10 +1109,13 @@ def run_suite():
     timestamp_started = datetime.datetime.now().strftime("%Y-%m-%d-%H_%M_%S")
     if not configuration.sdir_name:
         configuration.sdir_name = timestamp_started
-    os.environ["LLDB_SESSION_DIRNAME"] = os.path.join(os.getcwd(), configuration.sdir_name)
+    os.environ["LLDB_SESSION_DIRNAME"] = os.path.join(
+        os.getcwd(), configuration.sdir_name)
 
-    sys.stderr.write("\nSession logs for test failures/errors/unexpected successes"
-                        " will go into directory '%s'\n" % configuration.sdir_name)
+    sys.stderr.write(
+        "\nSession logs for test failures/errors/unexpected successes"
+        " will go into directory '%s'\n" %
+        configuration.sdir_name)
     sys.stderr.write("Command invoked: %s\n" % getMyCommandLine())
 
     if not os.path.isdir(configuration.sdir_name):
@@ -1024,14 +1138,16 @@ def run_suite():
 
     #
     # Add some intervention here to sanity check that the compilers requested are sane.
-    # If found not to be an executable program, the invalid one is dropped from the list.
+    # If found not to be an executable program, the invalid one is dropped
+    # from the list.
     for i in range(len(configuration.compilers)):
         c = configuration.compilers[i]
         if which(c):
             continue
         else:
             if sys.platform.startswith("darwin"):
-                pipe = subprocess.Popen(['xcrun', '-find', c], stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
+                pipe = subprocess.Popen(
+                    ['xcrun', '-find', c], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
                 cmd_output = pipe.stdout.read()
                 if cmd_output:
                     if "not found" in cmd_output:
@@ -1039,7 +1155,9 @@ def run_suite():
                         configuration.compilers.remove(i)
                     else:
                         configuration.compilers[i] = cmd_output.split('\n')[0]
-                        print("'xcrun -find %s' returning %s" % (c, configuration.compilers[i]))
+                        print(
+                            "'xcrun -find %s' returning %s" %
+                            (c, configuration.compilers[i]))
 
     if not configuration.parsable:
         print("compilers=%s" % str(configuration.compilers))
@@ -1048,10 +1166,14 @@ def run_suite():
         print("No eligible compiler found, exiting.")
         exitTestSuite(1)
 
-    if isinstance(configuration.compilers, list) and len(configuration.compilers) >= 1:
+    if isinstance(
+        configuration.compilers,
+        list) and len(
+            configuration.compilers) >= 1:
         iterCompilers = True
 
-    # If we iterate on archs or compilers, there is a chance we want to split stderr/stdout.
+    # If we iterate on archs or compilers, there is a chance we want to split
+    # stderr/stdout.
     if iterArchs or iterCompilers:
         old_stderr = sys.stderr
         old_stdout = sys.stdout
@@ -1067,7 +1189,8 @@ def run_suite():
         for ic in range(len(configuration.compilers) if iterCompilers else 1):
             if iterCompilers:
                 os.environ["CC"] = configuration.compilers[ic]
-                configString = "%s compiler=%s" % (archConfig, configuration.compilers[ic])
+                configString = "%s compiler=%s" % (
+                    archConfig, configuration.compilers[ic])
             else:
                 configString = archConfig
 
@@ -1090,9 +1213,10 @@ def run_suite():
             # First, write out the number of collected test cases.
             if not configuration.parsable:
                 sys.stderr.write(configuration.separator + "\n")
-                sys.stderr.write("Collected %d test%s\n\n"
-                                 % (configuration.suite.countTestCases(),
-                                    configuration.suite.countTestCases() != 1 and "s" or ""))
+                sys.stderr.write(
+                    "Collected %d test%s\n\n" %
+                    (configuration.suite.countTestCases(),
+                     configuration.suite.countTestCases() != 1 and "s" or ""))
 
             if configuration.parsable:
                 v = 0
@@ -1101,30 +1225,39 @@ def run_suite():
 
             # Invoke the test runner.
             if configuration.count == 1:
-                result = unittest2.TextTestRunner(stream=sys.stderr,
-                                                  verbosity=v,
-                                                  resultclass=test_result.LLDBTestResult).run(configuration.suite)
+                result = unittest2.TextTestRunner(
+                    stream=sys.stderr,
+                    verbosity=v,
+                    resultclass=test_result.LLDBTestResult).run(
+                    configuration.suite)
             else:
                 # We are invoking the same test suite more than once.  In this case,
                 # mark __ignore_singleton__ flag as True so the signleton pattern is
                 # not enforced.
                 test_result.LLDBTestResult.__ignore_singleton__ = True
                 for i in range(configuration.count):
-               
-                    result = unittest2.TextTestRunner(stream=sys.stderr,
-                                                      verbosity=v,
-                                                      resultclass=test_result.LLDBTestResult).run(configuration.suite)
+
+                    result = unittest2.TextTestRunner(
+                        stream=sys.stderr,
+                        verbosity=v,
+                        resultclass=test_result.LLDBTestResult).run(
+                        configuration.suite)
 
             configuration.failed = configuration.failed or not result.wasSuccessful()
 
     if configuration.sdir_has_content and not configuration.parsable:
-        sys.stderr.write("Session logs for test failures/errors/unexpected successes"
-                         " can be found in directory '%s'\n" % configuration.sdir_name)
+        sys.stderr.write(
+            "Session logs for test failures/errors/unexpected successes"
+            " can be found in directory '%s'\n" %
+            configuration.sdir_name)
 
-    if configuration.useCategories and len(configuration.failuresPerCategory) > 0:
+    if configuration.useCategories and len(
+            configuration.failuresPerCategory) > 0:
         sys.stderr.write("Failures per category:\n")
         for category in configuration.failuresPerCategory:
-            sys.stderr.write("%s - %d\n" % (category, configuration.failuresPerCategory[category]))
+            sys.stderr.write(
+                "%s - %d\n" %
+                (category, configuration.failuresPerCategory[category]))
 
     # Terminate the test suite if ${LLDB_TESTSUITE_FORCE_FINISH} is defined.
     # This should not be necessary now.
@@ -1136,5 +1269,7 @@ def run_suite():
     exitTestSuite(configuration.failed)
 
 if __name__ == "__main__":
-    print(__file__ + " is for use as a module only.  It should not be run as a standalone script.")
+    print(
+        __file__ +
+        " is for use as a module only.  It should not be run as a standalone script.")
     sys.exit(-1)

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py Tue Sep  6 15:57:50 2016
@@ -13,9 +13,11 @@ import textwrap
 # LLDB modules
 from . import configuration
 
+
 class ArgParseNamespace(object):
     pass
 
+
 def parse_args(parser, argv):
     """ Returns an argument object. LLDB_TEST_ARGUMENTS environment variable can
         be used to pass additional arguments.
@@ -23,8 +25,11 @@ def parse_args(parser, argv):
     args = ArgParseNamespace()
 
     if ('LLDB_TEST_ARGUMENTS' in os.environ):
-        print("Arguments passed through environment: '%s'" % os.environ['LLDB_TEST_ARGUMENTS'])
-        args = parser.parse_args([sys.argv[0]].__add__(os.environ['LLDB_TEST_ARGUMENTS'].split()),namespace=args)
+        print(
+            "Arguments passed through environment: '%s'" %
+            os.environ['LLDB_TEST_ARGUMENTS'])
+        args = parser.parse_args([sys.argv[0]].__add__(
+            os.environ['LLDB_TEST_ARGUMENTS'].split()), namespace=args)
 
     return parser.parse_args(args=argv, namespace=args)
 
@@ -39,59 +44,152 @@ def default_thread_count():
 
 
 def create_parser():
-    parser = argparse.ArgumentParser(description='description', prefix_chars='+-', add_help=False)
+    parser = argparse.ArgumentParser(
+        description='description',
+        prefix_chars='+-',
+        add_help=False)
     group = None
 
-    # Helper function for boolean options (group will point to the current group when executing X)
-    X = lambda optstr, helpstr, **kwargs: group.add_argument(optstr, help=helpstr, action='store_true', **kwargs)
+    # Helper function for boolean options (group will point to the current
+    # group when executing X)
+    X = lambda optstr, helpstr, **kwargs: group.add_argument(
+        optstr, help=helpstr, action='store_true', **kwargs)
 
     group = parser.add_argument_group('Help')
-    group.add_argument('-h', '--help', dest='h', action='store_true', help="Print this help message and exit.  Add '-v' for more detailed help.")
+    group.add_argument(
+        '-h',
+        '--help',
+        dest='h',
+        action='store_true',
+        help="Print this help message and exit.  Add '-v' for more detailed help.")
 
     # C and Python toolchain options
     group = parser.add_argument_group('Toolchain options')
-    group.add_argument('-A', '--arch', metavar='arch', action='append', dest='archs', help=textwrap.dedent('''Specify the architecture(s) to test. This option can be specified more than once'''))
-    group.add_argument('-C', '--compiler', metavar='compiler', dest='compilers', action='append', help=textwrap.dedent('''Specify the compiler(s) used to build the inferior executables. The compiler path can be an executable basename or a full path to a compiler executable. This option can be specified multiple times.'''))
+    group.add_argument(
+        '-A',
+        '--arch',
+        metavar='arch',
+        action='append',
+        dest='archs',
+        help=textwrap.dedent('''Specify the architecture(s) to test. This option can be specified more than once'''))
+    group.add_argument('-C', '--compiler', metavar='compiler', dest='compilers', action='append', help=textwrap.dedent(
+        '''Specify the compiler(s) used to build the inferior executables. The compiler path can be an executable basename or a full path to a compiler executable. This option can be specified multiple times.'''))
     if sys.platform == 'darwin':
-        group.add_argument('--apple-sdk', metavar='apple_sdk', dest='apple_sdk', help=textwrap.dedent('''Specify the name of the Apple SDK (macosx, macosx.internal, iphoneos, iphoneos.internal, or path to SDK) and use the appropriate tools from that SDK's toolchain.'''))
+        group.add_argument('--apple-sdk', metavar='apple_sdk', dest='apple_sdk', help=textwrap.dedent(
+            '''Specify the name of the Apple SDK (macosx, macosx.internal, iphoneos, iphoneos.internal, or path to SDK) and use the appropriate tools from that SDK's toolchain.'''))
     # FIXME? This won't work for different extra flags according to each arch.
-    group.add_argument('-E', metavar='extra-flags', help=textwrap.dedent('''Specify the extra flags to be passed to the toolchain when building the inferior programs to be debugged
+    group.add_argument(
+        '-E',
+        metavar='extra-flags',
+        help=textwrap.dedent('''Specify the extra flags to be passed to the toolchain when building the inferior programs to be debugged
                                                            suggestions: do not lump the "-A arch1 -A arch2" together such that the -E option applies to only one of the architectures'''))
 
     # Test filtering options
     group = parser.add_argument_group('Test filtering options')
-    group.add_argument('-f', metavar='filterspec', action='append', help='Specify a filter, which consists of the test class name, a dot, followed by the test method, to only admit such test into the test suite')  # FIXME: Example?
+    group.add_argument(
+        '-f',
+        metavar='filterspec',
+        action='append',
+        help='Specify a filter, which consists of the test class name, a dot, followed by the test method, to only admit such test into the test suite')  # FIXME: Example?
     X('-l', "Don't skip long running tests")
-    group.add_argument('-p', metavar='pattern', help='Specify a regexp filename pattern for inclusion in the test suite')
-    group.add_argument('-G', '--category', metavar='category', action='append', dest='categoriesList', help=textwrap.dedent('''Specify categories of test cases of interest. Can be specified more than once.'''))
-    group.add_argument('--skip-category', metavar='category', action='append', dest='skipCategories', help=textwrap.dedent('''Specify categories of test cases to skip. Takes precedence over -G. Can be specified more than once.'''))
+    group.add_argument(
+        '-p',
+        metavar='pattern',
+        help='Specify a regexp filename pattern for inclusion in the test suite')
+    group.add_argument(
+        '-G',
+        '--category',
+        metavar='category',
+        action='append',
+        dest='categoriesList',
+        help=textwrap.dedent('''Specify categories of test cases of interest. Can be specified more than once.'''))
+    group.add_argument(
+        '--skip-category',
+        metavar='category',
+        action='append',
+        dest='skipCategories',
+        help=textwrap.dedent('''Specify categories of test cases to skip. Takes precedence over -G. Can be specified more than once.'''))
 
     # Configuration options
     group = parser.add_argument_group('Configuration options')
-    group.add_argument('--framework', metavar='framework-path', help='The path to LLDB.framework')
-    group.add_argument('--executable', metavar='executable-path', help='The path to the lldb executable')
-    group.add_argument('-s', metavar='name', help='Specify the name of the dir created to store the session files of tests with errored or failed status. If not specified, the test driver uses the timestamp as the session dir name')
-    group.add_argument('-S', '--session-file-format', default=configuration.session_file_format, metavar='format', help='Specify session file name format.  See configuration.py for a description.')
-    group.add_argument('-y', type=int, metavar='count', help="Specify the iteration count used to collect our benchmarks. An example is the number of times to do 'thread step-over' to measure stepping speed.")
-    group.add_argument('-#', type=int, metavar='sharp', dest='sharp', help='Repeat the test suite for a specified number of times')
-    group.add_argument('--channel', metavar='channel', dest='channels', action='append', help=textwrap.dedent("Specify the log channels (and optional categories) e.g. 'lldb all' or 'gdb-remote packets' if no categories are specified, 'default' is used"))
-    group.add_argument('--log-success', dest='log_success', action='store_true', help="Leave logs/traces even for successful test runs (useful for creating reference log files during debugging.)")
+    group.add_argument(
+        '--framework',
+        metavar='framework-path',
+        help='The path to LLDB.framework')
+    group.add_argument(
+        '--executable',
+        metavar='executable-path',
+        help='The path to the lldb executable')
+    group.add_argument(
+        '-s',
+        metavar='name',
+        help='Specify the name of the dir created to store the session files of tests with errored or failed status. If not specified, the test driver uses the timestamp as the session dir name')
+    group.add_argument(
+        '-S',
+        '--session-file-format',
+        default=configuration.session_file_format,
+        metavar='format',
+        help='Specify session file name format.  See configuration.py for a description.')
+    group.add_argument(
+        '-y',
+        type=int,
+        metavar='count',
+        help="Specify the iteration count used to collect our benchmarks. An example is the number of times to do 'thread step-over' to measure stepping speed.")
+    group.add_argument(
+        '-#',
+        type=int,
+        metavar='sharp',
+        dest='sharp',
+        help='Repeat the test suite for a specified number of times')
+    group.add_argument('--channel', metavar='channel', dest='channels', action='append', help=textwrap.dedent(
+        "Specify the log channels (and optional categories) e.g. 'lldb all' or 'gdb-remote packets' if no categories are specified, 'default' is used"))
+    group.add_argument(
+        '--log-success',
+        dest='log_success',
+        action='store_true',
+        help="Leave logs/traces even for successful test runs (useful for creating reference log files during debugging.)")
 
     # Configuration options
     group = parser.add_argument_group('Remote platform options')
-    group.add_argument('--platform-name', dest='lldb_platform_name', metavar='platform-name', help='The name of a remote platform to use')
-    group.add_argument('--platform-url', dest='lldb_platform_url', metavar='platform-url', help='A LLDB platform URL to use when connecting to a remote platform to run the test suite')
-    group.add_argument('--platform-working-dir', dest='lldb_platform_working_dir', metavar='platform-working-dir', help='The directory to use on the remote platform.')
+    group.add_argument(
+        '--platform-name',
+        dest='lldb_platform_name',
+        metavar='platform-name',
+        help='The name of a remote platform to use')
+    group.add_argument(
+        '--platform-url',
+        dest='lldb_platform_url',
+        metavar='platform-url',
+        help='A LLDB platform URL to use when connecting to a remote platform to run the test suite')
+    group.add_argument(
+        '--platform-working-dir',
+        dest='lldb_platform_working_dir',
+        metavar='platform-working-dir',
+        help='The directory to use on the remote platform.')
 
     # Test-suite behaviour
     group = parser.add_argument_group('Runtime behaviour options')
     X('-d', 'Suspend the process after launch to wait indefinitely for a debugger to attach')
     X('-q', "Don't print extra output from this script.")
     X('-t', 'Turn on tracing of lldb command and other detailed test executions')
-    group.add_argument('-u', dest='unset_env_varnames', metavar='variable', action='append', help='Specify an environment variable to unset before running the test cases. e.g., -u DYLD_INSERT_LIBRARIES -u MallocScribble')
-    group.add_argument('--env', dest='set_env_vars', metavar='variable', action='append', help='Specify an environment variable to set to the given value before running the test cases e.g.: --env CXXFLAGS=-O3 --env DYLD_INSERT_LIBRARIES')
+    group.add_argument(
+        '-u',
+        dest='unset_env_varnames',
+        metavar='variable',
+        action='append',
+        help='Specify an environment variable to unset before running the test cases. e.g., -u DYLD_INSERT_LIBRARIES -u MallocScribble')
+    group.add_argument(
+        '--env',
+        dest='set_env_vars',
+        metavar='variable',
+        action='append',
+        help='Specify an environment variable to set to the given value before running the test cases e.g.: --env CXXFLAGS=-O3 --env DYLD_INSERT_LIBRARIES')
     X('-v', 'Do verbose mode of unittest framework (print out each test case invocation)')
-    group.add_argument('--enable-crash-dialog', dest='disable_crash_dialog', action='store_false', help='(Windows only) When LLDB crashes, display the Windows crash dialog.')
+    group.add_argument(
+        '--enable-crash-dialog',
+        dest='disable_crash_dialog',
+        action='store_false',
+        help='(Windows only) When LLDB crashes, display the Windows crash dialog.')
     group.set_defaults(disable_crash_dialog=True)
 
     group = parser.add_argument_group('Parallel execution options')
@@ -185,6 +283,10 @@ def create_parser():
     del X
 
     group = parser.add_argument_group('Test directories')
-    group.add_argument('args', metavar='test-dir', nargs='*', help='Specify a list of directory names to search for test modules named after Test*.py (test discovery). If empty, search from the current working directory instead.')
+    group.add_argument(
+        'args',
+        metavar='test-dir',
+        nargs='*',
+        help='Specify a list of directory names to search for test modules named after Test*.py (test discovery). If empty, search from the current working directory instead.')
 
     return parser

Modified: lldb/trunk/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test that the lldb driver's batch mode w
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class DriverBatchModeTest (TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -23,21 +24,23 @@ class DriverBatchModeTest (TestBase):
         self.source = 'main.c'
         self.victim = None
 
-    def expect_string (self, string):
+    def expect_string(self, string):
         import pexpect
         """This expects for "string", with timeout & EOF being test fails."""
         try:
             self.child.expect_exact(string)
         except pexpect.EOF:
-            self.fail ("Got EOF waiting for '%s'"%(string))
+            self.fail("Got EOF waiting for '%s'" % (string))
         except pexpect.TIMEOUT:
-            self.fail ("Timed out waiting for '%s'"%(string))
+            self.fail("Timed out waiting for '%s'" % (string))
 
-    @skipIfRemote # test not remote-ready llvm.org/pr24813
+    @skipIfRemote  # test not remote-ready llvm.org/pr24813
     @expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
     @expectedFlakeyLinux("llvm.org/pr25172")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
-    def test_batch_mode_run_crash (self):
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+    def test_batch_mode_run_crash(self):
         """Test that the lldb driver's batch mode works correctly."""
         self.build()
         self.setTearDownCleanup()
@@ -48,33 +51,36 @@ class DriverBatchModeTest (TestBase):
 
         # Pass CRASH so the process will crash and stop in batch mode.
         run_commands = ' -b -o "break set -n main" -o "run" -o "continue" -k "frame var touch_me_not"'
-        self.child = pexpect.spawn('%s %s %s %s -- CRASH' % (lldbtest_config.lldbExec, self.lldbOption, run_commands, exe))
+        self.child = pexpect.spawn(
+            '%s %s %s %s -- CRASH' %
+            (lldbtest_config.lldbExec, self.lldbOption, run_commands, exe))
         child = self.child
         # Turn on logging for what the child sends back.
         if self.TraceOn():
             child.logfile_read = sys.stdout
 
         # We should see the "run":
-        self.expect_string ("run")
+        self.expect_string("run")
         # We should have hit the breakpoint & continued:
-        self.expect_string ("continue")
+        self.expect_string("continue")
         # The App should have crashed:
         self.expect_string("About to crash")
         # The -k option should have printed the frame variable once:
-        self.expect_string ('(char *) touch_me_not')
+        self.expect_string('(char *) touch_me_not')
         # Then we should have a live prompt:
-        self.expect_string (prompt)
+        self.expect_string(prompt)
         self.child.sendline("frame variable touch_me_not")
-        self.expect_string ('(char *) touch_me_not')
-        
-        self.deletePexpectChild()
+        self.expect_string('(char *) touch_me_not')
 
+        self.deletePexpectChild()
 
-    @skipIfRemote # test not remote-ready llvm.org/pr24813
+    @skipIfRemote  # test not remote-ready llvm.org/pr24813
     @expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
     @expectedFlakeyLinux("llvm.org/pr25172")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
-    def test_batch_mode_run_exit (self):
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+    def test_batch_mode_run_exit(self):
         """Test that the lldb driver's batch mode works correctly."""
         self.build()
         self.setTearDownCleanup()
@@ -85,66 +91,78 @@ class DriverBatchModeTest (TestBase):
 
         # Now do it again, and make sure if we don't crash, we quit:
         run_commands = ' -b -o "break set -n main" -o "run" -o "continue" '
-        self.child = pexpect.spawn('%s %s %s %s -- NOCRASH' % (lldbtest_config.lldbExec, self.lldbOption, run_commands, exe))
+        self.child = pexpect.spawn(
+            '%s %s %s %s -- NOCRASH' %
+            (lldbtest_config.lldbExec, self.lldbOption, run_commands, exe))
         child = self.child
         # Turn on logging for what the child sends back.
         if self.TraceOn():
             child.logfile_read = sys.stdout
 
         # We should see the "run":
-        self.expect_string ("run")
+        self.expect_string("run")
         # We should have hit the breakpoint & continued:
-        self.expect_string ("continue")
+        self.expect_string("continue")
         # The App should have not have crashed:
         self.expect_string("Got there on time and it did not crash.")
         # Then we should have a live prompt:
-        self.expect_string ("exited")
+        self.expect_string("exited")
         index = self.child.expect([pexpect.EOF, pexpect.TIMEOUT])
-        self.assertTrue(index == 0, "lldb didn't close on successful batch completion.")
+        self.assertTrue(
+            index == 0,
+            "lldb didn't close on successful batch completion.")
 
     def closeVictim(self):
-        if self.victim != None:
+        if self.victim is not None:
             self.victim.close()
             self.victim = None
 
-    @skipIfRemote # test not remote-ready llvm.org/pr24813
+    @skipIfRemote  # test not remote-ready llvm.org/pr24813
     @expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
     @expectedFlakeyLinux("llvm.org/pr25172")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
-    def test_batch_mode_attach_exit (self):
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+    def test_batch_mode_attach_exit(self):
         """Test that the lldb driver's batch mode works correctly."""
         self.build()
         self.setTearDownCleanup()
- 
+
         import pexpect
         exe = os.path.join(os.getcwd(), "a.out")
         prompt = "(lldb) "
 
         # Finally, start up the process by hand, attach to it, and wait for its completion.
-        # Attach is funny, since it looks like it stops with a signal on most Unixen so 
+        # Attach is funny, since it looks like it stops with a signal on most Unixen so
         # care must be taken not to treat that as a reason to exit batch mode.
-        
+
         # Start up the process by hand and wait for it to get to the wait loop.
 
-        self.victim = pexpect.spawn('%s WAIT' %(exe))
-        if self.victim == None:
+        self.victim = pexpect.spawn('%s WAIT' % (exe))
+        if self.victim is None:
             self.fail("Could not spawn ", exe, ".")
 
-        self.addTearDownHook (self.closeVictim)
+        self.addTearDownHook(self.closeVictim)
 
         if self.TraceOn():
             self.victim.logfile_read = sys.stdout
 
         self.victim.expect("PID: ([0-9]+) END")
-        if self.victim.match == None:
+        if self.victim.match is None:
             self.fail("Couldn't get the target PID.")
 
         victim_pid = int(self.victim.match.group(1))
-        
+
         self.victim.expect("Waiting")
 
-        run_commands = ' -b -o "process attach -p %d" -o "breakpoint set --file %s -p \'Stop here to unset keep_waiting\' -N keep_waiting" -o "continue" -o "break delete keep_waiting" -o "expr keep_waiting = 0" -o "continue" ' % (victim_pid, self.source)
-        self.child = pexpect.spawn('%s %s %s %s' % (lldbtest_config.lldbExec, self.lldbOption, run_commands, exe))
+        run_commands = ' -b -o "process attach -p %d" -o "breakpoint set --file %s -p \'Stop here to unset keep_waiting\' -N keep_waiting" -o "continue" -o "break delete keep_waiting" -o "expr keep_waiting = 0" -o "continue" ' % (
+            victim_pid, self.source)
+        self.child = pexpect.spawn(
+            '%s %s %s %s' %
+            (lldbtest_config.lldbExec,
+             self.lldbOption,
+             run_commands,
+             exe))
 
         child = self.child
         # Turn on logging for what the child sends back.
@@ -152,19 +170,19 @@ class DriverBatchModeTest (TestBase):
             child.logfile_read = sys.stdout
 
         # We should see the "run":
-        self.expect_string ("attach")
+        self.expect_string("attach")
 
         self.expect_string(prompt + "continue")
 
         self.expect_string(prompt + "continue")
 
         # Then we should see the process exit:
-        self.expect_string ("Process %d exited with status"%(victim_pid))
-        
+        self.expect_string("Process %d exited with status" % (victim_pid))
+
         victim_index = self.victim.expect([pexpect.EOF, pexpect.TIMEOUT])
         self.assertTrue(victim_index == 0, "Victim didn't really exit.")
 
         index = self.child.expect([pexpect.EOF, pexpect.TIMEOUT])
-        self.assertTrue(index == 0, "lldb didn't close on successful batch completion.")
-
-        
+        self.assertTrue(
+            index == 0,
+            "lldb didn't close on successful batch completion.")

Modified: lldb/trunk/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py Tue Sep  6 15:57:50 2016
@@ -4,14 +4,15 @@ import random
 import unittest
 import traceback
 
+
 class SequenceFunctionsTestCase(unittest.TestCase):
 
     def setUp(self):
-        #traceback.print_stack()
+        # traceback.print_stack()
         self.seq = list(range(10))
 
     def tearDown(self):
-        #traceback.print_stack()
+        # traceback.print_stack()
         pass
 
     def test_shuffle(self):

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py Tue Sep  6 15:57:50 2016
@@ -24,7 +24,10 @@ class TestExprLookupAnonStructTypedef(Te
         self.line = line_number('main.cpp', '// lldb testsuite break')
 
     @expectedFailureAll(oslist=["windows"])
-    @expectedFailureAll(oslist=['linux'], archs=['arm'], bugnumber="llvm.org/pr27868")
+    @expectedFailureAll(
+        oslist=['linux'],
+        archs=['arm'],
+        bugnumber="llvm.org/pr27868")
     def test(self):
         """Test typedeffed untagged struct arguments for function call expressions"""
         self.build()

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStdStringFunction.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStdStringFunction.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStdStringFunction.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStdStringFunction.py Tue Sep  6 15:57:50 2016
@@ -5,12 +5,12 @@ Test calling std::String member function
 from __future__ import print_function
 
 
-
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ExprCommandCallFunctionTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -19,26 +19,33 @@ class ExprCommandCallFunctionTestCase(Te
         # Call super's setUp().
         TestBase.setUp(self)
         # Find the line number to break for main.c.
-        self.line = line_number('main.cpp',
-                                '// Please test these expressions while stopped at this line:')
-
-    @expectedFailureAll(compiler="icc", bugnumber="llvm.org/pr14437, fails with ICC 13.1")
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr17807 Fails on FreeBSD buildbot')
+        self.line = line_number(
+            'main.cpp',
+            '// Please test these expressions while stopped at this line:')
+
+    @expectedFailureAll(
+        compiler="icc",
+        bugnumber="llvm.org/pr14437, fails with ICC 13.1")
+    @expectedFailureAll(
+        oslist=['freebsd'],
+        bugnumber='llvm.org/pr17807 Fails on FreeBSD buildbot')
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
     def test_with(self):
         """Test calling std::String member function."""
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        # Some versions of GCC encode two locations for the 'return' statement in main.cpp
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
+        # Some versions of GCC encode two locations for the 'return' statement
+        # in main.cpp
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         self.expect("print str",
-            substrs = ['Hello world'])
+                    substrs=['Hello world'])
 
         # Calling this function now succeeds, but we follow the typedef return type through to
         # const char *, and thus don't invoke the Summary formatter.
         self.expect("print str.c_str()",
-            substrs = ['Hello world'])
+                    substrs=['Hello world'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py Tue Sep  6 15:57:50 2016
@@ -5,12 +5,12 @@ Test calling a function, stopping in the
 from __future__ import print_function
 
 
-
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ExprCommandCallStopContinueTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -19,28 +19,40 @@ class ExprCommandCallStopContinueTestCas
         # Call super's setUp().
         TestBase.setUp(self)
         # Find the line number to break for main.c.
-        self.line = line_number('main.cpp',
-                                '// Please test these expressions while stopped at this line:')
-        self.func_line = line_number ('main.cpp', '{5, "five"}')
+        self.line = line_number(
+            'main.cpp',
+            '// Please test these expressions while stopped at this line:')
+        self.func_line = line_number('main.cpp', '{5, "five"}')
 
     @expectedFlakeyDarwin("llvm.org/pr20274")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
     def test(self):
         """Test gathering result from interrupted function call."""
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        # Some versions of GCC encode two locations for the 'return' statement in main.cpp
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
+        # Some versions of GCC encode two locations for the 'return' statement
+        # in main.cpp
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.func_line, num_expected_locations=-1, loc_exact=True)
-        
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "main.cpp",
+            self.func_line,
+            num_expected_locations=-1,
+            loc_exact=True)
+
         self.expect("expr -i false -- returnsFive()", error=True,
-            substrs = ['Execution was interrupted, reason: breakpoint'])
+                    substrs=['Execution was interrupted, reason: breakpoint'])
 
         self.runCmd("continue", "Continue completed")
-        self.expect ("thread list",
-                     substrs = ['stop reason = User Expression thread plan',
-                                r'Completed expression: (Five) $0 = (number = 5, name = "five")'])
+        self.expect(
+            "thread list",
+            substrs=[
+                'stop reason = User Expression thread plan',
+                r'Completed expression: (Five) $0 = (number = 5, name = "five")'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallUserDefinedFunction.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallUserDefinedFunction.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallUserDefinedFunction.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallUserDefinedFunction.py Tue Sep  6 15:57:50 2016
@@ -10,12 +10,12 @@ Note:
 from __future__ import print_function
 
 
-
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ExprCommandCallUserDefinedFunction(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -24,30 +24,39 @@ class ExprCommandCallUserDefinedFunction
         # Call super's setUp().
         TestBase.setUp(self)
         # Find the line number to break for main.c.
-        self.line = line_number('main.cpp',
-                                '// Please test these expressions while stopped at this line:')
+        self.line = line_number(
+            'main.cpp',
+            '// Please test these expressions while stopped at this line:')
+
     @expectedFlakeyDsym("llvm.org/pr20274")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
     def test(self):
         """Test return values of user defined function calls."""
         self.build()
 
         # Set breakpoint in main and run exe
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # Test recursive function call.
-        self.expect("expr fib(5)", substrs = ['$0 = 5'])
+        self.expect("expr fib(5)", substrs=['$0 = 5'])
 
         # Test function with more than one paramter
-        self.expect("expr add(4,8)", substrs = ['$1 = 12'])
+        self.expect("expr add(4,8)", substrs=['$1 = 12'])
 
         # Test nesting function calls in function paramters
-        self.expect("expr add(add(5,2),add(3,4))", substrs = ['$2 = 14'])
-        self.expect("expr add(add(5,2),fib(5))", substrs = ['$3 = 12'])
+        self.expect("expr add(add(5,2),add(3,4))", substrs=['$2 = 14'])
+        self.expect("expr add(add(5,2),fib(5))", substrs=['$3 = 12'])
 
         # Test function with pointer paramter
-        self.expect("exp stringCompare((const char*) \"Hello world\")", substrs = ['$4 = true'])
-        self.expect("exp stringCompare((const char*) \"Hellworld\")", substrs = ['$5 = false'])
+        self.expect(
+            "exp stringCompare((const char*) \"Hello world\")",
+            substrs=['$4 = true'])
+        self.expect(
+            "exp stringCompare((const char*) \"Hellworld\")",
+            substrs=['$5 = false'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-restarts/TestCallThatRestarts.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-restarts/TestCallThatRestarts.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-restarts/TestCallThatRestarts.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-restarts/TestCallThatRestarts.py Tue Sep  6 15:57:50 2016
@@ -5,12 +5,12 @@ Test calling a function that hits a sign
 from __future__ import print_function
 
 
-
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ExprCommandThatRestartsTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -20,24 +20,30 @@ class ExprCommandThatRestartsTestCase(Te
         TestBase.setUp(self)
 
         self.main_source = "lotta-signals.c"
-        self.main_source_spec = lldb.SBFileSpec (self.main_source)
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
 
-    @skipIfFreeBSD # llvm.org/pr19246: intermittent failure
-    @skipIfDarwin # llvm.org/pr19246: intermittent failure
-    @skipIfWindows # Test relies on signals, unsupported on Windows
+    @skipIfFreeBSD  # llvm.org/pr19246: intermittent failure
+    @skipIfDarwin  # llvm.org/pr19246: intermittent failure
+    @skipIfWindows  # Test relies on signals, unsupported on Windows
     def test(self):
         """Test calling function that hits a signal and restarts."""
         self.build()
         self.call_function()
 
-    def check_after_call (self, num_sigchld):
+    def check_after_call(self, num_sigchld):
         after_call = self.sigchld_no.GetValueAsSigned(-1)
-        self.assertTrue (after_call - self.start_sigchld_no == num_sigchld, "Really got %d SIGCHLD signals through the call."%(num_sigchld))
+        self.assertTrue(
+            after_call -
+            self.start_sigchld_no == num_sigchld,
+            "Really got %d SIGCHLD signals through the call." %
+            (num_sigchld))
         self.start_sigchld_no = after_call
 
         # Check that we are back where we were before:
         frame = self.thread.GetFrameAtIndex(0)
-        self.assertTrue (self.orig_frame_pc == frame.GetPC(), "Restored the zeroth frame correctly")
+        self.assertTrue(
+            self.orig_frame_pc == frame.GetPC(),
+            "Restored the zeroth frame correctly")
 
     def call_function(self):
         exe_name = "a.out"
@@ -46,95 +52,133 @@ class ExprCommandThatRestartsTestCase(Te
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
         empty = lldb.SBFileSpec()
-        breakpoint = target.BreakpointCreateBySourceRegex('Stop here in main.',self.main_source_spec)
+        breakpoint = target.BreakpointCreateBySourceRegex(
+            'Stop here in main.', self.main_source_spec)
         self.assertTrue(breakpoint.GetNumLocations() > 0, VALID_BREAKPOINT)
 
         # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # Frame #0 should be at our breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint (process, breakpoint)
-        
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, breakpoint)
+
         self.assertTrue(len(threads) == 1)
         self.thread = threads[0]
-        
+
         # Make sure the SIGCHLD behavior is pass/no-stop/no-notify:
         return_obj = lldb.SBCommandReturnObject()
-        self.dbg.GetCommandInterpreter().HandleCommand("process handle SIGCHLD -s 0 -p 1 -n 0", return_obj)
-        self.assertTrue (return_obj.Succeeded() == True, "Set SIGCHLD to pass, no-stop")
+        self.dbg.GetCommandInterpreter().HandleCommand(
+            "process handle SIGCHLD -s 0 -p 1 -n 0", return_obj)
+        self.assertTrue(return_obj.Succeeded(), "Set SIGCHLD to pass, no-stop")
 
         # The sigchld_no variable should be 0 at this point.
         self.sigchld_no = target.FindFirstGlobalVariable("sigchld_no")
-        self.assertTrue (self.sigchld_no.IsValid(), "Got a value for sigchld_no")
-
-        self.start_sigchld_no = self.sigchld_no.GetValueAsSigned (-1)
-        self.assertTrue (self.start_sigchld_no != -1, "Got an actual value for sigchld_no")
+        self.assertTrue(
+            self.sigchld_no.IsValid(),
+            "Got a value for sigchld_no")
+
+        self.start_sigchld_no = self.sigchld_no.GetValueAsSigned(-1)
+        self.assertTrue(
+            self.start_sigchld_no != -1,
+            "Got an actual value for sigchld_no")
 
         options = lldb.SBExpressionOptions()
-        # processing 30 signals takes a while, increase the expression timeout a bit
-        options.SetTimeoutInMicroSeconds(3000000) # 3s
+        # processing 30 signals takes a while, increase the expression timeout
+        # a bit
+        options.SetTimeoutInMicroSeconds(3000000)  # 3s
         options.SetUnwindOnError(True)
 
         frame = self.thread.GetFrameAtIndex(0)
-        # Store away the PC to check that the functions unwind to the right place after calls
+        # Store away the PC to check that the functions unwind to the right
+        # place after calls
         self.orig_frame_pc = frame.GetPC()
 
         num_sigchld = 30
-        value = frame.EvaluateExpression ("call_me (%d)"%(num_sigchld), options)
-        self.assertTrue (value.IsValid())
-        self.assertTrue (value.GetError().Success() == True)
-        self.assertTrue (value.GetValueAsSigned(-1) == num_sigchld)
+        value = frame.EvaluateExpression(
+            "call_me (%d)" %
+            (num_sigchld), options)
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Success())
+        self.assertTrue(value.GetValueAsSigned(-1) == num_sigchld)
 
         self.check_after_call(num_sigchld)
 
         # Okay, now try with a breakpoint in the called code in the case where
         # we are ignoring breakpoint hits.
-        handler_bkpt = target.BreakpointCreateBySourceRegex("Got sigchld %d.", self.main_source_spec)
-        self.assertTrue (handler_bkpt.GetNumLocations() > 0)
+        handler_bkpt = target.BreakpointCreateBySourceRegex(
+            "Got sigchld %d.", self.main_source_spec)
+        self.assertTrue(handler_bkpt.GetNumLocations() > 0)
         options.SetIgnoreBreakpoints(True)
         options.SetUnwindOnError(True)
 
-        value = frame.EvaluateExpression("call_me (%d)"%(num_sigchld), options)
+        value = frame.EvaluateExpression(
+            "call_me (%d)" %
+            (num_sigchld), options)
 
-        self.assertTrue (value.IsValid() and value.GetError().Success() == True)
-        self.assertTrue (value.GetValueAsSigned(-1) == num_sigchld)
+        self.assertTrue(value.IsValid() and value.GetError().Success())
+        self.assertTrue(value.GetValueAsSigned(-1) == num_sigchld)
         self.check_after_call(num_sigchld)
 
-        # Now set the signal to print but not stop and make sure that calling still works:
-        self.dbg.GetCommandInterpreter().HandleCommand("process handle SIGCHLD -s 0 -p 1 -n 1", return_obj)
-        self.assertTrue (return_obj.Succeeded() == True, "Set SIGCHLD to pass, no-stop, notify")
-
-        value = frame.EvaluateExpression("call_me (%d)"%(num_sigchld), options)
+        # Now set the signal to print but not stop and make sure that calling
+        # still works:
+        self.dbg.GetCommandInterpreter().HandleCommand(
+            "process handle SIGCHLD -s 0 -p 1 -n 1", return_obj)
+        self.assertTrue(
+            return_obj.Succeeded(),
+            "Set SIGCHLD to pass, no-stop, notify")
+
+        value = frame.EvaluateExpression(
+            "call_me (%d)" %
+            (num_sigchld), options)
 
-        self.assertTrue (value.IsValid() and value.GetError().Success() == True)
-        self.assertTrue (value.GetValueAsSigned(-1) == num_sigchld)
+        self.assertTrue(value.IsValid() and value.GetError().Success())
+        self.assertTrue(value.GetValueAsSigned(-1) == num_sigchld)
         self.check_after_call(num_sigchld)
 
-        # Now set this unwind on error to false, and make sure that we still complete the call:
+        # Now set this unwind on error to false, and make sure that we still
+        # complete the call:
         options.SetUnwindOnError(False)
-        value = frame.EvaluateExpression("call_me (%d)"%(num_sigchld), options)
+        value = frame.EvaluateExpression(
+            "call_me (%d)" %
+            (num_sigchld), options)
 
-        self.assertTrue (value.IsValid() and value.GetError().Success() == True)
-        self.assertTrue (value.GetValueAsSigned(-1) == num_sigchld)
+        self.assertTrue(value.IsValid() and value.GetError().Success())
+        self.assertTrue(value.GetValueAsSigned(-1) == num_sigchld)
         self.check_after_call(num_sigchld)
 
         # Okay, now set UnwindOnError to true, and then make the signal behavior to stop
         # and see that now we do stop at the signal point:
-        
-        self.dbg.GetCommandInterpreter().HandleCommand("process handle SIGCHLD -s 1 -p 1 -n 1", return_obj)
-        self.assertTrue (return_obj.Succeeded() == True, "Set SIGCHLD to pass, stop, notify")
-        
-        value = frame.EvaluateExpression("call_me (%d)"%(num_sigchld), options)
-        self.assertTrue (value.IsValid() and value.GetError().Success() == False)
-        
-        # Set signal handling back to no-stop, and continue and we should end up back in out starting frame:
-        self.dbg.GetCommandInterpreter().HandleCommand("process handle SIGCHLD -s 0 -p 1 -n 1", return_obj)
-        self.assertTrue (return_obj.Succeeded() == True, "Set SIGCHLD to pass, no-stop, notify")
+
+        self.dbg.GetCommandInterpreter().HandleCommand(
+            "process handle SIGCHLD -s 1 -p 1 -n 1", return_obj)
+        self.assertTrue(
+            return_obj.Succeeded(),
+            "Set SIGCHLD to pass, stop, notify")
+
+        value = frame.EvaluateExpression(
+            "call_me (%d)" %
+            (num_sigchld), options)
+        self.assertTrue(
+            value.IsValid() and value.GetError().Success() == False)
+
+        # Set signal handling back to no-stop, and continue and we should end
+        # up back in out starting frame:
+        self.dbg.GetCommandInterpreter().HandleCommand(
+            "process handle SIGCHLD -s 0 -p 1 -n 1", return_obj)
+        self.assertTrue(
+            return_obj.Succeeded(),
+            "Set SIGCHLD to pass, no-stop, notify")
 
         error = process.Continue()
-        self.assertTrue (error.Success(), "Continuing after stopping for signal succeeds.")
-        
+        self.assertTrue(
+            error.Success(),
+            "Continuing after stopping for signal succeeds.")
+
         frame = self.thread.GetFrameAtIndex(0)
-        self.assertTrue (frame.GetPC() == self.orig_frame_pc, "Continuing returned to the place we started.")
+        self.assertTrue(
+            frame.GetPC() == self.orig_frame_pc,
+            "Continuing returned to the place we started.")

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-throws/TestCallThatThrows.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-throws/TestCallThatThrows.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-throws/TestCallThatThrows.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-throws/TestCallThatThrows.py Tue Sep  6 15:57:50 2016
@@ -5,12 +5,12 @@ Test calling a function that throws an O
 from __future__ import print_function
 
 
-
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ExprCommandWithThrowTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -20,7 +20,7 @@ class ExprCommandWithThrowTestCase(TestB
         TestBase.setUp(self)
 
         self.main_source = "call-throws.m"
-        self.main_source_spec = lldb.SBFileSpec (self.main_source)
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
 
     @skipUnlessDarwin
     def test(self):
@@ -28,12 +28,13 @@ class ExprCommandWithThrowTestCase(TestB
         self.build()
         self.call_function()
 
-    def check_after_call (self):
+    def check_after_call(self):
         # Check that we are back where we were before:
         frame = self.thread.GetFrameAtIndex(0)
-        self.assertTrue (self.orig_frame_pc == frame.GetPC(), "Restored the zeroth frame correctly")
+        self.assertTrue(
+            self.orig_frame_pc == frame.GetPC(),
+            "Restored the zeroth frame correctly")
 
-        
     def call_function(self):
         """Test calling function that throws."""
         exe_name = "a.out"
@@ -42,72 +43,82 @@ class ExprCommandWithThrowTestCase(TestB
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        breakpoint = target.BreakpointCreateBySourceRegex('I am about to throw.',self.main_source_spec)
+        breakpoint = target.BreakpointCreateBySourceRegex(
+            'I am about to throw.', self.main_source_spec)
         self.assertTrue(breakpoint.GetNumLocations() > 0, VALID_BREAKPOINT)
 
         # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # Frame #0 should be at our breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint (process, breakpoint)
-        
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, breakpoint)
+
         self.assertTrue(len(threads) == 1)
         self.thread = threads[0]
-        
+
         options = lldb.SBExpressionOptions()
         options.SetUnwindOnError(True)
 
         frame = self.thread.GetFrameAtIndex(0)
-        # Store away the PC to check that the functions unwind to the right place after calls
+        # Store away the PC to check that the functions unwind to the right
+        # place after calls
         self.orig_frame_pc = frame.GetPC()
 
-        value = frame.EvaluateExpression ("[my_class callMeIThrow]", options)
-        self.assertTrue (value.IsValid())
-        self.assertTrue (value.GetError().Success() == False)
+        value = frame.EvaluateExpression("[my_class callMeIThrow]", options)
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Success() == False)
 
         self.check_after_call()
 
         # Okay, now try with a breakpoint in the called code in the case where
         # we are ignoring breakpoint hits.
-        handler_bkpt = target.BreakpointCreateBySourceRegex("I felt like it", self.main_source_spec)
-        self.assertTrue (handler_bkpt.GetNumLocations() > 0)
+        handler_bkpt = target.BreakpointCreateBySourceRegex(
+            "I felt like it", self.main_source_spec)
+        self.assertTrue(handler_bkpt.GetNumLocations() > 0)
         options.SetIgnoreBreakpoints(True)
         options.SetUnwindOnError(True)
 
-        value = frame.EvaluateExpression ("[my_class callMeIThrow]", options)
+        value = frame.EvaluateExpression("[my_class callMeIThrow]", options)
 
-        self.assertTrue (value.IsValid() and value.GetError().Success() == False)
+        self.assertTrue(
+            value.IsValid() and value.GetError().Success() == False)
         self.check_after_call()
 
-        # Now set the ObjC language breakpoint and make sure that doesn't interfere with the call:
-        exception_bkpt = target.BreakpointCreateForException (lldb.eLanguageTypeObjC, False, True)
+        # Now set the ObjC language breakpoint and make sure that doesn't
+        # interfere with the call:
+        exception_bkpt = target.BreakpointCreateForException(
+            lldb.eLanguageTypeObjC, False, True)
         self.assertTrue(exception_bkpt.GetNumLocations() > 0)
 
         options.SetIgnoreBreakpoints(True)
         options.SetUnwindOnError(True)
 
-        value = frame.EvaluateExpression ("[my_class callMeIThrow]", options)
+        value = frame.EvaluateExpression("[my_class callMeIThrow]", options)
 
-        self.assertTrue (value.IsValid() and value.GetError().Success() == False)
+        self.assertTrue(
+            value.IsValid() and value.GetError().Success() == False)
         self.check_after_call()
 
-
         # Now turn off exception trapping, and call a function that catches the exceptions,
-        # and make sure the function actually completes, and we get the right value:
+        # and make sure the function actually completes, and we get the right
+        # value:
         options.SetTrapExceptions(False)
-        value = frame.EvaluateExpression ("[my_class iCatchMyself]", options)
-        self.assertTrue (value.IsValid())
-        self.assertTrue (value.GetError().Success() == True)
-        self.assertTrue (value.GetValueAsUnsigned() == 57)
+        value = frame.EvaluateExpression("[my_class iCatchMyself]", options)
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Success())
+        self.assertTrue(value.GetValueAsUnsigned() == 57)
         self.check_after_call()
         options.SetTrapExceptions(True)
 
-        # Now set this unwind on error to false, and make sure that we stop where the exception was thrown
+        # Now set this unwind on error to false, and make sure that we stop
+        # where the exception was thrown
         options.SetUnwindOnError(False)
-        value = frame.EvaluateExpression ("[my_class callMeIThrow]", options)
-
+        value = frame.EvaluateExpression("[my_class callMeIThrow]", options)
 
-        self.assertTrue (value.IsValid() and value.GetError().Success() == False)
+        self.assertTrue(
+            value.IsValid() and value.GetError().Success() == False)
         self.check_after_call()

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py Tue Sep  6 15:57:50 2016
@@ -1,12 +1,12 @@
 from __future__ import print_function
 
 
-
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ExprCharTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -16,24 +16,27 @@ class ExprCharTestCase(TestBase):
         TestBase.setUp(self)
 
         self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec (self.main_source)
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
         self.exe = os.path.join(os.getcwd(), "a.out")
 
     def do_test(self, dictionary=None):
         """These basic expression commands should work as expected."""
-        self.build(dictionary = dictionary)
+        self.build(dictionary=dictionary)
 
         target = self.dbg.CreateTarget(self.exe)
         self.assertTrue(target)
 
-        breakpoint = target.BreakpointCreateBySourceRegex('// Break here', self.main_source_spec)
+        breakpoint = target.BreakpointCreateBySourceRegex(
+            '// Break here', self.main_source_spec)
         self.assertTrue(breakpoint)
 
         # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process)
 
-        threads = lldbutil.get_threads_stopped_at_breakpoint(process, breakpoint)
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, breakpoint)
         self.assertEqual(len(threads), 1)
 
         frame = threads[0].GetFrameAtIndex(0)
@@ -57,13 +60,22 @@ class ExprCharTestCase(TestBase):
     def test_default_char(self):
         self.do_test()
 
-    @expectedFailureAll(archs=["arm", "aarch64", "s390x"], bugnumber="llvm.org/pr23069")
+    @expectedFailureAll(
+        archs=[
+            "arm",
+            "aarch64",
+            "s390x"],
+        bugnumber="llvm.org/pr23069")
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
     def test_signed_char(self):
         self.do_test(dictionary={'CFLAGS_EXTRAS': '-fsigned-char'})
 
-    @expectedFailureAll(archs=["i[3-6]86", "x86_64"], bugnumber="llvm.org/pr23069")
+    @expectedFailureAll(
+        archs=[
+            "i[3-6]86",
+            "x86_64"],
+        bugnumber="llvm.org/pr23069")
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
-    @expectedFailureAll(triple = 'mips*', bugnumber="llvm.org/pr23069")
+    @expectedFailureAll(triple='mips*', bugnumber="llvm.org/pr23069")
     def test_unsigned_char(self):
         self.do_test(dictionary={'CFLAGS_EXTRAS': '-funsigned-char'})

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py Tue Sep  6 15:57:50 2016
@@ -3,7 +3,6 @@
 from __future__ import print_function
 
 
-
 import os
 import lldb
 from lldbsuite.test.decorators import *
@@ -15,7 +14,9 @@ class ExprSyscallTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765, getpid() does not exist on Windows")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr21765, getpid() does not exist on Windows")
     def test_setpgid(self):
         self.build()
         self.expr_syscall()
@@ -32,16 +33,16 @@ class ExprSyscallTestCase(TestBase):
         # launch the inferior and don't wait for it to stop
         self.dbg.SetAsync(True)
         error = lldb.SBError()
-        process = target.Launch (listener,
-                None,      # argv
-                None,      # envp
-                None,      # stdin_path
-                None,      # stdout_path
-                None,      # stderr_path
-                None,      # working directory
-                0,         # launch flags
-                False,     # Stop at entry
-                error)     # error
+        process = target.Launch(listener,
+                                None,      # argv
+                                None,      # envp
+                                None,      # stdin_path
+                                None,      # stdout_path
+                                None,      # stderr_path
+                                None,      # working directory
+                                0,         # launch flags
+                                False,     # Stop at entry
+                                error)     # error
 
         self.assertTrue(process and process.IsValid(), PROCESS_IS_VALID)
 
@@ -54,7 +55,10 @@ class ExprSyscallTestCase(TestBase):
             pass
 
         # now the process should be running (blocked in the syscall)
-        self.assertEqual(process.GetState(), lldb.eStateRunning, "Process is running")
+        self.assertEqual(
+            process.GetState(),
+            lldb.eStateRunning,
+            "Process is running")
 
         # send the process a signal
         process.SendAsyncInterrupt()
@@ -62,13 +66,18 @@ class ExprSyscallTestCase(TestBase):
             pass
 
         # as a result the process should stop
-        # in all likelihood we have stopped in the middle of the sleep() syscall
-        self.assertEqual(process.GetState(), lldb.eStateStopped, PROCESS_STOPPED)
+        # in all likelihood we have stopped in the middle of the sleep()
+        # syscall
+        self.assertEqual(
+            process.GetState(),
+            lldb.eStateStopped,
+            PROCESS_STOPPED)
         thread = process.GetSelectedThread()
 
         # try evaluating a couple of expressions in this state
-        self.expect("expr release_flag = 1", substrs = [" = 1"])
-        self.expect("print (int)getpid()", substrs = [str(process.GetProcessID())])
+        self.expect("expr release_flag = 1", substrs=[" = 1"])
+        self.expect("print (int)getpid()",
+                    substrs=[str(process.GetProcessID())])
 
         # and run the process to completion
         process.Continue()

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py Tue Sep  6 15:57:50 2016
@@ -5,12 +5,12 @@ Test calling an expression with errors t
 from __future__ import print_function
 
 
-
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ExprCommandWithFixits(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -20,7 +20,7 @@ class ExprCommandWithFixits(TestBase):
         TestBase.setUp(self)
 
         self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec (self.main_source)
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
 
     @skipUnlessDarwin
     def test(self):
@@ -36,20 +36,23 @@ class ExprCommandWithFixits(TestBase):
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        breakpoint = target.BreakpointCreateBySourceRegex('Stop here to evaluate expressions',self.main_source_spec)
+        breakpoint = target.BreakpointCreateBySourceRegex(
+            'Stop here to evaluate expressions', self.main_source_spec)
         self.assertTrue(breakpoint.GetNumLocations() > 0, VALID_BREAKPOINT)
 
         # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # Frame #0 should be at our breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint (process, breakpoint)
-        
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, breakpoint)
+
         self.assertTrue(len(threads) == 1)
         self.thread = threads[0]
-        
+
         options = lldb.SBExpressionOptions()
         options.SetAutoApplyFixIts(True)
 
@@ -60,7 +63,7 @@ class ExprCommandWithFixits(TestBase):
         self.assertTrue(value.IsValid())
         self.assertTrue(value.GetError().Success())
         self.assertTrue(value.GetValueAsUnsigned() == 10)
-        
+
         # Try with two errors:
         two_error_expression = "my_pointer.second->a"
         value = frame.EvaluateExpression(two_error_expression, options)
@@ -74,8 +77,9 @@ class ExprCommandWithFixits(TestBase):
         self.assertTrue(value.IsValid())
         self.assertTrue(value.GetError().Fail())
         error_string = value.GetError().GetCString()
-        self.assertTrue(error_string.find("fixed expression suggested:") != -1, "Fix was suggested")
-        self.assertTrue(error_string.find("my_pointer->second.a") != -1, "Fix was right")
-
-        
-
+        self.assertTrue(
+            error_string.find("fixed expression suggested:") != -1,
+            "Fix was suggested")
+        self.assertTrue(
+            error_string.find("my_pointer->second.a") != -1,
+            "Fix was right")

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/formatters/TestFormatters.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/formatters/TestFormatters.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/formatters/TestFormatters.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/formatters/TestFormatters.py Tue Sep  6 15:57:50 2016
@@ -5,12 +5,12 @@ Test using LLDB data formatters with fro
 from __future__ import print_function
 
 
-
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ExprFormattersTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -22,11 +22,13 @@ class ExprFormattersTestCase(TestBase):
         self.line = line_number('main.cpp',
                                 '// Stop here')
 
-    @skipIfFreeBSD # llvm.org/pr24691 skipping to avoid crashing the test runner
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr19011 Newer Clang omits C1 complete object constructor')
+    @skipIfFreeBSD  # llvm.org/pr24691 skipping to avoid crashing the test runner
+    @expectedFailureAll(
+        oslist=['freebsd'],
+        bugnumber='llvm.org/pr19011 Newer Clang omits C1 complete object constructor')
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
-    @skipIfTargetAndroid() # skipping to avoid crashing the test runner
-    @expectedFailureAndroid('llvm.org/pr24691') # we hit an assertion in clang
+    @skipIfTargetAndroid()  # skipping to avoid crashing the test runner
+    @expectedFailureAndroid('llvm.org/pr24691')  # we hit an assertion in clang
     def test(self):
         """Test expr + formatters for good interoperability."""
         self.build()
@@ -36,64 +38,117 @@ class ExprFormattersTestCase(TestBase):
         def cleanup():
             self.runCmd('type summary clear', check=False)
             self.runCmd('type synthetic clear', check=False)
-        
+
         # Execute the cleanup function during test case tear down.
         self.addTearDownHook(cleanup)
 
         """Test expr + formatters for good interoperability."""
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
         self.runCmd("command script import formatters.py")
         self.runCmd("command script import foosynth.py")
-        
+
         if self.TraceOn():
             self.runCmd("frame variable foo1 --show-types")
             self.runCmd("frame variable foo1.b --show-types")
             self.runCmd("frame variable foo1.b.b_ref --show-types")
 
-        self.expect("expression --show-types -- *(new foo(47))",
-            substrs = ['(int) a = 47', '(bar) b = {', '(int) i = 94', '(baz) b = {', '(int) k = 99'])
+        self.expect(
+            "expression --show-types -- *(new foo(47))",
+            substrs=[
+                '(int) a = 47',
+                '(bar) b = {',
+                '(int) i = 94',
+                '(baz) b = {',
+                '(int) k = 99'])
 
         self.runCmd("type summary add -F formatters.foo_SummaryProvider foo")
 
         self.expect("expression new int(12)",
-            substrs = ['(int *) $', ' = 0x'])
+                    substrs=['(int *) $', ' = 0x'])
 
-        self.runCmd("type summary add -s \"${var%pointer} -> ${*var%decimal}\" \"int *\"")
+        self.runCmd(
+            "type summary add -s \"${var%pointer} -> ${*var%decimal}\" \"int *\"")
 
         self.expect("expression new int(12)",
-            substrs = ['(int *) $', '= 0x', ' -> 12'])
+                    substrs=['(int *) $', '= 0x', ' -> 12'])
 
         self.expect("expression foo1.a_ptr",
-            substrs = ['(int *) $', '= 0x', ' -> 13'])
-
-        self.expect("expression foo1",
-            substrs = ['(foo) $', ' a = 12', 'a_ptr = ', ' -> 13','i = 24','i_ptr = ', ' -> 25'])
+                    substrs=['(int *) $', '= 0x', ' -> 13'])
 
-        self.expect("expression --ptr-depth=1 -- new foo(47)",
-            substrs = ['(foo *) $', 'a = 47','a_ptr = ', ' -> 48','i = 94','i_ptr = ', ' -> 95'])
-
-        self.expect("expression foo2",
-            substrs = ['(foo) $', 'a = 121','a_ptr = ', ' -> 122','i = 242','i_ptr = ', ' -> 243'])
+        self.expect(
+            "expression foo1",
+            substrs=[
+                '(foo) $',
+                ' a = 12',
+                'a_ptr = ',
+                ' -> 13',
+                'i = 24',
+                'i_ptr = ',
+                ' -> 25'])
+
+        self.expect(
+            "expression --ptr-depth=1 -- new foo(47)",
+            substrs=[
+                '(foo *) $',
+                'a = 47',
+                'a_ptr = ',
+                ' -> 48',
+                'i = 94',
+                'i_ptr = ',
+                ' -> 95'])
+
+        self.expect(
+            "expression foo2",
+            substrs=[
+                '(foo) $',
+                'a = 121',
+                'a_ptr = ',
+                ' -> 122',
+                'i = 242',
+                'i_ptr = ',
+                ' -> 243'])
 
         object_name = self.res.GetOutput()
         object_name = object_name[7:]
         object_name = object_name[0:object_name.find(' =')]
 
-        self.expect("frame variable foo2",
-                    substrs = ['(foo)', 'foo2', 'a = 121','a_ptr = ', ' -> 122','i = 242','i_ptr = ', ' -> 243'])
-        
-        self.expect("expression $" + object_name,
-            substrs = ['(foo) $', 'a = 121','a_ptr = ', ' -> 122','i = 242','i_ptr = ', ' -> 243', 'h = 245','k = 247'])
+        self.expect(
+            "frame variable foo2",
+            substrs=[
+                '(foo)',
+                'foo2',
+                'a = 121',
+                'a_ptr = ',
+                ' -> 122',
+                'i = 242',
+                'i_ptr = ',
+                ' -> 243'])
+
+        self.expect(
+            "expression $" +
+            object_name,
+            substrs=[
+                '(foo) $',
+                'a = 121',
+                'a_ptr = ',
+                ' -> 122',
+                'i = 242',
+                'i_ptr = ',
+                ' -> 243',
+                'h = 245',
+                'k = 247'])
 
         self.runCmd("type summary delete foo")
-        self.runCmd("type synthetic add --python-class foosynth.FooSyntheticProvider foo")
+        self.runCmd(
+            "type synthetic add --python-class foosynth.FooSyntheticProvider foo")
 
         self.expect("expression --show-types -- $" + object_name,
-            substrs = ['(foo) $', ' = {', '(int) *i_ptr = 243'])
+                    substrs=['(foo) $', ' = {', '(int) *i_ptr = 243'])
 
         self.runCmd("n")
         self.runCmd("n")
@@ -101,31 +156,61 @@ class ExprFormattersTestCase(TestBase):
         self.runCmd("type synthetic delete foo")
         self.runCmd("type summary add -F formatters.foo_SummaryProvider foo")
 
-        self.expect("expression foo2",
-            substrs = ['(foo) $', 'a = 7777','a_ptr = ', ' -> 122','i = 242','i_ptr = ', ' -> 8888'])
+        self.expect(
+            "expression foo2",
+            substrs=[
+                '(foo) $',
+                'a = 7777',
+                'a_ptr = ',
+                ' -> 122',
+                'i = 242',
+                'i_ptr = ',
+                ' -> 8888'])
 
         self.expect("expression $" + object_name + '.a',
-            substrs = ['7777'])
+                    substrs=['7777'])
 
         self.expect("expression *$" + object_name + '.b.i_ptr',
-            substrs = ['8888'])
+                    substrs=['8888'])
 
-        self.expect("expression $" + object_name,
-            substrs = ['(foo) $', 'a = 121', 'a_ptr = ', ' -> 122', 'i = 242', 'i_ptr = ', ' -> 8888', 'h = 245','k = 247'])
+        self.expect(
+            "expression $" +
+            object_name,
+            substrs=[
+                '(foo) $',
+                'a = 121',
+                'a_ptr = ',
+                ' -> 122',
+                'i = 242',
+                'i_ptr = ',
+                ' -> 8888',
+                'h = 245',
+                'k = 247'])
 
         self.runCmd("type summary delete foo")
-        self.runCmd("type synthetic add --python-class foosynth.FooSyntheticProvider foo")
+        self.runCmd(
+            "type synthetic add --python-class foosynth.FooSyntheticProvider foo")
 
         self.expect("expression --show-types -- $" + object_name,
-            substrs = ['(foo) $', ' = {', '(int) *i_ptr = 8888'])
+                    substrs=['(foo) $', ' = {', '(int) *i_ptr = 8888'])
 
         self.runCmd("n")
 
         self.runCmd("type synthetic delete foo")
         self.runCmd("type summary add -F formatters.foo_SummaryProvider foo")
 
-        self.expect("expression $" + object_name,
-                    substrs = ['(foo) $', 'a = 121','a_ptr = ', ' -> 122','i = 242', 'i_ptr = ', ' -> 8888','k = 247'])
+        self.expect(
+            "expression $" +
+            object_name,
+            substrs=[
+                '(foo) $',
+                'a = 121',
+                'a_ptr = ',
+                ' -> 122',
+                'i = 242',
+                'i_ptr = ',
+                ' -> 8888',
+                'k = 247'])
 
         process = self.dbg.GetSelectedTarget().GetProcess()
         thread = process.GetThreadAtIndex(0)
@@ -136,32 +221,78 @@ class ExprFormattersTestCase(TestBase):
         a_data = frozen.GetPointeeData()
 
         error = lldb.SBError()
-        self.assertTrue(a_data.GetUnsignedInt32(error, 0) == 122, '*a_ptr = 122')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                0) == 122,
+            '*a_ptr = 122')
 
-        self.runCmd("n");self.runCmd("n");self.runCmd("n");
+        self.runCmd("n")
+        self.runCmd("n")
+        self.runCmd("n")
 
         self.expect("frame variable numbers",
-                    substrs = ['1','2','3','4','5'])
+                    substrs=['1', '2', '3', '4', '5'])
 
         self.expect("expression numbers",
-                    substrs = ['1','2','3','4','5'])
+                    substrs=['1', '2', '3', '4', '5'])
 
         frozen = frame.EvaluateExpression("&numbers")
 
         a_data = frozen.GetPointeeData(0, 1)
 
-        self.assertTrue(a_data.GetUnsignedInt32(error, 0) == 1, 'numbers[0] == 1')
-        self.assertTrue(a_data.GetUnsignedInt32(error, 4) == 2, 'numbers[1] == 2')
-        self.assertTrue(a_data.GetUnsignedInt32(error, 8) == 3, 'numbers[2] == 3')
-        self.assertTrue(a_data.GetUnsignedInt32(error, 12) == 4, 'numbers[3] == 4')
-        self.assertTrue(a_data.GetUnsignedInt32(error, 16) == 5, 'numbers[4] == 5')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                0) == 1,
+            'numbers[0] == 1')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                4) == 2,
+            'numbers[1] == 2')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                8) == 3,
+            'numbers[2] == 3')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                12) == 4,
+            'numbers[3] == 4')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                16) == 5,
+            'numbers[4] == 5')
 
         frozen = frame.EvaluateExpression("numbers")
 
         a_data = frozen.GetData()
 
-        self.assertTrue(a_data.GetUnsignedInt32(error, 0) == 1, 'numbers[0] == 1')
-        self.assertTrue(a_data.GetUnsignedInt32(error, 4) == 2, 'numbers[1] == 2')
-        self.assertTrue(a_data.GetUnsignedInt32(error, 8) == 3, 'numbers[2] == 3')
-        self.assertTrue(a_data.GetUnsignedInt32(error, 12) == 4, 'numbers[3] == 4')
-        self.assertTrue(a_data.GetUnsignedInt32(error, 16) == 5, 'numbers[4] == 5')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                0) == 1,
+            'numbers[0] == 1')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                4) == 2,
+            'numbers[1] == 2')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                8) == 3,
+            'numbers[2] == 3')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                12) == 4,
+            'numbers[3] == 4')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                16) == 5,
+            'numbers[4] == 5')

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/formatters/foosynth.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/formatters/foosynth.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/formatters/foosynth.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/formatters/foosynth.py Tue Sep  6 15:57:50 2016
@@ -1,29 +1,33 @@
 import lldb
 
+
 class FooSyntheticProvider:
-	def __init__(self,valobj,dict):
-		self.valobj = valobj;
-		self.update();
-
-	def update(self):
-		self.adjust_for_architecture()
-
-	def num_children(self):
-		return 1;
-
-	def get_child_at_index(self,index):
-		if index != 0:
-			return None;
-		return self.i_ptr.Dereference();
-
-	def get_child_index(self,name):
-		if name == "*i_ptr":
-			return 0;
-		return None;
-
-	def adjust_for_architecture(self):
-		self.lp64 = (self.valobj.GetTarget().GetProcess().GetAddressByteSize() == 8)
-		self.is_little = (self.valobj.GetTarget().GetProcess().GetByteOrder() == lldb.eByteOrderLittle)
-		self.pointer_size = self.valobj.GetTarget().GetProcess().GetAddressByteSize()
-		self.bar = self.valobj.GetChildMemberWithName('b');
-		self.i_ptr = self.bar.GetChildMemberWithName('i_ptr');
\ No newline at end of file
+
+    def __init__(self, valobj, dict):
+        self.valobj = valobj
+        self.update()
+
+    def update(self):
+        self.adjust_for_architecture()
+
+    def num_children(self):
+        return 1
+
+    def get_child_at_index(self, index):
+        if index != 0:
+            return None
+        return self.i_ptr.Dereference()
+
+    def get_child_index(self, name):
+        if name == "*i_ptr":
+            return 0
+        return None
+
+    def adjust_for_architecture(self):
+        self.lp64 = (
+            self.valobj.GetTarget().GetProcess().GetAddressByteSize() == 8)
+        self.is_little = (self.valobj.GetTarget().GetProcess(
+        ).GetByteOrder() == lldb.eByteOrderLittle)
+        self.pointer_size = self.valobj.GetTarget().GetProcess().GetAddressByteSize()
+        self.bar = self.valobj.GetChildMemberWithName('b')
+        self.i_ptr = self.bar.GetChildMemberWithName('i_ptr')

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/formatters/formatters.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/formatters/formatters.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/formatters/formatters.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/formatters/formatters.py Tue Sep  6 15:57:50 2016
@@ -1,17 +1,17 @@
-def foo_SummaryProvider (valobj,dict):
-	a = valobj.GetChildMemberWithName('a');
-	a_ptr = valobj.GetChildMemberWithName('a_ptr');
-	bar = valobj.GetChildMemberWithName('b');
-	i = bar.GetChildMemberWithName('i');
-	i_ptr = bar.GetChildMemberWithName('i_ptr');
-	b_ref = bar.GetChildMemberWithName('b_ref');
-	b_ref_ptr = b_ref.AddressOf()
-	b_ref = b_ref_ptr.Dereference()
-	h = b_ref.GetChildMemberWithName('h');
-	k = b_ref.GetChildMemberWithName('k');
-	return 'a = ' + str(a.GetValueAsUnsigned(0)) + ', a_ptr = ' + \
-	str(a_ptr.GetValueAsUnsigned(0)) + ' -> ' + str(a_ptr.Dereference().GetValueAsUnsigned(0)) + \
-	', i = ' + str(i.GetValueAsUnsigned(0)) + \
-	', i_ptr = ' + str(i_ptr.GetValueAsUnsigned(0)) + ' -> ' + str(i_ptr.Dereference().GetValueAsUnsigned(0)) + \
-	', b_ref = ' + str(b_ref.GetValueAsUnsigned(0)) + \
-	', h = ' + str(h.GetValueAsUnsigned(0)) + ' , k = ' + str(k.GetValueAsUnsigned(0))
\ No newline at end of file
+def foo_SummaryProvider(valobj, dict):
+    a = valobj.GetChildMemberWithName('a')
+    a_ptr = valobj.GetChildMemberWithName('a_ptr')
+    bar = valobj.GetChildMemberWithName('b')
+    i = bar.GetChildMemberWithName('i')
+    i_ptr = bar.GetChildMemberWithName('i_ptr')
+    b_ref = bar.GetChildMemberWithName('b_ref')
+    b_ref_ptr = b_ref.AddressOf()
+    b_ref = b_ref_ptr.Dereference()
+    h = b_ref.GetChildMemberWithName('h')
+    k = b_ref.GetChildMemberWithName('k')
+    return 'a = ' + str(a.GetValueAsUnsigned(0)) + ', a_ptr = ' + \
+        str(a_ptr.GetValueAsUnsigned(0)) + ' -> ' + str(a_ptr.Dereference().GetValueAsUnsigned(0)) + \
+        ', i = ' + str(i.GetValueAsUnsigned(0)) + \
+        ', i_ptr = ' + str(i_ptr.GetValueAsUnsigned(0)) + ' -> ' + str(i_ptr.Dereference().GetValueAsUnsigned(0)) + \
+        ', b_ref = ' + str(b_ref.GetValueAsUnsigned(0)) + \
+        ', h = ' + str(h.GetValueAsUnsigned(0)) + ' , k = ' + str(k.GetValueAsUnsigned(0))

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py Tue Sep  6 15:57:50 2016
@@ -2,38 +2,41 @@
 Test PHI nodes work in the IR interpreter.
 """
 
-import os, os.path
+import os
+import os.path
 
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class IRInterpreterPHINodesTestCase(TestBase):
     mydir = TestBase.compute_mydir(__file__)
 
     def test_phi_node_support(self):
         """Test support for PHI nodes in the IR interpreter."""
-        
+
         self.build()
         exe = os.path.join(os.getcwd(), 'a.out')
         self.runCmd('file ' + exe, CURRENT_EXECUTABLE_SET)
-        
+
         # Break on the first assignment to i
         line = line_number('main.cpp', 'i = 5')
-        lldbutil.run_break_set_by_file_and_line(self, 'main.cpp', line, num_expected_locations=1, loc_exact=True)
-        
+        lldbutil.run_break_set_by_file_and_line(
+            self, 'main.cpp', line, num_expected_locations=1, loc_exact=True)
+
         self.runCmd('run', RUN_SUCCEEDED)
-        
+
         # The stop reason of the thread should be breakpoint
         self.expect('thread list', STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped', 'stop reason = breakpoint'])
-        
+                    substrs=['stopped', 'stop reason = breakpoint'])
+
         self.runCmd('s')
-        
+
         # The logical 'or' causes a PHI node to be generated. Execute without JIT
         # to test that the interpreter can handle this
         self.expect('expr -j 0 -- i == 3 || i == 5', substrs=['true'])
-        
+
         self.runCmd('s')
         self.expect('expr -j 0 -- i == 3 || i == 5', substrs=['false'])
         self.runCmd('s')

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/ir-interpreter/TestIRInterpreter.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/ir-interpreter/TestIRInterpreter.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/ir-interpreter/TestIRInterpreter.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/ir-interpreter/TestIRInterpreter.py Tue Sep  6 15:57:50 2016
@@ -6,12 +6,14 @@ from __future__ import print_function
 
 import unittest2
 
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class IRInterpreterTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -25,7 +27,8 @@ class IRInterpreterTestCase(TestBase):
 
         # Disable confirmation prompt to avoid infinite wait
         self.runCmd("settings set auto-confirm true")
-        self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))
+        self.addTearDownHook(
+            lambda: self.runCmd("settings clear auto-confirm"))
 
     def build_and_run(self):
         """Test the IR interpreter"""
@@ -33,13 +36,20 @@ class IRInterpreterTestCase(TestBase):
 
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.c", self.line, num_expected_locations=1, loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", self.line, num_expected_locations=1, loc_exact=False)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
     @add_test_categories(['pyapi'])
-    @expectedFailureAll(oslist=['windows'], bugnumber="http://llvm.org/pr21765")  # getpid() is POSIX, among other problems, see bug
-    @expectedFailureAll(oslist=['linux'], archs=['arm'], bugnumber="llvm.org/pr27868")
+    # getpid() is POSIX, among other problems, see bug
+    @expectedFailureAll(
+        oslist=['windows'],
+        bugnumber="http://llvm.org/pr21765")
+    @expectedFailureAll(
+        oslist=['linux'],
+        archs=['arm'],
+        bugnumber="llvm.org/pr27868")
     def test_ir_interpreter(self):
         self.build_and_run()
 
@@ -62,11 +72,16 @@ class IRInterpreterTestCase(TestBase):
             self.frame().EvaluateExpression(expression, options)
 
         for expression in expressions:
-            interp_expression   = expression
-            jit_expression      = "(int)getpid(); " + expression
-
-            interp_result       = self.frame().EvaluateExpression(interp_expression, options).GetValueAsSigned()
-            jit_result          = self.frame().EvaluateExpression(jit_expression, options).GetValueAsSigned()
-
-            self.assertEqual(interp_result, jit_result, "While evaluating " + expression)
+            interp_expression = expression
+            jit_expression = "(int)getpid(); " + expression
 
+            interp_result = self.frame().EvaluateExpression(
+                interp_expression, options).GetValueAsSigned()
+            jit_result = self.frame().EvaluateExpression(
+                jit_expression, options).GetValueAsSigned()
+
+            self.assertEqual(
+                interp_result,
+                jit_result,
+                "While evaluating " +
+                expression)

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/issue_11588/Test11588.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/issue_11588/Test11588.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/issue_11588/Test11588.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/issue_11588/Test11588.py Tue Sep  6 15:57:50 2016
@@ -7,13 +7,14 @@ expected in a SyntheticChildrenProvider
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class Issue11581TestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -25,54 +26,61 @@ class Issue11581TestCase(TestBase):
         def cleanup():
             self.runCmd('type synthetic clear', check=False)
 
-
         # Execute the cleanup function during test case tear down.
         self.addTearDownHook(cleanup)
 
         """valobj.AddressOf() should return correct values."""
         self.build()
-        
+
         exe = os.path.join(os.getcwd(), "a.out")
-        
+
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        breakpoint = target.BreakpointCreateBySourceRegex('Set breakpoint here.',lldb.SBFileSpec ("main.cpp", False))
-        
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
-        self.assertTrue (process, "Created a process.")
-        self.assertTrue (process.GetState() == lldb.eStateStopped, "Stopped it too.")
+        breakpoint = target.BreakpointCreateBySourceRegex(
+            'Set breakpoint here.', lldb.SBFileSpec("main.cpp", False))
 
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint (process, breakpoint)
-        self.assertTrue (len(thread_list) == 1)
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
+        self.assertTrue(process, "Created a process.")
+        self.assertTrue(
+            process.GetState() == lldb.eStateStopped,
+            "Stopped it too.")
+
+        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
+            process, breakpoint)
+        self.assertTrue(len(thread_list) == 1)
         thread = thread_list[0]
 
         self.runCmd("command script import --allow-reload s11588.py")
-        self.runCmd("type synthetic add --python-class s11588.Issue11581SyntheticProvider StgClosure")
+        self.runCmd(
+            "type synthetic add --python-class s11588.Issue11581SyntheticProvider StgClosure")
 
         self.expect("expr --show-types -- *((StgClosure*)(r14-1))",
-            substrs = ["(StgClosure) $",
-            "(StgClosure *) &$","0x",
-            "addr = ",
-            "load_address = "])
+                    substrs=["(StgClosure) $",
+                             "(StgClosure *) &$", "0x",
+                             "addr = ",
+                             "load_address = "])
 
         # register r14 is an x86_64 extension let's skip this part of the test
         # if we are on a different architecture
         if self.getArchitecture() == 'x86_64':
-                target = lldb.debugger.GetSelectedTarget()
-                process = target.GetProcess()
-                frame = process.GetSelectedThread().GetSelectedFrame()
-                pointer = frame.FindVariable("r14")
-                addr = pointer.GetValueAsUnsigned(0)
-                self.assertTrue(addr != 0, "could not read pointer to StgClosure")
-                addr = addr - 1
-                self.runCmd("register write r14 %d" % addr)
-                self.expect("register read r14",
-                    substrs = ["0x",hex(addr)[2:].rstrip("L")])  # Remove trailing 'L' if it exists
-                self.expect("expr --show-types -- *(StgClosure*)$r14",
-                    substrs = ["(StgClosure) $",
-                    "(StgClosure *) &$","0x",
-                    "addr = ",
-                    "load_address = ",
-                    hex(addr)[2:].rstrip("L"),
-                    str(addr)])
+            target = lldb.debugger.GetSelectedTarget()
+            process = target.GetProcess()
+            frame = process.GetSelectedThread().GetSelectedFrame()
+            pointer = frame.FindVariable("r14")
+            addr = pointer.GetValueAsUnsigned(0)
+            self.assertTrue(addr != 0, "could not read pointer to StgClosure")
+            addr = addr - 1
+            self.runCmd("register write r14 %d" % addr)
+            self.expect(
+                "register read r14", substrs=[
+                    "0x", hex(addr)[
+                        2:].rstrip("L")])  # Remove trailing 'L' if it exists
+            self.expect("expr --show-types -- *(StgClosure*)$r14",
+                        substrs=["(StgClosure) $",
+                                 "(StgClosure *) &$", "0x",
+                                 "addr = ",
+                                 "load_address = ",
+                                 hex(addr)[2:].rstrip("L"),
+                                 str(addr)])

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/issue_11588/s11588.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/issue_11588/s11588.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/issue_11588/s11588.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/issue_11588/s11588.py Tue Sep  6 15:57:50 2016
@@ -1,26 +1,28 @@
 class Issue11581SyntheticProvider(object):
-	def __init__(self, valobj, dict):
-		self.valobj = valobj
-		self.addrOf = valobj.AddressOf()
-		self.addr = valobj.GetAddress()
-		self.load_address = valobj.GetLoadAddress()
 
-	def num_children(self):
-		return 3;
+    def __init__(self, valobj, dict):
+        self.valobj = valobj
+        self.addrOf = valobj.AddressOf()
+        self.addr = valobj.GetAddress()
+        self.load_address = valobj.GetLoadAddress()
 
-	def get_child_at_index(self, index):
-		if index == 0:
-			return self.addrOf
-		if index == 1:
-			return self.valobj.CreateValueFromExpression("addr", str(self.addr))
-		if index == 2:
-			return self.valobj.CreateValueFromExpression("load_address", str(self.load_address))
+    def num_children(self):
+        return 3
 
-	def get_child_index(self, name):
-		if name == "addrOf":
-			return 0
-		if name == "addr":
-			return 1
-		if name == "load_address":
-			return 2
+    def get_child_at_index(self, index):
+        if index == 0:
+            return self.addrOf
+        if index == 1:
+            return self.valobj.CreateValueFromExpression(
+                "addr", str(self.addr))
+        if index == 2:
+            return self.valobj.CreateValueFromExpression(
+                "load_address", str(self.load_address))
 
+    def get_child_index(self, name):
+        if name == "addrOf":
+            return 0
+        if name == "addr":
+            return 1
+        if name == "load_address":
+            return 2

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/macros/TestMacros.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/macros/TestMacros.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/macros/TestMacros.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/macros/TestMacros.py Tue Sep  6 15:57:50 2016
@@ -6,13 +6,21 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestMacros(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAll(compiler="clang", bugnumber="clang does not emit .debug_macro[.dwo] sections.")
-    @expectedFailureAll(debug_info="dwo", bugnumber="GCC produces multiple .debug_macro.dwo sections and the spec is unclear as to what it means")
-    @expectedFailureAll(hostoslist=["windows"], compiler="gcc", triple='.*-android')
+    @expectedFailureAll(
+        compiler="clang",
+        bugnumber="clang does not emit .debug_macro[.dwo] sections.")
+    @expectedFailureAll(
+        debug_info="dwo",
+        bugnumber="GCC produces multiple .debug_macro.dwo sections and the spec is unclear as to what it means")
+    @expectedFailureAll(
+        hostoslist=["windows"],
+        compiler="gcc",
+        triple='.*-android')
     def test_expr_with_macros(self):
         self.build()
 
@@ -25,7 +33,7 @@ class TestMacros(TestBase):
         # Get the path of the executable
         cwd = os.getcwd()
         exe_file = "a.out"
-        exe_path  = os.path.join(cwd, exe_file)
+        exe_path = os.path.join(cwd, exe_file)
 
         # Load the executable
         target = self.dbg.CreateTarget(exe_path)
@@ -33,51 +41,78 @@ class TestMacros(TestBase):
 
         # Set breakpoints
         bp1 = target.BreakpointCreateBySourceRegex("Break here", src_file_spec)
-        self.assertTrue(bp1.IsValid() and bp1.GetNumLocations() >= 1, VALID_BREAKPOINT)
+        self.assertTrue(
+            bp1.IsValid() and bp1.GetNumLocations() >= 1,
+            VALID_BREAKPOINT)
 
         # Launch the process
-        process = target.LaunchSimple(None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
 
         # Get the thread of the process
-        self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
 
         # Get frame for current thread
         frame = thread.GetSelectedFrame()
 
         result = frame.EvaluateExpression("MACRO_1")
-        self.assertTrue(result.IsValid() and result.GetValue() == "100", "MACRO_1 = 100")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "100",
+            "MACRO_1 = 100")
 
         result = frame.EvaluateExpression("MACRO_2")
-        self.assertTrue(result.IsValid() and result.GetValue() == "200", "MACRO_2 = 200")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "200",
+            "MACRO_2 = 200")
 
         result = frame.EvaluateExpression("ONE")
-        self.assertTrue(result.IsValid() and result.GetValue() == "1", "ONE = 1")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "1",
+            "ONE = 1")
 
         result = frame.EvaluateExpression("TWO")
-        self.assertTrue(result.IsValid() and result.GetValue() == "2", "TWO = 2")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "2",
+            "TWO = 2")
 
         result = frame.EvaluateExpression("THREE")
-        self.assertTrue(result.IsValid() and result.GetValue() == "3", "THREE = 3")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "3",
+            "THREE = 3")
 
         result = frame.EvaluateExpression("FOUR")
-        self.assertTrue(result.IsValid() and result.GetValue() == "4", "FOUR = 4")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "4",
+            "FOUR = 4")
 
         result = frame.EvaluateExpression("HUNDRED")
-        self.assertTrue(result.IsValid() and result.GetValue() == "100", "HUNDRED = 100")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "100",
+            "HUNDRED = 100")
 
         result = frame.EvaluateExpression("THOUSAND")
-        self.assertTrue(result.IsValid() and result.GetValue() == "1000", "THOUSAND = 1000")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "1000",
+            "THOUSAND = 1000")
 
         result = frame.EvaluateExpression("MILLION")
-        self.assertTrue(result.IsValid() and result.GetValue() == "1000000", "MILLION = 1000000")
+        self.assertTrue(result.IsValid() and result.GetValue()
+                        == "1000000", "MILLION = 1000000")
 
         result = frame.EvaluateExpression("MAX(ONE, TWO)")
-        self.assertTrue(result.IsValid() and result.GetValue() == "2", "MAX(ONE, TWO) = 2")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "2",
+            "MAX(ONE, TWO) = 2")
 
         result = frame.EvaluateExpression("MAX(THREE, TWO)")
-        self.assertTrue(result.IsValid() and result.GetValue() == "3", "MAX(THREE, TWO) = 3")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "3",
+            "MAX(THREE, TWO) = 3")
 
         # Get the thread of the process
         thread.StepOver()
@@ -86,10 +121,14 @@ class TestMacros(TestBase):
         frame = thread.GetSelectedFrame()
 
         result = frame.EvaluateExpression("MACRO_2")
-        self.assertTrue(result.GetError().Fail(), "Printing MACRO_2 fails in the mail file")
+        self.assertTrue(
+            result.GetError().Fail(),
+            "Printing MACRO_2 fails in the mail file")
 
         result = frame.EvaluateExpression("FOUR")
-        self.assertTrue(result.GetError().Fail(), "Printing FOUR fails in the main file")
+        self.assertTrue(
+            result.GetError().Fail(),
+            "Printing FOUR fails in the main file")
 
         thread.StepInto()
 
@@ -97,14 +136,20 @@ class TestMacros(TestBase):
         frame = thread.GetSelectedFrame()
 
         result = frame.EvaluateExpression("ONE")
-        self.assertTrue(result.IsValid() and result.GetValue() == "1", "ONE = 1")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "1",
+            "ONE = 1")
 
         result = frame.EvaluateExpression("MAX(ONE, TWO)")
-        self.assertTrue(result.IsValid() and result.GetValue() == "2", "MAX(ONE, TWO) = 2")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "2",
+            "MAX(ONE, TWO) = 2")
 
         # This time, MACRO_1 and MACRO_2 are not visible.
         result = frame.EvaluateExpression("MACRO_1")
-        self.assertTrue(result.GetError().Fail(), "Printing MACRO_1 fails in the header file")
+        self.assertTrue(result.GetError().Fail(),
+                        "Printing MACRO_1 fails in the header file")
 
         result = frame.EvaluateExpression("MACRO_2")
-        self.assertTrue(result.GetError().Fail(), "Printing MACRO_2 fails in the header file")
+        self.assertTrue(result.GetError().Fail(),
+                        "Printing MACRO_2 fails in the header file")

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/multiline/TestMultilineExpressions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/multiline/TestMultilineExpressions.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/multiline/TestMultilineExpressions.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/multiline/TestMultilineExpressions.py Tue Sep  6 15:57:50 2016
@@ -8,6 +8,7 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class MultilineExpressionsTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -19,7 +20,9 @@ class MultilineExpressionsTestCase(TestB
         self.line = line_number('main.c', 'break')
 
     @skipIfRemote
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
     def test_with_run_commands(self):
         """Test that multiline expressions work correctly"""
         self.build()
@@ -28,7 +31,9 @@ class MultilineExpressionsTestCase(TestB
         prompt = "(lldb) "
 
         # So that the child gets torn down after the test.
-        self.child = pexpect.spawn('%s %s %s' % (lldbtest_config.lldbExec, self.lldbOption, exe))
+        self.child = pexpect.spawn(
+            '%s %s %s' %
+            (lldbtest_config.lldbExec, self.lldbOption, exe))
         child = self.child
         # Turn on logging for what the child sends back.
         if self.TraceOn():
@@ -54,4 +59,4 @@ class MultilineExpressionsTestCase(TestB
         child.sendline('')
         child.expect_exact(prompt)
         self.expect(child.before, exe=False,
-            patterns = ['= 5'])
+                    patterns=['= 5'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py Tue Sep  6 15:57:50 2016
@@ -10,12 +10,13 @@ o test_expr_options:
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
 from lldbsuite.test.lldbtest import *
 
+
 class ExprOptionsTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -25,7 +26,7 @@ class ExprOptionsTestCase(TestBase):
         TestBase.setUp(self)
 
         self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec (self.main_source)
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
         self.line = line_number('main.cpp', '// breakpoint_in_main')
         self.exe = os.path.join(os.getcwd(), "a.out")
 
@@ -41,14 +42,17 @@ class ExprOptionsTestCase(TestBase):
         self.assertTrue(target, VALID_TARGET)
 
         # Set breakpoints inside main.
-        breakpoint = target.BreakpointCreateBySourceRegex('// breakpoint_in_main', self.main_source_spec)
+        breakpoint = target.BreakpointCreateBySourceRegex(
+            '// breakpoint_in_main', self.main_source_spec)
         self.assertTrue(breakpoint)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
 
-        threads = lldbutil.get_threads_stopped_at_breakpoint(process, breakpoint)
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, breakpoint)
         self.assertEqual(len(threads), 1)
 
         frame = threads[0].GetFrameAtIndex(0)

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py Tue Sep  6 15:57:50 2016
@@ -5,12 +5,12 @@ Test that we can p *objcObject
 from __future__ import print_function
 
 
-
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class PersistObjCPointeeType(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -19,7 +19,7 @@ class PersistObjCPointeeType(TestBase):
         # Call super's setUp().
         TestBase.setUp(self)
         # Find the line number to break for main.cpp.
-        self.line = line_number('main.m','// break here')
+        self.line = line_number('main.m', '// break here')
 
     @skipUnlessDarwin
     @expectedFailureAll(
@@ -37,15 +37,16 @@ class PersistObjCPointeeType(TestBase):
 
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.m", self.line, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
-        
+
         self.expect("p *self", substrs=['_sc_name = nil',
-        '_sc_name2 = nil',
-        '_sc_name3 = nil',
-        '_sc_name4 = nil',
-        '_sc_name5 = nil',
-        '_sc_name6 = nil',
-        '_sc_name7 = nil',
-        '_sc_name8 = nil'])
+                                        '_sc_name2 = nil',
+                                        '_sc_name3 = nil',
+                                        '_sc_name4 = nil',
+                                        '_sc_name5 = nil',
+                                        '_sc_name6 = nil',
+                                        '_sc_name7 = nil',
+                                        '_sc_name8 = nil'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py Tue Sep  6 15:57:50 2016
@@ -5,11 +5,11 @@ Test that we can have persistent pointer
 from __future__ import print_function
 
 
-
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
 from lldbsuite.test.lldbtest import *
 
+
 class PersistentPtrUpdateTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -24,18 +24,18 @@ class PersistentPtrUpdateTestCase(TestBa
 
         def cleanup():
             pass
-        
+
         # Execute the cleanup function during test case tear down.
         self.addTearDownHook(cleanup)
 
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
-        
+
         self.runCmd('break set -p here')
 
         self.runCmd("run", RUN_SUCCEEDED)
-        
+
         self.runCmd("expr void* $foo = 0")
-        
+
         self.runCmd("continue")
-        
-        self.expect("expr $foo", substrs=['$foo','0x0'])
+
+        self.expect("expr $foo", substrs=['$foo', '0x0'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/persistent_types/TestNestedPersistentTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/persistent_types/TestNestedPersistentTypes.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/persistent_types/TestNestedPersistentTypes.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/persistent_types/TestNestedPersistentTypes.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test that nested persistent types work.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class NestedPersistentTypesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -29,15 +30,16 @@ class NestedPersistentTypesTestCase(Test
 
         self.runCmd("expression struct $foo { int a; int b; };")
 
-        self.runCmd("expression struct $bar { struct $foo start; struct $foo end; };")
+        self.runCmd(
+            "expression struct $bar { struct $foo start; struct $foo end; };")
 
         self.runCmd("expression struct $bar $my_bar = {{ 2, 3 }, { 4, 5 }};")
 
         self.expect("expression $my_bar",
-                    substrs = ['a = 2', 'b = 3', 'a = 4', 'b = 5'])
+                    substrs=['a = 2', 'b = 3', 'a = 4', 'b = 5'])
 
         self.expect("expression $my_bar.start.b",
-                    substrs = ['(int)', '3'])
+                    substrs=['(int)', '3'])
 
         self.expect("expression $my_bar.end.b",
-                    substrs = ['(int)', '5'])
+                    substrs=['(int)', '5'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/persistent_types/TestPersistentTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/persistent_types/TestPersistentTypes.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/persistent_types/TestPersistentTypes.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/persistent_types/TestPersistentTypes.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test that lldb persistent types works co
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class PersistenttypesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -29,31 +30,57 @@ class PersistenttypesTestCase(TestBase):
 
         self.runCmd("expression struct $foo { int a; int b; };")
 
-        self.expect("expression struct $foo $my_foo; $my_foo.a = 2; $my_foo.b = 3;",
-                    startstr = "(int) $0 = 3")
+        self.expect(
+            "expression struct $foo $my_foo; $my_foo.a = 2; $my_foo.b = 3;",
+            startstr="(int) $0 = 3")
 
         self.expect("expression $my_foo",
-                    substrs = ['a = 2', 'b = 3'])
+                    substrs=['a = 2', 'b = 3'])
 
         self.runCmd("expression typedef int $bar")
 
         self.expect("expression $bar i = 5; i",
-                    startstr = "($bar) $1 = 5")
+                    startstr="($bar) $1 = 5")
 
-        self.runCmd("expression struct $foobar { char a; char b; char c; char d; };")
+        self.runCmd(
+            "expression struct $foobar { char a; char b; char c; char d; };")
         self.runCmd("next")
 
-        self.expect("memory read foo -t $foobar",
-                    substrs = ['($foobar) 0x', ' = ', "a = 'H'","b = 'e'","c = 'l'","d = 'l'"]) # persistent types are OK to use for memory read
-
-        self.expect("memory read foo -t foobar",
-                    substrs = ['($foobar) 0x', ' = ', "a = 'H'","b = 'e'","c = 'l'","d = 'l'"],matching=False,error=True) # the type name is $foobar, make sure we settle for nothing less
+        self.expect(
+            "memory read foo -t $foobar",
+            substrs=[
+                '($foobar) 0x',
+                ' = ',
+                "a = 'H'",
+                "b = 'e'",
+                "c = 'l'",
+                "d = 'l'"])  # persistent types are OK to use for memory read
+
+        self.expect(
+            "memory read foo -t foobar",
+            substrs=[
+                '($foobar) 0x',
+                ' = ',
+                "a = 'H'",
+                "b = 'e'",
+                "c = 'l'",
+                "d = 'l'"],
+            matching=False,
+            error=True)  # the type name is $foobar, make sure we settle for nothing less
 
         self.expect("expression struct { int a; int b; } x = { 2, 3 }; x",
-                    substrs = ['a = 2', 'b = 3'])
-
-        self.expect("expression struct { int x; int y; int z; } object; object.y = 1; object.z = 3; object.x = 2; object",
-                    substrs = ['x = 2', 'y = 1', 'z = 3'])
+                    substrs=['a = 2', 'b = 3'])
 
-        self.expect("expression struct A { int x; int y; }; struct { struct A a; int z; } object; object.a.y = 1; object.z = 3; object.a.x = 2; object",
-                    substrs = ['x = 2', 'y = 1', 'z = 3'])
+        self.expect(
+            "expression struct { int x; int y; int z; } object; object.y = 1; object.z = 3; object.x = 2; object",
+            substrs=[
+                'x = 2',
+                'y = 1',
+                'z = 3'])
+
+        self.expect(
+            "expression struct A { int x; int y; }; struct { struct A a; int z; } object; object.a.y = 1; object.z = 3; object.a.x = 2; object",
+            substrs=[
+                'x = 2',
+                'y = 1',
+                'z = 3'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/persistent_variables/TestPersistentVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/persistent_variables/TestPersistentVariables.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/persistent_variables/TestPersistentVariables.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/persistent_variables/TestPersistentVariables.py Tue Sep  6 15:57:50 2016
@@ -5,11 +5,12 @@ Test that lldb persistent variables work
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbtest import *
 
+
 class PersistentVariablesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -27,28 +28,28 @@ class PersistentVariablesTestCase(TestBa
         self.runCmd("expression int $i = i")
 
         self.expect("expression $i == i",
-            startstr = "(bool) $0 = true")
+                    startstr="(bool) $0 = true")
 
         self.expect("expression $i + 1",
-            startstr = "(int) $1 = 6")
+                    startstr="(int) $1 = 6")
 
         self.expect("expression $i + 3",
-            startstr = "(int) $2 = 8")
+                    startstr="(int) $2 = 8")
 
         self.expect("expression $2 + $1",
-            startstr = "(int) $3 = 14")
+                    startstr="(int) $3 = 14")
 
         self.expect("expression $3",
-            startstr = "(int) $3 = 14")
+                    startstr="(int) $3 = 14")
 
         self.expect("expression $2",
-            startstr = "(int) $2 = 8")
+                    startstr="(int) $2 = 8")
 
         self.expect("expression (int)-2",
-            startstr = "(int) $4 = -2")
+                    startstr="(int) $4 = -2")
 
         self.expect("expression $4 > (int)31",
-            startstr = "(bool) $5 = false")
+                    startstr="(bool) $5 = false")
 
         self.expect("expression (long)$4",
-            startstr = "(long) $6 = -2")
+                    startstr="(long) $6 = -2")

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/po_verbosity/TestPoVerbosity.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/po_verbosity/TestPoVerbosity.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/po_verbosity/TestPoVerbosity.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/po_verbosity/TestPoVerbosity.py Tue Sep  6 15:57:50 2016
@@ -5,12 +5,12 @@ Test that the po command acts correctly.
 from __future__ import print_function
 
 
-
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class PoVerbosityTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -26,37 +26,38 @@ class PoVerbosityTestCase(TestBase):
     def test(self):
         """Test that the po command acts correctly."""
         self.build()
-        
+
         # This is the function to remove the custom formats in order to have a
         # clean slate for the next test case.
         def cleanup():
             self.runCmd('type summary clear', check=False)
             self.runCmd('type synthetic clear', check=False)
-        
+
         # Execute the cleanup function during test case tear down.
         self.addTearDownHook(cleanup)
 
         """Test expr + formatters for good interoperability."""
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.m", self.line, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
-        
+
         self.expect("expr -O -v -- foo",
-            substrs = ['(id) $',' = 0x', '1 = 2','2 = 3;'])
+                    substrs=['(id) $', ' = 0x', '1 = 2', '2 = 3;'])
         self.expect("expr -O -vfull -- foo",
-            substrs = ['(id) $',' = 0x', '1 = 2','2 = 3;'])
-        self.expect("expr -O -- foo",matching=False,
-            substrs = ['(id) $'])
+                    substrs=['(id) $', ' = 0x', '1 = 2', '2 = 3;'])
+        self.expect("expr -O -- foo", matching=False,
+                    substrs=['(id) $'])
 
-        self.expect("expr -O -- 22",matching=False,
-            substrs = ['(int) $'])
+        self.expect("expr -O -- 22", matching=False,
+                    substrs=['(int) $'])
         self.expect("expr -O -- 22",
-            substrs = ['22'])
+                    substrs=['22'])
 
         self.expect("expr -O -vfull -- 22",
-            substrs = ['(int) $', ' = 22'])
+                    substrs=['(int) $', ' = 22'])
 
         self.expect("expr -O -v -- 22",
-            substrs = ['(int) $', ' = 22'])
+                    substrs=['(int) $', ' = 22'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/radar_8638051/Test8638051.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/radar_8638051/Test8638051.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/radar_8638051/Test8638051.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/radar_8638051/Test8638051.py Tue Sep  6 15:57:50 2016
@@ -5,11 +5,12 @@ Test the robustness of lldb expression p
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbtest import *
 
+
 class Radar8638051TestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -25,15 +26,15 @@ class Radar8638051TestCase(TestBase):
         self.runCmd("run", RUN_SUCCEEDED)
 
         self.expect("expression val",
-            startstr = "(int) $0 = 1")
+                    startstr="(int) $0 = 1")
         # (int) $0 = 1
 
         self.expect("expression *(&val)",
-            startstr = "(int) $1 = 1")
+                    startstr="(int) $1 = 1")
         # (int) $1 = 1
 
         # rdar://problem/8638051
         # lldb expression command: Could this crash be avoided
         self.expect("expression &val",
-            startstr = "(int *) $2 = ")
+                    startstr="(int *) $2 = ")
         # (int *) $2 = 0x....

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/radar_9531204/TestPrintfAfterUp.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/radar_9531204/TestPrintfAfterUp.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/radar_9531204/TestPrintfAfterUp.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/radar_9531204/TestPrintfAfterUp.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ The evaluating printf(...) after break s
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class Radar9531204TestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -24,7 +25,8 @@ class Radar9531204TestCase(TestBase):
 
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_symbol (self, 'foo', sym_exact=True, num_expected_locations=1)
+        lldbutil.run_break_set_by_symbol(
+            self, 'foo', sym_exact=True, num_expected_locations=1)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
@@ -35,7 +37,7 @@ class Radar9531204TestCase(TestBase):
 
         # rdar://problem/9531204
         # "Error dematerializing struct" error when evaluating expressions "up" on the stack
-        self.runCmd('up') # frame select -r 1
+        self.runCmd('up')  # frame select -r 1
 
         self.runCmd("frame variable")
 

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/radar_9673664/TestExprHelpExamples.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/radar_9673664/TestExprHelpExamples.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/radar_9673664/TestExprHelpExamples.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/radar_9673664/TestExprHelpExamples.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test example snippets from the lldb 'hel
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class Radar9673644TestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -30,13 +31,18 @@ class Radar9673644TestCase(TestBase):
 
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, self.main_source, self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            self.main_source,
+            self.line,
+            num_expected_locations=1,
+            loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # rdar://problem/9673664 lldb expression evaluation problem
 
         self.expect('expr char c[] = "foo"; c[0]',
-            substrs = ["'f'"])
+                    substrs=["'f'"])
         # runCmd: expr char c[] = "foo"; c[0]
         # output: (char) $0 = 'f'

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/test/TestExprs.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/test/TestExprs.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/test/TestExprs.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/test/TestExprs.py Tue Sep  6 15:57:50 2016
@@ -14,15 +14,16 @@ o test_expr_commands_can_handle_quotes:
 from __future__ import print_function
 
 
-
 import unittest2
 
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class BasicExprCommandsTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -31,13 +32,14 @@ class BasicExprCommandsTestCase(TestBase
         # Call super's setUp().
         TestBase.setUp(self)
         # Find the line number to break for main.c.
-        self.line = line_number('main.cpp',
-                                '// Please test many expressions while stopped at this line:')
+        self.line = line_number(
+            'main.cpp',
+            '// Please test many expressions while stopped at this line:')
 
         # Disable confirmation prompt to avoid infinite wait
         self.runCmd("settings set auto-confirm true")
-        self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))
-
+        self.addTearDownHook(
+            lambda: self.runCmd("settings clear auto-confirm"))
 
     def build_and_run(self):
         """These basic expression commands should work as expected."""
@@ -45,56 +47,58 @@ class BasicExprCommandsTestCase(TestBase
 
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
-    @unittest2.expectedFailure("llvm.org/pr17135 <rdar://problem/14874559> APFloat::toString does not identify the correct (i.e. least) precision.")
+    @unittest2.expectedFailure(
+        "llvm.org/pr17135 <rdar://problem/14874559> APFloat::toString does not identify the correct (i.e. least) precision.")
     def test_floating_point_expr_commands(self):
         self.build_and_run()
 
         self.expect("expression 2.234f",
-            patterns = ["\(float\) \$.* = 2\.234"])
+                    patterns=["\(float\) \$.* = 2\.234"])
         # (float) $2 = 2.234
 
     def test_many_expr_commands(self):
         self.build_and_run()
 
         self.expect("expression 2",
-            patterns = ["\(int\) \$.* = 2"])
+                    patterns=["\(int\) \$.* = 2"])
         # (int) $0 = 1
 
         self.expect("expression 2ull",
-            patterns = ["\(unsigned long long\) \$.* = 2"])
+                    patterns=["\(unsigned long long\) \$.* = 2"])
         # (unsigned long long) $1 = 2
 
         self.expect("expression 0.5f",
-            patterns = ["\(float\) \$.* = 0\.5"])
+                    patterns=["\(float\) \$.* = 0\.5"])
         # (float) $2 = 0.5
 
         self.expect("expression 2.234",
-            patterns = ["\(double\) \$.* = 2\.234"])
+                    patterns=["\(double\) \$.* = 2\.234"])
         # (double) $3 = 2.234
 
         self.expect("expression 2+3",
-            patterns = ["\(int\) \$.* = 5"])
+                    patterns=["\(int\) \$.* = 5"])
         # (int) $4 = 5
 
         self.expect("expression argc",
-            patterns = ["\(int\) \$.* = 1"])
+                    patterns=["\(int\) \$.* = 1"])
         # (int) $5 = 1
 
         self.expect("expression argc + 22",
-            patterns = ["\(int\) \$.* = 23"])
+                    patterns=["\(int\) \$.* = 23"])
         # (int) $6 = 23
 
         self.expect("expression argv",
-            patterns = ["\(const char \*\*\) \$.* = 0x"])
+                    patterns=["\(const char \*\*\) \$.* = 0x"])
         # (const char *) $7 = ...
 
         self.expect("expression argv[0]",
-            substrs = ["(const char *)", 
-                       "a.out"])
+                    substrs=["(const char *)",
+                             "a.out"])
         # (const char *) $8 = 0x... "/Volumes/data/lldb/svn/trunk/test/expression_command/test/a.out"
 
     @add_test_categories(['pyapi'])
@@ -115,12 +119,13 @@ class BasicExprCommandsTestCase(TestBase
 
         # Verify the breakpoint just created.
         self.expect(str(breakpoint), BREAKPOINT_CREATED, exe=False,
-            substrs = ['main.cpp',
-                       str(self.line)])
+                    substrs=['main.cpp',
+                             str(self.line)])
 
         # Launch the process, and do not stop at the entry point.
         # Pass 'X Y Z' as the args, which makes argc == 4.
-        process = target.LaunchSimple (['X', 'Y', 'Z'], None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            ['X', 'Y', 'Z'], None, self.get_process_working_directory())
 
         if not process:
             self.fail("SBTarget.LaunchProcess() failed")
@@ -130,16 +135,18 @@ class BasicExprCommandsTestCase(TestBase
                       "instead the actual state is: '%s'" %
                       lldbutil.state_type_to_str(process.GetState()))
 
-        thread = lldbutil.get_one_thread_stopped_at_breakpoint(process, breakpoint)
-        self.assertIsNotNone(thread, "Expected one thread to be stopped at the breakpoint")
+        thread = lldbutil.get_one_thread_stopped_at_breakpoint(
+            process, breakpoint)
+        self.assertIsNotNone(
+            thread, "Expected one thread to be stopped at the breakpoint")
 
         # The filename of frame #0 should be 'main.cpp' and function is main.
         self.expect(lldbutil.get_filenames(thread)[0],
                     "Break correctly at main.cpp", exe=False,
-            startstr = "main.cpp")
+                    startstr="main.cpp")
         self.expect(lldbutil.get_function_names(thread)[0],
                     "Break correctly at main()", exe=False,
-            startstr = "main")
+                    startstr="main")
 
         # We should be stopped on the breakpoint with a hit count of 1.
         self.assertTrue(breakpoint.GetHitCount() == 1, BREAKPOINT_HIT_ONCE)
@@ -151,49 +158,51 @@ class BasicExprCommandsTestCase(TestBase
 
         val = frame.EvaluateExpression("2.234")
         self.expect(val.GetValue(), "2.345 evaluated correctly", exe=False,
-            startstr = "2.234")
+                    startstr="2.234")
         self.expect(val.GetTypeName(), "2.345 evaluated correctly", exe=False,
-            startstr = "double")
+                    startstr="double")
         self.DebugSBValue(val)
 
         val = frame.EvaluateExpression("argc")
         self.expect(val.GetValue(), "Argc evaluated correctly", exe=False,
-            startstr = "4")
+                    startstr="4")
         self.DebugSBValue(val)
 
         val = frame.EvaluateExpression("*argv[1]")
         self.expect(val.GetValue(), "Argv[1] evaluated correctly", exe=False,
-            startstr = "'X'")
+                    startstr="'X'")
         self.DebugSBValue(val)
 
         val = frame.EvaluateExpression("*argv[2]")
         self.expect(val.GetValue(), "Argv[2] evaluated correctly", exe=False,
-            startstr = "'Y'")
+                    startstr="'Y'")
         self.DebugSBValue(val)
 
         val = frame.EvaluateExpression("*argv[3]")
         self.expect(val.GetValue(), "Argv[3] evaluated correctly", exe=False,
-            startstr = "'Z'")
+                    startstr="'Z'")
         self.DebugSBValue(val)
 
-        callee_break = target.BreakpointCreateByName ("a_function_to_call", None)
+        callee_break = target.BreakpointCreateByName(
+            "a_function_to_call", None)
         self.assertTrue(callee_break.GetNumLocations() > 0)
 
         # Make sure ignoring breakpoints works from the command line:
         self.expect("expression -i true -- a_function_to_call()",
-                    substrs = ['(int) $', ' 1'])
-        self.assertTrue (callee_break.GetHitCount() == 1)
+                    substrs=['(int) $', ' 1'])
+        self.assertTrue(callee_break.GetHitCount() == 1)
 
         # Now try ignoring breakpoints using the SB API's:
         options = lldb.SBExpressionOptions()
         options.SetIgnoreBreakpoints(True)
         value = frame.EvaluateExpression('a_function_to_call()', options)
-        self.assertTrue (value.IsValid())
-        self.assertTrue (value.GetValueAsSigned(0) == 2)
-        self.assertTrue (callee_break.GetHitCount() == 2)
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetValueAsSigned(0) == 2)
+        self.assertTrue(callee_break.GetHitCount() == 2)
 
     # rdar://problem/8686536
-    # CommandInterpreter::HandleCommand is stripping \'s from input for WantsRawCommand commands
+    # CommandInterpreter::HandleCommand is stripping \'s from input for
+    # WantsRawCommand commands
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
     def test_expr_commands_can_handle_quotes(self):
         """Throw some expression commands with quotes at lldb."""
@@ -201,44 +210,46 @@ class BasicExprCommandsTestCase(TestBase
 
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line(self, "main.cpp", self.line, num_expected_locations=1,loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # runCmd: expression 'a'
         # output: (char) $0 = 'a'
         self.expect("expression 'a'",
-            substrs = ['(char) $',
-                       "'a'"])
+                    substrs=['(char) $',
+                             "'a'"])
 
         # runCmd: expression (int) printf ("\n\n\tHello there!\n")
         # output: (int) $1 = 16
         self.expect(r'''expression (int) printf ("\n\n\tHello there!\n")''',
-            substrs = ['(int) $',
-                       '16'])
+                    substrs=['(int) $',
+                             '16'])
 
         # runCmd: expression (int) printf("\t\x68\n")
         # output: (int) $2 = 3
         self.expect(r'''expression (int) printf("\t\x68\n")''',
-            substrs = ['(int) $',
-                       '3'])
+                    substrs=['(int) $',
+                             '3'])
 
         # runCmd: expression (int) printf("\"\n")
         # output: (int) $3 = 2
         self.expect(r'''expression (int) printf("\"\n")''',
-            substrs = ['(int) $',
-                       '2'])
+                    substrs=['(int) $',
+                             '2'])
 
         # runCmd: expression (int) printf("'\n")
         # output: (int) $4 = 2
         self.expect(r'''expression (int) printf("'\n")''',
-            substrs = ['(int) $',
-                       '2'])
+                    substrs=['(int) $',
+                             '2'])
 
         # runCmd: command alias print_hi expression (int) printf ("\n\tHi!\n")
-        # output: 
-        self.runCmd(r'''command alias print_hi expression (int) printf ("\n\tHi!\n")''')
+        # output:
+        self.runCmd(
+            r'''command alias print_hi expression (int) printf ("\n\tHi!\n")''')
         # This fails currently.
         self.expect('print_hi',
-            substrs = ['(int) $',
-                       '6'])
+                    substrs=['(int) $',
+                             '6'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/test/TestExprs2.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/test/TestExprs2.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/test/TestExprs2.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/test/TestExprs2.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,13 @@ Test some more expression commands.
 from __future__ import print_function
 
 
-
 import os
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ExprCommands2TestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -20,42 +20,46 @@ class ExprCommands2TestCase(TestBase):
         # Call super's setUp().
         TestBase.setUp(self)
         # Find the line number to break for main.c.
-        self.line = line_number('main.cpp',
-                                '// Please test many expressions while stopped at this line:')
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
+        self.line = line_number(
+            'main.cpp',
+            '// Please test many expressions while stopped at this line:')
+
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
     def test_more_expr_commands(self):
         """Test some more expression commands."""
         self.build()
 
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line(self, "main.cpp", self.line, num_expected_locations=1,loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # Does static casting work?
         self.expect("expression (int*)argv",
-            startstr = "(int *) $0 = 0x")
+                    startstr="(int *) $0 = 0x")
         # (int *) $0 = 0x00007fff5fbff258
 
         # Do anonymous symbols work?
         self.expect("expression ((char**)environ)[0]",
-            startstr = "(char *) $1 = 0x")
+                    startstr="(char *) $1 = 0x")
         # (char *) $1 = 0x00007fff5fbff298 "Apple_PubSub_Socket_Render=/tmp/launch-7AEsUD/Render"
 
         # Do return values containing the contents of expression locals work?
         self.expect("expression int i = 5; i",
-            startstr = "(int) $2 = 5")
+                    startstr="(int) $2 = 5")
         # (int) $2 = 5
         self.expect("expression $2 + 1",
-            startstr = "(int) $3 = 6")
+                    startstr="(int) $3 = 6")
         # (int) $3 = 6
 
         # Do return values containing the results of static expressions work?
         self.expect("expression 20 + 3",
-            startstr = "(int) $4 = 23")
+                    startstr="(int) $4 = 23")
         # (int) $4 = 5
         self.expect("expression $4 + 1",
-            startstr = "(int) $5 = 24")
+                    startstr="(int) $5 = 24")
         # (int) $5 = 6




More information about the lldb-commits mailing list