[Lldb-commits] [lldb] r358135 - [NFC] Remove ASCII lines from comments
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 10 13:48:59 PDT 2019
Modified: lldb/trunk/include/lldb/Target/Thread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Thread.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Thread.h (original)
+++ lldb/trunk/include/lldb/Target/Thread.h Wed Apr 10 13:48:55 2019
@@ -34,7 +34,6 @@ public:
~ThreadProperties() override;
- //------------------------------------------------------------------
/// The regular expression returned determines symbols that this
/// thread won't stop in during "step-in" operations.
///
@@ -42,7 +41,6 @@ public:
/// A pointer to a regular expression to compare against symbols,
/// or nullptr if all symbols are allowed.
///
- //------------------------------------------------------------------
const RegularExpression *GetSymbolsToAvoidRegexp();
FileSpecList &GetLibrariesToAvoid() const;
@@ -64,9 +62,7 @@ class Thread : public std::enable_shared
public ExecutionContextScope,
public Broadcaster {
public:
- //------------------------------------------------------------------
/// Broadcaster event bits definitions.
- //------------------------------------------------------------------
enum {
eBroadcastBitStackChanged = (1 << 0),
eBroadcastBitThreadSuspended = (1 << 1),
@@ -130,7 +126,6 @@ public:
lldb::addr_t current_inlined_pc;
};
- //------------------------------------------------------------------
/// Constructor
///
/// \param [in] process
@@ -146,7 +141,6 @@ public:
/// 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;
@@ -167,7 +161,6 @@ public:
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,
@@ -190,14 +183,12 @@ public:
/// (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
@@ -206,7 +197,6 @@ public:
///
/// \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
@@ -266,7 +256,6 @@ public:
virtual const char *GetInfo() { return nullptr; }
- //------------------------------------------------------------------
/// Retrieve a dictionary of information about this thread
///
/// On Mac OS X systems there may be voucher information.
@@ -277,7 +266,6 @@ public:
/// array
/// being a dictionary (keys include "message" with the text of the trace
/// message).
- //------------------------------------------------------------------
StructuredData::ObjectSP GetExtendedInfo() {
if (!m_extended_info_fetched) {
m_extended_info = FetchThreadExtendedInfo();
@@ -290,7 +278,6 @@ public:
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,
@@ -307,7 +294,6 @@ public:
///
/// 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;
}
@@ -315,7 +301,6 @@ public:
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,
@@ -329,12 +314,10 @@ public:
/// \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,
@@ -343,12 +326,10 @@ public:
/// \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,
@@ -359,12 +340,10 @@ public:
/// \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
@@ -373,10 +352,8 @@ public:
/// 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
///
@@ -391,14 +368,12 @@ public:
/// \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
@@ -411,7 +386,6 @@ public:
/// 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() {
@@ -499,7 +473,6 @@ public:
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
@@ -520,13 +493,11 @@ public:
///
/// \return
/// An error that describes anything that went wrong
- //------------------------------------------------------------------
virtual Status
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
@@ -538,12 +509,10 @@ public:
///
/// \return
/// An error that describes anything that went wrong
- //------------------------------------------------------------------
virtual Status 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
@@ -551,10 +520,8 @@ public:
///
/// \return
/// An error that describes anything that went wrong
- //------------------------------------------------------------------
virtual Status 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.
@@ -562,10 +529,8 @@ public:
/// \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
@@ -577,11 +542,9 @@ public:
/// 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
@@ -591,10 +554,8 @@ public:
/// \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
@@ -617,9 +578,7 @@ public:
// 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
@@ -634,10 +593,8 @@ public:
/// \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.
///
@@ -658,12 +615,10 @@ public:
/// \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,
Status &status);
- //------------------------------------------------------------------
/// Queues the plan used to step through an address range, stepping over
/// function calls.
///
@@ -702,7 +657,6 @@ public:
/// \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,
@@ -718,7 +672,6 @@ public:
Status &status,
LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
- //------------------------------------------------------------------
/// Queues the plan used to step through an address range, stepping into
/// functions.
///
@@ -766,7 +719,6 @@ public:
/// \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,
@@ -784,7 +736,6 @@ public:
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.
///
@@ -823,14 +774,12 @@ public:
/// \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, Vote run_vote,
uint32_t frame_idx, Status &status,
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
@@ -887,13 +836,11 @@ public:
/// \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, Vote run_vote,
uint32_t frame_idx, Status &status, 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.
///
@@ -916,13 +863,11 @@ public:
/// \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,
Status &status);
- //------------------------------------------------------------------
/// 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.
@@ -944,7 +889,6 @@ public:
/// \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, Status &status);
@@ -957,57 +901,44 @@ public:
QueueThreadPlanForStepScripted(bool abort_other_plans, const char *class_name,
bool stop_other_threads, Status &status);
- //------------------------------------------------------------------
// 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.
- //------------------------------------------------------------------
Status 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.
///
@@ -1017,10 +948,8 @@ public:
/// \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.
///
@@ -1030,19 +959,15 @@ public:
/// \return
/// Returns true if the input plan is in the discarded plan stack,
/// false otherwise.
- //------------------------------------------------------------------
bool WasThreadPlanDiscarded(ThreadPlan *plan);
- //------------------------------------------------------------------
/// Check if we have completed plan to override breakpoint stop reason
///
/// \return
/// Returns true if completed plan stack is not empty
/// false otherwise.
- //------------------------------------------------------------------
bool CompletedPlanOverridesBreakpoint();
- //------------------------------------------------------------------
/// Queues a generic thread plan.
///
/// \param[in] plan_sp
@@ -1055,30 +980,24 @@ public:
///
/// \return
/// A pointer to the last completed plan.
- //------------------------------------------------------------------
Status 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
@@ -1091,16 +1010,13 @@ public:
/// \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,
@@ -1118,15 +1034,12 @@ public:
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
@@ -1136,22 +1049,17 @@ public:
// 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;
@@ -1194,7 +1102,6 @@ public:
// 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
@@ -1202,10 +1109,8 @@ public:
//
// \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
@@ -1219,7 +1124,6 @@ public:
// is resumed
// eStateSuspended - thread should not execute any instructions when
// process is resumed
- //----------------------------------------------------------------------
lldb::StateType GetTemporaryResumeState() const {
return m_temporary_resume_state;
}
@@ -1230,17 +1134,14 @@ public:
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
@@ -1249,7 +1150,6 @@ public:
/// \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; }
lldb::ValueObjectSP GetCurrentException();
@@ -1305,9 +1205,7 @@ protected:
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
Modified: lldb/trunk/include/lldb/Target/ThreadList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadList.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadList.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadList.h Wed Apr 10 13:48:55 2019
@@ -110,7 +110,6 @@ public:
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
@@ -122,7 +121,6 @@ public:
/// the process will not actually run. The thread must then return
/// the correct StopInfo when asked.
///
- //------------------------------------------------------------------
bool WillResume();
void DidResume();
@@ -144,9 +142,7 @@ protected:
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.
Modified: lldb/trunk/include/lldb/Target/ThreadPlan.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlan.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlan.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlan.h Wed Apr 10 13:48:55 2019
@@ -22,7 +22,6 @@
namespace lldb_private {
-//------------------------------------------------------------------
// ThreadPlan:
// This is the pure virtual base class for thread plans.
//
@@ -328,7 +327,6 @@ namespace lldb_private {
// 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 {
@@ -355,28 +353,22 @@ public:
} 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; }
@@ -385,7 +377,6 @@ public:
const Target &GetTarget() const { return m_thread.GetProcess()->GetTarget(); }
- //------------------------------------------------------------------
/// Print a description of this thread to the stream \a s.
/// \a thread.
///
@@ -395,10 +386,8 @@ public:
/// \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
@@ -408,7 +397,6 @@ public:
///
/// \return
/// \b true if the plan should be queued, \b false otherwise.
- //------------------------------------------------------------------
virtual bool ValidatePlan(Stream *error) = 0;
bool TracerExplainsStop() {
@@ -556,9 +544,7 @@ public:
}
protected:
- //------------------------------------------------------------------
// Classes that inherit from ThreadPlan can see and modify these
- //------------------------------------------------------------------
virtual bool DoWillResume(lldb::StateType resume_state, bool current_plan) {
return true;
@@ -604,9 +590,7 @@ protected:
int32_t m_iteration_count = 1;
private:
- //------------------------------------------------------------------
// For ThreadPlan only
- //------------------------------------------------------------------
static lldb::user_id_t GetNextID();
ThreadPlanKind m_kind;
@@ -625,13 +609,11 @@ private:
DISALLOW_COPY_AND_ASSIGN(ThreadPlan);
};
-//----------------------------------------------------------------------
// ThreadPlanNull:
// Threads are assumed to always have at least one plan on the plan stack. This
// is put on the plan stack when a thread is destroyed so that if you
// accidentally access a thread after it is destroyed you won't crash. But
// asking questions of the ThreadPlanNull is definitely an error.
-//----------------------------------------------------------------------
class ThreadPlanNull : public ThreadPlan {
public:
Modified: lldb/trunk/include/lldb/Target/ThreadPlanBase.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanBase.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanBase.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanBase.h Wed Apr 10 13:48:55 2019
@@ -15,12 +15,10 @@
namespace lldb_private {
-//------------------------------------------------------------------
// Base thread plans:
// 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.
Modified: lldb/trunk/include/lldb/Target/ThreadPlanCallOnFunctionExit.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanCallOnFunctionExit.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanCallOnFunctionExit.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanCallOnFunctionExit.h Wed Apr 10 13:48:55 2019
@@ -29,9 +29,7 @@ public:
void DidPush() override;
- // -------------------------------------------------------------------------
// ThreadPlan API
- // -------------------------------------------------------------------------
void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
Modified: lldb/trunk/include/lldb/Target/ThreadPlanPython.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanPython.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanPython.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanPython.h Wed Apr 10 13:48:55 2019
@@ -24,10 +24,8 @@
namespace lldb_private {
-//------------------------------------------------------------------
// ThreadPlanPython:
//
-//------------------------------------------------------------------
class ThreadPlanPython : public ThreadPlan {
public:
Modified: lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h Wed Apr 10 13:48:55 2019
@@ -62,9 +62,7 @@ public:
eStepOutAvoidNoDebug = (1 << 2)
};
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
ThreadPlanShouldStopHere(ThreadPlan *owner);
ThreadPlanShouldStopHere(ThreadPlan *owner,
Modified: lldb/trunk/include/lldb/Target/UnixSignals.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/UnixSignals.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/UnixSignals.h (original)
+++ lldb/trunk/include/lldb/Target/UnixSignals.h Wed Apr 10 13:48:55 2019
@@ -24,9 +24,7 @@ public:
static lldb::UnixSignalsSP Create(const ArchSpec &arch);
static lldb::UnixSignalsSP CreateForHost();
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
UnixSignals();
virtual ~UnixSignals();
@@ -95,9 +93,7 @@ public:
llvm::Optional<bool> should_notify);
protected:
- //------------------------------------------------------------------
// Classes that inherit from UnixSignals can see and modify these
- //------------------------------------------------------------------
struct Signal {
ConstString m_name;
Modified: lldb/trunk/include/lldb/Target/Unwind.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Unwind.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Unwind.h (original)
+++ lldb/trunk/include/lldb/Target/Unwind.h Wed Apr 10 13:48:55 2019
@@ -17,9 +17,7 @@ namespace lldb_private {
class Unwind {
protected:
- //------------------------------------------------------------------
// Classes that inherit from Unwind can see and modify these
- //------------------------------------------------------------------
Unwind(Thread &thread) : m_thread(thread), m_unwind_mutex() {}
public:
@@ -62,9 +60,7 @@ public:
Thread &GetThread() { return m_thread; }
protected:
- //------------------------------------------------------------------
// Classes that inherit from Unwind can see and modify these
- //------------------------------------------------------------------
virtual void DoClear() = 0;
virtual uint32_t DoGetFrameCount() = 0;
Modified: lldb/trunk/include/lldb/Utility/ArchSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/ArchSpec.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/ArchSpec.h (original)
+++ lldb/trunk/include/lldb/Utility/ArchSpec.h Wed Apr 10 13:48:55 2019
@@ -22,7 +22,6 @@
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class ArchSpec ArchSpec.h "lldb/Utility/ArchSpec.h" An architecture
/// specification class.
///
@@ -30,7 +29,6 @@ namespace lldb_private {
/// string representation, or an llvm::Triple. Keeping all of the conversions
/// of strings to architecture enumeration values confined to this class
/// allows new architecture support to be added easily.
-//----------------------------------------------------------------------
class ArchSpec {
public:
enum MIPSSubType {
@@ -235,131 +233,99 @@ public:
};
- //------------------------------------------------------------------
/// Default constructor.
///
/// Default constructor that initializes the object with invalid cpu type
/// and subtype values.
- //------------------------------------------------------------------
ArchSpec();
- //------------------------------------------------------------------
/// Constructor over triple.
///
/// Constructs an ArchSpec with properties consistent with the given Triple.
- //------------------------------------------------------------------
explicit ArchSpec(const llvm::Triple &triple);
explicit ArchSpec(const char *triple_cstr);
explicit ArchSpec(llvm::StringRef triple_str);
- //------------------------------------------------------------------
/// Constructor over architecture name.
///
/// Constructs an ArchSpec with properties consistent with the given object
/// type and architecture name.
- //------------------------------------------------------------------
explicit ArchSpec(ArchitectureType arch_type, uint32_t cpu_type,
uint32_t cpu_subtype);
- //------------------------------------------------------------------
/// Destructor.
- //------------------------------------------------------------------
~ArchSpec();
- //------------------------------------------------------------------
/// Assignment operator.
///
/// \param[in] rhs another ArchSpec object to copy.
///
/// \return A const reference to this object.
- //------------------------------------------------------------------
const ArchSpec &operator=(const ArchSpec &rhs);
- //---------------------------------------------------------------------------
/// Returns true if the OS, vendor and environment fields of the triple are
/// unset. The triple is expected to be normalized
/// (llvm::Triple::normalize).
- //---------------------------------------------------------------------------
static bool ContainsOnlyArch(const llvm::Triple &normalized_triple);
static void ListSupportedArchNames(StringList &list);
static size_t AutoComplete(CompletionRequest &request);
- //------------------------------------------------------------------
/// Returns a static string representing the current architecture.
///
/// \return A static string corresponding to the current
/// architecture.
- //------------------------------------------------------------------
const char *GetArchitectureName() const;
- //-----------------------------------------------------------------
/// if MIPS architecture return true.
///
/// \return a boolean value.
- //-----------------------------------------------------------------
bool IsMIPS() const;
- //------------------------------------------------------------------
/// Returns a string representing current architecture as a target CPU for
/// tools like compiler, disassembler etc.
///
/// \return A string representing target CPU for the current
/// architecture.
- //------------------------------------------------------------------
std::string GetClangTargetCPU() const;
- //------------------------------------------------------------------
/// Return a string representing target application ABI.
///
/// \return A string representing target application ABI.
- //------------------------------------------------------------------
std::string GetTargetABI() const;
- //------------------------------------------------------------------
/// Clears the object state.
///
/// Clears the object state back to a default invalid state.
- //------------------------------------------------------------------
void Clear();
- //------------------------------------------------------------------
/// Returns the size in bytes of an address of the current architecture.
///
/// \return The byte size of an address of the current architecture.
- //------------------------------------------------------------------
uint32_t GetAddressByteSize() const;
- //------------------------------------------------------------------
/// Returns a machine family for the current architecture.
///
/// \return An LLVM arch type.
- //------------------------------------------------------------------
llvm::Triple::ArchType GetMachine() const;
- //------------------------------------------------------------------
/// Returns the distribution id of the architecture.
///
/// This will be something like "ubuntu", "fedora", etc. on Linux.
///
/// \return A ConstString ref containing the distribution id,
/// potentially empty.
- //------------------------------------------------------------------
ConstString GetDistributionId() const;
- //------------------------------------------------------------------
/// Set the distribution id of the architecture.
///
/// This will be something like "ubuntu", "fedora", etc. on Linux. This
/// should be the same value returned by HostInfo::GetDistributionId ().
- ///------------------------------------------------------------------
void SetDistributionId(const char *distribution_id);
- //------------------------------------------------------------------
/// Tests if this ArchSpec is valid.
///
/// \return True if the current architecture is valid, false
/// otherwise.
- //------------------------------------------------------------------
bool IsValid() const {
return m_core >= eCore_arm_generic && m_core < kNumCores;
}
@@ -375,7 +341,6 @@ public:
return m_triple.hasEnvironment();
}
- //------------------------------------------------------------------
/// Merges fields from another ArchSpec into this ArchSpec.
///
/// This will use the supplied ArchSpec to fill in any fields of the triple
@@ -385,10 +350,8 @@ public:
/// have a triple which is x64-pc-windows-msvc, then merging that triple
/// into this one will result in the triple i386-pc-windows-msvc.
///
- //------------------------------------------------------------------
void MergeFrom(const ArchSpec &other);
- //------------------------------------------------------------------
/// Change the architecture object type, CPU type and OS type.
///
/// \param[in] arch_type The object type of this ArchSpec.
@@ -423,26 +386,21 @@ public:
/// *-*-netbsd
/// *-*-openbsd
/// *-*-solaris
- //------------------------------------------------------------------
bool SetArchitecture(ArchitectureType arch_type, uint32_t cpu, uint32_t sub,
uint32_t os = 0);
- //------------------------------------------------------------------
/// Returns the byte order for the architecture specification.
///
/// \return The endian enumeration for the current endianness of
/// the architecture specification
- //------------------------------------------------------------------
lldb::ByteOrder GetByteOrder() const;
- //------------------------------------------------------------------
/// Sets this ArchSpec's byte order.
///
/// In the common case there is no need to call this method as the byte
/// order can almost always be determined by the architecture. However, many
/// CPU's are bi-endian (ARM, Alpha, PowerPC, etc) and the default/assumed
/// byte order may be incorrect.
- //------------------------------------------------------------------
void SetByteOrder(lldb::ByteOrder byte_order) { m_byte_order = byte_order; }
uint32_t GetMinimumOpcodeByteSize() const;
@@ -455,39 +413,30 @@ public:
uint32_t GetMachOCPUSubType() const;
- //------------------------------------------------------------------
/// Architecture data byte width accessor
///
/// \return the size in 8-bit (host) bytes of a minimum addressable unit
/// from the Architecture's data bus
- //------------------------------------------------------------------
uint32_t GetDataByteSize() const;
- //------------------------------------------------------------------
/// Architecture code byte width accessor
///
/// \return the size in 8-bit (host) bytes of a minimum addressable unit
/// from the Architecture's code bus
- //------------------------------------------------------------------
uint32_t GetCodeByteSize() const;
- //------------------------------------------------------------------
/// Architecture triple accessor.
///
/// \return A triple describing this ArchSpec.
- //------------------------------------------------------------------
llvm::Triple &GetTriple() { return m_triple; }
- //------------------------------------------------------------------
/// Architecture triple accessor.
///
/// \return A triple describing this ArchSpec.
- //------------------------------------------------------------------
const llvm::Triple &GetTriple() const { return m_triple; }
void DumpTriple(Stream &s) const;
- //------------------------------------------------------------------
/// Architecture triple setter.
///
/// Configures this ArchSpec according to the given triple. If the triple
@@ -498,44 +447,35 @@ public:
/// etc.
///
/// \return A triple describing this ArchSpec.
- //------------------------------------------------------------------
bool SetTriple(const llvm::Triple &triple);
bool SetTriple(llvm::StringRef triple_str);
- //------------------------------------------------------------------
/// Returns the default endianness of the architecture.
///
/// \return The endian enumeration for the default endianness of
/// the architecture.
- //------------------------------------------------------------------
lldb::ByteOrder GetDefaultEndian() const;
- //------------------------------------------------------------------
/// Returns true if 'char' is a signed type by default in the architecture
/// false otherwise
///
/// \return True if 'char' is a signed type by default on the
/// architecture and false otherwise.
- //------------------------------------------------------------------
bool CharIsSignedByDefault() const;
- //------------------------------------------------------------------
/// Compare an ArchSpec to another ArchSpec, requiring an exact cpu type
/// match between them. e.g. armv7s is not an exact match with armv7 - this
/// would return false
///
/// \return true if the two ArchSpecs match.
- //------------------------------------------------------------------
bool IsExactMatch(const ArchSpec &rhs) const;
- //------------------------------------------------------------------
/// Compare an ArchSpec to another ArchSpec, requiring a compatible cpu type
/// match between them. e.g. armv7s is compatible with armv7 - this method
/// would return true
///
/// \return true if the two ArchSpecs are compatible
- //------------------------------------------------------------------
bool IsCompatibleMatch(const ArchSpec &rhs) const;
bool IsFullySpecifiedTriple() const;
@@ -545,7 +485,6 @@ public:
bool &os_version_different,
bool &env_different) const;
- //------------------------------------------------------------------
/// Detect whether this architecture uses thumb code exclusively
///
/// Some embedded ARM chips (e.g. the ARM Cortex M0-7 line) can only execute
@@ -557,7 +496,6 @@ public:
///
/// \return true if this is an arm ArchSpec which can only execute Thumb
/// instructions
- //------------------------------------------------------------------
bool IsAlwaysThumbInstructions() const;
uint32_t GetFlags() const { return m_flags; }
@@ -585,7 +523,6 @@ protected:
void CoreUpdated(bool update_triple);
};
-//------------------------------------------------------------------
/// \fn bool operator< (const ArchSpec& lhs, const ArchSpec& rhs) Less than
/// operator.
///
@@ -595,7 +532,6 @@ protected:
/// rhs The Left Hand Side ArchSpec object to compare.
///
/// \return true if \a lhs is less than \a rhs
-//------------------------------------------------------------------
bool operator<(const ArchSpec &lhs, const ArchSpec &rhs);
bool operator==(const ArchSpec &lhs, const ArchSpec &rhs);
Modified: lldb/trunk/include/lldb/Utility/Args.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Args.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Args.h (original)
+++ lldb/trunk/include/lldb/Utility/Args.h Wed Apr 10 13:48:55 2019
@@ -20,7 +20,6 @@
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class Args Args.h "lldb/Utility/Args.h"
/// A command line argument class.
///
@@ -30,7 +29,6 @@ namespace lldb_private {
/// quotes) surrounding the argument. Spaces can be escaped using a \
/// character to avoid having to surround an argument that contains a space
/// with quotes.
-//----------------------------------------------------------------------
class Args {
public:
struct ArgEntry {
@@ -48,13 +46,10 @@ public:
char quote;
const char *c_str() const { return ptr.get(); }
- //------------------------------------------------------------------
/// Returns true if this argument was quoted in any way.
- //------------------------------------------------------------------
bool IsQuoted() const { return quote != '\0'; }
};
- //------------------------------------------------------------------
/// Construct with an option command string.
///
/// \param[in] command
@@ -62,7 +57,6 @@ public:
/// into arguments.
///
/// \see Args::SetCommandString(llvm::StringRef)
- //------------------------------------------------------------------
Args(llvm::StringRef command = llvm::StringRef());
Args(const Args &rhs);
@@ -70,9 +64,7 @@ public:
Args &operator=(const Args &rhs);
- //------------------------------------------------------------------
/// Destructor.
- //------------------------------------------------------------------
~Args();
explicit Args(const Environment &env) : Args() {
@@ -81,7 +73,6 @@ public:
explicit operator Environment() const { return GetConstArgumentVector(); }
- //------------------------------------------------------------------
/// Dump all entries to the stream \a s using label \a label_name.
///
/// If label_name is nullptr, the dump operation is skipped.
@@ -93,10 +84,8 @@ public:
/// The label_name to use as the label printed for each
/// entry of the args like so:
/// {label_name}[{index}]={value}
- //------------------------------------------------------------------
void Dump(Stream &s, const char *label_name = "argv") const;
- //------------------------------------------------------------------
/// Sets the command string contained by this object.
///
/// The command string will be copied and split up into arguments that can
@@ -110,30 +99,25 @@ public:
/// \see Args::GetArgumentAtIndex (size_t) const @see
/// Args::GetArgumentVector () \see Args::Shift () \see Args::Unshift (const
/// char *)
- //------------------------------------------------------------------
void SetCommandString(llvm::StringRef command);
bool GetCommandString(std::string &command) const;
bool GetQuotedCommandString(std::string &command) const;
- //------------------------------------------------------------------
/// Gets the number of arguments left in this command object.
///
/// \return
/// The number or arguments in this object.
- //------------------------------------------------------------------
size_t GetArgumentCount() const;
bool empty() const { return GetArgumentCount() == 0; }
- //------------------------------------------------------------------
/// Gets the NULL terminated C string argument pointer for the argument at
/// index \a idx.
///
/// \return
/// The NULL terminated C string argument pointer if \a idx is a
/// valid argument index, NULL otherwise.
- //------------------------------------------------------------------
const char *GetArgumentAtIndex(size_t idx) const;
llvm::ArrayRef<ArgEntry> entries() const { return m_entries; }
@@ -147,7 +131,6 @@ public:
size_t size() const { return GetArgumentCount(); }
const ArgEntry &operator[](size_t n) const { return m_entries[n]; }
- //------------------------------------------------------------------
/// Gets the argument vector.
///
/// The value returned by this function can be used by any function that
@@ -160,10 +143,8 @@ public:
/// \return
/// An array of NULL terminated C string argument pointers that
/// also has a terminating NULL C string pointer
- //------------------------------------------------------------------
char **GetArgumentVector();
- //------------------------------------------------------------------
/// Gets the argument vector.
///
/// The value returned by this function can be used by any function that
@@ -176,19 +157,15 @@ public:
/// \return
/// An array of NULL terminate C string argument pointers that
/// also has a terminating NULL C string pointer
- //------------------------------------------------------------------
const char **GetConstArgumentVector() const;
- //------------------------------------------------------------------
/// Gets the argument as an ArrayRef. Note that the return value does *not*
/// have a nullptr const char * at the end, as the size of the list is
/// embedded in the ArrayRef object.
- //------------------------------------------------------------------
llvm::ArrayRef<const char *> GetArgumentArrayRef() const {
return llvm::makeArrayRef(m_argv).drop_back();
}
- //------------------------------------------------------------------
/// Appends a new argument to the end of the list argument list.
///
/// \param[in] arg_cstr
@@ -196,14 +173,12 @@ public:
///
/// \param[in] quote_char
/// If the argument was originally quoted, put in the quote char here.
- //------------------------------------------------------------------
void AppendArgument(llvm::StringRef arg_str, char quote_char = '\0');
void AppendArguments(const Args &rhs);
void AppendArguments(const char **argv);
- //------------------------------------------------------------------
/// Insert the argument value at index \a idx to \a arg_cstr.
///
/// \param[in] idx
@@ -217,11 +192,9 @@ public:
///
/// \return
/// The NULL terminated C string of the copy of \a arg_cstr.
- //------------------------------------------------------------------
void InsertArgumentAtIndex(size_t idx, llvm::StringRef arg_str,
char quote_char = '\0');
- //------------------------------------------------------------------
/// Replaces the argument value at index \a idx to \a arg_cstr if \a idx is
/// a valid argument index.
///
@@ -233,21 +206,17 @@ public:
///
/// \param[in] quote_char
/// If the argument was originally quoted, put in the quote char here.
- //------------------------------------------------------------------
void ReplaceArgumentAtIndex(size_t idx, llvm::StringRef arg_str,
char quote_char = '\0');
- //------------------------------------------------------------------
/// Deletes the argument value at index
/// if \a idx is a valid argument index.
///
/// \param[in] idx
/// The index of the argument that will have its value replaced.
///
- //------------------------------------------------------------------
void DeleteArgumentAtIndex(size_t idx);
- //------------------------------------------------------------------
/// Sets the argument vector value, optionally copying all arguments into an
/// internal buffer.
///
@@ -255,12 +224,10 @@ public:
/// will be copied into an internal buffers.
//
// FIXME: Handle the quote character somehow.
- //------------------------------------------------------------------
void SetArguments(size_t argc, const char **argv);
void SetArguments(const char **argv);
- //------------------------------------------------------------------
/// Shifts the first argument C string value of the array off the argument
/// array.
///
@@ -269,10 +236,8 @@ public:
/// returned value before calling Args::Shift().
///
/// \see Args::GetArgumentAtIndex (size_t) const
- //------------------------------------------------------------------
void Shift();
- //------------------------------------------------------------------
/// Inserts a class owned copy of \a arg_cstr at the beginning of the
/// argument vector.
///
@@ -283,14 +248,11 @@ public:
///
/// \param[in] quote_char
/// If the argument was originally quoted, put in the quote char here.
- //------------------------------------------------------------------
void Unshift(llvm::StringRef arg_str, char quote_char = '\0');
- //------------------------------------------------------------------
// Clear the arguments.
//
// For re-setting or blanking out the list of arguments.
- //------------------------------------------------------------------
void Clear();
static const char *StripSpaces(std::string &s, bool leading = true,
@@ -357,7 +319,6 @@ private:
std::vector<char *> m_argv;
};
-//----------------------------------------------------------------------
/// \class OptionsWithRaw Args.h "lldb/Utility/Args.h"
/// A pair of an option list with a 'raw' string as a suffix.
///
@@ -377,70 +338,55 @@ private:
/// string without any options.
///
/// \see Args
-//----------------------------------------------------------------------
class OptionsWithRaw {
public:
- //------------------------------------------------------------------
/// Parse the given string as a list of optional arguments with a raw suffix.
///
/// See the class description for a description of the input format.
///
/// \param[in] argument_string
/// The string that should be parsed.
- //------------------------------------------------------------------
explicit OptionsWithRaw(llvm::StringRef argument_string);
- //------------------------------------------------------------------
/// Returns true if there are any arguments before the raw suffix.
- //------------------------------------------------------------------
bool HasArgs() const { return m_has_args; }
- //------------------------------------------------------------------
/// Returns the list of arguments.
///
/// You can only call this method if HasArgs returns true.
- //------------------------------------------------------------------
Args &GetArgs() {
assert(m_has_args);
return m_args;
}
- //------------------------------------------------------------------
/// Returns the list of arguments.
///
/// You can only call this method if HasArgs returns true.
- //------------------------------------------------------------------
const Args &GetArgs() const {
assert(m_has_args);
return m_args;
}
- //------------------------------------------------------------------
/// Returns the part of the input string that was used for parsing the
/// argument list. This string also includes the double dash that is used
/// for separating the argument list from the suffix.
///
/// You can only call this method if HasArgs returns true.
- //------------------------------------------------------------------
llvm::StringRef GetArgStringWithDelimiter() const {
assert(m_has_args);
return m_arg_string_with_delimiter;
}
- //------------------------------------------------------------------
/// Returns the part of the input string that was used for parsing the
/// argument list.
///
/// You can only call this method if HasArgs returns true.
- //------------------------------------------------------------------
llvm::StringRef GetArgString() const {
assert(m_has_args);
return m_arg_string;
}
- //------------------------------------------------------------------
/// Returns the raw suffix part of the parsed string.
- //------------------------------------------------------------------
const std::string &GetRawPart() const { return m_suffix; }
private:
Modified: lldb/trunk/include/lldb/Utility/Baton.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Baton.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Baton.h (original)
+++ lldb/trunk/include/lldb/Utility/Baton.h Wed Apr 10 13:48:55 2019
@@ -20,7 +20,6 @@ class Stream;
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class Baton Baton.h "lldb/Core/Baton.h"
/// A class designed to wrap callback batons so they can cleanup
/// any acquired resources
@@ -31,7 +30,6 @@ namespace lldb_private {
///
/// The default behavior is to not free anything. Subclasses can free any
/// needed resources in their destructors.
-//----------------------------------------------------------------------
class Baton {
public:
Baton() {}
Modified: lldb/trunk/include/lldb/Utility/Broadcaster.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Broadcaster.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Broadcaster.h (original)
+++ lldb/trunk/include/lldb/Utility/Broadcaster.h Wed Apr 10 13:48:55 2019
@@ -39,12 +39,10 @@ class Stream;
namespace lldb_private {
-//----------------------------------------------------------------------
// lldb::BroadcastEventSpec
//
// This class is used to specify a kind of event to register for. The Debugger
// maintains a list of BroadcastEventSpec's and when it is made
-//----------------------------------------------------------------------
class BroadcastEventSpec {
public:
BroadcastEventSpec(ConstString broadcaster_class, uint32_t event_bits)
@@ -221,7 +219,6 @@ private:
};
};
-//----------------------------------------------------------------------
/// \class Broadcaster Broadcaster.h "lldb/Utility/Broadcaster.h" An event
/// broadcasting class.
///
@@ -241,9 +238,7 @@ private:
/// class Foo : public Broadcaster
/// {
/// public:
-/// //----------------------------------------------------------
/// // Broadcaster event bits definitions.
-/// //----------------------------------------------------------
/// enum
/// {
/// eBroadcastBitOne = (1 << 0),
@@ -252,31 +247,25 @@ private:
/// ...
/// };
/// \endcode
-//----------------------------------------------------------------------
class Broadcaster {
friend class Listener;
friend class Event;
public:
- //------------------------------------------------------------------
/// Construct with a broadcaster with a name.
///
/// \param[in] name
/// A NULL terminated C string that contains the name of the
/// broadcaster object.
- //------------------------------------------------------------------
Broadcaster(lldb::BroadcasterManagerSP manager_sp, const char *name);
- //------------------------------------------------------------------
/// Destructor.
///
/// The destructor is virtual since this class gets subclassed.
- //------------------------------------------------------------------
virtual ~Broadcaster();
void CheckInWithManager();
- //------------------------------------------------------------------
/// Broadcast an event which has no associated data.
///
/// \param[in] event_type
@@ -291,7 +280,6 @@ public:
/// If true, then only add an event of this type if there isn't
/// one already in the queue.
///
- //------------------------------------------------------------------
void BroadcastEvent(lldb::EventSP &event_sp) {
m_broadcaster_sp->BroadcastEvent(event_sp);
}
@@ -319,7 +307,6 @@ public:
virtual void AddInitialEventsToListener(const lldb::ListenerSP &listener_sp,
uint32_t requested_events);
- //------------------------------------------------------------------
/// Listen for any events specified by \a event_mask.
///
/// Only one listener can listen to each event bit in a given Broadcaster.
@@ -339,21 +326,17 @@ public:
///
/// \return
/// The actual event bits that were acquired by \a listener.
- //------------------------------------------------------------------
uint32_t AddListener(const lldb::ListenerSP &listener_sp,
uint32_t event_mask) {
return m_broadcaster_sp->AddListener(listener_sp, event_mask);
}
- //------------------------------------------------------------------
/// Get the NULL terminated C string name of this Broadcaster object.
///
/// \return
/// The NULL terminated C string name of this Broadcaster.
- //------------------------------------------------------------------
ConstString GetBroadcasterName() { return m_broadcaster_name; }
- //------------------------------------------------------------------
/// Get the event name(s) for one or more event bits.
///
/// \param[in] event_mask
@@ -361,14 +344,12 @@ public:
///
/// \return
/// The NULL terminated C string name of this Broadcaster.
- //------------------------------------------------------------------
bool GetEventNames(Stream &s, const uint32_t event_mask,
bool prefix_with_broadcaster_name) const {
return m_broadcaster_sp->GetEventNames(s, event_mask,
prefix_with_broadcaster_name);
}
- //------------------------------------------------------------------
/// Set the name for an event bit.
///
/// \param[in] event_mask
@@ -377,7 +358,6 @@ public:
///
/// \return
/// The NULL terminated C string name of this Broadcaster.
- //------------------------------------------------------------------
void SetEventName(uint32_t event_mask, const char *name) {
m_broadcaster_sp->SetEventName(event_mask, name);
}
@@ -390,7 +370,6 @@ public:
return m_broadcaster_sp->EventTypeHasListeners(event_type);
}
- //------------------------------------------------------------------
/// Removes a Listener from this broadcasters list and frees the event bits
/// specified by \a event_mask that were previously acquired by \a listener
/// (assuming \a listener was listening to this object) for other listener
@@ -407,13 +386,11 @@ public:
/// and was removed, \b false otherwise.
///
/// \see uint32_t Broadcaster::AddListener (Listener*, uint32_t)
- //------------------------------------------------------------------
bool RemoveListener(const lldb::ListenerSP &listener_sp,
uint32_t event_mask = UINT32_MAX) {
return m_broadcaster_sp->RemoveListener(listener_sp, event_mask);
}
- //------------------------------------------------------------------
/// Provides a simple mechanism to temporarily redirect events from
/// broadcaster. When you call this function passing in a listener and
/// event type mask, all events from the broadcaster matching the mask will
@@ -432,7 +409,6 @@ public:
/// \b True if the event mask could be hijacked, \b false otherwise.
///
/// \see uint32_t Broadcaster::AddListener (Listener*, uint32_t)
- //------------------------------------------------------------------
bool HijackBroadcaster(const lldb::ListenerSP &listener_sp,
uint32_t event_mask = UINT32_MAX) {
return m_broadcaster_sp->HijackBroadcaster(listener_sp, event_mask);
@@ -442,10 +418,8 @@ public:
return m_broadcaster_sp->IsHijackedForEvent(event_mask);
}
- //------------------------------------------------------------------
/// Restore the state of the Broadcaster from a previous hijack attempt.
///
- //------------------------------------------------------------------
void RestoreBroadcaster() { m_broadcaster_sp->RestoreBroadcaster(); }
// This needs to be filled in if you are going to register the broadcaster
@@ -537,9 +511,7 @@ protected:
const char *GetHijackingListenerName();
- //------------------------------------------------------------------
//
- //------------------------------------------------------------------
typedef llvm::SmallVector<std::pair<lldb::ListenerWP, uint32_t>, 4>
collection;
typedef std::map<uint32_t, std::string> event_names_map;
@@ -562,9 +534,7 @@ protected:
// collections, but for now this is just for private hijacking.
private:
- //------------------------------------------------------------------
// For Broadcaster only
- //------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(BroadcasterImpl);
};
@@ -576,14 +546,10 @@ protected:
const char *GetHijackingListenerName() {
return m_broadcaster_sp->GetHijackingListenerName();
}
- //------------------------------------------------------------------
// Classes that inherit from Broadcaster can see and modify these
- //------------------------------------------------------------------
private:
- //------------------------------------------------------------------
// For Broadcaster only
- //------------------------------------------------------------------
BroadcasterImplSP m_broadcaster_sp;
lldb::BroadcasterManagerSP m_manager_sp;
const ConstString
Modified: lldb/trunk/include/lldb/Utility/CompletionRequest.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/CompletionRequest.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/CompletionRequest.h (original)
+++ lldb/trunk/include/lldb/Utility/CompletionRequest.h Wed Apr 10 13:48:55 2019
@@ -17,9 +17,7 @@
namespace lldb_private {
class CompletionResult {
- //----------------------------------------------------------
/// A single completion and all associated data.
- //----------------------------------------------------------
struct Completion {
Completion(llvm::StringRef completion, llvm::StringRef description)
: m_completion(completion.str()), m_descripton(description.str()) {}
@@ -38,24 +36,19 @@ class CompletionResult {
public:
void AddResult(llvm::StringRef completion, llvm::StringRef description);
- //----------------------------------------------------------
/// Adds all collected completion matches to the given list.
/// The list will be cleared before the results are added. The number of
/// results here is guaranteed to be equal to GetNumberOfResults().
- //----------------------------------------------------------
void GetMatches(StringList &matches) const;
- //----------------------------------------------------------
/// Adds all collected completion descriptions to the given list.
/// The list will be cleared before the results are added. The number of
/// results here is guaranteed to be equal to GetNumberOfResults().
- //----------------------------------------------------------
void GetDescriptions(StringList &descriptions) const;
std::size_t GetNumberOfResults() const { return m_results.size(); }
};
-//----------------------------------------------------------------------
/// \class CompletionRequest CompletionRequest.h
/// "lldb/Utility/ArgCompletionRequest.h"
///
@@ -63,10 +56,8 @@ public:
/// for the user. Will be filled with the generated completions by the different
/// completions functions.
///
-//----------------------------------------------------------------------
class CompletionRequest {
public:
- //----------------------------------------------------------
/// Constructs a completion request.
///
/// \param [in] command_line
@@ -87,7 +78,6 @@ public:
/// \param [out] result
/// The CompletionResult that will be filled with the results after this
/// request has been handled.
- //----------------------------------------------------------
CompletionRequest(llvm::StringRef command_line, unsigned raw_cursor_pos,
int match_start_point, int max_return_elements,
CompletionResult &result);
Modified: lldb/trunk/include/lldb/Utility/Connection.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Connection.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Connection.h (original)
+++ lldb/trunk/include/lldb/Utility/Connection.h Wed Apr 10 13:48:55 2019
@@ -29,7 +29,6 @@ template <typename Ratio> class Timeout;
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class Connection Connection.h "lldb/Utility/Connection.h"
/// A communication connection class.
///
@@ -41,21 +40,15 @@ namespace lldb_private {
/// Instances can be instantiated and given to a Communication class to
/// perform communications where clients can listen for broadcasts, and
/// perform other higher level communications.
-//----------------------------------------------------------------------
class Connection {
public:
- //------------------------------------------------------------------
/// Default constructor
- //------------------------------------------------------------------
Connection() = default;
- //------------------------------------------------------------------
/// Virtual destructor since this class gets subclassed and handed to a
/// Communication object.
- //------------------------------------------------------------------
virtual ~Connection();
- //------------------------------------------------------------------
/// Connect using the connect string \a url.
///
/// \param[in] url
@@ -73,11 +66,9 @@ public:
/// appropriate value based on the result of this function.
///
/// \see Status& Communication::GetError ();
- //------------------------------------------------------------------
virtual lldb::ConnectionStatus Connect(llvm::StringRef url,
Status *error_ptr) = 0;
- //------------------------------------------------------------------
/// Disconnect the communications connection if one is currently connected.
///
/// \param[out] error_ptr
@@ -91,19 +82,15 @@ public:
/// appropriate value based on the result of this function.
///
/// \see Status& Communication::GetError ();
- //------------------------------------------------------------------
virtual lldb::ConnectionStatus Disconnect(Status *error_ptr) = 0;
- //------------------------------------------------------------------
/// Check if the connection is valid.
///
/// \return
/// \b True if this object is currently connected, \b false
/// otherwise.
- //------------------------------------------------------------------
virtual bool IsConnected() const = 0;
- //------------------------------------------------------------------
/// The read function that attempts to read from the connection.
///
/// \param[in] dst
@@ -130,12 +117,10 @@ public:
/// The number of bytes actually read.
///
/// \see size_t Communication::Read (void *, size_t, uint32_t);
- //------------------------------------------------------------------
virtual size_t Read(void *dst, size_t dst_len,
const Timeout<std::micro> &timeout,
lldb::ConnectionStatus &status, Status *error_ptr) = 0;
- //------------------------------------------------------------------
/// The actual write function that attempts to write to the communications
/// protocol.
///
@@ -156,21 +141,17 @@ public:
///
/// \return
/// The number of bytes actually Written.
- //------------------------------------------------------------------
virtual size_t Write(const void *dst, size_t dst_len,
lldb::ConnectionStatus &status, Status *error_ptr) = 0;
- //------------------------------------------------------------------
/// Returns a URI that describes this connection object
///
/// Subclasses may override this function.
///
/// \return
/// Returns URI or an empty string if disconnecteds
- //------------------------------------------------------------------
virtual std::string GetURI() = 0;
- //------------------------------------------------------------------
/// Interrupts an ongoing Read() operation.
///
/// If there is an ongoing read operation in another thread, this operation
@@ -182,10 +163,8 @@ public:
///
/// \return
/// Returns true is the interrupt request was successful.
- //------------------------------------------------------------------
virtual bool InterruptRead() = 0;
- //------------------------------------------------------------------
/// Returns the underlying IOObject used by the Connection.
///
/// The IOObject can be used to wait for data to become available on the
@@ -194,13 +173,10 @@ public:
///
/// \return
/// The underlying IOObject used for reading.
- //------------------------------------------------------------------
virtual lldb::IOObjectSP GetReadObject() { return lldb::IOObjectSP(); }
private:
- //------------------------------------------------------------------
// For Connection only
- //------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(Connection);
};
Modified: lldb/trunk/include/lldb/Utility/ConstString.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/ConstString.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/ConstString.h (original)
+++ lldb/trunk/include/lldb/Utility/ConstString.h Wed Apr 10 13:48:55 2019
@@ -23,7 +23,6 @@ class raw_ostream;
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class ConstString ConstString.h "lldb/Utility/ConstString.h"
/// A uniqued constant string class.
///
@@ -36,29 +35,23 @@ namespace lldb_private {
/// No reference counting is done on strings that are added to the string
/// pool, once strings are added they are in the string pool for the life of
/// the program.
-//----------------------------------------------------------------------
class ConstString {
public:
- //------------------------------------------------------------------
/// Default constructor
///
/// Initializes the string to an empty string.
- //------------------------------------------------------------------
ConstString() : m_string(nullptr) {}
- //------------------------------------------------------------------
/// Copy constructor
///
/// Copies the string value in \a rhs into this object.
///
/// \param[in] rhs
/// Another string object to copy.
- //------------------------------------------------------------------
ConstString(const ConstString &rhs) : m_string(rhs.m_string) {}
explicit ConstString(const llvm::StringRef &s);
- //------------------------------------------------------------------
/// Construct with C String value
///
/// Constructs this object with a C string by looking to see if the
@@ -67,10 +60,8 @@ public:
///
/// \param[in] cstr
/// A NULL terminated C string to add to the string pool.
- //------------------------------------------------------------------
explicit ConstString(const char *cstr);
- //------------------------------------------------------------------
/// Construct with C String value with max length
///
/// Constructs this object with a C string with a length. If \a max_cstr_len
@@ -91,23 +82,17 @@ public:
/// truncated. If the string length of \a cstr is greater than
/// \a max_cstr_len, then only max_cstr_len bytes will be used
/// from \a cstr.
- //------------------------------------------------------------------
explicit ConstString(const char *cstr, size_t max_cstr_len);
- //------------------------------------------------------------------
/// Destructor
///
/// Since constant string values are currently not reference counted, there
/// isn't much to do here.
- //------------------------------------------------------------------
~ConstString() = default;
- //----------------------------------------------------------------------
/// C string equality binary predicate function object for ConstString
/// objects.
- //----------------------------------------------------------------------
struct StringIsEqual {
- //--------------------------------------------------------------
/// C equality test.
///
/// Two C strings are equal when they are contained in ConstString objects
@@ -116,13 +101,11 @@ public:
/// \return
/// Returns \b true if the C string in \a lhs is equal to
/// the C string value in \a rhs, \b false otherwise.
- //--------------------------------------------------------------
bool operator()(const char *lhs, const char *rhs) const {
return lhs == rhs;
}
};
- //------------------------------------------------------------------
/// Convert to bool operator.
///
/// This allows code to check a ConstString object to see if it contains a
@@ -137,10 +120,8 @@ public:
/// \return
/// /b True this object contains a valid non-empty C string, \b
/// false otherwise.
- //------------------------------------------------------------------
explicit operator bool() const { return !IsEmpty(); }
- //------------------------------------------------------------------
/// Assignment operator
///
/// Assigns the string in this object with the value from \a rhs.
@@ -150,13 +131,11 @@ public:
///
/// \return
/// A const reference to this object.
- //------------------------------------------------------------------
ConstString operator=(ConstString rhs) {
m_string = rhs.m_string;
return *this;
}
- //------------------------------------------------------------------
/// Equal to operator
///
/// Returns true if this string is equal to the string in \a rhs. This
@@ -169,14 +148,12 @@ public:
/// \return
/// \li \b true if this object is equal to \a rhs.
/// \li \b false if this object is not equal to \a rhs.
- //------------------------------------------------------------------
bool operator==(ConstString rhs) const {
// We can do a pointer compare to compare these strings since they must
// come from the same pool in order to be equal.
return m_string == rhs.m_string;
}
- //------------------------------------------------------------------
/// Not equal to operator
///
/// Returns true if this string is not equal to the string in \a rhs. This
@@ -189,14 +166,12 @@ public:
/// \return
/// \li \b true if this object is not equal to \a rhs.
/// \li \b false if this object is equal to \a rhs.
- //------------------------------------------------------------------
bool operator!=(ConstString rhs) const {
return m_string != rhs.m_string;
}
bool operator<(ConstString rhs) const;
- //------------------------------------------------------------------
/// Get the string value as a C string.
///
/// Get the value of the contained string as a NULL terminated C string
@@ -207,23 +182,19 @@ public:
/// \return
/// Returns \a value_if_empty if the string is empty, otherwise
/// the C string value contained in this object.
- //------------------------------------------------------------------
const char *AsCString(const char *value_if_empty = nullptr) const {
return (IsEmpty() ? value_if_empty : m_string);
}
- //------------------------------------------------------------------
/// Get the string value as a llvm::StringRef
///
/// \return
/// Returns a new llvm::StringRef object filled in with the
/// needed data.
- //------------------------------------------------------------------
llvm::StringRef GetStringRef() const {
return llvm::StringRef(m_string, GetLength());
}
- //------------------------------------------------------------------
/// Get the string value as a C string.
///
/// Get the value of the contained string as a NULL terminated C string
@@ -234,10 +205,8 @@ public:
/// \return
/// Returns nullptr the string is invalid, otherwise the C string
/// value contained in this object.
- //------------------------------------------------------------------
const char *GetCString() const { return m_string; }
- //------------------------------------------------------------------
/// Get the length in bytes of string value.
///
/// The string pool stores the length of the string, so we can avoid calling
@@ -246,18 +215,14 @@ public:
/// \return
/// Returns the number of bytes that this string occupies in
/// memory, not including the NULL termination byte.
- //------------------------------------------------------------------
size_t GetLength() const;
- //------------------------------------------------------------------
/// Clear this object's state.
///
/// Clear any contained string and reset the value to the empty string
/// value.
- //------------------------------------------------------------------
void Clear() { m_string = nullptr; }
- //------------------------------------------------------------------
/// Equal to operator
///
/// Returns true if this string is equal to the string in \a rhs. If case
@@ -278,11 +243,9 @@ public:
/// \return
/// \li \b true if this object is equal to \a rhs.
/// \li \b false if this object is not equal to \a rhs.
- //------------------------------------------------------------------
static bool Equals(ConstString lhs, ConstString rhs,
const bool case_sensitive = true);
- //------------------------------------------------------------------
/// Compare two string objects.
///
/// Compares the C string values contained in \a lhs and \a rhs and returns
@@ -307,11 +270,9 @@ public:
/// \li -1 if lhs < rhs
/// \li 0 if lhs == rhs
/// \li 1 if lhs > rhs
- //------------------------------------------------------------------
static int Compare(ConstString lhs, ConstString rhs,
const bool case_sensitive = true);
- //------------------------------------------------------------------
/// Dump the object description to a stream.
///
/// Dump the string value to the stream \a s. If the contained string is
@@ -324,36 +285,28 @@ public:
/// \param[in] value_if_empty
/// The value to dump if the string is empty. If nullptr, nothing
/// will be output to the stream.
- //------------------------------------------------------------------
void Dump(Stream *s, const char *value_if_empty = nullptr) const;
- //------------------------------------------------------------------
/// Dump the object debug description to a stream.
///
/// \param[in] s
/// The stream that will be used to dump the object description.
- //------------------------------------------------------------------
void DumpDebug(Stream *s) const;
- //------------------------------------------------------------------
/// Test for empty string.
///
/// \return
/// \li \b true if the contained string is empty.
/// \li \b false if the contained string is not empty.
- //------------------------------------------------------------------
bool IsEmpty() const { return m_string == nullptr || m_string[0] == '\0'; }
- //------------------------------------------------------------------
/// Test for null string.
///
/// \return
/// \li \b true if there is no string associated with this instance.
/// \li \b false if there is a string associated with this instance.
- //------------------------------------------------------------------
bool IsNull() const { return m_string == nullptr; }
- //------------------------------------------------------------------
/// Set the C string value.
///
/// Set the string value in the object by uniquing the \a cstr string value
@@ -365,12 +318,10 @@ public:
///
/// \param[in] cstr
/// A NULL terminated C string to add to the string pool.
- //------------------------------------------------------------------
void SetCString(const char *cstr);
void SetString(const llvm::StringRef &s);
- //------------------------------------------------------------------
/// Set the C string value and its mangled counterpart.
///
/// Object files and debug symbols often use mangled string to represent the
@@ -386,11 +337,9 @@ public:
/// \param[in] mangled
/// The already uniqued mangled ConstString to correlate the
/// soon to be uniqued version of \a demangled.
- //------------------------------------------------------------------
void SetStringWithMangledCounterpart(llvm::StringRef demangled,
ConstString mangled);
- //------------------------------------------------------------------
/// Retrieve the mangled or demangled counterpart for a mangled or demangled
/// ConstString.
///
@@ -408,10 +357,8 @@ public:
/// \return
/// /b True if \a counterpart was filled in with the counterpart
/// /b false otherwise.
- //------------------------------------------------------------------
bool GetMangledCounterpart(ConstString &counterpart) const;
- //------------------------------------------------------------------
/// Set the C string value with length.
///
/// Set the string value in the object by uniquing \a cstr_len bytes
@@ -428,18 +375,14 @@ public:
///
/// \param[in] cstr_len
/// The maximum length of the C string.
- //------------------------------------------------------------------
void SetCStringWithLength(const char *cstr, size_t cstr_len);
- //------------------------------------------------------------------
/// Set the C string value with the minimum length between \a fixed_cstr_len
/// and the actual length of the C string. This can be used for data
/// structures that have a fixed length to store a C string where the string
/// might not be NULL terminated if the string takes the entire buffer.
- //------------------------------------------------------------------
void SetTrimmedCStringWithLength(const char *cstr, size_t fixed_cstr_len);
- //------------------------------------------------------------------
/// Get the memory cost of this object.
///
/// Return the size in bytes that this object takes in memory. This returns
@@ -450,10 +393,8 @@ public:
/// The number of bytes that this object occupies in memory.
///
/// \see ConstString::StaticMemorySize ()
- //------------------------------------------------------------------
size_t MemorySize() const { return sizeof(ConstString); }
- //------------------------------------------------------------------
/// Get the size in bytes of the current global string pool.
///
/// Reports the size in bytes of all shared C string values, containers and
@@ -462,19 +403,14 @@ public:
/// \return
/// The number of bytes that the global string pool occupies
/// in memory.
- //------------------------------------------------------------------
static size_t StaticMemorySize();
protected:
- //------------------------------------------------------------------
// Member variables
- //------------------------------------------------------------------
const char *m_string;
};
-//------------------------------------------------------------------
/// Stream the string value \a str to the stream \a s
-//------------------------------------------------------------------
Stream &operator<<(Stream &s, ConstString str);
} // namespace lldb_private
Modified: lldb/trunk/include/lldb/Utility/DataBuffer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/DataBuffer.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/DataBuffer.h (original)
+++ lldb/trunk/include/lldb/Utility/DataBuffer.h Wed Apr 10 13:48:55 2019
@@ -19,7 +19,6 @@
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class DataBuffer DataBuffer.h "lldb/Core/DataBuffer.h"
/// A pure virtual protocol class for abstracted data buffers.
///
@@ -41,43 +40,34 @@ namespace lldb_private {
/// This class currently expects all data to be available without any extra
/// calls being made, but we can modify it to optionally get data on demand
/// with some extra function calls to load the data before it gets accessed.
-//----------------------------------------------------------------------
class DataBuffer {
public:
- //------------------------------------------------------------------
/// Destructor
///
/// The destructor is virtual as other classes will inherit from this class
/// and be downcast to the DataBuffer pure virtual interface. The virtual
/// destructor ensures that destructing the base class will destruct the
/// class that inherited from it correctly.
- //------------------------------------------------------------------
virtual ~DataBuffer() {}
- //------------------------------------------------------------------
/// Get a pointer to the data.
///
/// \return
/// A pointer to the bytes owned by this object, or NULL if the
/// object contains no bytes.
- //------------------------------------------------------------------
virtual uint8_t *GetBytes() = 0;
- //------------------------------------------------------------------
/// Get a const pointer to the data.
///
/// \return
/// A const pointer to the bytes owned by this object, or NULL
/// if the object contains no bytes.
- //------------------------------------------------------------------
virtual const uint8_t *GetBytes() const = 0;
- //------------------------------------------------------------------
/// Get the number of bytes in the data buffer.
///
/// \return
/// The number of bytes this object currently contains.
- //------------------------------------------------------------------
virtual lldb::offset_t GetByteSize() const = 0;
llvm::ArrayRef<uint8_t> GetData() const {
Modified: lldb/trunk/include/lldb/Utility/DataBufferHeap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/DataBufferHeap.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/DataBufferHeap.h (original)
+++ lldb/trunk/include/lldb/Utility/DataBufferHeap.h Wed Apr 10 13:48:55 2019
@@ -18,7 +18,6 @@
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class DataBufferHeap DataBufferHeap.h "lldb/Core/DataBufferHeap.h"
/// A subclass of DataBuffer that stores a data buffer on the heap.
///
@@ -28,17 +27,13 @@ namespace lldb_private {
/// pages in. Large amounts of data that comes from files should probably use
/// DataBufferLLVM, which can intelligently determine when memory mapping is
/// optimal.
-//----------------------------------------------------------------------
class DataBufferHeap : public DataBuffer {
public:
- //------------------------------------------------------------------
/// Default constructor
///
/// Initializes the heap based buffer with no bytes.
- //------------------------------------------------------------------
DataBufferHeap();
- //------------------------------------------------------------------
/// Construct with size \a n and fill with \a ch.
///
/// Initialize this class with \a n bytes and fills the buffer with \a ch.
@@ -48,10 +43,8 @@ public:
///
/// \param[in] ch
/// The character to use when filling the buffer initially.
- //------------------------------------------------------------------
DataBufferHeap(lldb::offset_t n, uint8_t ch);
- //------------------------------------------------------------------
/// Construct by making a copy of \a src_len bytes from \a src.
///
/// \param[in] src
@@ -59,33 +52,23 @@ public:
///
/// \param[in] src_len
/// The number of bytes in \a src to copy.
- //------------------------------------------------------------------
DataBufferHeap(const void *src, lldb::offset_t src_len);
- //------------------------------------------------------------------
/// Destructor.
///
/// Virtual destructor since this class inherits from a pure virtual base
/// class #DataBuffer.
- //------------------------------------------------------------------
~DataBufferHeap() override;
- //------------------------------------------------------------------
/// \copydoc DataBuffer::GetBytes()
- //------------------------------------------------------------------
uint8_t *GetBytes() override;
- //------------------------------------------------------------------
/// \copydoc DataBuffer::GetBytes() const
- //------------------------------------------------------------------
const uint8_t *GetBytes() const override;
- //------------------------------------------------------------------
/// \copydoc DataBuffer::GetByteSize() const
- //------------------------------------------------------------------
lldb::offset_t GetByteSize() const override;
- //------------------------------------------------------------------
/// Set the number of bytes in the data buffer.
///
/// Sets the number of bytes that this object should be able to contain.
@@ -99,10 +82,8 @@ public:
/// \return
/// The size in bytes after that this heap buffer was
/// successfully resized to.
- //------------------------------------------------------------------
lldb::offset_t SetByteSize(lldb::offset_t byte_size);
- //------------------------------------------------------------------
/// Makes a copy of the \a src_len bytes in \a src.
///
/// Copies the data in \a src into an internal buffer.
@@ -112,7 +93,6 @@ public:
///
/// \param[in] src_len
/// The number of bytes in \a src to copy.
- //------------------------------------------------------------------
void CopyData(const void *src, lldb::offset_t src_len);
void CopyData(llvm::StringRef src) { CopyData(src.data(), src.size()); }
@@ -121,10 +101,8 @@ public:
void Clear();
private:
- //------------------------------------------------------------------
// This object uses a std::vector<uint8_t> to store its data. This takes care
// of free the data when the object is deleted.
- //------------------------------------------------------------------
typedef std::vector<uint8_t> buffer_t; ///< Buffer type
buffer_t m_data; ///< The heap based buffer where data is stored
};
Modified: lldb/trunk/include/lldb/Utility/DataEncoder.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/DataEncoder.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/DataEncoder.h (original)
+++ lldb/trunk/include/lldb/Utility/DataEncoder.h Wed Apr 10 13:48:55 2019
@@ -21,7 +21,6 @@
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class DataEncoder DataEncoder.h "lldb/Core/DataEncoder.h" An binary data
/// encoding class.
///
@@ -30,17 +29,13 @@ namespace lldb_private {
/// that can be shared between multiple DataEncoder or DataEncoder instances.
///
/// \see DataBuffer
-//----------------------------------------------------------------------
class DataEncoder {
public:
- //------------------------------------------------------------------
/// Default constructor.
///
/// Initialize all members to a default empty state.
- //------------------------------------------------------------------
DataEncoder();
- //------------------------------------------------------------------
/// Construct with a buffer that is owned by the caller.
///
/// This constructor allows us to use data that is owned by the caller. The
@@ -57,11 +52,9 @@ public:
///
/// \param[in] addr_size
/// A new address byte size value.
- //------------------------------------------------------------------
DataEncoder(void *data, uint32_t data_length, lldb::ByteOrder byte_order,
uint8_t addr_size);
- //------------------------------------------------------------------
/// Construct with shared data.
///
/// Copies the data shared pointer which adds a reference to the contained
@@ -77,57 +70,45 @@ public:
///
/// \param[in] addr_size
/// A new address byte size value.
- //------------------------------------------------------------------
DataEncoder(const lldb::DataBufferSP &data_sp, lldb::ByteOrder byte_order,
uint8_t addr_size);
- //------------------------------------------------------------------
/// Destructor
///
/// If this object contains a valid shared data reference, the reference
/// count on the data will be decremented, and if zero, the data will be
/// freed.
- //------------------------------------------------------------------
~DataEncoder();
- //------------------------------------------------------------------
/// Clears the object state.
///
/// Clears the object contents back to a default invalid state, and release
/// any references to shared data that this object may contain.
- //------------------------------------------------------------------
void Clear();
- //------------------------------------------------------------------
/// Get the current address size.
///
/// Return the size in bytes of any address values this object will extract.
///
/// \return
/// The size in bytes of address values that will be extracted.
- //------------------------------------------------------------------
uint8_t GetAddressByteSize() const { return m_addr_size; }
- //------------------------------------------------------------------
/// Get the number of bytes contained in this object.
///
/// \return
/// The total number of bytes of data this object refers to.
- //------------------------------------------------------------------
size_t GetByteSize() const { return m_end - m_start; }
- //------------------------------------------------------------------
/// Get the data end pointer.
///
/// \return
/// Returns a pointer to the next byte contained in this
/// object's data, or NULL of there is no data in this object.
- //------------------------------------------------------------------
uint8_t *GetDataEnd() { return m_end; }
const uint8_t *GetDataEnd() const { return m_end; }
- //------------------------------------------------------------------
/// Get the shared data offset.
///
/// Get the offset of the first byte of data in the shared data (if any).
@@ -135,30 +116,24 @@ public:
/// \return
/// If this object contains shared data, this function returns
/// the offset in bytes into that shared data, zero otherwise.
- //------------------------------------------------------------------
size_t GetSharedDataOffset() const;
- //------------------------------------------------------------------
/// Get the current byte order value.
///
/// \return
/// The current byte order value from this object's internal
/// state.
- //------------------------------------------------------------------
lldb::ByteOrder GetByteOrder() const { return m_byte_order; }
- //------------------------------------------------------------------
/// Get the data start pointer.
///
/// \return
/// Returns a pointer to the first byte contained in this
/// object's data, or NULL of there is no data in this object.
- //------------------------------------------------------------------
uint8_t *GetDataStart() { return m_start; }
const uint8_t *GetDataStart() const { return m_start; }
- //------------------------------------------------------------------
/// Encode unsigned integer values into the data at \a offset.
///
/// \param[in] offset
@@ -171,7 +146,6 @@ public:
/// \return
/// The next offset in the bytes of this data if the data
/// was successfully encoded, UINT32_MAX if the encoding failed.
- //------------------------------------------------------------------
uint32_t PutU8(uint32_t offset, uint8_t value);
uint32_t PutU16(uint32_t offset, uint16_t value);
@@ -180,7 +154,6 @@ public:
uint32_t PutU64(uint32_t offset, uint64_t value);
- //------------------------------------------------------------------
/// Encode an unsigned integer of size \a byte_size to \a offset.
///
/// Encode a single integer value at \a offset and return the offset that
@@ -203,10 +176,8 @@ public:
/// \return
/// The next offset in the bytes of this data if the integer
/// was successfully encoded, UINT32_MAX if the encoding failed.
- //------------------------------------------------------------------
uint32_t PutMaxU64(uint32_t offset, uint32_t byte_size, uint64_t value);
- //------------------------------------------------------------------
/// Encode an arbitrary number of bytes.
///
/// \param[in] offset
@@ -222,10 +193,8 @@ public:
/// \return
/// The next valid offset within data if the put operation
/// was successful, else UINT32_MAX to indicate the put failed.
- //------------------------------------------------------------------
uint32_t PutData(uint32_t offset, const void *src, uint32_t src_len);
- //------------------------------------------------------------------
/// Encode an address in the existing buffer at \a offset bytes into the
/// buffer.
///
@@ -245,10 +214,8 @@ public:
/// \return
/// The next valid offset within data if the put operation
/// was successful, else UINT32_MAX to indicate the put failed.
- //------------------------------------------------------------------
uint32_t PutAddress(uint32_t offset, lldb::addr_t addr);
- //------------------------------------------------------------------
/// Put a C string to \a offset.
///
/// Encodes a C string into the existing data including the terminating
@@ -265,12 +232,10 @@ public:
/// pointed to by \a offset_ptr is out of bounds, or if the
/// offset plus the length of the C string is out of bounds,
/// NULL will be returned.
- //------------------------------------------------------------------
uint32_t PutCString(uint32_t offset_ptr, const char *cstr);
lldb::DataBufferSP &GetSharedDataBuffer() { return m_data_sp; }
- //------------------------------------------------------------------
/// Set the address byte size.
///
/// Set the size in bytes that will be used when extracting any address and
@@ -278,10 +243,8 @@ public:
///
/// \param[in] addr_size
/// The size in bytes to use when extracting addresses.
- //------------------------------------------------------------------
void SetAddressByteSize(uint8_t addr_size) { m_addr_size = addr_size; }
- //------------------------------------------------------------------
/// Set data with a buffer that is caller owned.
///
/// Use data that is owned by the caller when extracting values. The data
@@ -300,10 +263,8 @@ public:
///
/// \return
/// The number of bytes that this object now contains.
- //------------------------------------------------------------------
uint32_t SetData(void *bytes, uint32_t length, lldb::ByteOrder byte_order);
- //------------------------------------------------------------------
/// Adopt a subset of shared data in \a data_sp.
///
/// Copies the data shared pointer which adds a reference to the contained
@@ -326,11 +287,9 @@ public:
///
/// \return
/// The number of bytes that this object now contains.
- //------------------------------------------------------------------
uint32_t SetData(const lldb::DataBufferSP &data_sp, uint32_t offset = 0,
uint32_t length = UINT32_MAX);
- //------------------------------------------------------------------
/// Set the byte_order value.
///
/// Sets the byte order of the data to extract. Extracted values will be
@@ -338,25 +297,20 @@ public:
///
/// \param[in] byte_order
/// The byte order value to use when extracting data.
- //------------------------------------------------------------------
void SetByteOrder(lldb::ByteOrder byte_order) { m_byte_order = byte_order; }
- //------------------------------------------------------------------
/// Test the validity of \a offset.
///
/// \return
/// \b true if \a offset is a valid offset into the data in this
/// object, \b false otherwise.
- //------------------------------------------------------------------
bool ValidOffset(uint32_t offset) const { return offset < GetByteSize(); }
- //------------------------------------------------------------------
/// Test the availability of \a length bytes of data from \a offset.
///
/// \return
/// \b true if \a offset is a valid offset and there are \a
/// length bytes available at that offset, \b false otherwise.
- //------------------------------------------------------------------
bool ValidOffsetForDataOfSize(uint32_t offset, uint32_t length) const {
return length <= BytesLeft(offset);
}
@@ -369,9 +323,7 @@ public:
}
protected:
- //------------------------------------------------------------------
// Member variables
- //------------------------------------------------------------------
uint8_t *m_start; ///< A pointer to the first byte of data.
uint8_t *m_end; ///< A pointer to the byte that is past the end of the data.
lldb::ByteOrder
Modified: lldb/trunk/include/lldb/Utility/DataExtractor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/DataExtractor.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/DataExtractor.h (original)
+++ lldb/trunk/include/lldb/Utility/DataExtractor.h Wed Apr 10 13:48:55 2019
@@ -32,7 +32,6 @@ template <typename T> class SmallVectorI
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class DataExtractor DataExtractor.h "lldb/Core/DataExtractor.h" An data
/// extractor class.
///
@@ -45,13 +44,10 @@ namespace lldb_private {
/// offsets.
///
/// \see DataBuffer
-//----------------------------------------------------------------------
class DataExtractor {
public:
- //------------------------------------------------------------------
/// \typedef DataExtractor::Type
/// Type enumerations used in the dump routines.
- //------------------------------------------------------------------
typedef enum {
TypeUInt8, ///< Format output as unsigned 8 bit integers
TypeChar, ///< Format output as characters
@@ -63,14 +59,11 @@ public:
TypeSLEB128 ///< Format output as SLEB128 numbers
} Type;
- //------------------------------------------------------------------
/// Default constructor.
///
/// Initialize all members to a default empty state.
- //------------------------------------------------------------------
DataExtractor();
- //------------------------------------------------------------------
/// Construct with a buffer that is owned by the caller.
///
/// This constructor allows us to use data that is owned by the caller. The
@@ -90,12 +83,10 @@ public:
///
/// \param[in] target_byte_size
/// A size of a target byte in 8-bit host bytes
- //------------------------------------------------------------------
DataExtractor(const void *data, lldb::offset_t data_length,
lldb::ByteOrder byte_order, uint32_t addr_size,
uint32_t target_byte_size = 1);
- //------------------------------------------------------------------
/// Construct with shared data.
///
/// Copies the data shared pointer which adds a reference to the contained
@@ -114,11 +105,9 @@ public:
///
/// \param[in] target_byte_size
/// A size of a target byte in 8-bit host bytes
- //------------------------------------------------------------------
DataExtractor(const lldb::DataBufferSP &data_sp, lldb::ByteOrder byte_order,
uint32_t addr_size, uint32_t target_byte_size = 1);
- //------------------------------------------------------------------
/// Construct with a subset of \a data.
///
/// Initialize this object with a subset of the data bytes in \a data. If \a
@@ -141,13 +130,11 @@ public:
///
/// \param[in] target_byte_size
/// A size of a target byte in 8-bit host bytes
- //------------------------------------------------------------------
DataExtractor(const DataExtractor &data, lldb::offset_t offset,
lldb::offset_t length, uint32_t target_byte_size = 1);
DataExtractor(const DataExtractor &rhs);
- //------------------------------------------------------------------
/// Assignment operator.
///
/// Copies all data, byte order and address size settings from \a rhs into
@@ -159,29 +146,23 @@ public:
///
/// \return
/// A const reference to this object.
- //------------------------------------------------------------------
const DataExtractor &operator=(const DataExtractor &rhs);
- //------------------------------------------------------------------
/// Destructor
///
/// If this object contains a valid shared data reference, the reference
/// count on the data will be decremented, and if zero, the data will be
/// freed.
- //------------------------------------------------------------------
virtual ~DataExtractor();
uint32_t getTargetByteSize() const { return m_target_byte_size; }
- //------------------------------------------------------------------
/// Clears the object state.
///
/// Clears the object contents back to a default invalid state, and release
/// any references to shared data that this object may contain.
- //------------------------------------------------------------------
void Clear();
- //------------------------------------------------------------------
/// Dumps the binary data as \a type objects to stream \a s (or to Log() if
/// \a s is nullptr) starting \a offset bytes into the data and stopping
/// after dumping \a length bytes. The offset into the data is displayed at
@@ -215,13 +196,11 @@ public:
///
/// \return
/// The offset at which dumping ended.
- //------------------------------------------------------------------
lldb::offset_t PutToLog(Log *log, lldb::offset_t offset,
lldb::offset_t length, uint64_t base_addr,
uint32_t num_per_line, Type type,
const char *type_format = nullptr) const;
- //------------------------------------------------------------------
/// Extract an arbitrary number of bytes in the specified byte order.
///
/// Attemps to extract \a length bytes starting at \a offset bytes into this
@@ -247,11 +226,9 @@ public:
/// The number of bytes that were extracted which will be \a
/// length when the value is successfully extracted, or zero
/// if there aren't enough bytes at the specified offset.
- //------------------------------------------------------------------
size_t ExtractBytes(lldb::offset_t offset, lldb::offset_t length,
lldb::ByteOrder dst_byte_order, void *dst) const;
- //------------------------------------------------------------------
/// Extract an address from \a *offset_ptr.
///
/// Extract a single address from the data and update the offset pointed to
@@ -268,30 +245,24 @@ public:
///
/// \return
/// The extracted address value.
- //------------------------------------------------------------------
uint64_t GetAddress(lldb::offset_t *offset_ptr) const;
uint64_t GetAddress_unchecked(lldb::offset_t *offset_ptr) const;
- //------------------------------------------------------------------
/// Get the current address size.
///
/// Return the size in bytes of any address values this object will extract.
///
/// \return
/// The size in bytes of address values that will be extracted.
- //------------------------------------------------------------------
uint32_t GetAddressByteSize() const { return m_addr_size; }
- //------------------------------------------------------------------
/// Get the number of bytes contained in this object.
///
/// \return
/// The total number of bytes of data this object refers to.
- //------------------------------------------------------------------
uint64_t GetByteSize() const { return m_end - m_start; }
- //------------------------------------------------------------------
/// Extract a C string from \a *offset_ptr.
///
/// Returns a pointer to a C String from the data at the offset pointed to
@@ -311,10 +282,8 @@ public:
/// pointed to by \a offset_ptr is out of bounds, or if the
/// offset plus the length of the C string is out of bounds,
/// nullptr will be returned.
- //------------------------------------------------------------------
const char *GetCStr(lldb::offset_t *offset_ptr) const;
- //------------------------------------------------------------------
/// Extract a C string from \a *offset_ptr with field size \a len.
///
/// Returns a pointer to a C String from the data at the offset pointed to
@@ -338,7 +307,6 @@ public:
/// be returned.
const char *GetCStr(lldb::offset_t *offset_ptr, lldb::offset_t len) const;
- //------------------------------------------------------------------
/// Extract \a length bytes from \a *offset_ptr.
///
/// Returns a pointer to a bytes in this object's data at the offset pointed
@@ -360,7 +328,6 @@ public:
/// \return
/// A pointer to the bytes in this object's data if the offset
/// and length are valid, or nullptr otherwise.
- //------------------------------------------------------------------
const void *GetData(lldb::offset_t *offset_ptr, lldb::offset_t length) const {
const uint8_t *ptr = PeekData(*offset_ptr, length);
if (ptr)
@@ -368,7 +335,6 @@ public:
return ptr;
}
- //------------------------------------------------------------------
/// Copy \a length bytes from \a *offset, without swapping bytes.
///
/// \param[in] offset
@@ -383,11 +349,9 @@ public:
/// \return
/// Returns the number of bytes that were copied, or zero if
/// anything goes wrong.
- //------------------------------------------------------------------
lldb::offset_t CopyData(lldb::offset_t offset, lldb::offset_t length,
void *dst) const;
- //------------------------------------------------------------------
/// Copy \a dst_len bytes from \a *offset_ptr and ensure the copied data is
/// treated as a value that can be swapped to match the specified byte
/// order.
@@ -424,22 +388,18 @@ public:
/// \return
/// Returns the number of bytes that were copied, or zero if
/// anything goes wrong.
- //------------------------------------------------------------------
lldb::offset_t CopyByteOrderedData(lldb::offset_t src_offset,
lldb::offset_t src_len, void *dst,
lldb::offset_t dst_len,
lldb::ByteOrder dst_byte_order) const;
- //------------------------------------------------------------------
/// Get the data end pointer.
///
/// \return
/// Returns a pointer to the next byte contained in this
/// object's data, or nullptr of there is no data in this object.
- //------------------------------------------------------------------
const uint8_t *GetDataEnd() const { return m_end; }
- //------------------------------------------------------------------
/// Get the shared data offset.
///
/// Get the offset of the first byte of data in the shared data (if any).
@@ -447,19 +407,15 @@ public:
/// \return
/// If this object contains shared data, this function returns
/// the offset in bytes into that shared data, zero otherwise.
- //------------------------------------------------------------------
size_t GetSharedDataOffset() const;
- //------------------------------------------------------------------
/// Get the data start pointer.
///
/// \return
/// Returns a pointer to the first byte contained in this
/// object's data, or nullptr of there is no data in this object.
- //------------------------------------------------------------------
const uint8_t *GetDataStart() const { return m_start; }
- //------------------------------------------------------------------
/// Extract a float from \a *offset_ptr.
///
/// Extract a single float value.
@@ -473,14 +429,12 @@ public:
///
/// \return
/// The floating value that was extracted, or zero on failure.
- //------------------------------------------------------------------
float GetFloat(lldb::offset_t *offset_ptr) const;
double GetDouble(lldb::offset_t *offset_ptr) const;
long double GetLongDouble(lldb::offset_t *offset_ptr) const;
- //------------------------------------------------------------------
/// Extract an integer of size \a byte_size from \a *offset_ptr.
///
/// Extract a single integer value and update the offset pointed to by \a
@@ -500,10 +454,8 @@ public:
///
/// \return
/// The integer value that was extracted, or zero on failure.
- //------------------------------------------------------------------
uint32_t GetMaxU32(lldb::offset_t *offset_ptr, size_t byte_size) const;
- //------------------------------------------------------------------
/// Extract an unsigned integer of size \a byte_size from \a *offset_ptr.
///
/// Extract a single unsigned integer value and update the offset pointed to
@@ -525,13 +477,11 @@ public:
/// \return
/// The unsigned integer value that was extracted, or zero on
/// failure.
- //------------------------------------------------------------------
uint64_t GetMaxU64(lldb::offset_t *offset_ptr, size_t byte_size) const;
uint64_t GetMaxU64_unchecked(lldb::offset_t *offset_ptr,
size_t byte_size) const;
- //------------------------------------------------------------------
/// Extract an signed integer of size \a byte_size from \a *offset_ptr.
///
/// Extract a single signed integer value (sign extending if required) and
@@ -553,10 +503,8 @@ public:
/// \return
/// The sign extended signed integer value that was extracted,
/// or zero on failure.
- //------------------------------------------------------------------
int64_t GetMaxS64(lldb::offset_t *offset_ptr, size_t byte_size) const;
- //------------------------------------------------------------------
/// Extract an unsigned integer of size \a byte_size from \a *offset_ptr,
/// then extract the bitfield from this value if \a bitfield_bit_size is
/// non-zero.
@@ -591,12 +539,10 @@ public:
/// \return
/// The unsigned bitfield integer value that was extracted, or
/// zero on failure.
- //------------------------------------------------------------------
uint64_t GetMaxU64Bitfield(lldb::offset_t *offset_ptr, size_t size,
uint32_t bitfield_bit_size,
uint32_t bitfield_bit_offset) const;
- //------------------------------------------------------------------
/// Extract an signed integer of size \a byte_size from \a *offset_ptr, then
/// extract and signe extend the bitfield from this value if \a
/// bitfield_bit_size is non-zero.
@@ -631,12 +577,10 @@ public:
/// \return
/// The signed bitfield integer value that was extracted, or
/// zero on failure.
- //------------------------------------------------------------------
int64_t GetMaxS64Bitfield(lldb::offset_t *offset_ptr, size_t size,
uint32_t bitfield_bit_size,
uint32_t bitfield_bit_offset) const;
- //------------------------------------------------------------------
/// Extract an pointer from \a *offset_ptr.
///
/// Extract a single pointer from the data and update the offset pointed to
@@ -653,19 +597,15 @@ public:
///
/// \return
/// The extracted pointer value as a 64 integer.
- //------------------------------------------------------------------
uint64_t GetPointer(lldb::offset_t *offset_ptr) const;
- //------------------------------------------------------------------
/// Get the current byte order value.
///
/// \return
/// The current byte order value from this object's internal
/// state.
- //------------------------------------------------------------------
lldb::ByteOrder GetByteOrder() const { return m_byte_order; }
- //------------------------------------------------------------------
/// Extract a uint8_t value from \a *offset_ptr.
///
/// Extract a single uint8_t from the binary data at the offset pointed to
@@ -680,7 +620,6 @@ public:
///
/// \return
/// The extracted uint8_t value.
- //------------------------------------------------------------------
uint8_t GetU8(lldb::offset_t *offset_ptr) const;
uint8_t GetU8_unchecked(lldb::offset_t *offset_ptr) const {
@@ -694,7 +633,6 @@ public:
uint32_t GetU32_unchecked(lldb::offset_t *offset_ptr) const;
uint64_t GetU64_unchecked(lldb::offset_t *offset_ptr) const;
- //------------------------------------------------------------------
/// Extract \a count uint8_t values from \a *offset_ptr.
///
/// Extract \a count uint8_t values from the binary data at the offset
@@ -718,10 +656,8 @@ public:
/// \return
/// \a dst if all values were properly extracted and copied,
/// nullptr otherwise.
- //------------------------------------------------------------------
void *GetU8(lldb::offset_t *offset_ptr, void *dst, uint32_t count) const;
- //------------------------------------------------------------------
/// Extract a uint16_t value from \a *offset_ptr.
///
/// Extract a single uint16_t from the binary data at the offset pointed to
@@ -736,10 +672,8 @@ public:
///
/// \return
/// The extracted uint16_t value.
- //------------------------------------------------------------------
uint16_t GetU16(lldb::offset_t *offset_ptr) const;
- //------------------------------------------------------------------
/// Extract \a count uint16_t values from \a *offset_ptr.
///
/// Extract \a count uint16_t values from the binary data at the offset
@@ -763,10 +697,8 @@ public:
/// \return
/// \a dst if all values were properly extracted and copied,
/// nullptr otherwise.
- //------------------------------------------------------------------
void *GetU16(lldb::offset_t *offset_ptr, void *dst, uint32_t count) const;
- //------------------------------------------------------------------
/// Extract a uint32_t value from \a *offset_ptr.
///
/// Extract a single uint32_t from the binary data at the offset pointed to
@@ -781,10 +713,8 @@ public:
///
/// \return
/// The extracted uint32_t value.
- //------------------------------------------------------------------
uint32_t GetU32(lldb::offset_t *offset_ptr) const;
- //------------------------------------------------------------------
/// Extract \a count uint32_t values from \a *offset_ptr.
///
/// Extract \a count uint32_t values from the binary data at the offset
@@ -808,10 +738,8 @@ public:
/// \return
/// \a dst if all values were properly extracted and copied,
/// nullptr otherwise.
- //------------------------------------------------------------------
void *GetU32(lldb::offset_t *offset_ptr, void *dst, uint32_t count) const;
- //------------------------------------------------------------------
/// Extract a uint64_t value from \a *offset_ptr.
///
/// Extract a single uint64_t from the binary data at the offset pointed to
@@ -826,10 +754,8 @@ public:
///
/// \return
/// The extracted uint64_t value.
- //------------------------------------------------------------------
uint64_t GetU64(lldb::offset_t *offset_ptr) const;
- //------------------------------------------------------------------
/// Extract \a count uint64_t values from \a *offset_ptr.
///
/// Extract \a count uint64_t values from the binary data at the offset
@@ -853,10 +779,8 @@ public:
/// \return
/// \a dst if all values were properly extracted and copied,
/// nullptr otherwise.
- //------------------------------------------------------------------
void *GetU64(lldb::offset_t *offset_ptr, void *dst, uint32_t count) const;
- //------------------------------------------------------------------
/// Extract a signed LEB128 value from \a *offset_ptr.
///
/// Extracts an signed LEB128 number from this object's data starting at the
@@ -873,10 +797,8 @@ public:
///
/// \return
/// The extracted signed integer value.
- //------------------------------------------------------------------
int64_t GetSLEB128(lldb::offset_t *offset_ptr) const;
- //------------------------------------------------------------------
/// Extract a unsigned LEB128 value from \a *offset_ptr.
///
/// Extracts an unsigned LEB128 number from this object's data starting at
@@ -893,12 +815,10 @@ public:
///
/// \return
/// The extracted unsigned integer value.
- //------------------------------------------------------------------
uint64_t GetULEB128(lldb::offset_t *offset_ptr) const;
lldb::DataBufferSP &GetSharedDataBuffer() { return m_data_sp; }
- //------------------------------------------------------------------
/// Peek at a C string at \a offset.
///
/// Peeks at a string in the contained data. No verification is done to make
@@ -911,10 +831,8 @@ public:
/// \return
/// A non-nullptr C string pointer if \a offset is a valid offset,
/// nullptr otherwise.
- //------------------------------------------------------------------
const char *PeekCStr(lldb::offset_t offset) const;
- //------------------------------------------------------------------
/// Peek at a bytes at \a offset.
///
/// Returns a pointer to \a length bytes at \a offset as long as there are
@@ -924,14 +842,12 @@ public:
/// A non-nullptr data pointer if \a offset is a valid offset and
/// there are \a length bytes available at that offset, nullptr
/// otherwise.
- //------------------------------------------------------------------
const uint8_t *PeekData(lldb::offset_t offset, lldb::offset_t length) const {
if (ValidOffsetForDataOfSize(offset, length))
return m_start + offset;
return nullptr;
}
- //------------------------------------------------------------------
/// Set the address byte size.
///
/// Set the size in bytes that will be used when extracting any address and
@@ -939,7 +855,6 @@ public:
///
/// \param[in] addr_size
/// The size in bytes to use when extracting addresses.
- //------------------------------------------------------------------
void SetAddressByteSize(uint32_t addr_size) {
#ifdef LLDB_CONFIGURATION_DEBUG
assert(addr_size == 4 || addr_size == 8);
@@ -947,7 +862,6 @@ public:
m_addr_size = addr_size;
}
- //------------------------------------------------------------------
/// Set data with a buffer that is caller owned.
///
/// Use data that is owned by the caller when extracting values. The data
@@ -966,11 +880,9 @@ public:
///
/// \return
/// The number of bytes that this object now contains.
- //------------------------------------------------------------------
lldb::offset_t SetData(const void *bytes, lldb::offset_t length,
lldb::ByteOrder byte_order);
- //------------------------------------------------------------------
/// Adopt a subset of \a data.
///
/// Set this object's data to be a subset of the data bytes in \a data. If
@@ -993,11 +905,9 @@ public:
///
/// \return
/// The number of bytes that this object now contains.
- //------------------------------------------------------------------
lldb::offset_t SetData(const DataExtractor &data, lldb::offset_t offset,
lldb::offset_t length);
- //------------------------------------------------------------------
/// Adopt a subset of shared data in \a data_sp.
///
/// Copies the data shared pointer which adds a reference to the contained
@@ -1020,12 +930,10 @@ public:
///
/// \return
/// The number of bytes that this object now contains.
- //------------------------------------------------------------------
lldb::offset_t SetData(const lldb::DataBufferSP &data_sp,
lldb::offset_t offset = 0,
lldb::offset_t length = LLDB_INVALID_OFFSET);
- //------------------------------------------------------------------
/// Set the byte_order value.
///
/// Sets the byte order of the data to extract. Extracted values will be
@@ -1033,10 +941,8 @@ public:
///
/// \param[in] byte_order
/// The byte order value to use when extracting data.
- //------------------------------------------------------------------
void SetByteOrder(lldb::ByteOrder byte_order) { m_byte_order = byte_order; }
- //------------------------------------------------------------------
/// Skip an LEB128 number at \a *offset_ptr.
///
/// Skips a LEB128 number (signed or unsigned) from this object's data
@@ -1053,27 +959,22 @@ public:
///
/// \return
// The number of bytes consumed during the extraction.
- //------------------------------------------------------------------
uint32_t Skip_LEB128(lldb::offset_t *offset_ptr) const;
- //------------------------------------------------------------------
/// Test the validity of \a offset.
///
/// \return
/// \b true if \a offset is a valid offset into the data in this
/// object, \b false otherwise.
- //------------------------------------------------------------------
bool ValidOffset(lldb::offset_t offset) const {
return offset < GetByteSize();
}
- //------------------------------------------------------------------
/// Test the availability of \a length bytes of data from \a offset.
///
/// \return
/// \b true if \a offset is a valid offset and there are \a
/// length bytes available at that offset, \b false otherwise.
- //------------------------------------------------------------------
bool ValidOffsetForDataOfSize(lldb::offset_t offset,
lldb::offset_t length) const {
return length <= BytesLeft(offset);
@@ -1099,9 +1000,7 @@ public:
}
protected:
- //------------------------------------------------------------------
// Member variables
- //------------------------------------------------------------------
const uint8_t *m_start; ///< A pointer to the first byte of data.
const uint8_t
*m_end; ///< A pointer to the byte that is past the end of the data.
Modified: lldb/trunk/include/lldb/Utility/Event.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Event.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Event.h (original)
+++ lldb/trunk/include/lldb/Utility/Event.h Wed Apr 10 13:48:55 2019
@@ -34,9 +34,7 @@ class Stream;
namespace lldb_private {
-//----------------------------------------------------------------------
// lldb::EventData
-//----------------------------------------------------------------------
class EventData {
friend class Event;
@@ -55,14 +53,10 @@ private:
DISALLOW_COPY_AND_ASSIGN(EventData);
};
-//----------------------------------------------------------------------
// lldb::EventDataBytes
-//----------------------------------------------------------------------
class EventDataBytes : public EventData {
public:
- //------------------------------------------------------------------
// Constructors
- //------------------------------------------------------------------
EventDataBytes();
EventDataBytes(const char *cstr);
@@ -73,9 +67,7 @@ public:
~EventDataBytes() override;
- //------------------------------------------------------------------
// Member functions
- //------------------------------------------------------------------
ConstString GetFlavor() const override;
void Dump(Stream *s) const override;
@@ -90,9 +82,7 @@ public:
void SetBytesFromCString(const char *cstr);
- //------------------------------------------------------------------
// Static functions
- //------------------------------------------------------------------
static const EventDataBytes *GetEventDataFromEvent(const Event *event_ptr);
static const void *GetBytesFromEvent(const Event *event_ptr);
@@ -132,16 +122,12 @@ private:
}
};
-//----------------------------------------------------------------------
/// This class handles one or more StructuredData::Dictionary entries
/// that are raised for structured data events.
-//----------------------------------------------------------------------
class EventDataStructuredData : public EventData {
public:
- //------------------------------------------------------------------
// Constructors
- //------------------------------------------------------------------
EventDataStructuredData();
EventDataStructuredData(const lldb::ProcessSP &process_sp,
@@ -150,9 +136,7 @@ public:
~EventDataStructuredData() override;
- //------------------------------------------------------------------
// Member functions
- //------------------------------------------------------------------
ConstString GetFlavor() const override;
void Dump(Stream *s) const override;
@@ -169,9 +153,7 @@ public:
void SetStructuredDataPlugin(const lldb::StructuredDataPluginSP &plugin_sp);
- //------------------------------------------------------------------
// Static functions
- //------------------------------------------------------------------
static const EventDataStructuredData *
GetEventDataFromEvent(const Event *event_ptr);
@@ -192,9 +174,7 @@ private:
DISALLOW_COPY_AND_ASSIGN(EventDataStructuredData);
};
-//----------------------------------------------------------------------
// lldb::Event
-//----------------------------------------------------------------------
class Event {
friend class Listener;
friend class EventData;
Modified: lldb/trunk/include/lldb/Utility/FileSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/FileSpec.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/FileSpec.h (original)
+++ lldb/trunk/include/lldb/Utility/FileSpec.h Wed Apr 10 13:48:55 2019
@@ -37,7 +37,6 @@ template <typename T> class SmallVectorI
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class FileSpec FileSpec.h "lldb/Host/FileSpec.h"
/// A file utility class.
///
@@ -53,14 +52,12 @@ namespace lldb_private {
/// are already split up, it makes it easy for us to compare only the
/// basenames of a lot of file specifications without having to split up the
/// file path each time to get to the basename.
-//----------------------------------------------------------------------
class FileSpec {
public:
using Style = llvm::sys::path::Style;
FileSpec();
- //------------------------------------------------------------------
/// Constructor with path.
///
/// Takes a path to a file which can be just a filename, or a full path. If
@@ -74,22 +71,18 @@ public:
/// The style of the path
///
/// \see FileSpec::SetFile (const char *path)
- //------------------------------------------------------------------
explicit FileSpec(llvm::StringRef path, Style style = Style::native);
explicit FileSpec(llvm::StringRef path, const llvm::Triple &Triple);
- //------------------------------------------------------------------
/// Copy constructor
///
/// Makes a copy of the uniqued directory and filename strings from \a rhs.
///
/// \param[in] rhs
/// A const FileSpec object reference to copy.
- //------------------------------------------------------------------
FileSpec(const FileSpec &rhs);
- //------------------------------------------------------------------
/// Copy constructor
///
/// Makes a copy of the uniqued directory and filename strings from \a rhs
@@ -97,19 +90,15 @@ public:
///
/// \param[in] rhs
/// A const FileSpec object pointer to copy if non-nullptr.
- //------------------------------------------------------------------
FileSpec(const FileSpec *rhs);
- //------------------------------------------------------------------
/// Destructor.
- //------------------------------------------------------------------
~FileSpec();
bool DirectoryEquals(const FileSpec &other) const;
bool FileEquals(const FileSpec &other) const;
- //------------------------------------------------------------------
/// Assignment operator.
///
/// Makes a copy of the uniqued directory and filename strings from \a rhs.
@@ -119,10 +108,8 @@ public:
///
/// \return
/// A const reference to this object.
- //------------------------------------------------------------------
const FileSpec &operator=(const FileSpec &rhs);
- //------------------------------------------------------------------
/// Equal to operator
///
/// Tests if this object is equal to \a rhs.
@@ -134,10 +121,8 @@ public:
/// \return
/// \b true if this object is equal to \a rhs, \b false
/// otherwise.
- //------------------------------------------------------------------
bool operator==(const FileSpec &rhs) const;
- //------------------------------------------------------------------
/// Not equal to operator
///
/// Tests if this object is not equal to \a rhs.
@@ -149,10 +134,8 @@ public:
/// \return
/// \b true if this object is equal to \a rhs, \b false
/// otherwise.
- //------------------------------------------------------------------
bool operator!=(const FileSpec &rhs) const;
- //------------------------------------------------------------------
/// Less than to operator
///
/// Tests if this object is less than \a rhs.
@@ -164,10 +147,8 @@ public:
/// \return
/// \b true if this object is less than \a rhs, \b false
/// otherwise.
- //------------------------------------------------------------------
bool operator<(const FileSpec &rhs) const;
- //------------------------------------------------------------------
/// Convert to pointer operator.
///
/// This allows code to check a FileSpec object to see if it contains
@@ -182,10 +163,8 @@ public:
/// \return
/// A pointer to this object if either the directory or filename
/// is valid, nullptr otherwise.
- //------------------------------------------------------------------
explicit operator bool() const;
- //------------------------------------------------------------------
/// Logical NOT operator.
///
/// This allows code to check a FileSpec object to see if it is invalid
@@ -200,18 +179,14 @@ public:
/// \return
/// Returns \b true if the object has an empty directory and
/// filename, \b false otherwise.
- //------------------------------------------------------------------
bool operator!() const;
- //------------------------------------------------------------------
/// Clears the object state.
///
/// Clear this object by releasing both the directory and filename string
/// values and reverting them to empty strings.
- //------------------------------------------------------------------
void Clear();
- //------------------------------------------------------------------
/// Compare two FileSpec objects.
///
/// If \a full is true, then both the directory and the filename must match.
@@ -237,7 +212,6 @@ public:
/// \li -1 if \a lhs is less than \a rhs
/// \li 0 if \a lhs is equal to \a rhs
/// \li 1 if \a lhs is greater than \a rhs
- //------------------------------------------------------------------
static int Compare(const FileSpec &lhs, const FileSpec &rhs, bool full);
static bool Equal(const FileSpec &a, const FileSpec &b, bool full);
@@ -249,16 +223,13 @@ public:
/// unreliable (e.g. "c:\foo.txt" is a valid relative posix path).
static llvm::Optional<Style> GuessPathStyle(llvm::StringRef absolute_path);
- //------------------------------------------------------------------
/// Case sensitivity of path.
///
/// \return
/// \b true if the file path is case sensitive (POSIX), false
/// if case insensitive (Windows).
- //------------------------------------------------------------------
bool IsCaseSensitive() const { return m_style != Style::windows; }
- //------------------------------------------------------------------
/// Dump this object to a Stream.
///
/// Dump the object to the supplied stream \a s. If the object contains a
@@ -267,69 +238,54 @@ public:
///
/// \param[in] s
/// The stream to which to dump the object description.
- //------------------------------------------------------------------
void Dump(Stream *s) const;
Style GetPathStyle() const;
- //------------------------------------------------------------------
/// Directory string get accessor.
///
/// \return
/// A reference to the directory string object.
- //------------------------------------------------------------------
ConstString &GetDirectory();
- //------------------------------------------------------------------
/// Directory string const get accessor.
///
/// \return
/// A const reference to the directory string object.
- //------------------------------------------------------------------
ConstString GetDirectory() const;
- //------------------------------------------------------------------
/// Filename string get accessor.
///
/// \return
/// A reference to the filename string object.
- //------------------------------------------------------------------
ConstString &GetFilename();
- //------------------------------------------------------------------
/// Filename string const get accessor.
///
/// \return
/// A const reference to the filename string object.
- //------------------------------------------------------------------
ConstString GetFilename() const;
- //------------------------------------------------------------------
/// Returns true if the filespec represents an implementation source file
/// (files with a ".c", ".cpp", ".m", ".mm" (many more) extension).
///
/// \return
/// \b true if the filespec represents an implementation source
/// file, \b false otherwise.
- //------------------------------------------------------------------
bool IsSourceImplementationFile() const;
- //------------------------------------------------------------------
/// Returns true if the filespec represents a relative path.
///
/// \return
/// \b true if the filespec represents a relative path,
/// \b false otherwise.
- //------------------------------------------------------------------
bool IsRelative() const;
- //------------------------------------------------------------------
/// Returns true if the filespec represents an absolute path.
///
/// \return
/// \b true if the filespec represents an absolute path,
/// \b false otherwise.
- //------------------------------------------------------------------
bool IsAbsolute() const;
/// Make the FileSpec absolute by treating it relative to \a dir. Absolute
@@ -339,7 +295,6 @@ public:
/// Temporary helper for FileSystem change.
void SetPath(llvm::StringRef p) { SetFile(p); }
- //------------------------------------------------------------------
/// Extract the full path to the file.
///
/// Extract the directory and path into a fixed buffer. This is needed as
@@ -358,11 +313,9 @@ public:
/// properly copied and terminated. If the return value is
/// >= \a max_path_length, then the path was truncated (but is
/// still NULL terminated).
- //------------------------------------------------------------------
size_t GetPath(char *path, size_t max_path_length,
bool denormalize = true) const;
- //------------------------------------------------------------------
/// Extract the full path to the file.
///
/// Extract the directory and path into a std::string, which is returned.
@@ -370,12 +323,10 @@ public:
/// \return
/// Returns a std::string with the directory and filename
/// concatenated.
- //------------------------------------------------------------------
std::string GetPath(bool denormalize = true) const;
const char *GetCString(bool denormalize = true) const;
- //------------------------------------------------------------------
/// Extract the full path to the file.
///
/// Extract the directory and path into an llvm::SmallVectorImpl<>
@@ -383,11 +334,9 @@ public:
/// \return
/// Returns a std::string with the directory and filename
/// concatenated.
- //------------------------------------------------------------------
void GetPath(llvm::SmallVectorImpl<char> &path,
bool denormalize = true) const;
- //------------------------------------------------------------------
/// Extract the extension of the file.
///
/// Returns a ConstString that represents the extension of the filename for
@@ -397,10 +346,8 @@ public:
///
/// \return
/// Returns the extension of the file as a ConstString object.
- //------------------------------------------------------------------
ConstString GetFileNameExtension() const;
- //------------------------------------------------------------------
/// Return the filename without the extension part
///
/// Returns a ConstString that represents the filename of this object
@@ -410,10 +357,8 @@ public:
/// \return
/// Returns the filename without extension
/// as a ConstString object.
- //------------------------------------------------------------------
ConstString GetFileNameStrippingExtension() const;
- //------------------------------------------------------------------
/// Get the memory cost of this object.
///
/// Return the size in bytes that this object takes in memory. This returns
@@ -424,10 +369,8 @@ public:
/// The number of bytes that this object occupies in memory.
///
/// \see ConstString::StaticMemorySize ()
- //------------------------------------------------------------------
size_t MemorySize() const;
- //------------------------------------------------------------------
/// Change the file specified with a new path.
///
/// Update the contents of this object with a new path. The path will be
@@ -440,14 +383,12 @@ public:
/// \param[in] resolve_path
/// If \b true, then we will try to resolve links the path using
/// the static FileSpec::Resolve.
- //------------------------------------------------------------------
void SetFile(llvm::StringRef path, Style style);
void SetFile(llvm::StringRef path, const llvm::Triple &Triple);
bool IsResolved() const { return m_is_resolved; }
- //------------------------------------------------------------------
/// Set if the file path has been resolved or not.
///
/// If you know a file path is already resolved and avoided passing a \b
@@ -459,7 +400,6 @@ public:
/// \param[in] is_resolved
/// A boolean value that will replace the current value that
/// indicates if the paths in this object have been resolved.
- //------------------------------------------------------------------
void SetIsResolved(bool is_resolved) { m_is_resolved = is_resolved; }
FileSpec CopyByAppendingPathComponent(llvm::StringRef component) const;
@@ -471,35 +411,27 @@ public:
void AppendPathComponent(llvm::StringRef component);
void AppendPathComponent(const FileSpec &new_path);
- //------------------------------------------------------------------
/// Removes the last path component by replacing the current path with its
/// parent. When the current path has no parent, this is a no-op.
///
/// \return
/// A boolean value indicating whether the path was updated.
- //------------------------------------------------------------------
bool RemoveLastPathComponent();
ConstString GetLastPathComponent() const;
protected:
- //------------------------------------------------------------------
// Convenience method for setting the file without changing the style.
- //------------------------------------------------------------------
void SetFile(llvm::StringRef path);
- //------------------------------------------------------------------
// Member variables
- //------------------------------------------------------------------
ConstString m_directory; ///< The uniqued directory path
ConstString m_filename; ///< The uniqued filename path
mutable bool m_is_resolved = false; ///< True if this path has been resolved.
Style m_style; ///< The syntax that this path uses (e.g. Windows / Posix)
};
-//----------------------------------------------------------------------
/// Dump a FileSpec object to a stream
-//----------------------------------------------------------------------
Stream &operator<<(Stream &s, const FileSpec &f);
} // namespace lldb_private
Modified: lldb/trunk/include/lldb/Utility/Flags.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Flags.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Flags.h (original)
+++ lldb/trunk/include/lldb/Utility/Flags.h Wed Apr 10 13:48:55 2019
@@ -14,21 +14,16 @@
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class Flags Flags.h "lldb/Utility/Flags.h"
/// A class to manage flags.
///
/// The Flags class managed flag bits and allows testing and modification of
/// individual or multiple flag bits.
-//----------------------------------------------------------------------
class Flags {
public:
- //----------------------------------------------------------------------
/// The value type for flags is a 32 bit unsigned integer type.
- //----------------------------------------------------------------------
typedef uint32_t ValueType;
- //----------------------------------------------------------------------
/// Construct with initial flag bit values.
///
/// Constructs this object with \a mask as the initial value for all of the
@@ -36,49 +31,37 @@ public:
///
/// \param[in] mask
/// The initial value for all flags.
- //----------------------------------------------------------------------
Flags(ValueType flags = 0) : m_flags(flags) {}
- //----------------------------------------------------------------------
/// Copy constructor.
///
/// Construct and copy the flags from \a rhs.
///
/// \param[in] rhs
/// A const Flags object reference to copy.
- //----------------------------------------------------------------------
Flags(const Flags &rhs) : m_flags(rhs.m_flags) {}
- //----------------------------------------------------------------------
/// Destructor.
- //----------------------------------------------------------------------
~Flags() {}
- //----------------------------------------------------------------------
/// Get accessor for all flags.
///
/// \return
/// Returns all of the flags as a Flags::ValueType.
- //----------------------------------------------------------------------
ValueType Get() const { return m_flags; }
- //----------------------------------------------------------------------
/// Return the number of flags that can be represented in this object.
///
/// \return
/// The maximum number bits in this flag object.
- //----------------------------------------------------------------------
size_t GetBitSize() const { return sizeof(ValueType) * 8; }
- //----------------------------------------------------------------------
/// Set accessor for all flags.
///
/// \param[in] flags
/// The bits with which to replace all of the current flags.
- //----------------------------------------------------------------------
void Reset(ValueType flags) { m_flags = flags; }
- //----------------------------------------------------------------------
/// Clear one or more flags.
///
/// \param[in] mask
@@ -86,13 +69,11 @@ public:
///
/// \return
/// The new flags after clearing all bits from \a mask.
- //----------------------------------------------------------------------
ValueType Clear(ValueType mask = ~(ValueType)0) {
m_flags &= ~mask;
return m_flags;
}
- //----------------------------------------------------------------------
/// Set one or more flags by logical OR'ing \a mask with the current flags.
///
/// \param[in] mask
@@ -100,63 +81,50 @@ public:
///
/// \return
/// The new flags after setting all bits from \a mask.
- //----------------------------------------------------------------------
ValueType Set(ValueType mask) {
m_flags |= mask;
return m_flags;
}
- //----------------------------------------------------------------------
/// Test if all bits in \a mask are 1 in the current flags
///
/// \return
/// \b true if all flags in \a mask are 1, \b false
/// otherwise.
- //----------------------------------------------------------------------
bool AllSet(ValueType mask) const { return (m_flags & mask) == mask; }
- //----------------------------------------------------------------------
/// Test one or more flags.
///
/// \return
/// \b true if any flags in \a mask are 1, \b false
/// otherwise.
- //----------------------------------------------------------------------
bool AnySet(ValueType mask) const { return (m_flags & mask) != 0; }
- //----------------------------------------------------------------------
/// Test a single flag bit.
///
/// \return
/// \b true if \a bit is set, \b false otherwise.
- //----------------------------------------------------------------------
bool Test(ValueType bit) const { return (m_flags & bit) != 0; }
- //----------------------------------------------------------------------
/// Test if all bits in \a mask are clear.
///
/// \return
/// \b true if \b all flags in \a mask are clear, \b false
/// otherwise.
- //----------------------------------------------------------------------
bool AllClear(ValueType mask) const { return (m_flags & mask) == 0; }
bool AnyClear(ValueType mask) const { return (m_flags & mask) != mask; }
- //----------------------------------------------------------------------
/// Test a single flag bit to see if it is clear (zero).
///
/// \return
/// \b true if \a bit is 0, \b false otherwise.
- //----------------------------------------------------------------------
bool IsClear(ValueType bit) const { return (m_flags & bit) == 0; }
- //----------------------------------------------------------------------
/// Get the number of zero bits in \a m_flags.
///
/// \return
/// The number of bits that are set to 0 in the current flags.
- //----------------------------------------------------------------------
size_t ClearCount() const {
size_t count = 0;
for (ValueType shift = 0; shift < sizeof(ValueType) * 8; ++shift) {
@@ -166,12 +134,10 @@ public:
return count;
}
- //----------------------------------------------------------------------
/// Get the number of one bits in \a m_flags.
///
/// \return
/// The number of bits that are set to 1 in the current flags.
- //----------------------------------------------------------------------
size_t SetCount() const {
size_t count = 0;
for (ValueType mask = m_flags; mask; mask >>= 1) {
Modified: lldb/trunk/include/lldb/Utility/Listener.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Listener.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Listener.h (original)
+++ lldb/trunk/include/lldb/Utility/Listener.h Wed Apr 10 13:48:55 2019
@@ -42,9 +42,7 @@ public:
friend class Broadcaster;
friend class BroadcasterManager;
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
//
// Listeners have to be constructed into shared pointers - at least if you
// want them to listen to Broadcasters,
@@ -99,9 +97,7 @@ public:
size_t HandleBroadcastEvent(lldb::EventSP &event_sp);
private:
- //------------------------------------------------------------------
// Classes that inherit from Listener can see and modify these
- //------------------------------------------------------------------
struct BroadcasterInfo {
BroadcasterInfo(uint32_t mask, HandleBroadcastCallback cb = nullptr,
void *ud = nullptr)
@@ -149,9 +145,7 @@ private:
// uint32_t event_mask,
// bool exact);
- //------------------------------------------------------------------
// For Listener only
- //------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(Listener);
};
Modified: lldb/trunk/include/lldb/Utility/Log.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Log.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Log.h (original)
+++ lldb/trunk/include/lldb/Utility/Log.h Wed Apr 10 13:48:55 2019
@@ -31,9 +31,7 @@
namespace llvm {
class raw_ostream;
}
-//----------------------------------------------------------------------
// Logging Options
-//----------------------------------------------------------------------
#define LLDB_LOG_OPTION_THREADSAFE (1u << 0)
#define LLDB_LOG_OPTION_VERBOSE (1u << 1)
#define LLDB_LOG_OPTION_PREPEND_SEQUENCE (1u << 3)
@@ -44,9 +42,7 @@ class raw_ostream;
#define LLDB_LOG_OPTION_APPEND (1U << 8)
#define LLDB_LOG_OPTION_PREPEND_FILE_FUNCTION (1U << 9)
-//----------------------------------------------------------------------
// Logging Functions
-//----------------------------------------------------------------------
namespace lldb_private {
class Log final {
@@ -99,9 +95,7 @@ public:
static void Initialize();
- //------------------------------------------------------------------
// Static accessors for logging channels
- //------------------------------------------------------------------
static void Register(llvm::StringRef name, Channel &channel);
static void Unregister(llvm::StringRef name);
@@ -122,13 +116,11 @@ public:
static void ListAllLogChannels(llvm::raw_ostream &stream);
- //------------------------------------------------------------------
// Member functions
//
// These functions are safe to call at any time you have a Log* obtained from
// the Channel class. If logging is disabled between you obtaining the Log
// object and writing to it, the output will be silently discarded.
- //------------------------------------------------------------------
Log(Channel &channel) : m_channel(channel) {}
~Log() = default;
Modified: lldb/trunk/include/lldb/Utility/Logging.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Logging.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Logging.h (original)
+++ lldb/trunk/include/lldb/Utility/Logging.h Wed Apr 10 13:48:55 2019
@@ -11,9 +11,7 @@
#include <cstdint>
-//----------------------------------------------------------------------
// Log Bits specific to logging in lldb
-//----------------------------------------------------------------------
#define LIBLLDB_LOG_PROCESS (1u << 1)
#define LIBLLDB_LOG_THREAD (1u << 2)
#define LIBLLDB_LOG_DYNAMIC_LOADER (1u << 3)
Modified: lldb/trunk/include/lldb/Utility/Predicate.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Predicate.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Predicate.h (original)
+++ lldb/trunk/include/lldb/Utility/Predicate.h Wed Apr 10 13:48:55 2019
@@ -20,9 +20,7 @@
//#define DB_PTHREAD_LOG_EVENTS
-//----------------------------------------------------------------------
/// Enumerations for broadcasting.
-//----------------------------------------------------------------------
namespace lldb_private {
typedef enum {
@@ -32,7 +30,6 @@ typedef enum {
/// modified.
} PredicateBroadcastType;
-//----------------------------------------------------------------------
/// \class Predicate Predicate.h "lldb/Utility/Predicate.h"
/// A C++ wrapper class for providing threaded access to a value of
/// type T.
@@ -41,18 +38,14 @@ typedef enum {
/// of type T. Threads can efficiently wait for bits within T to be set
/// or reset, or wait for T to be set to be equal/not equal to a
/// specified values.
-//----------------------------------------------------------------------
template <class T> class Predicate {
public:
- //------------------------------------------------------------------
/// Default constructor.
///
/// Initializes the mutex, condition and value with their default
/// constructors.
- //------------------------------------------------------------------
Predicate() : m_value(), m_mutex(), m_condition() {}
- //------------------------------------------------------------------
/// Construct with initial T value \a initial_value.
///
/// Initializes the mutex and condition with their default
@@ -60,18 +53,14 @@ public:
///
/// \param[in] initial_value
/// The initial value for our T object.
- //------------------------------------------------------------------
Predicate(T initial_value)
: m_value(initial_value), m_mutex(), m_condition() {}
- //------------------------------------------------------------------
/// Destructor.
///
/// Destroy the condition, mutex, and T objects.
- //------------------------------------------------------------------
~Predicate() = default;
- //------------------------------------------------------------------
/// Value get accessor.
///
/// Copies the current \a m_value in a thread safe manor and returns
@@ -79,14 +68,12 @@ public:
///
/// \return
/// A copy of the current value.
- //------------------------------------------------------------------
T GetValue() const {
std::lock_guard<std::mutex> guard(m_mutex);
T value = m_value;
return value;
}
- //------------------------------------------------------------------
/// Value set accessor.
///
/// Set the contained \a m_value to \a new_value in a thread safe
@@ -100,7 +87,6 @@ public:
/// PredicateBroadcastType enumeration for details.
///
/// \see Predicate::Broadcast()
- //------------------------------------------------------------------
void SetValue(T value, PredicateBroadcastType broadcast_type) {
std::lock_guard<std::mutex> guard(m_mutex);
#ifdef DB_PTHREAD_LOG_EVENTS
@@ -113,7 +99,6 @@ public:
Broadcast(old_value, broadcast_type);
}
- //------------------------------------------------------------------
/// Wait for Cond(m_value) to be true.
///
/// Waits in a thread safe way for Cond(m_value) to be true. If Cond(m_value)
@@ -134,7 +119,6 @@ public:
/// \return
/// \li m_value if Cond(m_value) is true.
/// \li None otherwise (timeout occurred).
- //------------------------------------------------------------------
template <typename C>
llvm::Optional<T> WaitFor(C Cond, const Timeout<std::micro> &timeout) {
std::unique_lock<std::mutex> lock(m_mutex);
@@ -147,7 +131,6 @@ public:
return m_value;
return llvm::None;
}
- //------------------------------------------------------------------
/// Wait for \a m_value to be equal to \a value.
///
/// Waits in a thread safe way for \a m_value to be equal to \a
@@ -170,14 +153,12 @@ public:
/// \return
/// \li \b true if the \a m_value is equal to \a value
/// \li \b false otherwise (timeout occurred)
- //------------------------------------------------------------------
bool WaitForValueEqualTo(T value,
const Timeout<std::micro> &timeout = llvm::None) {
return WaitFor([&value](T current) { return value == current; }, timeout) !=
llvm::None;
}
- //------------------------------------------------------------------
/// Wait for \a m_value to not be equal to \a value.
///
/// Waits in a thread safe way for \a m_value to not be equal to \a
@@ -200,7 +181,6 @@ public:
/// \return
/// \li m_value if m_value != value
/// \li None otherwise (timeout occurred).
- //------------------------------------------------------------------
llvm::Optional<T>
WaitForValueNotEqualTo(T value,
const Timeout<std::micro> &timeout = llvm::None) {
@@ -208,10 +188,8 @@ public:
}
protected:
- //----------------------------------------------------------------------
// pthread condition and mutex variable to control access and allow blocking
// between the main thread and the spotlight index thread.
- //----------------------------------------------------------------------
T m_value; ///< The templatized value T that we are protecting access to
mutable std::mutex m_mutex; ///< The mutex to use when accessing the data
std::condition_variable m_condition; ///< The pthread condition variable to
@@ -219,7 +197,6 @@ protected:
/// or changed.
private:
- //------------------------------------------------------------------
/// Broadcast if needed.
///
/// Check to see if we need to broadcast to our condition variable
@@ -233,7 +210,6 @@ private:
///
/// If \a broadcast_type is eBroadcastOnChange, the condition
/// variable be broadcast if the owned value changes.
- //------------------------------------------------------------------
void Broadcast(T old_value, PredicateBroadcastType broadcast_type) {
bool broadcast =
(broadcast_type == eBroadcastAlways) ||
Modified: lldb/trunk/include/lldb/Utility/ProcessInfo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/ProcessInfo.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/ProcessInfo.h (original)
+++ lldb/trunk/include/lldb/Utility/ProcessInfo.h Wed Apr 10 13:48:55 2019
@@ -22,14 +22,12 @@ namespace lldb_private {
class UserIDResolver;
-//----------------------------------------------------------------------
// ProcessInfo
//
// A base class for information for a process. This can be used to fill
// out information for a process prior to launching it, or it can be used for
// an instance of a process and can be filled in with the existing values for
// that process.
-//----------------------------------------------------------------------
class ProcessInfo {
public:
ProcessInfo();
@@ -103,12 +101,10 @@ protected:
lldb::pid_t m_pid;
};
-//----------------------------------------------------------------------
// ProcessInstanceInfo
//
// Describes an existing process and any discoverable information that pertains
// to that process.
-//----------------------------------------------------------------------
class ProcessInstanceInfo : public ProcessInfo {
public:
ProcessInstanceInfo()
@@ -199,11 +195,9 @@ protected:
std::vector<ProcessInstanceInfo> m_infos;
};
-//----------------------------------------------------------------------
// ProcessInstanceInfoMatch
//
// A class to help matching one ProcessInstanceInfo to another.
-//----------------------------------------------------------------------
class ProcessInstanceInfoMatch {
public:
Modified: lldb/trunk/include/lldb/Utility/RangeMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/RangeMap.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/RangeMap.h (original)
+++ lldb/trunk/include/lldb/Utility/RangeMap.h Wed Apr 10 13:48:55 2019
@@ -21,15 +21,11 @@
namespace lldb_private {
-//----------------------------------------------------------------------
// Templatized classes for dealing with generic ranges and also collections of
// ranges, or collections of ranges that have associated data.
-//----------------------------------------------------------------------
-//----------------------------------------------------------------------
// A simple range class where you get to define the type of the range
// base "B", and the type used for the range byte size "S".
-//----------------------------------------------------------------------
template <typename B, typename S> struct Range {
typedef B BaseType;
typedef S SizeType;
@@ -126,10 +122,8 @@ template <typename B, typename S> struct
}
};
-//----------------------------------------------------------------------
// A range array class where you get to define the type of the ranges
// that the collection contains.
-//----------------------------------------------------------------------
template <typename B, typename S, unsigned N> class RangeArray {
public:
@@ -591,11 +585,9 @@ protected:
Collection m_entries;
};
-//----------------------------------------------------------------------
// A simple range with data class where you get to define the type of
// the range base "B", the type used for the range byte size "S", and the type
// for the associated data "T".
-//----------------------------------------------------------------------
template <typename B, typename S, typename T>
struct RangeData : public Range<B, S> {
typedef T DataType;
@@ -824,11 +816,9 @@ protected:
Collection m_entries;
};
-//----------------------------------------------------------------------
// A simple range with data class where you get to define the type of
// the range base "B", the type used for the range byte size "S", and the type
// for the associated data "T".
-//----------------------------------------------------------------------
template <typename B, typename T> struct AddressData {
typedef B BaseType;
typedef T DataType;
Modified: lldb/trunk/include/lldb/Utility/RegularExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/RegularExpression.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/RegularExpression.h (original)
+++ lldb/trunk/include/lldb/Utility/RegularExpression.h Wed Apr 10 13:48:55 2019
@@ -48,7 +48,6 @@ class StringRef;
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class RegularExpression RegularExpression.h
/// "lldb/Utility/RegularExpression.h"
/// A C++ wrapper class for regex.
@@ -56,7 +55,6 @@ namespace lldb_private {
/// This regular expression class wraps the posix regex functions \c
/// regcomp(), \c regerror(), \c regexec(), and \c regfree() from the header
/// file in \c /usr/include/regex\.h.
-//----------------------------------------------------------------------
class RegularExpression {
public:
class Match {
@@ -94,29 +92,24 @@ public:
m_matches; ///< Where parenthesized subexpressions results are stored
};
- //------------------------------------------------------------------
/// Default constructor.
///
/// The default constructor that initializes the object state such that it
/// contains no compiled regular expression.
- //------------------------------------------------------------------
RegularExpression();
explicit RegularExpression(llvm::StringRef string);
- //------------------------------------------------------------------
/// Destructor.
///
/// Any previously compiled regular expression contained in this object will
/// be freed.
- //------------------------------------------------------------------
~RegularExpression();
RegularExpression(const RegularExpression &rhs);
const RegularExpression &operator=(const RegularExpression &rhs);
- //------------------------------------------------------------------
/// Compile a regular expression.
///
/// Compile a regular expression using the supplied regular expression text.
@@ -132,11 +125,9 @@ public:
/// \return
/// \b true if the regular expression compiles successfully,
/// \b false otherwise.
- //------------------------------------------------------------------
bool Compile(llvm::StringRef string);
bool Compile(const char *) = delete;
- //------------------------------------------------------------------
/// Executes a regular expression.
///
/// Execute a regular expression match using the compiled regular expression
@@ -156,21 +147,17 @@ public:
/// \return
/// \b true if \a string matches the compiled regular
/// expression, \b false otherwise.
- //------------------------------------------------------------------
bool Execute(llvm::StringRef string, Match *match = nullptr) const;
bool Execute(const char *, Match * = nullptr) = delete;
size_t GetErrorAsCString(char *err_str, size_t err_str_max_len) const;
- //------------------------------------------------------------------
/// Free the compiled regular expression.
///
/// If this object contains a valid compiled regular expression, this
/// function will free any resources it was consuming.
- //------------------------------------------------------------------
void Free();
- //------------------------------------------------------------------
/// Access the regular expression text.
///
/// Returns the text that was used to compile the current regular
@@ -179,10 +166,8 @@ public:
/// \return
/// The NULL terminated C string that was used to compile the
/// current regular expression
- //------------------------------------------------------------------
llvm::StringRef GetText() const;
- //------------------------------------------------------------------
/// Test if valid.
///
/// Test if this object contains a valid regular expression.
@@ -190,7 +175,6 @@ public:
/// \return
/// \b true if the regular expression compiled and is ready
/// for execution, \b false otherwise.
- //------------------------------------------------------------------
bool IsValid() const;
void Clear() {
@@ -204,9 +188,7 @@ public:
bool operator<(const RegularExpression &rhs) const;
private:
- //------------------------------------------------------------------
// Member variables
- //------------------------------------------------------------------
std::string m_re; ///< A copy of the original regular expression text
int m_comp_err; ///< Status code for the regular expression compilation
regex_t m_preg; ///< The compiled regular expression
Modified: lldb/trunk/include/lldb/Utility/Scalar.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Scalar.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Scalar.h (original)
+++ lldb/trunk/include/lldb/Utility/Scalar.h Wed Apr 10 13:48:55 2019
@@ -32,12 +32,10 @@ class Stream;
namespace lldb_private {
-//----------------------------------------------------------------------
// A class designed to hold onto values and their corresponding types.
// Operators are defined and Scalar objects will correctly promote their types
// and values before performing these operations. Type promotion currently
// follows the ANSI C type promotion rules.
-//----------------------------------------------------------------------
class Scalar {
public:
enum Type {
@@ -59,9 +57,7 @@ public:
e_long_double
};
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
Scalar();
Scalar(int v) : m_type(e_sint), m_float((float)0) {
m_integer = llvm::APInt(sizeof(int) * 8, v, true);
@@ -171,12 +167,10 @@ public:
static Scalar::Type GetValueTypeForFloatWithByteSize(size_t byte_size);
- //----------------------------------------------------------------------
// All operators can benefits from the implicit conversions that will happen
// automagically by the compiler, so no temporary objects will need to be
// created. As a result, we currently don't need a variety of overloaded set
// value accessors.
- //----------------------------------------------------------------------
Scalar &operator=(const int i);
Scalar &operator=(unsigned int v);
Scalar &operator=(long v);
@@ -193,41 +187,29 @@ public:
Scalar &operator>>=(const Scalar &rhs); // Shift right (arithmetic)
Scalar &operator&=(const Scalar &rhs);
- //----------------------------------------------------------------------
// Shifts the current value to the right without maintaining the current sign
// of the value (if it is signed).
- //----------------------------------------------------------------------
bool ShiftRightLogical(const Scalar &rhs); // Returns true on success
- //----------------------------------------------------------------------
// Takes the absolute value of the current value if it is signed, else the
// value remains unchanged. Returns false if the contained value has a void
// type.
- //----------------------------------------------------------------------
bool AbsoluteValue(); // Returns true on success
- //----------------------------------------------------------------------
// Negates the current value (even for unsigned values). Returns false if the
// contained value has a void type.
- //----------------------------------------------------------------------
bool UnaryNegate(); // Returns true on success
- //----------------------------------------------------------------------
// Inverts all bits in the current value as long as it isn't void or a
// float/double/long double type. Returns false if the contained value has a
// void/float/double/long double type, else the value is inverted and true is
// returned.
- //----------------------------------------------------------------------
bool OnesComplement(); // Returns true on success
- //----------------------------------------------------------------------
// Access the type of the current value.
- //----------------------------------------------------------------------
Scalar::Type GetType() const { return m_type; }
- //----------------------------------------------------------------------
// Returns a casted value of the current contained data without modifying the
// current value. FAIL_VALUE will be returned if the type of the value is
// void or invalid.
- //----------------------------------------------------------------------
int SInt(int fail_value = 0) const;
unsigned char UChar(unsigned char fail_value = 0) const;
@@ -302,9 +284,7 @@ protected:
typedef double double_t;
typedef long double long_double_t;
- //------------------------------------------------------------------
// Classes that inherit from Scalar can see and modify these
- //------------------------------------------------------------------
Scalar::Type m_type;
llvm::APInt m_integer;
llvm::APFloat m_float;
@@ -329,7 +309,6 @@ private:
friend bool operator>=(const Scalar &lhs, const Scalar &rhs);
};
-//----------------------------------------------------------------------
// Split out the operators into a format where the compiler will be able to
// implicitly convert numbers into Scalar objects.
//
@@ -343,7 +322,6 @@ private:
// Item 19 of "Effective C++ Second Edition" by Scott Meyers
// Differentiate among members functions, non-member functions, and
// friend functions
-//----------------------------------------------------------------------
const Scalar operator+(const Scalar &lhs, const Scalar &rhs);
const Scalar operator-(const Scalar &lhs, const Scalar &rhs);
const Scalar operator/(const Scalar &lhs, const Scalar &rhs);
Modified: lldb/trunk/include/lldb/Utility/State.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/State.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/State.h (original)
+++ lldb/trunk/include/lldb/Utility/State.h Wed Apr 10 13:48:55 2019
@@ -17,7 +17,6 @@
namespace lldb_private {
-//------------------------------------------------------------------
/// Converts a StateType to a C string.
///
/// \param[in] state
@@ -27,10 +26,8 @@ namespace lldb_private {
/// A NULL terminated C string that describes \a state. The
/// returned string comes from constant string buffers and does
/// not need to be freed.
-//------------------------------------------------------------------
const char *StateAsCString(lldb::StateType state);
-//------------------------------------------------------------------
/// Check if a state represents a state where the process or thread
/// is running.
///
@@ -40,10 +37,8 @@ const char *StateAsCString(lldb::StateTy
/// \return
/// \b true if the state represents a process or thread state
/// where the process or thread is running, \b false otherwise.
-//------------------------------------------------------------------
bool StateIsRunningState(lldb::StateType state);
-//------------------------------------------------------------------
/// Check if a state represents a state where the process or thread
/// is stopped. Stopped can mean stopped when the process is still
/// around, or stopped when the process has exited or doesn't exist
@@ -63,7 +58,6 @@ bool StateIsRunningState(lldb::StateType
/// \b true, then the process can't be exited or unloaded,
/// otherwise exited and unloaded or other states where the
/// process no longer exists are considered to be stopped.
-//------------------------------------------------------------------
bool StateIsStoppedState(lldb::StateType state, bool must_exist);
const char *GetPermissionsAsCString(uint32_t permissions);
Modified: lldb/trunk/include/lldb/Utility/Status.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Status.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Status.h (original)
+++ lldb/trunk/include/lldb/Utility/Status.h Wed Apr 10 13:48:55 2019
@@ -26,7 +26,6 @@ class raw_ostream;
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class Status Status.h "lldb/Utility/Status.h" An error handling class.
///
/// This class is designed to be able to hold any error code that can be
@@ -42,16 +41,12 @@ namespace lldb_private {
/// of themselves for printing results and error codes. The string value will
/// be fetched on demand and its string value will be cached until the error
/// is cleared of the value of the error changes.
-//----------------------------------------------------------------------
class Status {
public:
- //------------------------------------------------------------------
/// Every error value that this object can contain needs to be able to fit
/// into ValueType.
- //------------------------------------------------------------------
typedef uint32_t ValueType;
- //------------------------------------------------------------------
/// Default constructor.
///
/// Initialize the error object with a generic success value.
@@ -61,7 +56,6 @@ public:
///
/// \param[in] type
/// The type for \a err.
- //------------------------------------------------------------------
Status();
explicit Status(ValueType err,
@@ -73,7 +67,6 @@ public:
__attribute__((format(printf, 2, 3)));
Status(const Status &rhs);
- //------------------------------------------------------------------
/// Assignment operator.
///
/// \param[in] err
@@ -81,7 +74,6 @@ public:
///
/// \return
/// A const reference to this object.
- //------------------------------------------------------------------
const Status &operator=(const Status &rhs);
~Status();
@@ -91,7 +83,6 @@ public:
const Status &operator=(llvm::Error error);
llvm::Error ToError() const;
- //------------------------------------------------------------------
/// Get the error string associated with the current error.
//
/// Gets the error value as a NULL terminated C string. The error string
@@ -103,43 +94,33 @@ public:
/// The error as a NULL terminated C string value if the error
/// is valid and is able to be converted to a string value,
/// NULL otherwise.
- //------------------------------------------------------------------
const char *AsCString(const char *default_error_str = "unknown error") const;
- //------------------------------------------------------------------
/// Clear the object state.
///
/// Reverts the state of this object to contain a generic success value and
/// frees any cached error string value.
- //------------------------------------------------------------------
void Clear();
- //------------------------------------------------------------------
/// Test for error condition.
///
/// \return
/// \b true if this object contains an error, \b false
/// otherwise.
- //------------------------------------------------------------------
bool Fail() const;
- //------------------------------------------------------------------
/// Access the error value.
///
/// \return
/// The error value.
- //------------------------------------------------------------------
ValueType GetError() const;
- //------------------------------------------------------------------
/// Access the error type.
///
/// \return
/// The error type enumeration value.
- //------------------------------------------------------------------
lldb::ErrorType GetType() const;
- //------------------------------------------------------------------
/// Set accessor from a kern_return_t.
///
/// Set accesssor for the error value to \a err and the error type to \c
@@ -147,7 +128,6 @@ public:
///
/// \param[in] err
/// A mach error code.
- //------------------------------------------------------------------
void SetMachError(uint32_t err);
void SetExpressionError(lldb::ExpressionResults, const char *mssg);
@@ -155,7 +135,6 @@ public:
int SetExpressionErrorWithFormat(lldb::ExpressionResults, const char *format,
...) __attribute__((format(printf, 3, 4)));
- //------------------------------------------------------------------
/// Set accesssor with an error value and type.
///
/// Set accesssor for the error value to \a err and the error type to \a
@@ -166,26 +145,20 @@ public:
///
/// \param[in] type
/// The type for \a err.
- //------------------------------------------------------------------
void SetError(ValueType err, lldb::ErrorType type);
- //------------------------------------------------------------------
/// Set the current error to errno.
///
/// Update the error value to be \c errno and update the type to be \c
/// Status::POSIX.
- //------------------------------------------------------------------
void SetErrorToErrno();
- //------------------------------------------------------------------
/// Set the current error to a generic error.
///
/// Update the error value to be \c LLDB_GENERIC_ERROR and update the type
/// to be \c Status::Generic.
- //------------------------------------------------------------------
void SetErrorToGenericError();
- //------------------------------------------------------------------
/// Set the current error string to \a err_str.
///
/// Set accessor for the error string value for a generic errors, or to
@@ -197,15 +170,12 @@ public:
///
/// \param err_str
/// The new custom error string to copy and cache.
- //------------------------------------------------------------------
void SetErrorString(llvm::StringRef err_str);
- //------------------------------------------------------------------
/// Set the current error string to a formatted error string.
///
/// \param format
/// A printf style format string
- //------------------------------------------------------------------
int SetErrorStringWithFormat(const char *format, ...)
__attribute__((format(printf, 2, 3)));
@@ -216,7 +186,6 @@ public:
SetErrorString(llvm::formatv(format, std::forward<Args>(args)...).str());
}
- //------------------------------------------------------------------
/// Test for success condition.
///
/// Returns true if the error code in this object is considered a successful
@@ -225,10 +194,8 @@ public:
/// \return
/// \b true if this object contains an value that describes
/// success (non-erro), \b false otherwise.
- //------------------------------------------------------------------
bool Success() const;
- //------------------------------------------------------------------
/// Test for a failure due to a generic interrupt.
///
/// Returns true if the error code in this object was caused by an
@@ -237,13 +204,10 @@ public:
/// \return
/// \b true if this object contains an value that describes
/// failure due to interrupt, \b false otherwise.
- //------------------------------------------------------------------
bool WasInterrupted() const;
protected:
- //------------------------------------------------------------------
/// Member variables
- //------------------------------------------------------------------
ValueType m_code; ///< Status code as an integer value.
lldb::ErrorType m_type; ///< The type of the above error code.
mutable std::string m_string; ///< A string representation of the error code.
Modified: lldb/trunk/include/lldb/Utility/Stream.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Stream.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Stream.h (original)
+++ lldb/trunk/include/lldb/Utility/Stream.h Wed Apr 10 13:48:55 2019
@@ -23,15 +23,11 @@
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class Stream Stream.h "lldb/Utility/Stream.h"
/// A stream class that can stream formatted output to a file.
-//----------------------------------------------------------------------
class Stream {
public:
- //------------------------------------------------------------------
/// \a m_flags bit values.
- //------------------------------------------------------------------
enum {
eBinary = (1 << 0) ///< Get and put data as binary instead of as the default
/// string mode.
@@ -56,19 +52,15 @@ public:
size_t operator*() const { return m_stream->GetWrittenBytes() - m_start; }
};
- //------------------------------------------------------------------
/// Construct with flags and address size and byte order.
///
/// Construct with dump flags \a flags and the default address size. \a
/// flags can be any of the above enumeration logical OR'ed together.
- //------------------------------------------------------------------
Stream(uint32_t flags, uint32_t addr_size, lldb::ByteOrder byte_order);
- //------------------------------------------------------------------
/// Construct a default Stream, not binary, host byte order and host addr
/// size.
///
- //------------------------------------------------------------------
Stream();
// FIXME: Streams should not be copyable.
@@ -82,24 +74,17 @@ public:
return *this;
}
- //------------------------------------------------------------------
/// Destructor
- //------------------------------------------------------------------
virtual ~Stream();
- //------------------------------------------------------------------
// Subclasses must override these methods
- //------------------------------------------------------------------
- //------------------------------------------------------------------
/// Flush the stream.
///
/// Subclasses should flush the stream to make any output appear if the
/// stream has any buffering.
- //------------------------------------------------------------------
virtual void Flush() = 0;
- //------------------------------------------------------------------
/// Output character bytes to the stream.
///
/// Appends \a src_len characters from the buffer \a src to the stream.
@@ -112,7 +97,6 @@ public:
///
/// \return
/// The number of bytes that were appended to the stream.
- //------------------------------------------------------------------
size_t Write(const void *src, size_t src_len) {
size_t appended_byte_count = WriteImpl(src, src_len);
m_bytes_written += appended_byte_count;
@@ -121,12 +105,9 @@ public:
size_t GetWrittenBytes() const { return m_bytes_written; }
- //------------------------------------------------------------------
// Member functions
- //------------------------------------------------------------------
size_t PutChar(char ch);
- //------------------------------------------------------------------
/// Set the byte_order value.
///
/// Sets the byte order of the data to extract. Extracted values will be
@@ -137,10 +118,8 @@ public:
///
/// \return
/// The old byte order value.
- //------------------------------------------------------------------
lldb::ByteOrder SetByteOrder(lldb::ByteOrder byte_order);
- //------------------------------------------------------------------
/// Format a C string from a printf style format and variable arguments and
/// encode and append the resulting C string as hex bytes.
///
@@ -152,11 +131,9 @@ public:
///
/// \return
/// The number of bytes that were appended to the stream.
- //------------------------------------------------------------------
size_t PrintfAsRawHex8(const char *format, ...)
__attribute__((__format__(__printf__, 2, 3)));
- //------------------------------------------------------------------
/// Append an uint8_t value in the hexadecimal format to the stream.
///
/// \param[in] uvalue
@@ -164,7 +141,6 @@ public:
///
/// \return
/// The number of bytes that were appended to the stream.
- //------------------------------------------------------------------
size_t PutHex8(uint8_t uvalue);
size_t PutNHex8(size_t n, uint8_t uvalue);
@@ -205,7 +181,6 @@ public:
size_t PutStringAsRawHex8(llvm::StringRef s);
- //------------------------------------------------------------------
/// Output a NULL terminated C string \a cstr to the stream \a s.
///
/// \param[in] cstr
@@ -214,12 +189,10 @@ public:
/// \return
/// A reference to this class so multiple things can be streamed
/// in one statement.
- //------------------------------------------------------------------
Stream &operator<<(const char *cstr);
Stream &operator<<(llvm::StringRef str);
- //------------------------------------------------------------------
/// Output a pointer value \a p to the stream \a s.
///
/// \param[in] p
@@ -228,10 +201,8 @@ public:
/// \return
/// A reference to this class so multiple things can be streamed
/// in one statement.
- //------------------------------------------------------------------
Stream &operator<<(const void *p);
- //------------------------------------------------------------------
/// Output a character \a ch to the stream \a s.
///
/// \param[in] ch
@@ -240,10 +211,8 @@ public:
/// \return
/// A reference to this class so multiple things can be streamed
/// in one statement.
- //------------------------------------------------------------------
Stream &operator<<(char ch);
- //------------------------------------------------------------------
/// Output a uint8_t \a uval to the stream \a s.
///
/// \param[in] uval
@@ -252,10 +221,8 @@ public:
/// \return
/// A reference to this class so multiple things can be streamed
/// in one statement.
- //------------------------------------------------------------------
Stream &operator<<(uint8_t uval);
- //------------------------------------------------------------------
/// Output a uint16_t \a uval to the stream \a s.
///
/// \param[in] uval
@@ -264,10 +231,8 @@ public:
/// \return
/// A reference to this class so multiple things can be streamed
/// in one statement.
- //------------------------------------------------------------------
Stream &operator<<(uint16_t uval);
- //------------------------------------------------------------------
/// Output a uint32_t \a uval to the stream \a s.
///
/// \param[in] uval
@@ -276,10 +241,8 @@ public:
/// \return
/// A reference to this class so multiple things can be streamed
/// in one statement.
- //------------------------------------------------------------------
Stream &operator<<(uint32_t uval);
- //------------------------------------------------------------------
/// Output a uint64_t \a uval to the stream \a s.
///
/// \param[in] uval
@@ -288,10 +251,8 @@ public:
/// \return
/// A reference to this class so multiple things can be streamed
/// in one statement.
- //------------------------------------------------------------------
Stream &operator<<(uint64_t uval);
- //------------------------------------------------------------------
/// Output a int8_t \a sval to the stream \a s.
///
/// \param[in] sval
@@ -300,10 +261,8 @@ public:
/// \return
/// A reference to this class so multiple things can be streamed
/// in one statement.
- //------------------------------------------------------------------
Stream &operator<<(int8_t sval);
- //------------------------------------------------------------------
/// Output a int16_t \a sval to the stream \a s.
///
/// \param[in] sval
@@ -312,10 +271,8 @@ public:
/// \return
/// A reference to this class so multiple things can be streamed
/// in one statement.
- //------------------------------------------------------------------
Stream &operator<<(int16_t sval);
- //------------------------------------------------------------------
/// Output a int32_t \a sval to the stream \a s.
///
/// \param[in] sval
@@ -324,10 +281,8 @@ public:
/// \return
/// A reference to this class so multiple things can be streamed
/// in one statement.
- //------------------------------------------------------------------
Stream &operator<<(int32_t sval);
- //------------------------------------------------------------------
/// Output a int64_t \a sval to the stream \a s.
///
/// \param[in] sval
@@ -336,10 +291,8 @@ public:
/// \return
/// A reference to this class so multiple things can be streamed
/// in one statement.
- //------------------------------------------------------------------
Stream &operator<<(int64_t sval);
- //------------------------------------------------------------------
/// Output an address value to this stream.
///
/// Put an address \a addr out to the stream with optional \a prefix and \a
@@ -356,11 +309,9 @@ public:
///
/// \param[in] suffix
/// A suffix C string. If nullptr, no suffix will be output.
- //------------------------------------------------------------------
void Address(uint64_t addr, uint32_t addr_size, const char *prefix = nullptr,
const char *suffix = nullptr);
- //------------------------------------------------------------------
/// Output an address range to this stream.
///
/// Put an address range \a lo_addr - \a hi_addr out to the stream with
@@ -380,67 +331,51 @@ public:
///
/// \param[in] suffix
/// A suffix C string. If nullptr, no suffix will be output.
- //------------------------------------------------------------------
void AddressRange(uint64_t lo_addr, uint64_t hi_addr, uint32_t addr_size,
const char *prefix = nullptr, const char *suffix = nullptr);
- //------------------------------------------------------------------
/// Output a C string to the stream.
///
/// Print a C string \a cstr to the stream.
///
/// \param[in] cstr
/// The string to be output to the stream.
- //------------------------------------------------------------------
size_t PutCString(llvm::StringRef cstr);
- //------------------------------------------------------------------
/// Output and End of Line character to the stream.
- //------------------------------------------------------------------
size_t EOL();
- //------------------------------------------------------------------
/// Get the address size in bytes.
///
/// \return
/// The size of an address in bytes that is used when outputting
/// address and pointer values to the stream.
- //------------------------------------------------------------------
uint32_t GetAddressByteSize() const;
- //------------------------------------------------------------------
/// The flags accessor.
///
/// \return
/// A reference to the Flags member variable.
- //------------------------------------------------------------------
Flags &GetFlags();
- //------------------------------------------------------------------
/// The flags const accessor.
///
/// \return
/// A const reference to the Flags member variable.
- //------------------------------------------------------------------
const Flags &GetFlags() const;
- //------------------------------------------------------------------
//// The byte order accessor.
////
//// \return
//// The byte order.
- //------------------------------------------------------------------
lldb::ByteOrder GetByteOrder() const;
- //------------------------------------------------------------------
/// Get the current indentation level.
///
/// \return
/// The current indentation level as an integer.
- //------------------------------------------------------------------
int GetIndentLevel() const;
- //------------------------------------------------------------------
/// Indent the current line in the stream.
///
/// Indent the current line using the current indentation level and print an
@@ -449,21 +384,15 @@ public:
/// \param[in] s
/// A C string to print following the indentation. If nullptr, just
/// output the indentation characters.
- //------------------------------------------------------------------
size_t Indent(const char *s = nullptr);
size_t Indent(llvm::StringRef s);
- //------------------------------------------------------------------
/// Decrement the current indentation level.
- //------------------------------------------------------------------
void IndentLess(int amount = 2);
- //------------------------------------------------------------------
/// Increment the current indentation level.
- //------------------------------------------------------------------
void IndentMore(int amount = 2);
- //------------------------------------------------------------------
/// Output an offset value.
///
/// Put an offset \a uval out to the stream using the printf format in \a
@@ -474,10 +403,8 @@ public:
///
/// \param[in] format
/// The printf style format to use when outputting the offset.
- //------------------------------------------------------------------
void Offset(uint32_t offset, const char *format = "0x%8.8x: ");
- //------------------------------------------------------------------
/// Output printf formatted output to the stream.
///
/// Print some formatted output to the stream.
@@ -488,7 +415,6 @@ public:
/// \param[in] ...
/// Variable arguments that are needed for the printf style
/// format string \a format.
- //------------------------------------------------------------------
size_t Printf(const char *format, ...) __attribute__((format(printf, 2, 3)));
size_t PrintfVarArg(const char *format, va_list args);
@@ -497,7 +423,6 @@ public:
PutCString(llvm::formatv(format, std::forward<Args>(args)...).str());
}
- //------------------------------------------------------------------
/// Output a quoted C string value to the stream.
///
/// Print a double quoted NULL terminated C string to the stream using the
@@ -508,27 +433,21 @@ public:
///
/// \param[in] format
/// The optional C string format that can be overridden.
- //------------------------------------------------------------------
void QuotedCString(const char *cstr, const char *format = "\"%s\"");
- //------------------------------------------------------------------
/// Set the address size in bytes.
///
/// \param[in] addr_size
/// The new size in bytes of an address to use when outputting
/// address and pointer values.
- //------------------------------------------------------------------
void SetAddressByteSize(uint32_t addr_size);
- //------------------------------------------------------------------
/// Set the current indentation level.
///
/// \param[in] level
/// The new indentation level.
- //------------------------------------------------------------------
void SetIndentLevel(int level);
- //------------------------------------------------------------------
/// Output a SLEB128 number to the stream.
///
/// Put an SLEB128 \a uval out to the stream using the printf format in \a
@@ -536,10 +455,8 @@ public:
///
/// \param[in] uval
/// A uint64_t value that was extracted as a SLEB128 value.
- //------------------------------------------------------------------
size_t PutSLEB128(int64_t uval);
- //------------------------------------------------------------------
/// Output a ULEB128 number to the stream.
///
/// Put an ULEB128 \a uval out to the stream using the printf format in \a
@@ -547,20 +464,15 @@ public:
///
/// \param[in] uval
/// A uint64_t value that was extracted as a ULEB128 value.
- //------------------------------------------------------------------
size_t PutULEB128(uint64_t uval);
- //------------------------------------------------------------------
/// Returns a raw_ostream that forwards the data to this Stream object.
- //------------------------------------------------------------------
llvm::raw_ostream &AsRawOstream() {
return m_forwarder;
}
protected:
- //------------------------------------------------------------------
// Member variables
- //------------------------------------------------------------------
Flags m_flags; ///< Dump flags.
uint32_t m_addr_size; ///< Size of an address in bytes.
lldb::ByteOrder
@@ -570,7 +482,6 @@ protected:
void _PutHex8(uint8_t uvalue, bool add_prefix);
- //------------------------------------------------------------------
/// Output character bytes to the stream.
///
/// Appends \a src_len characters from the buffer \a src to the stream.
@@ -583,15 +494,12 @@ protected:
///
/// \return
/// The number of bytes that were appended to the stream.
- //------------------------------------------------------------------
virtual size_t WriteImpl(const void *src, size_t src_len) = 0;
- //----------------------------------------------------------------------
/// \class RawOstreamForward Stream.h "lldb/Utility/Stream.h"
/// This is a wrapper class that exposes a raw_ostream interface that just
/// forwards to an LLDB stream, allowing to reuse LLVM algorithms that take
/// a raw_ostream within the LLDB code base.
- //----------------------------------------------------------------------
class RawOstreamForward : public llvm::raw_ostream {
// Note: This stream must *not* maintain its own buffer, but instead
// directly write everything to the internal Stream class. Without this,
Modified: lldb/trunk/include/lldb/Utility/StreamGDBRemote.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StreamGDBRemote.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/StreamGDBRemote.h (original)
+++ lldb/trunk/include/lldb/Utility/StreamGDBRemote.h Wed Apr 10 13:48:55 2019
@@ -26,7 +26,6 @@ public:
~StreamGDBRemote() override;
- //------------------------------------------------------------------
/// Output a block of data to the stream performing GDB-remote escaping.
///
/// \param[in] s
@@ -37,7 +36,6 @@ public:
///
/// \return
/// Number of bytes written.
- //------------------------------------------------------------------
// TODO: Convert this function to take ArrayRef<uint8_t>
int PutEscapedBytes(const void *s, size_t src_len);
};
Modified: lldb/trunk/include/lldb/Utility/StringExtractor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StringExtractor.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/StringExtractor.h (original)
+++ lldb/trunk/include/lldb/Utility/StringExtractor.h Wed Apr 10 13:48:55 2019
@@ -19,18 +19,14 @@
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) {
@@ -121,9 +117,7 @@ protected:
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
Modified: lldb/trunk/include/lldb/Utility/StructuredData.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StructuredData.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/StructuredData.h (original)
+++ lldb/trunk/include/lldb/Utility/StructuredData.h Wed Apr 10 13:48:55 2019
@@ -35,7 +35,6 @@ class Stream;
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class StructuredData StructuredData.h "lldb/Utility/StructuredData.h"
/// A class which can hold structured data
///
@@ -48,7 +47,6 @@ namespace lldb_private {
/// data it is holding; it can parse JSON data, for instance, and other parts
/// of lldb can iterate through the parsed data set to find keys and values
/// that may be present.
-//----------------------------------------------------------------------
class StructuredData {
public:
Modified: lldb/trunk/include/lldb/Utility/Timer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Timer.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Timer.h (original)
+++ lldb/trunk/include/lldb/Utility/Timer.h Wed Apr 10 13:48:55 2019
@@ -17,10 +17,8 @@
namespace lldb_private {
class Stream;
-//----------------------------------------------------------------------
/// \class Timer Timer.h "lldb/Utility/Timer.h"
/// A timer class that simplifies common timing metrics.
-//----------------------------------------------------------------------
class Timer {
public:
@@ -37,15 +35,11 @@ public:
DISALLOW_COPY_AND_ASSIGN(Category);
};
- //--------------------------------------------------------------
/// Default constructor.
- //--------------------------------------------------------------
Timer(Category &category, const char *format, ...)
__attribute__((format(printf, 3, 4)));
- //--------------------------------------------------------------
/// Destructor
- //--------------------------------------------------------------
~Timer();
void Dump();
Modified: lldb/trunk/include/lldb/Utility/UUID.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/UUID.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/UUID.h (original)
+++ lldb/trunk/include/lldb/Utility/UUID.h Wed Apr 10 13:48:55 2019
@@ -76,7 +76,6 @@ public:
// Decode as many UUID bytes (up to 16) as possible from the C string "cstr"
// This is used for auto completion where a partial UUID might have been
// typed in. It
- //------------------------------------------------------------------
/// Decode as many UUID bytes (up to 16) as possible from the C
/// string \a cstr.
///
@@ -91,7 +90,6 @@ public:
///
/// \return
/// The original string, with all decoded bytes removed.
- //------------------------------------------------------------------
static llvm::StringRef
DecodeUUIDBytesFromString(llvm::StringRef str,
llvm::SmallVectorImpl<uint8_t> &uuid_bytes,
Modified: lldb/trunk/include/lldb/Utility/UserID.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/UserID.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/UserID.h (original)
+++ lldb/trunk/include/lldb/Utility/UserID.h Wed Apr 10 13:48:55 2019
@@ -17,7 +17,6 @@ class Stream;
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class UserID UserID.h "lldb/Core/UserID.h"
/// A mix in class that contains a generic user ID.
///
@@ -31,42 +30,30 @@ namespace lldb_private {
/// Symbol table entries can use this to store the original symbol table
/// index, functions can use it to store the symbol table index or the
/// DWARF offset.
-//----------------------------------------------------------------------
struct UserID {
- //------------------------------------------------------------------
/// Construct with optional user ID.
- //------------------------------------------------------------------
UserID(lldb::user_id_t uid = LLDB_INVALID_UID) : m_uid(uid) {}
- //------------------------------------------------------------------
/// Destructor.
- //------------------------------------------------------------------
~UserID() {}
- //------------------------------------------------------------------
/// Clears the object state.
///
/// Clears the object contents back to a default invalid state.
- //------------------------------------------------------------------
void Clear() { m_uid = LLDB_INVALID_UID; }
- //------------------------------------------------------------------
/// Get accessor for the user ID.
///
/// \return
/// The user ID.
- //------------------------------------------------------------------
lldb::user_id_t GetID() const { return m_uid; }
- //------------------------------------------------------------------
/// Set accessor for the user ID.
///
/// \param[in] uid
/// The new user ID.
- //------------------------------------------------------------------
void SetID(lldb::user_id_t uid) { m_uid = uid; }
- //------------------------------------------------------------------
/// Unary predicate function object that can search for a matching user ID.
///
/// Function object that can be used on any class that inherits from UserID:
@@ -74,30 +61,21 @@ struct UserID {
/// iterator pos;
/// pos = std::find_if (coll.begin(), coll.end(), UserID::IDMatches(blockID));
/// \endcode
- //------------------------------------------------------------------
class IDMatches {
public:
- //--------------------------------------------------------------
/// Construct with the user ID to look for.
- //--------------------------------------------------------------
IDMatches(lldb::user_id_t uid) : m_uid(uid) {}
- //--------------------------------------------------------------
/// Unary predicate function object callback.
- //--------------------------------------------------------------
bool operator()(const UserID &rhs) const { return m_uid == rhs.GetID(); }
private:
- //--------------------------------------------------------------
// Member variables.
- //--------------------------------------------------------------
const lldb::user_id_t m_uid; ///< The user ID we are looking for
};
protected:
- //------------------------------------------------------------------
// Member variables.
- //------------------------------------------------------------------
lldb::user_id_t m_uid; ///< The user ID that uniquely identifies an object.
};
@@ -109,9 +87,7 @@ inline bool operator!=(const UserID &lhs
return lhs.GetID() != rhs.GetID();
}
-//--------------------------------------------------------------
/// Stream the UserID object to a Stream.
-//--------------------------------------------------------------
Stream &operator<<(Stream &strm, const UserID &uid);
} // namespace lldb_private
Modified: lldb/trunk/include/lldb/Utility/VMRange.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/VMRange.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/VMRange.h (original)
+++ lldb/trunk/include/lldb/Utility/VMRange.h Wed Apr 10 13:48:55 2019
@@ -21,10 +21,8 @@ class Stream;
namespace lldb_private {
-//----------------------------------------------------------------------
// A vm address range. These can represent offsets ranges or actual
// addresses.
-//----------------------------------------------------------------------
class VMRange {
public:
typedef std::vector<VMRange> collection;
Modified: lldb/trunk/include/lldb/lldb-defines.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-defines.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-defines.h (original)
+++ lldb/trunk/include/lldb/lldb-defines.h Wed Apr 10 13:48:55 2019
@@ -35,31 +35,23 @@
#define UINT64_MAX 18446744073709551615ULL
#endif
-//----------------------------------------------------------------------
// LLDB version
//
// A build script phase can modify this version number if needed.
-//----------------------------------------------------------------------
//#define LLDB_VERSION
//#define LLDB_REVISION
//#define LLDB_VERSION_STRING
-//----------------------------------------------------------------------
// LLDB defines
-//----------------------------------------------------------------------
#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)
-//----------------------------------------------------------------------
// 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)
@@ -67,9 +59,7 @@
#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
@@ -91,9 +81,7 @@
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
@@ -109,17 +97,13 @@
#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)
-//----------------------------------------------------------------------
/// 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
@@ -151,11 +135,9 @@
#if defined(__cplusplus)
-//----------------------------------------------------------------------
/// \def DISALLOW_COPY_AND_ASSIGN(TypeName)
/// Macro definition for easily disallowing copy constructor and
/// assignment operators in C++ classes.
-//----------------------------------------------------------------------
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName &) = delete; \
const TypeName &operator=(const TypeName &) = delete
Modified: lldb/trunk/include/lldb/lldb-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-enumerations.h Wed Apr 10 13:48:55 2019
@@ -69,9 +69,7 @@
namespace lldb {
-//----------------------------------------------------------------------
// Process and Thread States
-//----------------------------------------------------------------------
enum StateType {
eStateInvalid = 0,
eStateUnloaded, ///< Process is object is valid, but not currently loaded
@@ -95,9 +93,7 @@ enum StateType {
kLastStateType = eStateSuspended
};
-//----------------------------------------------------------------------
// Launch Flags
-//----------------------------------------------------------------------
FLAGS_ENUM(LaunchFlags){
eLaunchFlagNone = 0u,
eLaunchFlagExec = (1u << 0), ///< Exec when launching and turn the calling
@@ -130,14 +126,10 @@ FLAGS_ENUM(LaunchFlags){
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,
@@ -145,9 +137,7 @@ enum ByteOrder {
eByteOrderLittle = 4
};
-//----------------------------------------------------------------------
// Register encoding definitions
-//----------------------------------------------------------------------
enum Encoding {
eEncodingInvalid = 0,
eEncodingUint, // unsigned integer
@@ -156,9 +146,7 @@ enum Encoding {
eEncodingVector // vector registers
};
-//----------------------------------------------------------------------
// Display format definitions
-//----------------------------------------------------------------------
enum Format {
eFormatDefault = 0,
eFormatInvalid = 0,
@@ -208,10 +196,8 @@ enum Format {
kNumFormats
};
-//----------------------------------------------------------------------
// Description levels for "void GetDescription(Stream *, DescriptionLevel)"
// calls
-//----------------------------------------------------------------------
enum DescriptionLevel {
eDescriptionLevelBrief = 0,
eDescriptionLevelFull,
@@ -220,9 +206,7 @@ enum DescriptionLevel {
kNumDescriptionLevels
};
-//----------------------------------------------------------------------
// Script interpreter types
-//----------------------------------------------------------------------
enum ScriptLanguage {
eScriptLanguageNone,
eScriptLanguagePython,
@@ -230,11 +214,9 @@ enum ScriptLanguage {
eScriptLanguageUnknown
};
-//----------------------------------------------------------------------
// 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
@@ -246,9 +228,7 @@ enum RegisterKind {
kNumRegisterKinds
};
-//----------------------------------------------------------------------
// Thread stop reasons
-//----------------------------------------------------------------------
enum StopReason {
eStopReasonInvalid = 0,
eStopReasonNone,
@@ -263,9 +243,7 @@ enum StopReason {
eStopReasonInstrumentation
};
-//----------------------------------------------------------------------
// Command Return Status Types
-//----------------------------------------------------------------------
enum ReturnStatus {
eReturnStatusInvalid,
eReturnStatusSuccessFinishNoResult,
@@ -277,9 +255,7 @@ enum ReturnStatus {
eReturnStatusQuit
};
-//----------------------------------------------------------------------
// The results of expression evaluation:
-//----------------------------------------------------------------------
enum ExpressionResults {
eExpressionCompleted = 0,
eExpressionSetupError,
@@ -303,9 +279,7 @@ enum SearchDepth {
kLastSearchDepthKind = eSearchDepthAddress
};
-//----------------------------------------------------------------------
// Connection Status Types
-//----------------------------------------------------------------------
enum ConnectionStatus {
eConnectionStatusSuccess, // Success
eConnectionStatusEndOfFile, // End-of-file encountered
@@ -338,9 +312,7 @@ enum ValueType {
eValueTypeVariableThreadLocal = 8 // thread local storage variable
};
-//----------------------------------------------------------------------
// Token size/granularities for Input Readers
-//----------------------------------------------------------------------
enum InputReaderGranularity {
eInputReaderGranularityInvalid = 0,
@@ -350,7 +322,6 @@ enum InputReaderGranularity {
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
@@ -359,7 +330,6 @@ enum InputReaderGranularity {
/// 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
@@ -446,14 +416,12 @@ FLAGS_ENUM(WatchpointEventType){
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.
@@ -623,9 +591,7 @@ enum CommandArgumentType {
// enumeration!!
};
-//----------------------------------------------------------------------
// Symbol types
-//----------------------------------------------------------------------
enum SymbolType {
eSymbolTypeAny = 0,
eSymbolTypeInvalid = 0,
@@ -747,9 +713,7 @@ FLAGS_ENUM(FunctionNameType){
};
LLDB_MARK_AS_BITMASK_ENUM(FunctionNameType)
-//----------------------------------------------------------------------
// Basic types enumeration for the public API SBType::GetBasicType()
-//----------------------------------------------------------------------
enum BasicType {
eBasicTypeInvalid = 0,
eBasicTypeVoid = 1,
@@ -834,10 +798,8 @@ enum TemplateArgumentKind {
eTemplateArgumentKindNullPtr,
};
-//----------------------------------------------------------------------
// 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),
@@ -851,7 +813,6 @@ FLAGS_ENUM(TypeOptions){eTypeOptionNone
eTypeOptionFrontEndWantsDereference = (1u << 9)
};
-//----------------------------------------------------------------------
// 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
@@ -863,7 +824,6 @@ FLAGS_ENUM(TypeOptions){eTypeOptionNone
// 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,
@@ -873,12 +833,10 @@ enum FrameComparison {
eFrameCompareOlder
};
-//----------------------------------------------------------------------
// 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),
@@ -934,35 +892,29 @@ FLAGS_ENUM(FilePermissions){
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,
@@ -970,11 +922,9 @@ enum ExpressionEvaluationPhase {
eExpressionEvaluationComplete
};
-//----------------------------------------------------------------------
// Watchpoint Kind
// Indicates what types of events cause the watchpoint to fire. Used by Native
// *Protocol-related classes.
-//----------------------------------------------------------------------
FLAGS_ENUM(WatchpointKind){eWatchpointKindWrite = (1u << 0),
eWatchpointKindRead = (1u << 1)};
@@ -987,11 +937,9 @@ enum GdbSignal {
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
@@ -1008,10 +956,8 @@ enum PathType {
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
@@ -1023,14 +969,10 @@ enum MemberFunctionKind {
// 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),
@@ -1046,7 +988,6 @@ FLAGS_ENUM(TypeFlags){
eTypeInstanceIsPointer = (1u << 22)};
FLAGS_ENUM(CommandFlags){
- //----------------------------------------------------------------------
// eCommandRequiresTarget
//
// Ensures a valid target is contained in m_exe_ctx prior to executing the
@@ -1054,9 +995,7 @@ FLAGS_ENUM(CommandFlags){
// 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
@@ -1065,9 +1004,7 @@ FLAGS_ENUM(CommandFlags){
// 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
@@ -1075,9 +1012,7 @@ FLAGS_ENUM(CommandFlags){
// 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
@@ -1085,9 +1020,7 @@ FLAGS_ENUM(CommandFlags){
// 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
@@ -1097,34 +1030,25 @@ FLAGS_ENUM(CommandFlags){
// 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
Modified: lldb/trunk/include/lldb/lldb-forward.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-forward.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-forward.h (original)
+++ lldb/trunk/include/lldb/lldb-forward.h Wed Apr 10 13:48:55 2019
@@ -13,9 +13,7 @@
#include "lldb/Utility/SharingPtr.h"
-//----------------------------------------------------------------------
// lldb forward declarations
-//----------------------------------------------------------------------
namespace lldb_private {
class ABI;
@@ -301,9 +299,7 @@ struct LineEntry;
} // namespace lldb_private
-//----------------------------------------------------------------------
// lldb forward declarations
-//----------------------------------------------------------------------
namespace lldb {
typedef std::shared_ptr<lldb_private::ABI> ABISP;
@@ -492,9 +488,7 @@ typedef std::shared_ptr<lldb_private::Wa
} // namespace lldb
-//----------------------------------------------------------------------
// llvm forward declarations
-//----------------------------------------------------------------------
namespace llvm {
struct ItaniumPartialDemangler;
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=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-private-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-private-enumerations.h Wed Apr 10 13:48:55 2019
@@ -15,9 +15,7 @@
namespace lldb_private {
-//----------------------------------------------------------------------
// Thread Step Types
-//----------------------------------------------------------------------
typedef enum StepType {
eStepTypeNone,
eStepTypeTrace, ///< Single step one instruction.
@@ -28,9 +26,7 @@ typedef enum StepType {
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
@@ -41,7 +37,6 @@ typedef enum AddressType {
///this code
} AddressType;
-//----------------------------------------------------------------------
// Address Class
//
// A way of classifying an address used for disassembling and setting
@@ -50,7 +45,6 @@ typedef enum AddressType {
// 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 class AddressClass {
eInvalid,
eUnknown,
@@ -61,9 +55,7 @@ enum class AddressClass {
eRuntime
};
-//----------------------------------------------------------------------
// Votes - Need a tri-state, yes, no, no opinion...
-//----------------------------------------------------------------------
typedef enum Vote { eVoteNo = -1, eVoteNoOpinion = 0, eVoteYes = 1 } Vote;
typedef enum ArchitectureType {
@@ -74,10 +66,8 @@ typedef enum ArchitectureType {
kNumArchTypes
} ArchitectureType;
-//----------------------------------------------------------------------
/// Settable state variable types.
///
-//----------------------------------------------------------------------
// typedef enum SettableVariableType
//{
@@ -123,20 +113,16 @@ typedef enum SortOrder {
eSortOrderByName
} SortOrder;
-//----------------------------------------------------------------------
// LazyBool is for boolean values that need to be calculated lazily. Values
// start off set to eLazyBoolCalculate, and then they can be calculated once
// and set to eLazyBoolNo or eLazyBoolYes.
-//----------------------------------------------------------------------
typedef enum LazyBool {
eLazyBoolCalculate = -1,
eLazyBoolNo = 0,
eLazyBoolYes = 1
} LazyBool;
-//------------------------------------------------------------------
/// Instruction types
-//------------------------------------------------------------------
typedef enum InstructionType {
eInstructionTypeAny, // Support for any instructions at all (at least one)
eInstructionTypePrologueEpilogue, // All prologue and epilogue instructions
@@ -148,9 +134,7 @@ typedef enum InstructionType {
} InstructionType;
-//------------------------------------------------------------------
/// Format category entry types
-//------------------------------------------------------------------
typedef enum FormatCategoryItem {
eFormatCategoryItemSummary = 0x0001,
eFormatCategoryItemRegexSummary = 0x0002,
@@ -164,9 +148,7 @@ typedef enum FormatCategoryItem {
eFormatCategoryItemRegexValidator = 0x0200
} FormatCategoryItem;
-//------------------------------------------------------------------
/// Expression execution policies
-//------------------------------------------------------------------
typedef enum {
eExecutionPolicyOnlyWhenNeeded,
eExecutionPolicyNever,
@@ -174,9 +156,7 @@ typedef enum {
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,
@@ -188,9 +168,7 @@ typedef enum FormatterChoiceCriterion {
eFormatterChoiceCriterionWentToStaticValue = 0x00000020
} FormatterChoiceCriterion;
-//----------------------------------------------------------------------
// Synchronicity behavior of scripted commands
-//----------------------------------------------------------------------
typedef enum ScriptedCommandSynchronicity {
eScriptedCommandSynchronicitySynchronous,
eScriptedCommandSynchronicityAsynchronous,
@@ -198,9 +176,7 @@ typedef enum ScriptedCommandSynchronicit
// synchronicity is
} ScriptedCommandSynchronicity;
-//----------------------------------------------------------------------
// Verbosity mode of "po" output
-//----------------------------------------------------------------------
typedef enum LanguageRuntimeDescriptionDisplayVerbosity {
eLanguageRuntimeDescriptionDisplayVerbosityCompact, // only print the
// description string, if
@@ -209,18 +185,14 @@ typedef enum LanguageRuntimeDescriptionD
// 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
} 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
@@ -230,14 +202,10 @@ enum class LineStatus {
Done // Lines are complete
};
-//----------------------------------------------------------------------
// Boolean result of running a Type Validator
-//----------------------------------------------------------------------
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,
@@ -252,10 +220,8 @@ enum class CompilerContextKind {
Typedef
};
-//----------------------------------------------------------------------
// Enumerations that can be used to specify the kind of metric we're looking at
// when collecting stats.
-//----------------------------------------------------------------------
enum StatisticKind {
ExpressionSuccessful = 0,
ExpressionFailure = 1,
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=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-private-forward.h (original)
+++ lldb/trunk/include/lldb/lldb-private-forward.h Wed Apr 10 13:48:55 2019
@@ -10,9 +10,7 @@
#define LLDB_lldb_private_forward_h_
namespace lldb_private {
-// --------------------------------------------------------------- Class
// forward decls.
-// ---------------------------------------------------------------
class NativeProcessProtocol;
class NativeRegisterContext;
class NativeThreadProtocol;
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=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-private-types.h (original)
+++ lldb/trunk/include/lldb/lldb-private-types.h Wed Apr 10 13:48:55 2019
@@ -28,10 +28,8 @@ class ExecutionContext;
typedef llvm::sys::DynamicLibrary (*LoadPluginCallbackType)(
const lldb::DebuggerSP &debugger_sp, const FileSpec &spec, Status &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
@@ -73,9 +71,7 @@ struct RegisterInfo {
}
};
-//----------------------------------------------------------------------
// 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
Modified: lldb/trunk/include/lldb/lldb-types.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-types.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-types.h (original)
+++ lldb/trunk/include/lldb/lldb-types.h Wed Apr 10 13:48:55 2019
@@ -14,7 +14,6 @@
#include <stdint.h>
-//----------------------------------------------------------------------
// All host systems must define:
// lldb::thread_t The native thread type for spawned threads on the
// system
@@ -27,7 +26,6 @@
// #define LLDB_INVALID_PROCESS_ID ...
// #define LLDB_INVALID_THREAD_ID ...
// #define LLDB_INVALID_HOST_THREAD ...
-//----------------------------------------------------------------------
// TODO: Add a bunch of ifdefs to determine the host system and what
// things should be defined. Currently MacOSX is being assumed by default since
@@ -54,9 +52,7 @@ typedef void *pipe_t;
#include <pthread.h>
namespace lldb {
-//----------------------------------------------------------------------
// MacOSX Types
-//----------------------------------------------------------------------
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
Modified: lldb/trunk/include/lldb/lldb-versioning.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-versioning.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-versioning.h (original)
+++ lldb/trunk/include/lldb/lldb-versioning.h Wed Apr 10 13:48:55 2019
@@ -10,9 +10,7 @@
#ifndef LLDB_lldb_versioning_h_
#define LLDB_lldb_versioning_h_
-//----------------------------------------------------------------------
// LLDB API version
-//----------------------------------------------------------------------
#define LLDB_API_MAJOR_VERSION 1
#define LLDB_API_MINOR_VERSION 0
Modified: lldb/trunk/source/API/SBInstruction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBInstruction.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/API/SBInstruction.cpp (original)
+++ lldb/trunk/source/API/SBInstruction.cpp Wed Apr 10 13:48:55 2019
@@ -29,7 +29,6 @@
#include <memory>
-//----------------------------------------------------------------------
// We recently fixed a leak in one of the Instruction subclasses where the
// instruction will only hold a weak reference to the disassembler to avoid a
// cycle that was keeping both objects alive (leak) and we need the
@@ -48,7 +47,6 @@
// objects that are given out have a strong reference to the disassembler and
// the instruction so that the object can live and successfully respond to all
// queries.
-//----------------------------------------------------------------------
class InstructionImpl {
public:
InstructionImpl(const lldb::DisassemblerSP &disasm_sp,
Modified: lldb/trunk/source/API/SBPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBPlatform.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/API/SBPlatform.cpp (original)
+++ lldb/trunk/source/API/SBPlatform.cpp Wed Apr 10 13:48:55 2019
@@ -26,9 +26,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// PlatformConnectOptions
-//----------------------------------------------------------------------
struct PlatformConnectOptions {
PlatformConnectOptions(const char *url = NULL)
: m_url(), m_rsync_options(), m_rsync_remote_path_prefix(),
@@ -48,9 +46,7 @@ struct PlatformConnectOptions {
ConstString m_local_cache_directory;
};
-//----------------------------------------------------------------------
// PlatformShellCommand
-//----------------------------------------------------------------------
struct PlatformShellCommand {
PlatformShellCommand(const char *shell_command = NULL)
: m_command(), m_working_dir(), m_status(0), m_signo(0) {
@@ -67,9 +63,7 @@ struct PlatformShellCommand {
int m_signo;
Timeout<std::ratio<1>> m_timeout = llvm::None;
};
-//----------------------------------------------------------------------
// SBPlatformConnectOptions
-//----------------------------------------------------------------------
SBPlatformConnectOptions::SBPlatformConnectOptions(const char *url)
: m_opaque_ptr(new PlatformConnectOptions(url)) {
LLDB_RECORD_CONSTRUCTOR(SBPlatformConnectOptions, (const char *), url);
@@ -164,9 +158,7 @@ void SBPlatformConnectOptions::SetLocalC
m_opaque_ptr->m_local_cache_directory = ConstString();
}
-//----------------------------------------------------------------------
// SBPlatformShellCommand
-//----------------------------------------------------------------------
SBPlatformShellCommand::SBPlatformShellCommand(const char *shell_command)
: m_opaque_ptr(new PlatformShellCommand(shell_command)) {
LLDB_RECORD_CONSTRUCTOR(SBPlatformShellCommand, (const char *),
@@ -268,9 +260,7 @@ const char *SBPlatformShellCommand::GetO
return m_opaque_ptr->m_output.c_str();
}
-//----------------------------------------------------------------------
// SBPlatform
-//----------------------------------------------------------------------
SBPlatform::SBPlatform() : m_opaque_sp() {
LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBPlatform);
}
Modified: lldb/trunk/source/API/SBProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcess.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/API/SBProcess.cpp (original)
+++ lldb/trunk/source/API/SBProcess.cpp Wed Apr 10 13:48:55 2019
@@ -53,9 +53,7 @@ SBProcess::SBProcess() : m_opaque_wp() {
LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBProcess);
}
-//----------------------------------------------------------------------
// SBProcess constructor
-//----------------------------------------------------------------------
SBProcess::SBProcess(const SBProcess &rhs) : m_opaque_wp(rhs.m_opaque_wp) {
LLDB_RECORD_CONSTRUCTOR(SBProcess, (const lldb::SBProcess &), rhs);
@@ -75,9 +73,7 @@ const SBProcess &SBProcess::operator=(co
return LLDB_RECORD_RESULT(*this);
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
SBProcess::~SBProcess() {}
const char *SBProcess::GetBroadcasterClassName() {
Modified: lldb/trunk/source/API/SBQueueItem.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBQueueItem.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/API/SBQueueItem.cpp (original)
+++ lldb/trunk/source/API/SBQueueItem.cpp Wed Apr 10 13:48:55 2019
@@ -20,9 +20,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// Constructors
-//----------------------------------------------------------------------
SBQueueItem::SBQueueItem() : m_queue_item_sp() {
LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBQueueItem);
}
@@ -33,9 +31,7 @@ SBQueueItem::SBQueueItem(const QueueItem
queue_item_sp);
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
SBQueueItem::~SBQueueItem() { m_queue_item_sp.reset(); }
bool SBQueueItem::IsValid() const {
Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Wed Apr 10 13:48:55 2019
@@ -97,9 +97,7 @@ Status AttachToProcess(ProcessAttachInfo
} // namespace
-//----------------------------------------------------------------------
// SBTarget constructor
-//----------------------------------------------------------------------
SBTarget::SBTarget() : m_opaque_sp() {
LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBTarget);
}
@@ -121,9 +119,7 @@ const SBTarget &SBTarget::operator=(cons
return LLDB_RECORD_RESULT(*this);
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
SBTarget::~SBTarget() {}
bool SBTarget::EventIsTargetEvent(const SBEvent &event) {
Modified: lldb/trunk/source/API/SBThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThread.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThread.cpp (original)
+++ lldb/trunk/source/API/SBThread.cpp Wed Apr 10 13:48:55 2019
@@ -56,9 +56,7 @@ const char *SBThread::GetBroadcasterClas
return Thread::GetStaticBroadcasterClass().AsCString();
}
-//----------------------------------------------------------------------
// Constructors
-//----------------------------------------------------------------------
SBThread::SBThread() : m_opaque_sp(new ExecutionContextRef()) {
LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBThread);
}
@@ -74,9 +72,7 @@ SBThread::SBThread(const SBThread &rhs)
m_opaque_sp = clone(rhs.m_opaque_sp);
}
-//----------------------------------------------------------------------
// Assignment operator
-//----------------------------------------------------------------------
const lldb::SBThread &SBThread::operator=(const SBThread &rhs) {
LLDB_RECORD_METHOD(const lldb::SBThread &,
@@ -87,9 +83,7 @@ const lldb::SBThread &SBThread::operator
return LLDB_RECORD_RESULT(*this);
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
SBThread::~SBThread() {}
lldb::SBQueue SBThread::GetQueue() const {
Modified: lldb/trunk/source/API/SBThreadPlan.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThreadPlan.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThreadPlan.cpp (original)
+++ lldb/trunk/source/API/SBThreadPlan.cpp Wed Apr 10 13:48:55 2019
@@ -47,9 +47,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// Constructors
-//----------------------------------------------------------------------
SBThreadPlan::SBThreadPlan() { LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBThreadPlan); }
SBThreadPlan::SBThreadPlan(const ThreadPlanSP &lldb_object_sp)
@@ -72,9 +70,7 @@ SBThreadPlan::SBThreadPlan(lldb::SBThrea
m_opaque_sp = std::make_shared<ThreadPlanPython>(*thread, class_name);
}
-//----------------------------------------------------------------------
// Assignment operator
-//----------------------------------------------------------------------
const lldb::SBThreadPlan &SBThreadPlan::operator=(const SBThreadPlan &rhs) {
LLDB_RECORD_METHOD(const lldb::SBThreadPlan &,
@@ -84,9 +80,7 @@ const lldb::SBThreadPlan &SBThreadPlan::
m_opaque_sp = rhs.m_opaque_sp;
return LLDB_RECORD_RESULT(*this);
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
SBThreadPlan::~SBThreadPlan() {}
lldb_private::ThreadPlan *SBThreadPlan::get() { return m_opaque_sp.get(); }
Modified: lldb/trunk/source/API/SystemInitializerFull.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SystemInitializerFull.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/API/SystemInitializerFull.cpp (original)
+++ lldb/trunk/source/API/SystemInitializerFull.cpp Wed Apr 10 13:48:55 2019
@@ -232,9 +232,7 @@ llvm::Error SystemInitializerFull::Initi
// shouldn't be limited to __APPLE__.
StructuredDataDarwinLog::Initialize();
- //----------------------------------------------------------------------
// Platform agnostic plugins
- //----------------------------------------------------------------------
platform_gdb_server::PlatformRemoteGDBServer::Initialize();
process_gdb_remote::ProcessGDBRemote::Initialize();
Modified: lldb/trunk/source/API/SystemInitializerFull.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SystemInitializerFull.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/API/SystemInitializerFull.h (original)
+++ lldb/trunk/source/API/SystemInitializerFull.h Wed Apr 10 13:48:55 2019
@@ -12,14 +12,12 @@
#include "lldb/Initialization/SystemInitializerCommon.h"
namespace lldb_private {
-//------------------------------------------------------------------
/// Initializes lldb.
///
/// This class is responsible for initializing all of lldb system
/// services needed to use the full LLDB application. This class is
/// not intended to be used externally, but is instead used
/// internally by SBDebugger to initialize the system.
-//------------------------------------------------------------------
class SystemInitializerFull : public SystemInitializerCommon {
public:
SystemInitializerFull();
Modified: lldb/trunk/source/Breakpoint/Breakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/Breakpoint.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/Breakpoint.cpp (original)
+++ lldb/trunk/source/Breakpoint/Breakpoint.cpp Wed Apr 10 13:48:55 2019
@@ -43,9 +43,7 @@ ConstString Breakpoint::GetEventIdentifi
const char *Breakpoint::g_option_names[static_cast<uint32_t>(
Breakpoint::OptionNames::LastOptionName)]{"Names", "Hardware"};
-//----------------------------------------------------------------------
// Breakpoint constructor
-//----------------------------------------------------------------------
Breakpoint::Breakpoint(Target &target, SearchFilterSP &filter_sp,
BreakpointResolverSP &resolver_sp, bool hardware,
bool resolve_indirect_symbols)
@@ -68,14 +66,10 @@ Breakpoint::Breakpoint(Target &new_targe
m_filter_sp = source_bp.m_filter_sp->CopyForBreakpoint(*this);
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
Breakpoint::~Breakpoint() = default;
-//----------------------------------------------------------------------
// Serialization
-//----------------------------------------------------------------------
StructuredData::ObjectSP Breakpoint::SerializeToStructuredData() {
// Serialize the resolver:
StructuredData::DictionarySP breakpoint_dict_sp(
@@ -496,9 +490,7 @@ void Breakpoint::ClearAllBreakpointSites
m_locations.ClearAllBreakpointSites();
}
-//----------------------------------------------------------------------
// ModulesChanged: Pass in a list of new modules, and
-//----------------------------------------------------------------------
void Breakpoint::ModulesChanged(ModuleList &module_list, bool load,
bool delete_locations) {
Modified: lldb/trunk/source/Breakpoint/BreakpointIDList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointIDList.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointIDList.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointIDList.cpp Wed Apr 10 13:48:55 2019
@@ -18,9 +18,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// class BreakpointIDList
-//----------------------------------------------------------------------
BreakpointIDList::BreakpointIDList()
: m_invalid_id(LLDB_INVALID_BREAK_ID, LLDB_INVALID_BREAK_ID) {}
Modified: lldb/trunk/source/Breakpoint/BreakpointLocationCollection.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointLocationCollection.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointLocationCollection.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointLocationCollection.cpp Wed Apr 10 13:48:55 2019
@@ -16,15 +16,11 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// BreakpointLocationCollection constructor
-//----------------------------------------------------------------------
BreakpointLocationCollection::BreakpointLocationCollection()
: m_break_loc_collection(), m_collection_mutex() {}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
BreakpointLocationCollection::~BreakpointLocationCollection() {}
void BreakpointLocationCollection::Add(const BreakpointLocationSP &bp_loc) {
Modified: lldb/trunk/source/Breakpoint/BreakpointOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointOptions.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointOptions.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointOptions.cpp Wed Apr 10 13:48:55 2019
@@ -119,9 +119,7 @@ bool BreakpointOptions::NullCallback(voi
return true;
}
-//----------------------------------------------------------------------
// BreakpointOptions constructor
-//----------------------------------------------------------------------
BreakpointOptions::BreakpointOptions(bool all_flags_set)
: m_callback(BreakpointOptions::NullCallback), m_callback_baton_sp(),
m_baton_is_command_baton(false), m_callback_is_synchronous(false),
@@ -147,9 +145,7 @@ BreakpointOptions::BreakpointOptions(con
}
}
-//----------------------------------------------------------------------
// BreakpointOptions copy constructor
-//----------------------------------------------------------------------
BreakpointOptions::BreakpointOptions(const BreakpointOptions &rhs)
: m_callback(rhs.m_callback), m_callback_baton_sp(rhs.m_callback_baton_sp),
m_baton_is_command_baton(rhs.m_baton_is_command_baton),
@@ -163,9 +159,7 @@ BreakpointOptions::BreakpointOptions(con
m_condition_text_hash = rhs.m_condition_text_hash;
}
-//----------------------------------------------------------------------
// BreakpointOptions assignment operator
-//----------------------------------------------------------------------
const BreakpointOptions &BreakpointOptions::
operator=(const BreakpointOptions &rhs) {
m_callback = rhs.m_callback;
@@ -236,9 +230,7 @@ void BreakpointOptions::CopyOverSetOptio
}
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
BreakpointOptions::~BreakpointOptions() = default;
std::unique_ptr<BreakpointOptions> BreakpointOptions::CreateFromStructuredData(
@@ -406,9 +398,7 @@ StructuredData::ObjectSP BreakpointOptio
return options_dict_sp;
}
-//------------------------------------------------------------------
// Callbacks
-//------------------------------------------------------------------
void BreakpointOptions::SetCallback(BreakpointHitCallback callback,
const lldb::BatonSP &callback_baton_sp,
bool callback_is_synchronous) {
Modified: lldb/trunk/source/Breakpoint/BreakpointResolver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolver.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolver.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolver.cpp Wed Apr 10 13:48:55 2019
@@ -31,9 +31,7 @@
using namespace lldb_private;
using namespace lldb;
-//----------------------------------------------------------------------
// BreakpointResolver:
-//----------------------------------------------------------------------
const char *BreakpointResolver::g_ty_to_name[] = {"FileAndLine", "Address",
"SymbolName", "SourceRegex",
"Exception", "Unknown"};
Modified: lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp Wed Apr 10 13:48:55 2019
@@ -20,9 +20,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// BreakpointResolverAddress:
-//----------------------------------------------------------------------
BreakpointResolverAddress::BreakpointResolverAddress(
Breakpoint *bkpt, const Address &addr, const FileSpec &module_spec)
: BreakpointResolver(bkpt, BreakpointResolver::AddressResolver),
Modified: lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp Wed Apr 10 13:48:55 2019
@@ -18,9 +18,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// BreakpointResolverFileLine:
-//----------------------------------------------------------------------
BreakpointResolverFileLine::BreakpointResolverFileLine(
Breakpoint *bkpt, const FileSpec &file_spec, uint32_t line_no,
uint32_t column, lldb::addr_t offset, bool check_inlines,
Modified: lldb/trunk/source/Breakpoint/BreakpointResolverFileRegex.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverFileRegex.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolverFileRegex.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolverFileRegex.cpp Wed Apr 10 13:48:55 2019
@@ -18,9 +18,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// BreakpointResolverFileRegex:
-//----------------------------------------------------------------------
BreakpointResolverFileRegex::BreakpointResolverFileRegex(
Breakpoint *bkpt, RegularExpression ®ex,
const std::unordered_set<std::string> &func_names, bool exact_match)
Modified: lldb/trunk/source/Breakpoint/BreakpointResolverScripted.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverScripted.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolverScripted.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolverScripted.cpp Wed Apr 10 13:48:55 2019
@@ -24,9 +24,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// BreakpointResolverScripted:
-//----------------------------------------------------------------------
BreakpointResolverScripted::BreakpointResolverScripted(
Breakpoint *bkpt,
const llvm::StringRef class_name,
Modified: lldb/trunk/source/Breakpoint/Stoppoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/Stoppoint.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/Stoppoint.cpp (original)
+++ lldb/trunk/source/Breakpoint/Stoppoint.cpp Wed Apr 10 13:48:55 2019
@@ -13,14 +13,10 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// Stoppoint constructor
-//----------------------------------------------------------------------
Stoppoint::Stoppoint() : m_bid(LLDB_INVALID_BREAK_ID) {}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
Stoppoint::~Stoppoint() {}
break_id_t Stoppoint::GetID() const { return m_bid; }
Modified: lldb/trunk/source/Breakpoint/StoppointLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/StoppointLocation.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/StoppointLocation.cpp (original)
+++ lldb/trunk/source/Breakpoint/StoppointLocation.cpp Wed Apr 10 13:48:55 2019
@@ -12,9 +12,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// StoppointLocation constructor
-//----------------------------------------------------------------------
StoppointLocation::StoppointLocation(break_id_t bid, addr_t addr, bool hardware)
: m_loc_id(bid), m_addr(addr), m_hardware(hardware),
m_hardware_index(LLDB_INVALID_INDEX32), m_byte_size(0), m_hit_count(0) {}
@@ -25,9 +23,7 @@ StoppointLocation::StoppointLocation(bre
m_hardware_index(LLDB_INVALID_INDEX32), m_byte_size(byte_size),
m_hit_count(0) {}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
StoppointLocation::~StoppointLocation() {}
void StoppointLocation::DecrementHitCount() {
Modified: lldb/trunk/source/Breakpoint/WatchpointOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/WatchpointOptions.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/WatchpointOptions.cpp (original)
+++ lldb/trunk/source/Breakpoint/WatchpointOptions.cpp Wed Apr 10 13:48:55 2019
@@ -25,16 +25,12 @@ bool WatchpointOptions::NullCallback(voi
return true;
}
-//----------------------------------------------------------------------
// WatchpointOptions constructor
-//----------------------------------------------------------------------
WatchpointOptions::WatchpointOptions()
: m_callback(WatchpointOptions::NullCallback), m_callback_baton_sp(),
m_callback_is_synchronous(false), m_thread_spec_up() {}
-//----------------------------------------------------------------------
// WatchpointOptions copy constructor
-//----------------------------------------------------------------------
WatchpointOptions::WatchpointOptions(const WatchpointOptions &rhs)
: m_callback(rhs.m_callback), m_callback_baton_sp(rhs.m_callback_baton_sp),
m_callback_is_synchronous(rhs.m_callback_is_synchronous),
@@ -43,9 +39,7 @@ WatchpointOptions::WatchpointOptions(con
m_thread_spec_up.reset(new ThreadSpec(*rhs.m_thread_spec_up));
}
-//----------------------------------------------------------------------
// WatchpointOptions assignment operator
-//----------------------------------------------------------------------
const WatchpointOptions &WatchpointOptions::
operator=(const WatchpointOptions &rhs) {
m_callback = rhs.m_callback;
@@ -70,14 +64,10 @@ WatchpointOptions::CopyOptionsNoCallback
return ret_val;
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
WatchpointOptions::~WatchpointOptions() = default;
-//------------------------------------------------------------------
// Callbacks
-//------------------------------------------------------------------
void WatchpointOptions::SetCallback(WatchpointHitCallback callback,
const BatonSP &callback_baton_sp,
bool callback_is_synchronous) {
Modified: lldb/trunk/source/Commands/CommandCompletions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandCompletions.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandCompletions.cpp (original)
+++ lldb/trunk/source/Commands/CommandCompletions.cpp Wed Apr 10 13:48:55 2019
@@ -349,9 +349,7 @@ CommandCompletions::Completer::Completer
CommandCompletions::Completer::~Completer() = default;
-//----------------------------------------------------------------------
// SourceFileCompleter
-//----------------------------------------------------------------------
CommandCompletions::SourceFileCompleter::SourceFileCompleter(
CommandInterpreter &interpreter, bool include_support_files,
@@ -424,9 +422,7 @@ CommandCompletions::SourceFileCompleter:
return m_request.GetNumberOfMatches();
}
-//----------------------------------------------------------------------
// SymbolCompleter
-//----------------------------------------------------------------------
static bool regex_chars(const char comp) {
return (comp == '[' || comp == ']' || comp == '(' || comp == ')' ||
@@ -492,9 +488,7 @@ size_t CommandCompletions::SymbolComplet
return m_request.GetNumberOfMatches();
}
-//----------------------------------------------------------------------
// ModuleCompleter
-//----------------------------------------------------------------------
CommandCompletions::ModuleCompleter::ModuleCompleter(
CommandInterpreter &interpreter, CompletionRequest &request)
: CommandCompletions::Completer(interpreter, request) {
Modified: lldb/trunk/source/Commands/CommandObjectApropos.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectApropos.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectApropos.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectApropos.cpp Wed Apr 10 13:48:55 2019
@@ -17,9 +17,7 @@
using namespace lldb;
using namespace lldb_private;
-//-------------------------------------------------------------------------
// CommandObjectApropos
-//-------------------------------------------------------------------------
CommandObjectApropos::CommandObjectApropos(CommandInterpreter &interpreter)
: CommandObjectParsed(
Modified: lldb/trunk/source/Commands/CommandObjectApropos.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectApropos.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectApropos.h (original)
+++ lldb/trunk/source/Commands/CommandObjectApropos.h Wed Apr 10 13:48:55 2019
@@ -14,9 +14,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectApropos
-//-------------------------------------------------------------------------
class CommandObjectApropos : public CommandObjectParsed {
public:
Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Wed Apr 10 13:48:55 2019
@@ -42,9 +42,7 @@ static void AddBreakpointDescription(Str
s->EOL();
}
-//-------------------------------------------------------------------------
// Modifiable Breakpoint Options
-//-------------------------------------------------------------------------
#pragma mark Modify::CommandOptions
static constexpr OptionDefinition g_breakpoint_modify_options[] = {
// clang-format off
@@ -322,9 +320,7 @@ static constexpr OptionDefinition g_brea
// clang-format on
};
-//-------------------------------------------------------------------------
// CommandObjectBreakpointSet
-//-------------------------------------------------------------------------
class CommandObjectBreakpointSet : public CommandObjectParsed {
public:
@@ -962,9 +958,7 @@ private:
OptionGroupOptions m_all_options;
};
-//-------------------------------------------------------------------------
// CommandObjectBreakpointModify
-//-------------------------------------------------------------------------
#pragma mark Modify
class CommandObjectBreakpointModify : public CommandObjectParsed {
@@ -1046,9 +1040,7 @@ private:
OptionGroupOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectBreakpointEnable
-//-------------------------------------------------------------------------
#pragma mark Enable
class CommandObjectBreakpointEnable : public CommandObjectParsed {
@@ -1137,9 +1129,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectBreakpointDisable
-//-------------------------------------------------------------------------
#pragma mark Disable
class CommandObjectBreakpointDisable : public CommandObjectParsed {
@@ -1252,9 +1242,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectBreakpointList
-//-------------------------------------------------------------------------
#pragma mark List::CommandOptions
static constexpr OptionDefinition g_breakpoint_list_options[] = {
@@ -1418,9 +1406,7 @@ private:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectBreakpointClear
-//-------------------------------------------------------------------------
#pragma mark Clear::CommandOptions
static constexpr OptionDefinition g_breakpoint_clear_options[] = {
@@ -1578,9 +1564,7 @@ private:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectBreakpointDelete
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_breakpoint_delete_options[] = {
// clang-format off
{ LLDB_OPT_SET_1, false, "force", 'f', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Delete all breakpoints without querying for confirmation." },
@@ -1734,9 +1718,7 @@ private:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectBreakpointName
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_breakpoint_name_options[] = {
// clang-format off
@@ -2245,9 +2227,7 @@ private:
OptionGroupOptions m_option_group;
};
-//-------------------------------------------------------------------------
// CommandObjectBreakpointName
-//-------------------------------------------------------------------------
class CommandObjectBreakpointName : public CommandObjectMultiword {
public:
CommandObjectBreakpointName(CommandInterpreter &interpreter)
@@ -2272,9 +2252,7 @@ public:
~CommandObjectBreakpointName() override = default;
};
-//-------------------------------------------------------------------------
// CommandObjectBreakpointRead
-//-------------------------------------------------------------------------
#pragma mark Read::CommandOptions
static constexpr OptionDefinition g_breakpoint_read_options[] = {
// clang-format off
@@ -2403,9 +2381,7 @@ private:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectBreakpointWrite
-//-------------------------------------------------------------------------
#pragma mark Write::CommandOptions
static constexpr OptionDefinition g_breakpoint_write_options[] = {
// clang-format off
@@ -2517,9 +2493,7 @@ private:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectMultiwordBreakpoint
-//-------------------------------------------------------------------------
#pragma mark MultiwordBreakpoint
CommandObjectMultiwordBreakpoint::CommandObjectMultiwordBreakpoint(
Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.h (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.h Wed Apr 10 13:48:55 2019
@@ -23,9 +23,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectMultiwordBreakpoint
-//-------------------------------------------------------------------------
class CommandObjectMultiwordBreakpoint : public CommandObjectMultiword {
public:
Modified: lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp Wed Apr 10 13:48:55 2019
@@ -26,9 +26,7 @@
using namespace lldb;
using namespace lldb_private;
-//-------------------------------------------------------------------------
// CommandObjectBreakpointCommandAdd
-//-------------------------------------------------------------------------
// FIXME: "script-type" needs to have its contents determined dynamically, so
// somebody can add a new scripting
@@ -469,9 +467,7 @@ private:
const char *CommandObjectBreakpointCommandAdd::g_reader_instructions =
"Enter your debugger command(s). Type 'DONE' to end.\n";
-//-------------------------------------------------------------------------
// CommandObjectBreakpointCommandDelete
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_breakpoint_delete_options[] = {
// clang-format off
@@ -606,9 +602,7 @@ private:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectBreakpointCommandList
-//-------------------------------------------------------------------------
class CommandObjectBreakpointCommandList : public CommandObjectParsed {
public:
@@ -726,9 +720,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectBreakpointCommand
-//-------------------------------------------------------------------------
CommandObjectBreakpointCommand::CommandObjectBreakpointCommand(
CommandInterpreter &interpreter)
Modified: lldb/trunk/source/Commands/CommandObjectBreakpointCommand.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpointCommand.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpointCommand.h (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpointCommand.h Wed Apr 10 13:48:55 2019
@@ -19,9 +19,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectMultiwordBreakpoint
-//-------------------------------------------------------------------------
class CommandObjectBreakpointCommand : public CommandObjectMultiword {
public:
Modified: lldb/trunk/source/Commands/CommandObjectBugreport.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBugreport.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBugreport.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBugreport.cpp Wed Apr 10 13:48:55 2019
@@ -19,9 +19,7 @@
using namespace lldb;
using namespace lldb_private;
-//-------------------------------------------------------------------------
// "bugreport unwind"
-//-------------------------------------------------------------------------
class CommandObjectBugreportUnwind : public CommandObjectParsed {
public:
@@ -109,9 +107,7 @@ private:
#pragma mark CommandObjectMultiwordBugreport
-//-------------------------------------------------------------------------
// CommandObjectMultiwordBugreport
-//-------------------------------------------------------------------------
CommandObjectMultiwordBugreport::CommandObjectMultiwordBugreport(
CommandInterpreter &interpreter)
Modified: lldb/trunk/source/Commands/CommandObjectBugreport.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBugreport.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBugreport.h (original)
+++ lldb/trunk/source/Commands/CommandObjectBugreport.h Wed Apr 10 13:48:55 2019
@@ -13,9 +13,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectMultiwordBugreport
-//-------------------------------------------------------------------------
class CommandObjectMultiwordBugreport : public CommandObjectMultiword {
public:
Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Wed Apr 10 13:48:55 2019
@@ -29,9 +29,7 @@
using namespace lldb;
using namespace lldb_private;
-//-------------------------------------------------------------------------
// CommandObjectCommandsSource
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_history_options[] = {
// clang-format off
@@ -188,9 +186,7 @@ protected:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectCommandsSource
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_source_options[] = {
// clang-format off
@@ -339,9 +335,7 @@ protected:
};
#pragma mark CommandObjectCommandsAlias
-//-------------------------------------------------------------------------
// CommandObjectCommandsAlias
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_alias_options[] = {
// clang-format off
@@ -765,9 +759,7 @@ protected:
};
#pragma mark CommandObjectCommandsUnalias
-//-------------------------------------------------------------------------
// CommandObjectCommandsUnalias
-//-------------------------------------------------------------------------
class CommandObjectCommandsUnalias : public CommandObjectParsed {
public:
@@ -848,9 +840,7 @@ protected:
};
#pragma mark CommandObjectCommandsDelete
-//-------------------------------------------------------------------------
// CommandObjectCommandsDelete
-//-------------------------------------------------------------------------
class CommandObjectCommandsDelete : public CommandObjectParsed {
public:
@@ -913,9 +903,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectCommandsAddRegex
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_regex_options[] = {
// clang-format off
@@ -1393,9 +1381,7 @@ private:
bool m_fetched_help_long : 1;
};
-//-------------------------------------------------------------------------
// CommandObjectCommandsScriptImport
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_script_import_options[] = {
// clang-format off
@@ -1519,9 +1505,7 @@ protected:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectCommandsScriptAdd
-//-------------------------------------------------------------------------
static constexpr OptionEnumValueElement g_script_synchro_type[] = {
{eScriptedCommandSynchronicitySynchronous, "synchronous",
"Run synchronous"},
@@ -1766,9 +1750,7 @@ protected:
ScriptedCommandSynchronicity m_synchronicity;
};
-//-------------------------------------------------------------------------
// CommandObjectCommandsScriptList
-//-------------------------------------------------------------------------
class CommandObjectCommandsScriptList : public CommandObjectParsed {
public:
@@ -1787,9 +1769,7 @@ public:
}
};
-//-------------------------------------------------------------------------
// CommandObjectCommandsScriptClear
-//-------------------------------------------------------------------------
class CommandObjectCommandsScriptClear : public CommandObjectParsed {
public:
@@ -1809,9 +1789,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectCommandsScriptDelete
-//-------------------------------------------------------------------------
class CommandObjectCommandsScriptDelete : public CommandObjectParsed {
public:
@@ -1861,9 +1839,7 @@ protected:
#pragma mark CommandObjectMultiwordCommandsScript
-//-------------------------------------------------------------------------
// CommandObjectMultiwordCommandsScript
-//-------------------------------------------------------------------------
class CommandObjectMultiwordCommandsScript : public CommandObjectMultiword {
public:
@@ -1893,9 +1869,7 @@ public:
#pragma mark CommandObjectMultiwordCommands
-//-------------------------------------------------------------------------
// CommandObjectMultiwordCommands
-//-------------------------------------------------------------------------
CommandObjectMultiwordCommands::CommandObjectMultiwordCommands(
CommandInterpreter &interpreter)
Modified: lldb/trunk/source/Commands/CommandObjectCommands.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCommands.h (original)
+++ lldb/trunk/source/Commands/CommandObjectCommands.h Wed Apr 10 13:48:55 2019
@@ -16,9 +16,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectMultiwordCommands
-//-------------------------------------------------------------------------
class CommandObjectMultiwordCommands : public CommandObjectMultiword {
public:
Modified: lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectDisassemble.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectDisassemble.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectDisassemble.cpp Wed Apr 10 13:48:55 2019
@@ -229,9 +229,7 @@ CommandObjectDisassemble::CommandOptions
return llvm::makeArrayRef(g_disassemble_options);
}
-//-------------------------------------------------------------------------
// CommandObjectDisassemble
-//-------------------------------------------------------------------------
CommandObjectDisassemble::CommandObjectDisassemble(
CommandInterpreter &interpreter)
Modified: lldb/trunk/source/Commands/CommandObjectDisassemble.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectDisassemble.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectDisassemble.h (original)
+++ lldb/trunk/source/Commands/CommandObjectDisassemble.h Wed Apr 10 13:48:55 2019
@@ -15,9 +15,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectDisassemble
-//-------------------------------------------------------------------------
class CommandObjectDisassemble : public CommandObjectParsed {
public:
Modified: lldb/trunk/source/Commands/CommandObjectExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectExpression.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectExpression.h (original)
+++ lldb/trunk/source/Commands/CommandObjectExpression.h Wed Apr 10 13:48:55 2019
@@ -57,9 +57,7 @@ public:
int HandleCompletion(CompletionRequest &request) override;
protected:
- //------------------------------------------------------------------
// IOHandler::Delegate functions
- //------------------------------------------------------------------
void IOHandlerInputComplete(IOHandler &io_handler,
std::string &line) override;
Modified: lldb/trunk/source/Commands/CommandObjectFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFrame.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectFrame.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectFrame.cpp Wed Apr 10 13:48:55 2019
@@ -50,13 +50,9 @@ using namespace lldb_private;
#pragma mark CommandObjectFrameDiagnose
-//-------------------------------------------------------------------------
// CommandObjectFrameInfo
-//-------------------------------------------------------------------------
-//-------------------------------------------------------------------------
// CommandObjectFrameDiagnose
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_frame_diag_options[] = {
// clang-format off
@@ -216,9 +212,7 @@ protected:
#pragma mark CommandObjectFrameInfo
-//-------------------------------------------------------------------------
// CommandObjectFrameInfo
-//-------------------------------------------------------------------------
class CommandObjectFrameInfo : public CommandObjectParsed {
public:
@@ -242,9 +236,7 @@ protected:
#pragma mark CommandObjectFrameSelect
-//-------------------------------------------------------------------------
// CommandObjectFrameSelect
-//-------------------------------------------------------------------------
static OptionDefinition g_frame_select_options[] = {
// clang-format off
@@ -412,9 +404,7 @@ protected:
};
#pragma mark CommandObjectFrameVariable
-//----------------------------------------------------------------------
// List images with associated information
-//----------------------------------------------------------------------
class CommandObjectFrameVariable : public CommandObjectParsed {
public:
CommandObjectFrameVariable(CommandInterpreter &interpreter)
@@ -1118,9 +1108,7 @@ class CommandObjectFrameRecognizer : pub
#pragma mark CommandObjectMultiwordFrame
-//-------------------------------------------------------------------------
// CommandObjectMultiwordFrame
-//-------------------------------------------------------------------------
CommandObjectMultiwordFrame::CommandObjectMultiwordFrame(
CommandInterpreter &interpreter)
Modified: lldb/trunk/source/Commands/CommandObjectFrame.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFrame.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectFrame.h (original)
+++ lldb/trunk/source/Commands/CommandObjectFrame.h Wed Apr 10 13:48:55 2019
@@ -14,9 +14,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectMultiwordFrame
-//-------------------------------------------------------------------------
class CommandObjectMultiwordFrame : public CommandObjectMultiword {
public:
Modified: lldb/trunk/source/Commands/CommandObjectGUI.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectGUI.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectGUI.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectGUI.cpp Wed Apr 10 13:48:55 2019
@@ -15,9 +15,7 @@
using namespace lldb;
using namespace lldb_private;
-//-------------------------------------------------------------------------
// CommandObjectGUI
-//-------------------------------------------------------------------------
CommandObjectGUI::CommandObjectGUI(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "gui",
Modified: lldb/trunk/source/Commands/CommandObjectGUI.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectGUI.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectGUI.h (original)
+++ lldb/trunk/source/Commands/CommandObjectGUI.h Wed Apr 10 13:48:55 2019
@@ -13,9 +13,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectGUI
-//-------------------------------------------------------------------------
class CommandObjectGUI : public CommandObjectParsed {
public:
Modified: lldb/trunk/source/Commands/CommandObjectHelp.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectHelp.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectHelp.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectHelp.cpp Wed Apr 10 13:48:55 2019
@@ -15,9 +15,7 @@
using namespace lldb;
using namespace lldb_private;
-//-------------------------------------------------------------------------
// CommandObjectHelp
-//-------------------------------------------------------------------------
void CommandObjectHelp::GenerateAdditionalHelpAvenuesMessage(
Stream *s, llvm::StringRef command, llvm::StringRef prefix,
Modified: lldb/trunk/source/Commands/CommandObjectHelp.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectHelp.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectHelp.h (original)
+++ lldb/trunk/source/Commands/CommandObjectHelp.h Wed Apr 10 13:48:55 2019
@@ -15,9 +15,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectHelp
-//-------------------------------------------------------------------------
class CommandObjectHelp : public CommandObjectParsed {
public:
Modified: lldb/trunk/source/Commands/CommandObjectLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectLog.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectLog.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectLog.cpp Wed Apr 10 13:48:55 2019
@@ -48,9 +48,7 @@ static constexpr OptionDefinition g_log_
class CommandObjectLogEnable : public CommandObjectParsed {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CommandObjectLogEnable(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "log enable",
"Enable logging for a single log channel.",
@@ -187,9 +185,7 @@ protected:
class CommandObjectLogDisable : public CommandObjectParsed {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CommandObjectLogDisable(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "log disable",
"Disable one or more log channel categories.",
@@ -247,9 +243,7 @@ protected:
class CommandObjectLogList : public CommandObjectParsed {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CommandObjectLogList(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "log list",
"List the log categories for one or more log "
@@ -294,9 +288,7 @@ protected:
class CommandObjectLogTimer : public CommandObjectParsed {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CommandObjectLogTimer(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "log timers",
"Enable, disable, dump, and reset LLDB internal "
Modified: lldb/trunk/source/Commands/CommandObjectLog.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectLog.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectLog.h (original)
+++ lldb/trunk/source/Commands/CommandObjectLog.h Wed Apr 10 13:48:55 2019
@@ -16,23 +16,17 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectLog
-//-------------------------------------------------------------------------
class CommandObjectLog : public CommandObjectMultiword {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CommandObjectLog(CommandInterpreter &interpreter);
~CommandObjectLog() override;
private:
- //------------------------------------------------------------------
// For CommandObjectLog only
- //------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(CommandObjectLog);
};
Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Wed Apr 10 13:48:55 2019
@@ -287,9 +287,7 @@ public:
OptionValueUInt64 m_offset;
};
-//----------------------------------------------------------------------
// Read memory from the inferior process
-//----------------------------------------------------------------------
class CommandObjectMemoryRead : public CommandObjectParsed {
public:
CommandObjectMemoryRead(CommandInterpreter &interpreter)
@@ -891,9 +889,7 @@ static constexpr OptionDefinition g_memo
// clang-format on
};
-//----------------------------------------------------------------------
// Find the specified data in memory
-//----------------------------------------------------------------------
class CommandObjectMemoryFind : public CommandObjectParsed {
public:
class OptionGroupFindMemory : public OptionGroup {
@@ -1188,9 +1184,7 @@ static constexpr OptionDefinition g_memo
// clang-format on
};
-//----------------------------------------------------------------------
// Write memory to the inferior process
-//----------------------------------------------------------------------
class CommandObjectMemoryWrite : public CommandObjectParsed {
public:
class OptionGroupWriteMemory : public OptionGroup {
@@ -1597,9 +1591,7 @@ protected:
OptionGroupWriteMemory m_memory_options;
};
-//----------------------------------------------------------------------
// Get malloc/free history of a memory address.
-//----------------------------------------------------------------------
class CommandObjectMemoryHistory : public CommandObjectParsed {
public:
CommandObjectMemoryHistory(CommandInterpreter &interpreter)
@@ -1679,9 +1671,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectMemoryRegion
-//-------------------------------------------------------------------------
#pragma mark CommandObjectMemoryRegion
class CommandObjectMemoryRegion : public CommandObjectParsed {
@@ -1772,9 +1762,7 @@ protected:
lldb::addr_t m_prev_end_addr;
};
-//-------------------------------------------------------------------------
// CommandObjectMemory
-//-------------------------------------------------------------------------
CommandObjectMemory::CommandObjectMemory(CommandInterpreter &interpreter)
: CommandObjectMultiword(
Modified: lldb/trunk/source/Commands/CommandObjectMultiword.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMultiword.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMultiword.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMultiword.cpp Wed Apr 10 13:48:55 2019
@@ -15,9 +15,7 @@
using namespace lldb;
using namespace lldb_private;
-//-------------------------------------------------------------------------
// CommandObjectMultiword
-//-------------------------------------------------------------------------
CommandObjectMultiword::CommandObjectMultiword(CommandInterpreter &interpreter,
const char *name,
Modified: lldb/trunk/source/Commands/CommandObjectPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectPlatform.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectPlatform.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectPlatform.cpp Wed Apr 10 13:48:55 2019
@@ -153,9 +153,7 @@ private:
DISALLOW_COPY_AND_ASSIGN(OptionPermissions);
};
-//----------------------------------------------------------------------
// "platform select <platform-name>"
-//----------------------------------------------------------------------
class CommandObjectPlatformSelect : public CommandObjectParsed {
public:
CommandObjectPlatformSelect(CommandInterpreter &interpreter)
@@ -218,9 +216,7 @@ protected:
OptionGroupPlatform m_platform_options;
};
-//----------------------------------------------------------------------
// "platform list"
-//----------------------------------------------------------------------
class CommandObjectPlatformList : public CommandObjectParsed {
public:
CommandObjectPlatformList(CommandInterpreter &interpreter)
@@ -261,9 +257,7 @@ protected:
}
};
-//----------------------------------------------------------------------
// "platform status"
-//----------------------------------------------------------------------
class CommandObjectPlatformStatus : public CommandObjectParsed {
public:
CommandObjectPlatformStatus(CommandInterpreter &interpreter)
@@ -297,9 +291,7 @@ protected:
}
};
-//----------------------------------------------------------------------
// "platform connect <connect-url>"
-//----------------------------------------------------------------------
class CommandObjectPlatformConnect : public CommandObjectParsed {
public:
CommandObjectPlatformConnect(CommandInterpreter &interpreter)
@@ -352,9 +344,7 @@ protected:
}
};
-//----------------------------------------------------------------------
// "platform disconnect"
-//----------------------------------------------------------------------
class CommandObjectPlatformDisconnect : public CommandObjectParsed {
public:
CommandObjectPlatformDisconnect(CommandInterpreter &interpreter)
@@ -414,9 +404,7 @@ protected:
}
};
-//----------------------------------------------------------------------
// "platform settings"
-//----------------------------------------------------------------------
class CommandObjectPlatformSettings : public CommandObjectParsed {
public:
CommandObjectPlatformSettings(CommandInterpreter &interpreter)
@@ -459,9 +447,7 @@ protected:
OptionGroupFile m_option_working_dir;
};
-//----------------------------------------------------------------------
// "platform mkdir"
-//----------------------------------------------------------------------
class CommandObjectPlatformMkDir : public CommandObjectParsed {
public:
CommandObjectPlatformMkDir(CommandInterpreter &interpreter)
@@ -511,9 +497,7 @@ public:
OptionGroupOptions m_options;
};
-//----------------------------------------------------------------------
// "platform fopen"
-//----------------------------------------------------------------------
class CommandObjectPlatformFOpen : public CommandObjectParsed {
public:
CommandObjectPlatformFOpen(CommandInterpreter &interpreter)
@@ -568,9 +552,7 @@ public:
OptionGroupOptions m_options;
};
-//----------------------------------------------------------------------
// "platform fclose"
-//----------------------------------------------------------------------
class CommandObjectPlatformFClose : public CommandObjectParsed {
public:
CommandObjectPlatformFClose(CommandInterpreter &interpreter)
@@ -604,9 +586,7 @@ public:
}
};
-//----------------------------------------------------------------------
// "platform fread"
-//----------------------------------------------------------------------
static constexpr OptionDefinition g_platform_fread_options[] = {
// clang-format off
@@ -699,9 +679,7 @@ protected:
CommandOptions m_options;
};
-//----------------------------------------------------------------------
// "platform fwrite"
-//----------------------------------------------------------------------
static constexpr OptionDefinition g_platform_fwrite_options[] = {
// clang-format off
@@ -793,9 +771,7 @@ protected:
class CommandObjectPlatformFile : public CommandObjectMultiword {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CommandObjectPlatformFile(CommandInterpreter &interpreter)
: CommandObjectMultiword(
interpreter, "platform file",
@@ -814,15 +790,11 @@ public:
~CommandObjectPlatformFile() override = default;
private:
- //------------------------------------------------------------------
// For CommandObjectPlatform only
- //------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(CommandObjectPlatformFile);
};
-//----------------------------------------------------------------------
// "platform get-file remote-file-path host-file-path"
-//----------------------------------------------------------------------
class CommandObjectPlatformGetFile : public CommandObjectParsed {
public:
CommandObjectPlatformGetFile(CommandInterpreter &interpreter)
@@ -897,9 +869,7 @@ public:
}
};
-//----------------------------------------------------------------------
// "platform get-size remote-file-path"
-//----------------------------------------------------------------------
class CommandObjectPlatformGetSize : public CommandObjectParsed {
public:
CommandObjectPlatformGetSize(CommandInterpreter &interpreter)
@@ -963,9 +933,7 @@ public:
}
};
-//----------------------------------------------------------------------
// "platform put-file"
-//----------------------------------------------------------------------
class CommandObjectPlatformPutFile : public CommandObjectParsed {
public:
CommandObjectPlatformPutFile(CommandInterpreter &interpreter)
@@ -1002,9 +970,7 @@ public:
}
};
-//----------------------------------------------------------------------
// "platform process launch"
-//----------------------------------------------------------------------
class CommandObjectPlatformProcessLaunch : public CommandObjectParsed {
public:
CommandObjectPlatformProcessLaunch(CommandInterpreter &interpreter)
@@ -1092,9 +1058,7 @@ protected:
ProcessLaunchCommandOptions m_options;
};
-//----------------------------------------------------------------------
// "platform process list"
-//----------------------------------------------------------------------
static OptionDefinition g_platform_process_list_options[] = {
// clang-format off
@@ -1393,9 +1357,7 @@ protected:
CommandOptions m_options;
};
-//----------------------------------------------------------------------
// "platform process info"
-//----------------------------------------------------------------------
class CommandObjectPlatformProcessInfo : public CommandObjectParsed {
public:
CommandObjectPlatformProcessInfo(CommandInterpreter &interpreter)
@@ -1633,9 +1595,7 @@ protected:
class CommandObjectPlatformProcess : public CommandObjectMultiword {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CommandObjectPlatformProcess(CommandInterpreter &interpreter)
: CommandObjectMultiword(interpreter, "platform process",
"Commands to query, launch and attach to "
@@ -1656,15 +1616,11 @@ public:
~CommandObjectPlatformProcess() override = default;
private:
- //------------------------------------------------------------------
// For CommandObjectPlatform only
- //------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(CommandObjectPlatformProcess);
};
-//----------------------------------------------------------------------
// "platform shell"
-//----------------------------------------------------------------------
static constexpr OptionDefinition g_platform_shell_options[] = {
// clang-format off
{ LLDB_OPT_SET_ALL, false, "timeout", 't', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeValue, "Seconds to wait for the remote host to finish running the command." },
@@ -1788,9 +1744,7 @@ public:
CommandOptions m_options;
};
-//----------------------------------------------------------------------
// "platform install" - install a target to a remote end
-//----------------------------------------------------------------------
class CommandObjectPlatformInstall : public CommandObjectParsed {
public:
CommandObjectPlatformInstall(CommandInterpreter &interpreter)
Modified: lldb/trunk/source/Commands/CommandObjectPlatform.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectPlatform.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectPlatform.h (original)
+++ lldb/trunk/source/Commands/CommandObjectPlatform.h Wed Apr 10 13:48:55 2019
@@ -14,9 +14,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectPlatform
-//-------------------------------------------------------------------------
class CommandObjectPlatform : public CommandObjectMultiword {
public:
Modified: lldb/trunk/source/Commands/CommandObjectProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectProcess.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectProcess.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectProcess.cpp Wed Apr 10 13:48:55 2019
@@ -100,9 +100,7 @@ protected:
std::string m_new_process_action;
};
-//-------------------------------------------------------------------------
// CommandObjectProcessLaunch
-//-------------------------------------------------------------------------
#pragma mark CommandObjectProcessLaunch
class CommandObjectProcessLaunch : public CommandObjectProcessLaunchOrAttach {
public:
@@ -295,9 +293,7 @@ protected:
//#undef SET2
//#undef SET3
-//-------------------------------------------------------------------------
// CommandObjectProcessAttach
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_process_attach_options[] = {
// clang-format off
@@ -547,9 +543,7 @@ protected:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectProcessContinue
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_process_continue_options[] = {
// clang-format off
@@ -711,9 +705,7 @@ protected:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectProcessDetach
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_process_detach_options[] = {
// clang-format off
{ LLDB_OPT_SET_1, false, "keep-stopped", 's', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "Whether or not the process should be kept stopped on detach (if possible)." },
@@ -809,9 +801,7 @@ protected:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectProcessConnect
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_process_connect_options[] = {
// clang-format off
@@ -915,9 +905,7 @@ protected:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectProcessPlugin
-//-------------------------------------------------------------------------
#pragma mark CommandObjectProcessPlugin
class CommandObjectProcessPlugin : public CommandObjectProxy {
@@ -938,9 +926,7 @@ public:
}
};
-//-------------------------------------------------------------------------
// CommandObjectProcessLoad
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_process_load_options[] = {
// clang-format off
@@ -1054,9 +1040,7 @@ protected:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectProcessUnload
-//-------------------------------------------------------------------------
#pragma mark CommandObjectProcessUnload
class CommandObjectProcessUnload : public CommandObjectParsed {
@@ -1102,9 +1086,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectProcessSignal
-//-------------------------------------------------------------------------
#pragma mark CommandObjectProcessSignal
class CommandObjectProcessSignal : public CommandObjectParsed {
@@ -1169,9 +1151,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectProcessInterrupt
-//-------------------------------------------------------------------------
#pragma mark CommandObjectProcessInterrupt
class CommandObjectProcessInterrupt : public CommandObjectParsed {
@@ -1213,9 +1193,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectProcessKill
-//-------------------------------------------------------------------------
#pragma mark CommandObjectProcessKill
class CommandObjectProcessKill : public CommandObjectParsed {
@@ -1256,9 +1234,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectProcessSaveCore
-//-------------------------------------------------------------------------
#pragma mark CommandObjectProcessSaveCore
class CommandObjectProcessSaveCore : public CommandObjectParsed {
@@ -1302,9 +1278,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectProcessStatus
-//-------------------------------------------------------------------------
#pragma mark CommandObjectProcessStatus
class CommandObjectProcessStatus : public CommandObjectParsed {
@@ -1336,9 +1310,7 @@ public:
}
};
-//-------------------------------------------------------------------------
// CommandObjectProcessHandle
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_process_handle_options[] = {
// clang-format off
@@ -1595,9 +1567,7 @@ protected:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectMultiwordProcess
-//-------------------------------------------------------------------------
CommandObjectMultiwordProcess::CommandObjectMultiwordProcess(
CommandInterpreter &interpreter)
Modified: lldb/trunk/source/Commands/CommandObjectProcess.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectProcess.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectProcess.h (original)
+++ lldb/trunk/source/Commands/CommandObjectProcess.h Wed Apr 10 13:48:55 2019
@@ -13,9 +13,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectMultiwordProcess
-//-------------------------------------------------------------------------
class CommandObjectMultiwordProcess : public CommandObjectMultiword {
public:
Modified: lldb/trunk/source/Commands/CommandObjectQuit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectQuit.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectQuit.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectQuit.cpp Wed Apr 10 13:48:55 2019
@@ -16,9 +16,7 @@
using namespace lldb;
using namespace lldb_private;
-//-------------------------------------------------------------------------
// CommandObjectQuit
-//-------------------------------------------------------------------------
CommandObjectQuit::CommandObjectQuit(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "quit", "Quit the LLDB debugger.",
Modified: lldb/trunk/source/Commands/CommandObjectQuit.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectQuit.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectQuit.h (original)
+++ lldb/trunk/source/Commands/CommandObjectQuit.h Wed Apr 10 13:48:55 2019
@@ -13,9 +13,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectQuit
-//-------------------------------------------------------------------------
class CommandObjectQuit : public CommandObjectParsed {
public:
Modified: lldb/trunk/source/Commands/CommandObjectRegister.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectRegister.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectRegister.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectRegister.cpp Wed Apr 10 13:48:55 2019
@@ -31,9 +31,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// "register read"
-//----------------------------------------------------------------------
static constexpr OptionDefinition g_register_read_options[] = {
// clang-format off
@@ -298,9 +296,7 @@ protected:
CommandOptions m_command_options;
};
-//----------------------------------------------------------------------
// "register write"
-//----------------------------------------------------------------------
class CommandObjectRegisterWrite : public CommandObjectParsed {
public:
CommandObjectRegisterWrite(CommandInterpreter &interpreter)
@@ -393,9 +389,7 @@ protected:
}
};
-//----------------------------------------------------------------------
// CommandObjectRegister constructor
-//----------------------------------------------------------------------
CommandObjectRegister::CommandObjectRegister(CommandInterpreter &interpreter)
: CommandObjectMultiword(interpreter, "register",
"Commands to access registers for the current "
Modified: lldb/trunk/source/Commands/CommandObjectRegister.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectRegister.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectRegister.h (original)
+++ lldb/trunk/source/Commands/CommandObjectRegister.h Wed Apr 10 13:48:55 2019
@@ -13,23 +13,17 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectRegister
-//-------------------------------------------------------------------------
class CommandObjectRegister : public CommandObjectMultiword {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CommandObjectRegister(CommandInterpreter &interpreter);
~CommandObjectRegister() override;
private:
- //------------------------------------------------------------------
// For CommandObjectRegister only
- //------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(CommandObjectRegister);
};
Modified: lldb/trunk/source/Commands/CommandObjectReproducer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectReproducer.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectReproducer.h (original)
+++ lldb/trunk/source/Commands/CommandObjectReproducer.h Wed Apr 10 13:48:55 2019
@@ -14,9 +14,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectReproducer
-//-------------------------------------------------------------------------
class CommandObjectReproducer : public CommandObjectMultiword {
public:
Modified: lldb/trunk/source/Commands/CommandObjectSettings.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSettings.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSettings.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSettings.cpp Wed Apr 10 13:48:55 2019
@@ -19,9 +19,7 @@
using namespace lldb;
using namespace lldb_private;
-//-------------------------------------------------------------------------
// CommandObjectSettingsSet
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_settings_set_options[] = {
// clang-format off
@@ -253,9 +251,7 @@ private:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectSettingsShow -- Show current values
-//-------------------------------------------------------------------------
class CommandObjectSettingsShow : public CommandObjectParsed {
public:
@@ -315,9 +311,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectSettingsWrite -- Write settings to file
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_settings_write_options[] = {
// clang-format off
@@ -442,9 +436,7 @@ private:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectSettingsRead -- Read settings from file
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_settings_read_options[] = {
// clang-format off
@@ -519,9 +511,7 @@ private:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectSettingsList -- List settable variables
-//-------------------------------------------------------------------------
class CommandObjectSettingsList : public CommandObjectParsed {
public:
@@ -596,9 +586,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectSettingsRemove
-//-------------------------------------------------------------------------
class CommandObjectSettingsRemove : public CommandObjectRaw {
public:
@@ -696,9 +684,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectSettingsReplace
-//-------------------------------------------------------------------------
class CommandObjectSettingsReplace : public CommandObjectRaw {
public:
@@ -800,9 +786,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectSettingsInsertBefore
-//-------------------------------------------------------------------------
class CommandObjectSettingsInsertBefore : public CommandObjectRaw {
public:
@@ -906,9 +890,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectSettingInsertAfter
-//-------------------------------------------------------------------------
class CommandObjectSettingsInsertAfter : public CommandObjectRaw {
public:
@@ -1011,9 +993,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectSettingsAppend
-//-------------------------------------------------------------------------
class CommandObjectSettingsAppend : public CommandObjectRaw {
public:
@@ -1107,9 +1087,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectSettingsClear
-//-------------------------------------------------------------------------
class CommandObjectSettingsClear : public CommandObjectParsed {
public:
@@ -1177,9 +1155,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectMultiwordSettings
-//-------------------------------------------------------------------------
CommandObjectMultiwordSettings::CommandObjectMultiwordSettings(
CommandInterpreter &interpreter)
Modified: lldb/trunk/source/Commands/CommandObjectSettings.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSettings.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSettings.h (original)
+++ lldb/trunk/source/Commands/CommandObjectSettings.h Wed Apr 10 13:48:55 2019
@@ -15,9 +15,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectMultiwordSettings
-//-------------------------------------------------------------------------
class CommandObjectMultiwordSettings : public CommandObjectMultiword {
public:
Modified: lldb/trunk/source/Commands/CommandObjectSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSource.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSource.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSource.cpp Wed Apr 10 13:48:55 2019
@@ -32,9 +32,7 @@ using namespace lldb;
using namespace lldb_private;
#pragma mark CommandObjectSourceInfo
-//----------------------------------------------------------------------
// CommandObjectSourceInfo - debug line entries dumping command
-//----------------------------------------------------------------------
static constexpr OptionDefinition g_source_info_options[] = {
// clang-format off
@@ -644,9 +642,7 @@ protected:
};
#pragma mark CommandObjectSourceList
-//-------------------------------------------------------------------------
// CommandObjectSourceList
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_source_list_options[] = {
// clang-format off
@@ -1292,9 +1288,7 @@ protected:
};
#pragma mark CommandObjectMultiwordSource
-//-------------------------------------------------------------------------
// CommandObjectMultiwordSource
-//-------------------------------------------------------------------------
CommandObjectMultiwordSource::CommandObjectMultiwordSource(
CommandInterpreter &interpreter)
Modified: lldb/trunk/source/Commands/CommandObjectSource.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSource.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSource.h (original)
+++ lldb/trunk/source/Commands/CommandObjectSource.h Wed Apr 10 13:48:55 2019
@@ -16,9 +16,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectMultiwordSource
-//-------------------------------------------------------------------------
class CommandObjectMultiwordSource : public CommandObjectMultiword {
public:
Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Wed Apr 10 13:48:55 2019
@@ -201,9 +201,7 @@ private:
#pragma mark CommandObjectTargetCreate
-//-------------------------------------------------------------------------
// "target create"
-//-------------------------------------------------------------------------
class CommandObjectTargetCreate : public CommandObjectParsed {
public:
@@ -476,9 +474,7 @@ private:
#pragma mark CommandObjectTargetList
-//----------------------------------------------------------------------
// "target list"
-//----------------------------------------------------------------------
class CommandObjectTargetList : public CommandObjectParsed {
public:
@@ -511,9 +507,7 @@ protected:
#pragma mark CommandObjectTargetSelect
-//----------------------------------------------------------------------
// "target select"
-//----------------------------------------------------------------------
class CommandObjectTargetSelect : public CommandObjectParsed {
public:
@@ -576,9 +570,7 @@ protected:
#pragma mark CommandObjectTargetSelect
-//----------------------------------------------------------------------
// "target delete"
-//----------------------------------------------------------------------
class CommandObjectTargetDelete : public CommandObjectParsed {
public:
@@ -689,9 +681,7 @@ protected:
#pragma mark CommandObjectTargetVariable
-//----------------------------------------------------------------------
// "target variable"
-//----------------------------------------------------------------------
class CommandObjectTargetVariable : public CommandObjectParsed {
static const uint32_t SHORT_OPTION_FILE = 0x66696c65; // 'file'
@@ -1317,9 +1307,7 @@ protected:
}
};
-//----------------------------------------------------------------------
// Static Helper functions
-//----------------------------------------------------------------------
static void DumpModuleArchitecture(Stream &strm, Module *module,
bool full_triple, uint32_t width) {
if (module) {
@@ -1829,10 +1817,8 @@ static size_t FindModulesByName(Target *
#pragma mark CommandObjectTargetModulesModuleAutoComplete
-//----------------------------------------------------------------------
// A base command object class that can auto complete with module file
// paths
-//----------------------------------------------------------------------
class CommandObjectTargetModulesModuleAutoComplete
: public CommandObjectParsed {
@@ -1871,10 +1857,8 @@ public:
#pragma mark CommandObjectTargetModulesSourceFileAutoComplete
-//----------------------------------------------------------------------
// A base command object class that can auto complete with module source
// file paths
-//----------------------------------------------------------------------
class CommandObjectTargetModulesSourceFileAutoComplete
: public CommandObjectParsed {
@@ -2126,9 +2110,7 @@ protected:
#pragma mark CommandObjectTargetModulesDumpSections
-//----------------------------------------------------------------------
// Image section dumping command
-//----------------------------------------------------------------------
class CommandObjectTargetModulesDumpSections
: public CommandObjectTargetModulesModuleAutoComplete {
@@ -2221,9 +2203,7 @@ protected:
#pragma mark CommandObjectTargetModulesDumpSections
-//----------------------------------------------------------------------
// Clang AST dumping command
-//----------------------------------------------------------------------
class CommandObjectTargetModulesDumpClangAST
: public CommandObjectTargetModulesModuleAutoComplete {
@@ -2300,9 +2280,7 @@ protected:
#pragma mark CommandObjectTargetModulesDumpSymfile
-//----------------------------------------------------------------------
// Image debug symbol dumping command
-//----------------------------------------------------------------------
class CommandObjectTargetModulesDumpSymfile
: public CommandObjectTargetModulesModuleAutoComplete {
@@ -2391,9 +2369,7 @@ protected:
#pragma mark CommandObjectTargetModulesDumpLineTable
-//----------------------------------------------------------------------
// Image debug line table dumping command
-//----------------------------------------------------------------------
class CommandObjectTargetModulesDumpLineTable
: public CommandObjectTargetModulesSourceFileAutoComplete {
@@ -2503,15 +2479,11 @@ protected:
#pragma mark CommandObjectTargetModulesDump
-//----------------------------------------------------------------------
// Dump multi-word command for target modules
-//----------------------------------------------------------------------
class CommandObjectTargetModulesDump : public CommandObjectMultiword {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CommandObjectTargetModulesDump(CommandInterpreter &interpreter)
: CommandObjectMultiword(
interpreter, "target modules dump",
@@ -2997,9 +2969,7 @@ protected:
OptionGroupUInt64 m_slide_option;
};
-//----------------------------------------------------------------------
// List images with associated information
-//----------------------------------------------------------------------
static constexpr OptionDefinition g_target_modules_list_options[] = {
// clang-format off
@@ -3363,9 +3333,7 @@ protected:
#pragma mark CommandObjectTargetModulesShowUnwind
-//----------------------------------------------------------------------
// Lookup unwind information in images
-//----------------------------------------------------------------------
static constexpr OptionDefinition g_target_modules_show_unwind_options[] = {
// clang-format off
@@ -3668,9 +3636,7 @@ protected:
CommandOptions m_options;
};
-//----------------------------------------------------------------------
// Lookup information in images
-//----------------------------------------------------------------------
static constexpr OptionDefinition g_target_modules_lookup_options[] = {
// clang-format off
@@ -4056,9 +4022,7 @@ protected:
#pragma mark CommandObjectMultiwordImageSearchPaths
-//-------------------------------------------------------------------------
// CommandObjectMultiwordImageSearchPaths
-//-------------------------------------------------------------------------
class CommandObjectTargetModulesImageSearchPaths
: public CommandObjectMultiword {
@@ -4091,15 +4055,11 @@ public:
#pragma mark CommandObjectTargetModules
-//-------------------------------------------------------------------------
// CommandObjectTargetModules
-//-------------------------------------------------------------------------
class CommandObjectTargetModules : public CommandObjectMultiword {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CommandObjectTargetModules(CommandInterpreter &interpreter)
: CommandObjectMultiword(interpreter, "target modules",
"Commands for accessing information for one or "
@@ -4128,9 +4088,7 @@ public:
~CommandObjectTargetModules() override = default;
private:
- //------------------------------------------------------------------
// For CommandObjectTargetModules only
- //------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(CommandObjectTargetModules);
};
@@ -4523,15 +4481,11 @@ protected:
#pragma mark CommandObjectTargetSymbols
-//-------------------------------------------------------------------------
// CommandObjectTargetSymbols
-//-------------------------------------------------------------------------
class CommandObjectTargetSymbols : public CommandObjectMultiword {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CommandObjectTargetSymbols(CommandInterpreter &interpreter)
: CommandObjectMultiword(
interpreter, "target symbols",
@@ -4544,17 +4498,13 @@ public:
~CommandObjectTargetSymbols() override = default;
private:
- //------------------------------------------------------------------
// For CommandObjectTargetModules only
- //------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(CommandObjectTargetSymbols);
};
#pragma mark CommandObjectTargetStopHookAdd
-//-------------------------------------------------------------------------
// CommandObjectTargetStopHookAdd
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_target_stop_hook_add_options[] = {
// clang-format off
@@ -4884,9 +4834,7 @@ private:
#pragma mark CommandObjectTargetStopHookDelete
-//-------------------------------------------------------------------------
// CommandObjectTargetStopHookDelete
-//-------------------------------------------------------------------------
class CommandObjectTargetStopHookDelete : public CommandObjectParsed {
public:
@@ -4942,9 +4890,7 @@ protected:
#pragma mark CommandObjectTargetStopHookEnableDisable
-//-------------------------------------------------------------------------
// CommandObjectTargetStopHookEnableDisable
-//-------------------------------------------------------------------------
class CommandObjectTargetStopHookEnableDisable : public CommandObjectParsed {
public:
@@ -4999,9 +4945,7 @@ private:
#pragma mark CommandObjectTargetStopHookList
-//-------------------------------------------------------------------------
// CommandObjectTargetStopHookList
-//-------------------------------------------------------------------------
class CommandObjectTargetStopHookList : public CommandObjectParsed {
public:
@@ -5040,9 +4984,7 @@ protected:
#pragma mark CommandObjectMultiwordTargetStopHooks
-//-------------------------------------------------------------------------
// CommandObjectMultiwordTargetStopHooks
-//-------------------------------------------------------------------------
class CommandObjectMultiwordTargetStopHooks : public CommandObjectMultiword {
public:
@@ -5073,9 +5015,7 @@ public:
#pragma mark CommandObjectMultiwordTarget
-//-------------------------------------------------------------------------
// CommandObjectMultiwordTarget
-//-------------------------------------------------------------------------
CommandObjectMultiwordTarget::CommandObjectMultiwordTarget(
CommandInterpreter &interpreter)
Modified: lldb/trunk/source/Commands/CommandObjectTarget.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.h (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.h Wed Apr 10 13:48:55 2019
@@ -14,9 +14,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectMultiwordTarget
-//-------------------------------------------------------------------------
class CommandObjectMultiwordTarget : public CommandObjectMultiword {
public:
Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectThread.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectThread.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectThread.cpp Wed Apr 10 13:48:55 2019
@@ -37,9 +37,7 @@
using namespace lldb;
using namespace lldb_private;
-//-------------------------------------------------------------------------
// CommandObjectIterateOverThreads
-//-------------------------------------------------------------------------
class CommandObjectIterateOverThreads : public CommandObjectParsed {
@@ -238,9 +236,7 @@ protected:
bool m_add_return = true;
};
-//-------------------------------------------------------------------------
// CommandObjectThreadBacktrace
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_thread_backtrace_options[] = {
// clang-format off
@@ -807,9 +803,7 @@ protected:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectThreadContinue
-//-------------------------------------------------------------------------
class CommandObjectThreadContinue : public CommandObjectParsed {
public:
@@ -987,9 +981,7 @@ public:
}
};
-//-------------------------------------------------------------------------
// CommandObjectThreadUntil
-//-------------------------------------------------------------------------
static constexpr OptionEnumValueElement g_duo_running_mode[] = {
{eOnlyThisThread, "this-thread", "Run only this thread"},
@@ -1328,9 +1320,7 @@ protected:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectThreadSelect
-//-------------------------------------------------------------------------
class CommandObjectThreadSelect : public CommandObjectParsed {
public:
@@ -1391,9 +1381,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectThreadList
-//-------------------------------------------------------------------------
class CommandObjectThreadList : public CommandObjectParsed {
public:
@@ -1423,9 +1411,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectThreadInfo
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_thread_info_options[] = {
// clang-format off
@@ -1518,9 +1504,7 @@ public:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectThreadException
-//-------------------------------------------------------------------------
class CommandObjectThreadException : public CommandObjectIterateOverThreads {
public:
@@ -1563,9 +1547,7 @@ class CommandObjectThreadException : pub
}
};
-//-------------------------------------------------------------------------
// CommandObjectThreadReturn
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_thread_return_options[] = {
// clang-format off
@@ -1741,9 +1723,7 @@ protected:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectThreadJump
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_thread_jump_options[] = {
// clang-format off
@@ -1889,13 +1869,9 @@ protected:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// Next are the subcommands of CommandObjectMultiwordThreadPlan
-//-------------------------------------------------------------------------
-//-------------------------------------------------------------------------
// CommandObjectThreadPlanList
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_thread_plan_list_options[] = {
// clang-format off
@@ -2061,9 +2037,7 @@ public:
}
};
-//-------------------------------------------------------------------------
// CommandObjectMultiwordThreadPlan
-//-------------------------------------------------------------------------
class CommandObjectMultiwordThreadPlan : public CommandObjectMultiword {
public:
@@ -2082,9 +2056,7 @@ public:
~CommandObjectMultiwordThreadPlan() override = default;
};
-//-------------------------------------------------------------------------
// CommandObjectMultiwordThread
-//-------------------------------------------------------------------------
CommandObjectMultiwordThread::CommandObjectMultiwordThread(
CommandInterpreter &interpreter)
Modified: lldb/trunk/source/Commands/CommandObjectType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectType.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectType.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectType.cpp Wed Apr 10 13:48:55 2019
@@ -523,9 +523,7 @@ public:
Status *error);
};
-//-------------------------------------------------------------------------
// CommandObjectTypeFormatAdd
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_type_format_add_options[] = {
// clang-format off
@@ -980,9 +978,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectTypeFormatDelete
-//-------------------------------------------------------------------------
class CommandObjectTypeFormatDelete : public CommandObjectTypeFormatterDelete {
public:
@@ -996,9 +992,7 @@ public:
~CommandObjectTypeFormatDelete() override = default;
};
-//-------------------------------------------------------------------------
// CommandObjectTypeFormatClear
-//-------------------------------------------------------------------------
class CommandObjectTypeFormatClear : public CommandObjectTypeFormatterClear {
public:
@@ -1222,9 +1216,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectTypeFormatList
-//-------------------------------------------------------------------------
class CommandObjectTypeFormatList
: public CommandObjectTypeFormatterList<TypeFormatImpl> {
@@ -1236,9 +1228,7 @@ public:
#ifndef LLDB_DISABLE_PYTHON
-//-------------------------------------------------------------------------
// CommandObjectTypeSummaryAdd
-//-------------------------------------------------------------------------
#endif // LLDB_DISABLE_PYTHON
@@ -1713,9 +1703,7 @@ bool CommandObjectTypeSummaryAdd::AddSum
}
}
-//-------------------------------------------------------------------------
// CommandObjectTypeSummaryDelete
-//-------------------------------------------------------------------------
class CommandObjectTypeSummaryDelete : public CommandObjectTypeFormatterDelete {
public:
@@ -1749,9 +1737,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectTypeSummaryList
-//-------------------------------------------------------------------------
class CommandObjectTypeSummaryList
: public CommandObjectTypeFormatterList<TypeSummaryImpl> {
@@ -1778,9 +1764,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectTypeCategoryDefine
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_type_category_define_options[] = {
// clang-format off
@@ -1885,9 +1869,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectTypeCategoryEnable
-//-------------------------------------------------------------------------
static constexpr OptionDefinition g_type_category_enable_options[] = {
// clang-format off
@@ -2002,9 +1984,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectTypeCategoryDelete
-//-------------------------------------------------------------------------
class CommandObjectTypeCategoryDelete : public CommandObjectParsed {
public:
@@ -2062,9 +2042,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectTypeCategoryDisable
-//-------------------------------------------------------------------------
OptionDefinition constexpr g_type_category_disable_options[] = {
// clang-format off
@@ -2174,9 +2152,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectTypeCategoryList
-//-------------------------------------------------------------------------
class CommandObjectTypeCategoryList : public CommandObjectParsed {
public:
@@ -2245,9 +2221,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectTypeFilterList
-//-------------------------------------------------------------------------
class CommandObjectTypeFilterList
: public CommandObjectTypeFormatterList<TypeFilterImpl> {
@@ -2259,9 +2233,7 @@ public:
#ifndef LLDB_DISABLE_PYTHON
-//-------------------------------------------------------------------------
// CommandObjectTypeSynthList
-//-------------------------------------------------------------------------
class CommandObjectTypeSynthList
: public CommandObjectTypeFormatterList<SyntheticChildren> {
@@ -2274,9 +2246,7 @@ public:
#endif // LLDB_DISABLE_PYTHON
-//-------------------------------------------------------------------------
// CommandObjectTypeFilterDelete
-//-------------------------------------------------------------------------
class CommandObjectTypeFilterDelete : public CommandObjectTypeFormatterDelete {
public:
@@ -2291,9 +2261,7 @@ public:
#ifndef LLDB_DISABLE_PYTHON
-//-------------------------------------------------------------------------
// CommandObjectTypeSynthDelete
-//-------------------------------------------------------------------------
class CommandObjectTypeSynthDelete : public CommandObjectTypeFormatterDelete {
public:
@@ -2309,9 +2277,7 @@ public:
#endif // LLDB_DISABLE_PYTHON
-//-------------------------------------------------------------------------
// CommandObjectTypeFilterClear
-//-------------------------------------------------------------------------
class CommandObjectTypeFilterClear : public CommandObjectTypeFormatterClear {
public:
@@ -2323,9 +2289,7 @@ public:
};
#ifndef LLDB_DISABLE_PYTHON
-//-------------------------------------------------------------------------
// CommandObjectTypeSynthClear
-//-------------------------------------------------------------------------
class CommandObjectTypeSynthClear : public CommandObjectTypeFormatterClear {
public:
@@ -2742,9 +2706,7 @@ protected:
}
};
-//----------------------------------------------------------------------
// "type lookup"
-//----------------------------------------------------------------------
static constexpr OptionDefinition g_type_lookup_options[] = {
// clang-format off
{ LLDB_OPT_SET_ALL, false, "show-help", 'h', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Display available help for types" },
@@ -3168,9 +3130,7 @@ public:
~CommandObjectTypeSummary() override = default;
};
-//-------------------------------------------------------------------------
// CommandObjectType
-//-------------------------------------------------------------------------
CommandObjectType::CommandObjectType(CommandInterpreter &interpreter)
: CommandObjectMultiword(interpreter, "type",
Modified: lldb/trunk/source/Commands/CommandObjectVersion.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectVersion.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectVersion.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectVersion.cpp Wed Apr 10 13:48:55 2019
@@ -15,9 +15,7 @@
using namespace lldb;
using namespace lldb_private;
-//-------------------------------------------------------------------------
// CommandObjectVersion
-//-------------------------------------------------------------------------
CommandObjectVersion::CommandObjectVersion(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "version",
Modified: lldb/trunk/source/Commands/CommandObjectVersion.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectVersion.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectVersion.h (original)
+++ lldb/trunk/source/Commands/CommandObjectVersion.h Wed Apr 10 13:48:55 2019
@@ -13,9 +13,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectVersion
-//-------------------------------------------------------------------------
class CommandObjectVersion : public CommandObjectParsed {
public:
Modified: lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp Wed Apr 10 13:48:55 2019
@@ -142,13 +142,9 @@ bool CommandObjectMultiwordWatchpoint::V
return !in_range;
}
-//-------------------------------------------------------------------------
// CommandObjectWatchpointList
-//-------------------------------------------------------------------------
-//-------------------------------------------------------------------------
// CommandObjectWatchpointList::Options
-//-------------------------------------------------------------------------
#pragma mark List::CommandOptions
static constexpr OptionDefinition g_watchpoint_list_options[] = {
@@ -295,9 +291,7 @@ private:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectWatchpointEnable
-//-------------------------------------------------------------------------
#pragma mark Enable
class CommandObjectWatchpointEnable : public CommandObjectParsed {
@@ -366,9 +360,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectWatchpointDisable
-//-------------------------------------------------------------------------
#pragma mark Disable
class CommandObjectWatchpointDisable : public CommandObjectParsed {
@@ -441,9 +433,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectWatchpointDelete
-//-------------------------------------------------------------------------
#pragma mark Delete
class CommandObjectWatchpointDelete : public CommandObjectParsed {
@@ -517,9 +507,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectWatchpointIgnore
-//-------------------------------------------------------------------------
#pragma mark Ignore::CommandOptions
static constexpr OptionDefinition g_watchpoint_ignore_options[] = {
@@ -638,9 +626,7 @@ private:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectWatchpointModify
-//-------------------------------------------------------------------------
#pragma mark Modify::CommandOptions
@@ -769,9 +755,7 @@ private:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectWatchpointSetVariable
-//-------------------------------------------------------------------------
#pragma mark SetVariable
class CommandObjectWatchpointSetVariable : public CommandObjectParsed {
@@ -959,9 +943,7 @@ private:
OptionGroupWatchpoint m_option_watchpoint;
};
-//-------------------------------------------------------------------------
// CommandObjectWatchpointSetExpression
-//-------------------------------------------------------------------------
#pragma mark Set
class CommandObjectWatchpointSetExpression : public CommandObjectRaw {
@@ -1127,9 +1109,7 @@ private:
OptionGroupWatchpoint m_option_watchpoint;
};
-//-------------------------------------------------------------------------
// CommandObjectWatchpointSet
-//-------------------------------------------------------------------------
#pragma mark Set
class CommandObjectWatchpointSet : public CommandObjectMultiword {
@@ -1150,9 +1130,7 @@ public:
~CommandObjectWatchpointSet() override = default;
};
-//-------------------------------------------------------------------------
// CommandObjectMultiwordWatchpoint
-//-------------------------------------------------------------------------
#pragma mark MultiwordWatchpoint
CommandObjectMultiwordWatchpoint::CommandObjectMultiwordWatchpoint(
Modified: lldb/trunk/source/Commands/CommandObjectWatchpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectWatchpoint.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectWatchpoint.h (original)
+++ lldb/trunk/source/Commands/CommandObjectWatchpoint.h Wed Apr 10 13:48:55 2019
@@ -16,9 +16,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectMultiwordWatchpoint
-//-------------------------------------------------------------------------
class CommandObjectMultiwordWatchpoint : public CommandObjectMultiword {
public:
Modified: lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp Wed Apr 10 13:48:55 2019
@@ -24,9 +24,7 @@
using namespace lldb;
using namespace lldb_private;
-//-------------------------------------------------------------------------
// CommandObjectWatchpointCommandAdd
-//-------------------------------------------------------------------------
// FIXME: "script-type" needs to have its contents determined dynamically, so
// somebody can add a new scripting
@@ -478,9 +476,7 @@ private:
CommandOptions m_options;
};
-//-------------------------------------------------------------------------
// CommandObjectWatchpointCommandDelete
-//-------------------------------------------------------------------------
class CommandObjectWatchpointCommandDelete : public CommandObjectParsed {
public:
@@ -558,9 +554,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectWatchpointCommandList
-//-------------------------------------------------------------------------
class CommandObjectWatchpointCommandList : public CommandObjectParsed {
public:
@@ -658,9 +652,7 @@ protected:
}
};
-//-------------------------------------------------------------------------
// CommandObjectWatchpointCommand
-//-------------------------------------------------------------------------
CommandObjectWatchpointCommand::CommandObjectWatchpointCommand(
CommandInterpreter &interpreter)
Modified: lldb/trunk/source/Commands/CommandObjectWatchpointCommand.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectWatchpointCommand.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectWatchpointCommand.h (original)
+++ lldb/trunk/source/Commands/CommandObjectWatchpointCommand.h Wed Apr 10 13:48:55 2019
@@ -17,9 +17,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectMultiwordWatchpoint
-//-------------------------------------------------------------------------
class CommandObjectWatchpointCommand : public CommandObjectMultiword {
public:
Modified: lldb/trunk/source/Core/Address.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Address.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Core/Address.cpp (original)
+++ lldb/trunk/source/Core/Address.cpp Wed Apr 10 13:48:55 2019
@@ -927,7 +927,6 @@ size_t Address::MemorySize() const {
return sizeof(Address);
}
-//----------------------------------------------------------------------
// NOTE: Be careful using this operator. It can correctly compare two
// addresses from the same Module correctly. It can't compare two addresses
// from different modules in any meaningful way, but it will compare the module
@@ -939,7 +938,6 @@ size_t Address::MemorySize() const {
// address results to make much sense
//
// This basically lets Address objects be used in ordered collection classes.
-//----------------------------------------------------------------------
bool lldb_private::operator<(const Address &lhs, const Address &rhs) {
ModuleSP lhs_module_sp(lhs.GetModule());
Modified: lldb/trunk/source/Core/AddressResolver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/AddressResolver.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Core/AddressResolver.cpp (original)
+++ lldb/trunk/source/Core/AddressResolver.cpp Wed Apr 10 13:48:55 2019
@@ -16,9 +16,7 @@ class ModuleList;
using namespace lldb_private;
-//----------------------------------------------------------------------
// AddressResolver:
-//----------------------------------------------------------------------
AddressResolver::AddressResolver() {}
AddressResolver::~AddressResolver() {}
Modified: lldb/trunk/source/Core/AddressResolverFileLine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/AddressResolverFileLine.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Core/AddressResolverFileLine.cpp (original)
+++ lldb/trunk/source/Core/AddressResolverFileLine.cpp Wed Apr 10 13:48:55 2019
@@ -27,9 +27,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// AddressResolverFileLine:
-//----------------------------------------------------------------------
AddressResolverFileLine::AddressResolverFileLine(const FileSpec &file_spec,
uint32_t line_no,
bool check_inlines)
Modified: lldb/trunk/source/Core/Debugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Core/Debugger.cpp (original)
+++ lldb/trunk/source/Core/Debugger.cpp Wed Apr 10 13:48:55 2019
@@ -824,7 +824,6 @@ Debugger::Debugger(lldb::LogOutputCallba
Debugger::~Debugger() { Clear(); }
void Debugger::Clear() {
- //----------------------------------------------------------------------
// Make sure we call this function only once. With the C++ global destructor
// chain having a list of debuggers and with code that can be running on
// other threads, we need to ensure this doesn't happen multiple times.
@@ -833,7 +832,6 @@ void Debugger::Clear() {
// Debugger::~Debugger();
// static void Debugger::Destroy(lldb::DebuggerSP &debugger_sp);
// static void Debugger::Terminate();
- //----------------------------------------------------------------------
llvm::call_once(m_clear_once, [this]() {
ClearIOHandlers();
StopIOHandlerThread();
Modified: lldb/trunk/source/Core/Disassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Disassembler.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Core/Disassembler.cpp (original)
+++ lldb/trunk/source/Core/Disassembler.cpp Wed Apr 10 13:48:55 2019
@@ -1237,9 +1237,7 @@ size_t Disassembler::ParseInstructions(c
return m_instruction_list.GetSize();
}
-//----------------------------------------------------------------------
// Disassembler copy constructor
-//----------------------------------------------------------------------
Disassembler::Disassembler(const ArchSpec &arch, const char *flavor)
: m_arch(arch), m_instruction_list(), m_base_addr(LLDB_INVALID_ADDRESS),
m_flavor() {
@@ -1271,9 +1269,7 @@ const InstructionList &Disassembler::Get
return m_instruction_list;
}
-//----------------------------------------------------------------------
// Class PseudoInstruction
-//----------------------------------------------------------------------
PseudoInstruction::PseudoInstruction()
: Instruction(Address(), AddressClass::eUnknown), m_description() {}
Modified: lldb/trunk/source/Core/DynamicLoader.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DynamicLoader.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Core/DynamicLoader.cpp (original)
+++ lldb/trunk/source/Core/DynamicLoader.cpp Wed Apr 10 13:48:55 2019
@@ -62,10 +62,8 @@ DynamicLoader::DynamicLoader(Process *pr
DynamicLoader::~DynamicLoader() = default;
-//----------------------------------------------------------------------
// Accessosors to the global setting as to whether to stop at image (shared
// library) loading/unloading.
-//----------------------------------------------------------------------
bool DynamicLoader::GetStopWhenImagesChange() const {
return m_process->GetStopOnSharedLibraryEvents();
Modified: lldb/trunk/source/Core/FileLineResolver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FileLineResolver.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Core/FileLineResolver.cpp (original)
+++ lldb/trunk/source/Core/FileLineResolver.cpp Wed Apr 10 13:48:55 2019
@@ -23,9 +23,7 @@ class Address;
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// FileLineResolver:
-//----------------------------------------------------------------------
FileLineResolver::FileLineResolver(const FileSpec &file_spec, uint32_t line_no,
bool check_inlines)
: Searcher(), m_file_spec(file_spec), m_line_number(line_no),
Modified: lldb/trunk/source/Core/FileSpecList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FileSpecList.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Core/FileSpecList.cpp (original)
+++ lldb/trunk/source/Core/FileSpecList.cpp Wed Apr 10 13:48:55 2019
@@ -22,19 +22,15 @@ FileSpecList::FileSpecList() : m_files()
FileSpecList::~FileSpecList() = default;
-//------------------------------------------------------------------
// Append the "file_spec" to the end of the file spec list.
-//------------------------------------------------------------------
void FileSpecList::Append(const FileSpec &file_spec) {
m_files.push_back(file_spec);
}
-//------------------------------------------------------------------
// Only append the "file_spec" if this list doesn't already contain it.
//
// Returns true if "file_spec" was added, false if this list already contained
// a copy of "file_spec".
-//------------------------------------------------------------------
bool FileSpecList::AppendIfUnique(const FileSpec &file_spec) {
collection::iterator end = m_files.end();
if (find(m_files.begin(), end, file_spec) == end) {
@@ -44,14 +40,10 @@ bool FileSpecList::AppendIfUnique(const
return false;
}
-//------------------------------------------------------------------
// Clears the file list.
-//------------------------------------------------------------------
void FileSpecList::Clear() { m_files.clear(); }
-//------------------------------------------------------------------
// Dumps the file list to the supplied stream pointer "s".
-//------------------------------------------------------------------
void FileSpecList::Dump(Stream *s, const char *separator_cstr) const {
collection::const_iterator pos, end = m_files.end();
for (pos = m_files.begin(); pos != end; ++pos) {
@@ -61,13 +53,11 @@ void FileSpecList::Dump(Stream *s, const
}
}
-//------------------------------------------------------------------
// Find the index of the file in the file spec list that matches "file_spec"
// starting "start_idx" entries into the file spec list.
//
// Returns the valid index of the file that matches "file_spec" if it is found,
// else std::numeric_limits<uint32_t>::max() is returned.
-//------------------------------------------------------------------
size_t FileSpecList::FindFileIndex(size_t start_idx, const FileSpec &file_spec,
bool full) const {
const size_t num_files = m_files.size();
@@ -92,10 +82,8 @@ size_t FileSpecList::FindFileIndex(size_
return UINT32_MAX;
}
-//------------------------------------------------------------------
// Returns the FileSpec object at index "idx". If "idx" is out of range, then
// an empty FileSpec object will be returned.
-//------------------------------------------------------------------
const FileSpec &FileSpecList::GetFileSpecAtIndex(size_t idx) const {
if (idx < m_files.size())
return m_files[idx];
@@ -109,12 +97,10 @@ const FileSpec *FileSpecList::GetFileSpe
return nullptr;
}
-//------------------------------------------------------------------
// Return the size in bytes that this object takes in memory. This returns the
// size in bytes of this object's member variables and any FileSpec objects its
// member variables contain, the result doesn't not include the string values
// for the directories any filenames as those are in shared string pools.
-//------------------------------------------------------------------
size_t FileSpecList::MemorySize() const {
size_t mem_size = sizeof(FileSpecList);
collection::const_iterator pos, end = m_files.end();
@@ -125,9 +111,7 @@ size_t FileSpecList::MemorySize() const
return mem_size;
}
-//------------------------------------------------------------------
// Return the number of files in the file spec list.
-//------------------------------------------------------------------
size_t FileSpecList::GetSize() const { return m_files.size(); }
size_t FileSpecList::GetFilesMatchingPartialPath(const char *path,
Modified: lldb/trunk/source/Core/IOHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/IOHandler.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Core/IOHandler.cpp (original)
+++ lldb/trunk/source/Core/IOHandler.cpp Wed Apr 10 13:48:55 2019
@@ -1078,9 +1078,7 @@ public:
operator WINDOW *() { return m_window; }
- //----------------------------------------------------------------------
// Window drawing utilities
- //----------------------------------------------------------------------
void DrawTitleBox(const char *title, const char *bottom_message = nullptr) {
attr_t attr = 0;
if (IsActive())
Modified: lldb/trunk/source/Core/Mangled.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Mangled.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Core/Mangled.cpp (original)
+++ lldb/trunk/source/Core/Mangled.cpp Wed Apr 10 13:48:55 2019
@@ -124,15 +124,11 @@ get_demangled_name_without_arguments(Con
}
#pragma mark Mangled
-//----------------------------------------------------------------------
// Default constructor
-//----------------------------------------------------------------------
Mangled::Mangled() : m_mangled(), m_demangled() {}
-//----------------------------------------------------------------------
// Constructor with an optional string and a boolean indicating if it is the
// mangled version.
-//----------------------------------------------------------------------
Mangled::Mangled(ConstString s, bool mangled)
: m_mangled(), m_demangled() {
if (s)
@@ -154,54 +150,42 @@ Mangled::Mangled(llvm::StringRef name) {
SetValue(ConstString(name));
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
Mangled::~Mangled() {}
-//----------------------------------------------------------------------
// Convert to pointer operator. This allows code to check any Mangled objects
// to see if they contain anything valid using code such as:
//
// Mangled mangled(...);
// if (mangled)
// { ...
-//----------------------------------------------------------------------
Mangled::operator void *() const {
return (m_mangled) ? const_cast<Mangled *>(this) : NULL;
}
-//----------------------------------------------------------------------
// Logical NOT operator. This allows code to check any Mangled objects to see
// if they are invalid using code such as:
//
// Mangled mangled(...);
// if (!file_spec)
// { ...
-//----------------------------------------------------------------------
bool Mangled::operator!() const { return !m_mangled; }
-//----------------------------------------------------------------------
// Clear the mangled and demangled values.
-//----------------------------------------------------------------------
void Mangled::Clear() {
m_mangled.Clear();
m_demangled.Clear();
}
-//----------------------------------------------------------------------
// Compare the string values.
-//----------------------------------------------------------------------
int Mangled::Compare(const Mangled &a, const Mangled &b) {
return ConstString::Compare(
a.GetName(lldb::eLanguageTypeUnknown, ePreferMangled),
b.GetName(lldb::eLanguageTypeUnknown, ePreferMangled));
}
-//----------------------------------------------------------------------
// Set the string value in this objects. If "mangled" is true, then the mangled
// named is set with the new value in "s", else the demangled name is set.
-//----------------------------------------------------------------------
void Mangled::SetValue(ConstString s, bool mangled) {
if (s) {
if (mangled) {
@@ -232,9 +216,7 @@ void Mangled::SetValue(ConstString name)
}
}
-//----------------------------------------------------------------------
// Local helpers for different demangling implementations.
-//----------------------------------------------------------------------
static char *GetMSVCDemangledStr(const char *M) {
#if defined(_MSC_VER)
const size_t demangled_length = 2048;
@@ -287,10 +269,8 @@ static char *GetItaniumDemangledStr(cons
return demangled_cstr;
}
-//----------------------------------------------------------------------
// Explicit demangling for scheduled requests during batch processing. This
// makes use of ItaniumPartialDemangler's rich demangle info
-//----------------------------------------------------------------------
bool Mangled::DemangleWithRichManglingInfo(
RichManglingContext &context, SkipMangledNameFn *skip_mangled_name) {
// We need to generate and cache the demangled name.
@@ -356,12 +336,10 @@ bool Mangled::DemangleWithRichManglingIn
llvm_unreachable("Fully covered switch above!");
}
-//----------------------------------------------------------------------
// Generate the demangled name on demand using this accessor. Code in this
// class will need to use this accessor if it wishes to decode the demangled
// name. The result is cached and will be kept until a new string value is
// supplied to this object, or until the end of the object's lifetime.
-//----------------------------------------------------------------------
ConstString
Mangled::GetDemangledName(lldb::LanguageType language) const {
// Check to make sure we have a valid mangled name and that we haven't
@@ -421,9 +399,7 @@ bool Mangled::NameMatches(const RegularE
return demangled && regex.Execute(demangled.AsCString());
}
-//----------------------------------------------------------------------
// Get the demangled name if there is one, else return the mangled name.
-//----------------------------------------------------------------------
ConstString Mangled::GetName(lldb::LanguageType language,
Mangled::NamePreference preference) const {
if (preference == ePreferMangled && m_mangled)
@@ -444,10 +420,8 @@ ConstString Mangled::GetName(lldb::Langu
return demangled;
}
-//----------------------------------------------------------------------
// Dump a Mangled object to stream "s". We don't force our demangled name to be
// computed currently (we don't use the accessor).
-//----------------------------------------------------------------------
void Mangled::Dump(Stream *s) const {
if (m_mangled) {
*s << ", mangled = " << m_mangled;
@@ -458,10 +432,8 @@ void Mangled::Dump(Stream *s) const {
}
}
-//----------------------------------------------------------------------
// Dumps a debug version of this string with extra object and state information
// to stream "s".
-//----------------------------------------------------------------------
void Mangled::DumpDebug(Stream *s) const {
s->Printf("%*p: Mangled mangled = ", static_cast<int>(sizeof(void *) * 2),
static_cast<const void *>(this));
@@ -470,23 +442,19 @@ void Mangled::DumpDebug(Stream *s) const
m_demangled.DumpDebug(s);
}
-//----------------------------------------------------------------------
// Return the size in byte that this object takes in memory. The size includes
// the size of the objects it owns, and not the strings that it references
// because they are shared strings.
-//----------------------------------------------------------------------
size_t Mangled::MemorySize() const {
return m_mangled.MemorySize() + m_demangled.MemorySize();
}
-//----------------------------------------------------------------------
// We "guess" the language because we can't determine a symbol's language from
// it's name. For example, a Pascal symbol can be mangled using the C++
// Itanium scheme, and defined in a compilation unit within the same module as
// other C++ units. In addition, different targets could have different ways
// of mangling names from a given language, likewise the compilation units
// within those targets.
-//----------------------------------------------------------------------
lldb::LanguageType Mangled::GuessLanguage() const {
ConstString mangled = GetMangledName();
if (mangled) {
@@ -507,9 +475,7 @@ lldb::LanguageType Mangled::GuessLanguag
return lldb::eLanguageTypeUnknown;
}
-//----------------------------------------------------------------------
// Dump OBJ to the supplied stream S.
-//----------------------------------------------------------------------
Stream &operator<<(Stream &s, const Mangled &obj) {
if (obj.GetMangledName())
s << "mangled = '" << obj.GetMangledName() << "'";
Modified: lldb/trunk/source/Core/PluginManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/PluginManager.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Core/PluginManager.cpp (original)
+++ lldb/trunk/source/Core/PluginManager.cpp Wed Apr 10 13:48:55 2019
@@ -1539,9 +1539,7 @@ lldb::ScriptInterpreterSP PluginManager:
#pragma mark -
#pragma mark StructuredDataPlugin
-// -----------------------------------------------------------------------------
// StructuredDataPlugin
-// -----------------------------------------------------------------------------
struct StructuredDataPluginInstance {
StructuredDataPluginInstance()
Modified: lldb/trunk/source/Core/RichManglingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/RichManglingContext.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Core/RichManglingContext.cpp (original)
+++ lldb/trunk/source/Core/RichManglingContext.cpp Wed Apr 10 13:48:55 2019
@@ -18,9 +18,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// RichManglingContext
-//----------------------------------------------------------------------
void RichManglingContext::ResetProvider(InfoProvider new_provider) {
// If we want to support parsers for other languages some day, we need a
// switch here to delete the correct parser type.
Modified: lldb/trunk/source/Core/SearchFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SearchFilter.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Core/SearchFilter.cpp (original)
+++ lldb/trunk/source/Core/SearchFilter.cpp Wed Apr 10 13:48:55 2019
@@ -171,9 +171,7 @@ lldb::SearchFilterSP SearchFilter::CopyF
return ret_sp;
}
-//----------------------------------------------------------------------
// Helper functions for serialization.
-//----------------------------------------------------------------------
StructuredData::DictionarySP
SearchFilter::WrapOptionsDict(StructuredData::DictionarySP options_dict_sp) {
@@ -204,10 +202,8 @@ void SearchFilter::SerializeFileSpecList
options_dict_sp->AddItem(GetKey(name), module_array_sp);
}
-//----------------------------------------------------------------------
// UTILITY Functions to help iterate down through the elements of the
// SymbolContext.
-//----------------------------------------------------------------------
void SearchFilter::Search(Searcher &searcher) {
SymbolContext empty_sc;
@@ -363,11 +359,9 @@ Searcher::CallbackReturn SearchFilter::D
return Searcher::eCallbackReturnContinue;
}
-//----------------------------------------------------------------------
// SearchFilterForUnconstrainedSearches:
// Selects a shared library matching a given file spec, consulting the targets
// "black list".
-//----------------------------------------------------------------------
SearchFilterSP SearchFilterForUnconstrainedSearches::CreateFromStructuredData(
Target &target, const StructuredData::Dictionary &data_dict,
Status &error) {
@@ -403,10 +397,8 @@ lldb::SearchFilterSP SearchFilterForUnco
return std::make_shared<SearchFilterForUnconstrainedSearches>(*this);
}
-//----------------------------------------------------------------------
// SearchFilterByModule:
// Selects a shared library matching a given file spec
-//----------------------------------------------------------------------
SearchFilterByModule::SearchFilterByModule(const lldb::TargetSP &target_sp,
const FileSpec &module)
@@ -533,10 +525,8 @@ StructuredData::ObjectSP SearchFilterByM
return WrapOptionsDict(options_dict_sp);
}
-//----------------------------------------------------------------------
// SearchFilterByModuleList:
// Selects a shared library matching a given file spec
-//----------------------------------------------------------------------
SearchFilterByModuleList::SearchFilterByModuleList(
const lldb::TargetSP &target_sp, const FileSpecList &module_list)
@@ -687,10 +677,8 @@ StructuredData::ObjectSP SearchFilterByM
return WrapOptionsDict(options_dict_sp);
}
-//----------------------------------------------------------------------
// SearchFilterByModuleListAndCU:
// Selects a shared library matching a given file spec
-//----------------------------------------------------------------------
SearchFilterByModuleListAndCU::SearchFilterByModuleListAndCU(
const lldb::TargetSP &target_sp, const FileSpecList &module_list,
Modified: lldb/trunk/source/Core/Section.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Section.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Core/Section.cpp (original)
+++ lldb/trunk/source/Core/Section.cpp Wed Apr 10 13:48:55 2019
@@ -381,9 +381,7 @@ bool Section::Slide(addr_t slide_amount,
return false;
}
-//------------------------------------------------------------------
/// Get the permissions as OR'ed bits from lldb::Permissions
-//------------------------------------------------------------------
uint32_t Section::GetPermissions() const {
uint32_t permissions = 0;
if (m_readable)
@@ -395,9 +393,7 @@ uint32_t Section::GetPermissions() const
return permissions;
}
-//------------------------------------------------------------------
/// Set the permissions using bits OR'ed from lldb::Permissions
-//------------------------------------------------------------------
void Section::SetPermissions(uint32_t permissions) {
m_readable = (permissions & ePermissionsReadable) != 0;
m_writable = (permissions & ePermissionsWritable) != 0;
Modified: lldb/trunk/source/Core/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SourceManager.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Core/SourceManager.cpp (original)
+++ lldb/trunk/source/Core/SourceManager.cpp Wed Apr 10 13:48:55 2019
@@ -49,9 +49,7 @@ using namespace lldb_private;
static inline bool is_newline_char(char ch) { return ch == '\n' || ch == '\r'; }
-//----------------------------------------------------------------------
// SourceManager constructor
-//----------------------------------------------------------------------
SourceManager::SourceManager(const TargetSP &target_sp)
: m_last_file_sp(), m_last_line(0), m_last_count(0), m_default_set(false),
m_target_wp(target_sp),
@@ -61,9 +59,7 @@ SourceManager::SourceManager(const Debug
: m_last_file_sp(), m_last_line(0), m_last_count(0), m_default_set(false),
m_target_wp(), m_debugger_wp(debugger_sp) {}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
SourceManager::~SourceManager() {}
SourceManager::FileSP SourceManager::GetFile(const FileSpec &file_spec) {
Modified: lldb/trunk/source/Core/StreamFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/StreamFile.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Core/StreamFile.cpp (original)
+++ lldb/trunk/source/Core/StreamFile.cpp Wed Apr 10 13:48:55 2019
@@ -14,9 +14,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// StreamFile constructor
-//----------------------------------------------------------------------
StreamFile::StreamFile() : Stream(), m_file() {}
StreamFile::StreamFile(uint32_t flags, uint32_t addr_size, ByteOrder byte_order)
Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Wed Apr 10 13:48:55 2019
@@ -77,9 +77,7 @@ using namespace lldb_utility;
static user_id_t g_value_obj_uid = 0;
-//----------------------------------------------------------------------
// ValueObject constructor
-//----------------------------------------------------------------------
ValueObject::ValueObject(ValueObject &parent)
: UserID(++g_value_obj_uid), // Unique identifier for every value object
m_parent(&parent), m_root(NULL), m_update_point(parent.GetUpdatePoint()),
@@ -105,9 +103,7 @@ ValueObject::ValueObject(ValueObject &pa
m_manager->ManageObject(this);
}
-//----------------------------------------------------------------------
// ValueObject constructor
-//----------------------------------------------------------------------
ValueObject::ValueObject(ExecutionContextScope *exe_scope,
AddressType child_ptr_or_ref_addr_type)
: UserID(++g_value_obj_uid), // Unique identifier for every value object
@@ -134,9 +130,7 @@ ValueObject::ValueObject(ExecutionContex
m_manager->ManageObject(this);
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
ValueObject::~ValueObject() {}
bool ValueObject::UpdateValueIfNeeded(bool update_format) {
Modified: lldb/trunk/source/Expression/DWARFExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DWARFExpression.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DWARFExpression.cpp (original)
+++ lldb/trunk/source/Expression/DWARFExpression.cpp Wed Apr 10 13:48:55 2019
@@ -50,9 +50,7 @@ ReadAddressFromDebugAddrSection(const DW
&offset, index_size);
}
-//----------------------------------------------------------------------
// DWARFExpression constructor
-//----------------------------------------------------------------------
DWARFExpression::DWARFExpression(DWARFUnit *dwarf_cu)
: m_module_wp(), m_data(), m_dwarf_cu(dwarf_cu),
m_reg_kind(eRegisterKindDWARF), m_loclist_slide(LLDB_INVALID_ADDRESS) {}
@@ -74,9 +72,7 @@ DWARFExpression::DWARFExpression(lldb::M
m_module_wp = module_sp;
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
DWARFExpression::~DWARFExpression() {}
bool DWARFExpression::IsValid() const { return m_data.GetByteSize() > 0; }
@@ -1379,10 +1375,8 @@ bool DWARFExpression::Evaluate(
}
switch (op) {
- //----------------------------------------------------------------------
// The DW_OP_addr operation has a single operand that encodes a machine
// address and whose size is the size of an address on the target machine.
- //----------------------------------------------------------------------
case DW_OP_addr:
stack.push_back(Scalar(opcodes.GetAddress(&offset)));
stack.back().SetValueType(Value::eValueTypeFileAddress);
@@ -1393,7 +1387,6 @@ bool DWARFExpression::Evaluate(
frame->CalculateTarget().get());
break;
- //----------------------------------------------------------------------
// The DW_OP_addr_sect_offset4 is used for any location expressions in
// shared libraries that have a location like:
// DW_OP_addr(0x1000)
@@ -1402,7 +1395,6 @@ bool DWARFExpression::Evaluate(
// process where shared libraries have been slid. To account for this, this
// new address type where we can store the section pointer and a 4 byte
// offset.
- //----------------------------------------------------------------------
// case DW_OP_addr_sect_offset4:
// {
// result_type = eResultTypeFileAddress;
@@ -1432,14 +1424,12 @@ bool DWARFExpression::Evaluate(
// }
// break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_deref
// OPERANDS: none
// DESCRIPTION: Pops the top stack entry and treats it as an address.
// The value retrieved from that address is pushed. The size of the data
// retrieved from the dereferenced address is the size of an address on the
// target machine.
- //----------------------------------------------------------------------
case DW_OP_deref: {
if (stack.empty()) {
if (error_ptr)
@@ -1521,7 +1511,6 @@ bool DWARFExpression::Evaluate(
} break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_deref_size
// OPERANDS: 1
// 1 - uint8_t that specifies the size of the data to dereference.
@@ -1534,7 +1523,6 @@ bool DWARFExpression::Evaluate(
// address on the target machine. The data retrieved is zero extended to
// the size of an address on the target machine before being pushed on the
// expression stack.
- //----------------------------------------------------------------------
case DW_OP_deref_size: {
if (stack.empty()) {
if (error_ptr)
@@ -1643,7 +1631,6 @@ bool DWARFExpression::Evaluate(
} break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_xderef_size
// OPERANDS: 1
// 1 - uint8_t that specifies the size of the data to dereference.
@@ -1659,12 +1646,10 @@ bool DWARFExpression::Evaluate(
// the size of an address on the target machine. The data retrieved is zero
// extended to the size of an address on the target machine before being
// pushed on the expression stack.
- //----------------------------------------------------------------------
case DW_OP_xderef_size:
if (error_ptr)
error_ptr->SetErrorString("Unimplemented opcode: DW_OP_xderef_size.");
return false;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_xderef
// OPERANDS: none
// DESCRIPTION: Provides an extended dereference mechanism. The entry at
@@ -1675,17 +1660,14 @@ bool DWARFExpression::Evaluate(
// calculation and pushed as the new stack top. The size of the data
// retrieved from the dereferenced address is the size of an address on the
// target machine.
- //----------------------------------------------------------------------
case DW_OP_xderef:
if (error_ptr)
error_ptr->SetErrorString("Unimplemented opcode: DW_OP_xderef.");
return false;
- //----------------------------------------------------------------------
// All DW_OP_constXXX opcodes have a single operand as noted below:
//
// Opcode Operand 1
- // --------------- ----------------------------------------------------
// DW_OP_const1u 1-byte unsigned integer constant DW_OP_const1s
// 1-byte signed integer constant DW_OP_const2u 2-byte unsigned integer
// constant DW_OP_const2s 2-byte signed integer constant DW_OP_const4u
@@ -1693,7 +1675,6 @@ bool DWARFExpression::Evaluate(
// constant DW_OP_const8u 8-byte unsigned integer constant DW_OP_const8s
// 8-byte signed integer constant DW_OP_constu unsigned LEB128 integer
// constant DW_OP_consts signed LEB128 integer constant
- //----------------------------------------------------------------------
case DW_OP_const1u:
stack.push_back(Scalar((uint8_t)opcodes.GetU8(&offset)));
break;
@@ -1725,11 +1706,9 @@ bool DWARFExpression::Evaluate(
stack.push_back(Scalar(opcodes.GetSLEB128(&offset)));
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_dup
// OPERANDS: none
// DESCRIPTION: duplicates the value at the top of the stack
- //----------------------------------------------------------------------
case DW_OP_dup:
if (stack.empty()) {
if (error_ptr)
@@ -1739,11 +1718,9 @@ bool DWARFExpression::Evaluate(
stack.push_back(stack.back());
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_drop
// OPERANDS: none
// DESCRIPTION: pops the value at the top of the stack
- //----------------------------------------------------------------------
case DW_OP_drop:
if (stack.empty()) {
if (error_ptr)
@@ -1753,12 +1730,10 @@ bool DWARFExpression::Evaluate(
stack.pop_back();
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_over
// OPERANDS: none
// DESCRIPTION: Duplicates the entry currently second in the stack at
// the top of the stack.
- //----------------------------------------------------------------------
case DW_OP_over:
if (stack.size() < 2) {
if (error_ptr)
@@ -1769,12 +1744,10 @@ bool DWARFExpression::Evaluate(
stack.push_back(stack[stack.size() - 2]);
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_pick
// OPERANDS: uint8_t index into the current stack
// DESCRIPTION: The stack entry with the specified index (0 through 255,
// inclusive) is pushed on the stack
- //----------------------------------------------------------------------
case DW_OP_pick: {
uint8_t pick_idx = opcodes.GetU8(&offset);
if (pick_idx < stack.size())
@@ -1787,13 +1760,11 @@ bool DWARFExpression::Evaluate(
}
} break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_swap
// OPERANDS: none
// DESCRIPTION: swaps the top two stack entries. The entry at the top
// of the stack becomes the second stack entry, and the second entry
// becomes the top of the stack
- //----------------------------------------------------------------------
case DW_OP_swap:
if (stack.size() < 2) {
if (error_ptr)
@@ -1807,14 +1778,12 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_rot
// OPERANDS: none
// DESCRIPTION: Rotates the first three stack entries. The entry at
// the top of the stack becomes the third stack entry, the second entry
// becomes the top of the stack, and the third entry becomes the second
// entry.
- //----------------------------------------------------------------------
case DW_OP_rot:
if (stack.size() < 3) {
if (error_ptr)
@@ -1830,13 +1799,11 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_abs
// OPERANDS: none
// DESCRIPTION: pops the top stack entry, interprets it as a signed
// value and pushes its absolute value. If the absolute value can not be
// represented, the result is undefined.
- //----------------------------------------------------------------------
case DW_OP_abs:
if (stack.empty()) {
if (error_ptr)
@@ -1851,12 +1818,10 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_and
// OPERANDS: none
// DESCRIPTION: pops the top two stack values, performs a bitwise and
// operation on the two, and pushes the result.
- //----------------------------------------------------------------------
case DW_OP_and:
if (stack.size() < 2) {
if (error_ptr)
@@ -1871,13 +1836,11 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_div
// OPERANDS: none
// DESCRIPTION: pops the top two stack values, divides the former second
// entry by the former top of the stack using signed division, and pushes
// the result.
- //----------------------------------------------------------------------
case DW_OP_div:
if (stack.size() < 2) {
if (error_ptr)
@@ -1903,12 +1866,10 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_minus
// OPERANDS: none
// DESCRIPTION: pops the top two stack values, subtracts the former top
// of the stack from the former second entry, and pushes the result.
- //----------------------------------------------------------------------
case DW_OP_minus:
if (stack.size() < 2) {
if (error_ptr)
@@ -1923,13 +1884,11 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_mod
// OPERANDS: none
// DESCRIPTION: pops the top two stack values and pushes the result of
// the calculation: former second stack entry modulo the former top of the
// stack.
- //----------------------------------------------------------------------
case DW_OP_mod:
if (stack.size() < 2) {
if (error_ptr)
@@ -1944,12 +1903,10 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_mul
// OPERANDS: none
// DESCRIPTION: pops the top two stack entries, multiplies them
// together, and pushes the result.
- //----------------------------------------------------------------------
case DW_OP_mul:
if (stack.size() < 2) {
if (error_ptr)
@@ -1964,11 +1921,9 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_neg
// OPERANDS: none
// DESCRIPTION: pops the top stack entry, and pushes its negation.
- //----------------------------------------------------------------------
case DW_OP_neg:
if (stack.empty()) {
if (error_ptr)
@@ -1984,12 +1939,10 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_not
// OPERANDS: none
// DESCRIPTION: pops the top stack entry, and pushes its bitwise
// complement
- //----------------------------------------------------------------------
case DW_OP_not:
if (stack.empty()) {
if (error_ptr)
@@ -2005,12 +1958,10 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_or
// OPERANDS: none
// DESCRIPTION: pops the top two stack entries, performs a bitwise or
// operation on the two, and pushes the result.
- //----------------------------------------------------------------------
case DW_OP_or:
if (stack.size() < 2) {
if (error_ptr)
@@ -2025,12 +1976,10 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_plus
// OPERANDS: none
// DESCRIPTION: pops the top two stack entries, adds them together, and
// pushes the result.
- //----------------------------------------------------------------------
case DW_OP_plus:
if (stack.size() < 2) {
if (error_ptr)
@@ -2044,12 +1993,10 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_plus_uconst
// OPERANDS: none
// DESCRIPTION: pops the top stack entry, adds it to the unsigned LEB128
// constant operand and pushes the result.
- //----------------------------------------------------------------------
case DW_OP_plus_uconst:
if (stack.empty()) {
if (error_ptr)
@@ -2068,13 +2015,11 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_shl
// OPERANDS: none
// DESCRIPTION: pops the top two stack entries, shifts the former
// second entry left by the number of bits specified by the former top of
// the stack, and pushes the result.
- //----------------------------------------------------------------------
case DW_OP_shl:
if (stack.size() < 2) {
if (error_ptr)
@@ -2088,13 +2033,11 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_shr
// OPERANDS: none
// DESCRIPTION: pops the top two stack entries, shifts the former second
// entry right logically (filling with zero bits) by the number of bits
// specified by the former top of the stack, and pushes the result.
- //----------------------------------------------------------------------
case DW_OP_shr:
if (stack.size() < 2) {
if (error_ptr)
@@ -2113,14 +2056,12 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_shra
// OPERANDS: none
// DESCRIPTION: pops the top two stack entries, shifts the former second
// entry right arithmetically (divide the magnitude by 2, keep the same
// sign for the result) by the number of bits specified by the former top
// of the stack, and pushes the result.
- //----------------------------------------------------------------------
case DW_OP_shra:
if (stack.size() < 2) {
if (error_ptr)
@@ -2134,12 +2075,10 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_xor
// OPERANDS: none
// DESCRIPTION: pops the top two stack entries, performs the bitwise
// exclusive-or operation on the two, and pushes the result.
- //----------------------------------------------------------------------
case DW_OP_xor:
if (stack.size() < 2) {
if (error_ptr)
@@ -2154,14 +2093,12 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_skip
// OPERANDS: int16_t
// DESCRIPTION: An unconditional branch. Its single operand is a 2-byte
// signed integer constant. The 2-byte constant is the number of bytes of
// the DWARF expression to skip forward or backward from the current
// operation, beginning after the 2-byte constant.
- //----------------------------------------------------------------------
case DW_OP_skip: {
int16_t skip_offset = (int16_t)opcodes.GetU16(&offset);
lldb::offset_t new_offset = offset + skip_offset;
@@ -2174,7 +2111,6 @@ bool DWARFExpression::Evaluate(
}
} break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_bra
// OPERANDS: int16_t
// DESCRIPTION: A conditional branch. Its single operand is a 2-byte
@@ -2182,7 +2118,6 @@ bool DWARFExpression::Evaluate(
// value popped is not the constant 0, the 2-byte constant operand is the
// number of bytes of the DWARF expression to skip forward or backward from
// the current operation, beginning after the 2-byte constant.
- //----------------------------------------------------------------------
case DW_OP_bra:
if (stack.empty()) {
if (error_ptr)
@@ -2207,7 +2142,6 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_eq
// OPERANDS: none
// DESCRIPTION: pops the top two stack values, compares using the
@@ -2215,7 +2149,6 @@ bool DWARFExpression::Evaluate(
// STACK RESULT: push the constant value 1 onto the stack if the result
// of the operation is true or the constant value 0 if the result of the
// operation is false.
- //----------------------------------------------------------------------
case DW_OP_eq:
if (stack.size() < 2) {
if (error_ptr)
@@ -2230,7 +2163,6 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_ge
// OPERANDS: none
// DESCRIPTION: pops the top two stack values, compares using the
@@ -2238,7 +2170,6 @@ bool DWARFExpression::Evaluate(
// STACK RESULT: push the constant value 1 onto the stack if the result
// of the operation is true or the constant value 0 if the result of the
// operation is false.
- //----------------------------------------------------------------------
case DW_OP_ge:
if (stack.size() < 2) {
if (error_ptr)
@@ -2253,7 +2184,6 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_gt
// OPERANDS: none
// DESCRIPTION: pops the top two stack values, compares using the
@@ -2261,7 +2191,6 @@ bool DWARFExpression::Evaluate(
// STACK RESULT: push the constant value 1 onto the stack if the result
// of the operation is true or the constant value 0 if the result of the
// operation is false.
- //----------------------------------------------------------------------
case DW_OP_gt:
if (stack.size() < 2) {
if (error_ptr)
@@ -2276,7 +2205,6 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_le
// OPERANDS: none
// DESCRIPTION: pops the top two stack values, compares using the
@@ -2284,7 +2212,6 @@ bool DWARFExpression::Evaluate(
// STACK RESULT: push the constant value 1 onto the stack if the result
// of the operation is true or the constant value 0 if the result of the
// operation is false.
- //----------------------------------------------------------------------
case DW_OP_le:
if (stack.size() < 2) {
if (error_ptr)
@@ -2299,7 +2226,6 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_lt
// OPERANDS: none
// DESCRIPTION: pops the top two stack values, compares using the
@@ -2307,7 +2233,6 @@ bool DWARFExpression::Evaluate(
// STACK RESULT: push the constant value 1 onto the stack if the result
// of the operation is true or the constant value 0 if the result of the
// operation is false.
- //----------------------------------------------------------------------
case DW_OP_lt:
if (stack.size() < 2) {
if (error_ptr)
@@ -2322,7 +2247,6 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_ne
// OPERANDS: none
// DESCRIPTION: pops the top two stack values, compares using the
@@ -2330,7 +2254,6 @@ bool DWARFExpression::Evaluate(
// STACK RESULT: push the constant value 1 onto the stack if the result
// of the operation is true or the constant value 0 if the result of the
// operation is false.
- //----------------------------------------------------------------------
case DW_OP_ne:
if (stack.size() < 2) {
if (error_ptr)
@@ -2345,13 +2268,11 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_litn
// OPERANDS: none
// DESCRIPTION: encode the unsigned literal values from 0 through 31.
// STACK RESULT: push the unsigned literal constant value onto the top
// of the stack.
- //----------------------------------------------------------------------
case DW_OP_lit0:
case DW_OP_lit1:
case DW_OP_lit2:
@@ -2387,11 +2308,9 @@ bool DWARFExpression::Evaluate(
stack.push_back(Scalar((uint64_t)(op - DW_OP_lit0)));
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_regN
// OPERANDS: none
// DESCRIPTION: Push the value in register n on the top of the stack.
- //----------------------------------------------------------------------
case DW_OP_reg0:
case DW_OP_reg1:
case DW_OP_reg2:
@@ -2431,12 +2350,10 @@ bool DWARFExpression::Evaluate(
else
return false;
} break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_regx
// OPERANDS:
// ULEB128 literal operand that encodes the register.
// DESCRIPTION: Push the value in register on the top of the stack.
- //----------------------------------------------------------------------
case DW_OP_regx: {
reg_num = opcodes.GetULEB128(&offset);
if (ReadRegisterValueAsScalar(reg_ctx, reg_kind, reg_num, error_ptr, tmp))
@@ -2445,13 +2362,11 @@ bool DWARFExpression::Evaluate(
return false;
} break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_bregN
// OPERANDS:
// SLEB128 offset from register N
// DESCRIPTION: Value is in memory at the address specified by register
// N plus an offset.
- //----------------------------------------------------------------------
case DW_OP_breg0:
case DW_OP_breg1:
case DW_OP_breg2:
@@ -2496,14 +2411,12 @@ bool DWARFExpression::Evaluate(
} else
return false;
} break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_bregx
// OPERANDS: 2
// ULEB128 literal operand that encodes the register.
// SLEB128 offset from register N
// DESCRIPTION: Value is in memory at the address specified by register
// N plus an offset.
- //----------------------------------------------------------------------
case DW_OP_bregx: {
reg_num = opcodes.GetULEB128(&offset);
@@ -2544,16 +2457,13 @@ bool DWARFExpression::Evaluate(
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_nop
// OPERANDS: none
// DESCRIPTION: A place holder. It has no effect on the location stack
// or any of its values.
- //----------------------------------------------------------------------
case DW_OP_nop:
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_piece
// OPERANDS: 1
// ULEB128: byte size of the piece
@@ -2567,7 +2477,6 @@ bool DWARFExpression::Evaluate(
// variable partially in memory and partially in registers. DW_OP_piece
// provides a way of describing how large a part of a variable a particular
// DWARF expression refers to.
- //----------------------------------------------------------------------
case DW_OP_piece: {
const uint64_t piece_byte_size = opcodes.GetULEB128(&offset);
@@ -2744,7 +2653,6 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_push_object_address
// OPERANDS: none
// DESCRIPTION: Pushes the address of the object currently being
@@ -2753,7 +2661,6 @@ bool DWARFExpression::Evaluate(
// DIE or it may be a component of an array, structure, or class whose
// address has been dynamically determined by an earlier step during user
// expression evaluation.
- //----------------------------------------------------------------------
case DW_OP_push_object_address:
if (object_address_ptr)
stack.push_back(*object_address_ptr);
@@ -2765,7 +2672,6 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_call2
// OPERANDS:
// uint16_t compile unit relative offset of a DIE
@@ -2784,12 +2690,10 @@ bool DWARFExpression::Evaluate(
// may be used as parameters by the called expression and values left on
// the stack by the called expression may be used as return values by prior
// agreement between the calling and called expressions.
- //----------------------------------------------------------------------
case DW_OP_call2:
if (error_ptr)
error_ptr->SetErrorString("Unimplemented opcode DW_OP_call2.");
return false;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_call4
// OPERANDS: 1
// uint32_t compile unit relative offset of a DIE
@@ -2809,30 +2713,25 @@ bool DWARFExpression::Evaluate(
// may be used as parameters by the called expression and values left on
// the stack by the called expression may be used as return values by prior
// agreement between the calling and called expressions.
- //----------------------------------------------------------------------
case DW_OP_call4:
if (error_ptr)
error_ptr->SetErrorString("Unimplemented opcode DW_OP_call4.");
return false;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_stack_value
// OPERANDS: None
// DESCRIPTION: Specifies that the object does not exist in memory but
// rather is a constant value. The value from the top of the stack is the
// value to be used. This is the actual object value and not the location.
- //----------------------------------------------------------------------
case DW_OP_stack_value:
stack.back().SetValueType(Value::eValueTypeScalar);
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_call_frame_cfa
// OPERANDS: None
// DESCRIPTION: Specifies a DWARF expression that pushes the value of
// the canonical frame address consistent with the call frame information
// located in .debug_frame (or in the FDEs of the eh_frame section).
- //----------------------------------------------------------------------
case DW_OP_call_frame_cfa:
if (frame) {
// Note that we don't have to parse FDEs because this DWARF expression
@@ -2854,14 +2753,12 @@ bool DWARFExpression::Evaluate(
}
break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_form_tls_address (or the old pre-DWARFv3 vendor extension
// opcode, DW_OP_GNU_push_tls_address)
// OPERANDS: none
// DESCRIPTION: Pops a TLS offset from the stack, converts it to
// an address in the current thread's thread-local storage block, and
// pushes it on the stack.
- //----------------------------------------------------------------------
case DW_OP_form_tls_address:
case DW_OP_GNU_push_tls_address: {
if (stack.size() < 1) {
@@ -2906,14 +2803,12 @@ bool DWARFExpression::Evaluate(
stack.back().SetValueType(Value::eValueTypeLoadAddress);
} break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_addrx (DW_OP_GNU_addr_index is the legacy name.)
// OPERANDS: 1
// ULEB128: index to the .debug_addr section
// DESCRIPTION: Pushes an address to the stack from the .debug_addr
// section with the base address specified by the DW_AT_addr_base attribute
// and the 0 based index is the ULEB128 encoded index.
- //----------------------------------------------------------------------
case DW_OP_addrx:
case DW_OP_GNU_addr_index: {
if (!dwarf_cu) {
@@ -2933,7 +2828,6 @@ bool DWARFExpression::Evaluate(
stack.back().SetValueType(Value::eValueTypeFileAddress);
} break;
- //----------------------------------------------------------------------
// OPCODE: DW_OP_GNU_const_index
// OPERANDS: 1
// ULEB128: index to the .debug_addr section
@@ -2941,7 +2835,6 @@ bool DWARFExpression::Evaluate(
// the stack from the .debug_addr section with the base address specified
// by the DW_AT_addr_base attribute and the 0 based index is the ULEB128
// encoded index.
- //----------------------------------------------------------------------
case DW_OP_GNU_const_index: {
if (!dwarf_cu) {
if (error_ptr)
Modified: lldb/trunk/source/Expression/FunctionCaller.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/FunctionCaller.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Expression/FunctionCaller.cpp (original)
+++ lldb/trunk/source/Expression/FunctionCaller.cpp Wed Apr 10 13:48:55 2019
@@ -29,9 +29,7 @@
using namespace lldb_private;
-//----------------------------------------------------------------------
// FunctionCaller constructor
-//----------------------------------------------------------------------
FunctionCaller::FunctionCaller(ExecutionContextScope &exe_scope,
const CompilerType &return_type,
const Address &functionAddress,
@@ -51,9 +49,7 @@ FunctionCaller::FunctionCaller(Execution
assert(m_jit_process_wp.lock());
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
FunctionCaller::~FunctionCaller() {
lldb::ProcessSP process_sp(m_jit_process_wp.lock());
if (process_sp) {
Modified: lldb/trunk/source/Expression/IRDynamicChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRDynamicChecks.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRDynamicChecks.cpp (original)
+++ lldb/trunk/source/Expression/IRDynamicChecks.cpp Wed Apr 10 13:48:55 2019
@@ -102,7 +102,6 @@ static std::string PrintValue(llvm::Valu
return s;
}
-//----------------------------------------------------------------------
/// \class Instrumenter IRDynamicChecks.cpp
/// Finds and instruments individual LLVM IR instructions
///
@@ -129,22 +128,18 @@ static std::string PrintValue(llvm::Valu
///
/// - InspectFunction [default: iterates through the basic blocks in a
/// function calling InspectBasicBlock]
-//----------------------------------------------------------------------
class Instrumenter {
public:
- //------------------------------------------------------------------
/// Constructor
///
/// \param[in] module
/// The module being instrumented.
- //------------------------------------------------------------------
Instrumenter(llvm::Module &module, DynamicCheckerFunctions &checker_functions)
: m_module(module), m_checker_functions(checker_functions),
m_i8ptr_ty(nullptr), m_intptr_ty(nullptr) {}
virtual ~Instrumenter() = default;
- //------------------------------------------------------------------
/// Inspect a function to find instructions to instrument
///
/// \param[in] function
@@ -152,15 +147,12 @@ public:
///
/// \return
/// True on success; false on error.
- //------------------------------------------------------------------
bool Inspect(llvm::Function &function) { return InspectFunction(function); }
- //------------------------------------------------------------------
/// Instrument all the instructions found by Inspect()
///
/// \return
/// True on success; false on error.
- //------------------------------------------------------------------
bool Instrument() {
for (InstIterator ii = m_to_instrument.begin(),
last_ii = m_to_instrument.end();
@@ -173,7 +165,6 @@ public:
}
protected:
- //------------------------------------------------------------------
/// Add instrumentation to a single instruction
///
/// \param[in] inst
@@ -181,20 +172,16 @@ protected:
///
/// \return
/// True on success; false otherwise.
- //------------------------------------------------------------------
virtual bool InstrumentInstruction(llvm::Instruction *inst) = 0;
- //------------------------------------------------------------------
/// Register a single instruction to be instrumented
///
/// \param[in] inst
/// The instruction to be instrumented.
- //------------------------------------------------------------------
void RegisterInstruction(llvm::Instruction &i) {
m_to_instrument.push_back(&i);
}
- //------------------------------------------------------------------
/// Determine whether a single instruction is interesting to instrument,
/// and, if so, call RegisterInstruction
///
@@ -203,10 +190,8 @@ protected:
///
/// \return
/// False if there was an error scanning; true otherwise.
- //------------------------------------------------------------------
virtual bool InspectInstruction(llvm::Instruction &i) { return true; }
- //------------------------------------------------------------------
/// Scan a basic block to see if any instructions are interesting
///
/// \param[in] bb
@@ -214,7 +199,6 @@ protected:
///
/// \return
/// False if there was an error scanning; true otherwise.
- //------------------------------------------------------------------
virtual bool InspectBasicBlock(llvm::BasicBlock &bb) {
for (llvm::BasicBlock::iterator ii = bb.begin(), last_ii = bb.end();
ii != last_ii; ++ii) {
@@ -225,7 +209,6 @@ protected:
return true;
}
- //------------------------------------------------------------------
/// Scan a function to see if any instructions are interesting
///
/// \param[in] f
@@ -233,7 +216,6 @@ protected:
///
/// \return
/// False if there was an error scanning; true otherwise.
- //------------------------------------------------------------------
virtual bool InspectFunction(llvm::Function &f) {
for (llvm::Function::iterator bbi = f.begin(), last_bbi = f.end();
bbi != last_bbi; ++bbi) {
@@ -244,7 +226,6 @@ protected:
return true;
}
- //------------------------------------------------------------------
/// Build a function pointer for a function with signature void
/// (*)(uint8_t*) with a given address
///
@@ -253,7 +234,6 @@ protected:
///
/// \return
/// The function pointer, for use in a CallInst.
- //------------------------------------------------------------------
llvm::FunctionCallee BuildPointerValidatorFunc(lldb::addr_t start_address) {
llvm::Type *param_array[1];
@@ -269,7 +249,6 @@ protected:
return {fun_ty, ConstantExpr::getIntToPtr(fun_addr_int, fun_ptr_ty)};
}
- //------------------------------------------------------------------
/// Build a function pointer for a function with signature void
/// (*)(uint8_t*, uint8_t*) with a given address
///
@@ -278,7 +257,6 @@ protected:
///
/// \return
/// The function pointer, for use in a CallInst.
- //------------------------------------------------------------------
llvm::FunctionCallee BuildObjectCheckerFunc(lldb::addr_t start_address) {
llvm::Type *param_array[2];
Modified: lldb/trunk/source/Expression/UtilityFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/UtilityFunction.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Expression/UtilityFunction.cpp (original)
+++ lldb/trunk/source/Expression/UtilityFunction.cpp Wed Apr 10 13:48:55 2019
@@ -29,7 +29,6 @@
using namespace lldb_private;
using namespace lldb;
-//------------------------------------------------------------------
/// Constructor
///
/// \param[in] text
@@ -37,7 +36,6 @@ using namespace lldb;
///
/// \param[in] name
/// The name of the function, as used in the text.
-//------------------------------------------------------------------
UtilityFunction::UtilityFunction(ExecutionContextScope &exe_scope,
const char *text, const char *name,
ExpressionKind kind)
Modified: lldb/trunk/source/Host/common/Editline.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Editline.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Editline.cpp (original)
+++ lldb/trunk/source/Host/common/Editline.cpp Wed Apr 10 13:48:55 2019
@@ -260,9 +260,7 @@ protected:
}
}
-//------------------------------------------------------------------
// Editline private methods
-//------------------------------------------------------------------
void Editline::SetBaseLineNumber(int line_number) {
std::stringstream line_number_stream;
@@ -856,10 +854,8 @@ unsigned char Editline::BufferEndCommand
return CC_NEWLINE;
}
-//------------------------------------------------------------------------------
/// Prints completions and their descriptions to the given file. Only the
/// completions in the interval [start, end) are printed.
-//------------------------------------------------------------------------------
static void PrintCompletion(FILE *output_file, size_t start, size_t end,
StringList &completions, StringList &descriptions) {
// This is an 'int' because of printf.
@@ -1144,9 +1140,7 @@ void Editline::ConfigureEditor(bool mult
}
}
-//------------------------------------------------------------------
// Editline public methods
-//------------------------------------------------------------------
Editline *Editline::InstanceFor(EditLine *editline) {
Editline *editor;
Modified: lldb/trunk/source/Host/common/File.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/File.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/File.cpp (original)
+++ lldb/trunk/source/Host/common/File.cpp Wed Apr 10 13:48:55 2019
@@ -621,9 +621,7 @@ Status File::Write(const void *buf, size
return error;
}
-//------------------------------------------------------------------
// Print some formatted output to the stream.
-//------------------------------------------------------------------
size_t File::Printf(const char *format, ...) {
va_list args;
va_start(args, format);
@@ -632,9 +630,7 @@ size_t File::Printf(const char *format,
return result;
}
-//------------------------------------------------------------------
// Print some formatted output to the stream.
-//------------------------------------------------------------------
size_t File::PrintfVarArg(const char *format, va_list args) {
size_t result = 0;
if (DescriptorIsValid()) {
Modified: lldb/trunk/source/Host/common/FileAction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/FileAction.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/FileAction.cpp (original)
+++ lldb/trunk/source/Host/common/FileAction.cpp Wed Apr 10 13:48:55 2019
@@ -14,9 +14,7 @@
using namespace lldb_private;
-//----------------------------------------------------------------------------
// FileAction member functions
-//----------------------------------------------------------------------------
FileAction::FileAction()
: m_action(eFileActionNone), m_fd(-1), m_arg(-1), m_file_spec() {}
Modified: lldb/trunk/source/Host/common/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Host.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Host.cpp (original)
+++ lldb/trunk/source/Host/common/Host.cpp Wed Apr 10 13:48:55 2019
@@ -116,10 +116,8 @@ HostThread Host::StartMonitoringChildPro
}
#ifndef __linux__
-//------------------------------------------------------------------
// Scoped class that will disable thread canceling when it is constructed, and
// exception safely restore the previous value it when it goes out of scope.
-//------------------------------------------------------------------
class ScopedPThreadCancelDisabler {
public:
ScopedPThreadCancelDisabler() {
Modified: lldb/trunk/source/Host/common/HostInfoBase.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/HostInfoBase.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/HostInfoBase.cpp (original)
+++ lldb/trunk/source/Host/common/HostInfoBase.cpp Wed Apr 10 13:48:55 2019
@@ -31,13 +31,11 @@ using namespace lldb;
using namespace lldb_private;
namespace {
-//----------------------------------------------------------------------
// The HostInfoBaseFields is a work around for windows not supporting static
// variables correctly in a thread safe way. Really each of the variables in
// HostInfoBaseFields should live in the functions in which they are used and
// each one should be static, but the work around is in place to avoid this
// restriction. Ick.
-//----------------------------------------------------------------------
struct HostInfoBaseFields {
~HostInfoBaseFields() {
Modified: lldb/trunk/source/Host/common/NativeProcessProtocol.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/NativeProcessProtocol.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/NativeProcessProtocol.cpp (original)
+++ lldb/trunk/source/Host/common/NativeProcessProtocol.cpp Wed Apr 10 13:48:55 2019
@@ -19,9 +19,7 @@
using namespace lldb;
using namespace lldb_private;
-// -----------------------------------------------------------------------------
// NativeProcessProtocol Members
-// -----------------------------------------------------------------------------
NativeProcessProtocol::NativeProcessProtocol(lldb::pid_t pid, int terminal_fd,
NativeDelegate &delegate)
Modified: lldb/trunk/source/Host/common/NativeRegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/NativeRegisterContext.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/NativeRegisterContext.cpp (original)
+++ lldb/trunk/source/Host/common/NativeRegisterContext.cpp Wed Apr 10 13:48:55 2019
@@ -21,9 +21,7 @@ using namespace lldb_private;
NativeRegisterContext::NativeRegisterContext(NativeThreadProtocol &thread)
: m_thread(thread) {}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
NativeRegisterContext::~NativeRegisterContext() {}
// FIXME revisit invalidation, process stop ids, etc. Right now we don't
Modified: lldb/trunk/source/Host/common/ProcessLaunchInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/ProcessLaunchInfo.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/ProcessLaunchInfo.cpp (original)
+++ lldb/trunk/source/Host/common/ProcessLaunchInfo.cpp Wed Apr 10 13:48:55 2019
@@ -26,9 +26,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------------
// ProcessLaunchInfo member functions
-//----------------------------------------------------------------------------
ProcessLaunchInfo::ProcessLaunchInfo()
: ProcessInfo(), m_working_dir(), m_plugin_name(), m_flags(0),
Modified: lldb/trunk/source/Host/common/PseudoTerminal.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/PseudoTerminal.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/PseudoTerminal.cpp (original)
+++ lldb/trunk/source/Host/common/PseudoTerminal.cpp Wed Apr 10 13:48:55 2019
@@ -26,36 +26,28 @@ int posix_openpt(int flags);
using namespace lldb_private;
-//----------------------------------------------------------------------
// Write string describing error number
-//----------------------------------------------------------------------
static void ErrnoToStr(char *error_str, size_t error_len) {
std::string strerror = llvm::sys::StrError();
::snprintf(error_str, error_len, "%s", strerror.c_str());
}
-//----------------------------------------------------------------------
// PseudoTerminal constructor
-//----------------------------------------------------------------------
PseudoTerminal::PseudoTerminal()
: m_master_fd(invalid_fd), m_slave_fd(invalid_fd) {}
-//----------------------------------------------------------------------
// Destructor
//
// The destructor will close the master and slave file descriptors if they are
// valid and ownership has not been released using the
// ReleaseMasterFileDescriptor() or the ReleaseSaveFileDescriptor() member
// functions.
-//----------------------------------------------------------------------
PseudoTerminal::~PseudoTerminal() {
CloseMasterFileDescriptor();
CloseSlaveFileDescriptor();
}
-//----------------------------------------------------------------------
// Close the master file descriptor if it is valid.
-//----------------------------------------------------------------------
void PseudoTerminal::CloseMasterFileDescriptor() {
if (m_master_fd >= 0) {
::close(m_master_fd);
@@ -63,9 +55,7 @@ void PseudoTerminal::CloseMasterFileDesc
}
}
-//----------------------------------------------------------------------
// Close the slave file descriptor if it is valid.
-//----------------------------------------------------------------------
void PseudoTerminal::CloseSlaveFileDescriptor() {
if (m_slave_fd >= 0) {
::close(m_slave_fd);
@@ -73,7 +63,6 @@ void PseudoTerminal::CloseSlaveFileDescr
}
}
-//----------------------------------------------------------------------
// Open the first available pseudo terminal with OFLAG as the permissions. The
// file descriptor is stored in this object and can be accessed with the
// MasterFileDescriptor() accessor. The ownership of the master file descriptor
@@ -85,7 +74,6 @@ void PseudoTerminal::CloseSlaveFileDescr
//
// RETURNS:
// True when successful, false indicating an error occurred.
-//----------------------------------------------------------------------
bool PseudoTerminal::OpenFirstAvailableMaster(int oflag, char *error_str,
size_t error_len) {
if (error_str)
@@ -124,7 +112,6 @@ bool PseudoTerminal::OpenFirstAvailableM
#endif
}
-//----------------------------------------------------------------------
// Open the slave pseudo terminal for the current master pseudo terminal. A
// master pseudo terminal should already be valid prior to calling this
// function (see OpenFirstAvailableMaster()). The file descriptor is stored
@@ -134,7 +121,6 @@ bool PseudoTerminal::OpenFirstAvailableM
//
// RETURNS:
// True when successful, false indicating an error occurred.
-//----------------------------------------------------------------------
bool PseudoTerminal::OpenSlave(int oflag, char *error_str, size_t error_len) {
if (error_str)
error_str[0] = '\0';
@@ -158,7 +144,6 @@ bool PseudoTerminal::OpenSlave(int oflag
return true;
}
-//----------------------------------------------------------------------
// Get the name of the slave pseudo terminal. A master pseudo terminal should
// already be valid prior to calling this function (see
// OpenFirstAvailableMaster()).
@@ -168,7 +153,6 @@ bool PseudoTerminal::OpenSlave(int oflag
// The name of the slave pseudo terminal as a NULL terminated C string
// that comes from static memory, so a copy of the string should be
// made as subsequent calls can change this value.
-//----------------------------------------------------------------------
const char *PseudoTerminal::GetSlaveName(char *error_str,
size_t error_len) const {
if (error_str)
@@ -188,7 +172,6 @@ const char *PseudoTerminal::GetSlaveName
return slave_name;
}
-//----------------------------------------------------------------------
// Fork a child process and have its stdio routed to a pseudo terminal.
//
// In the parent process when a valid pid is returned, the master file
@@ -206,7 +189,6 @@ const char *PseudoTerminal::GetSlaveName
// RETURNS:
// in the parent process: the pid of the child, or -1 if fork fails
// in the child process: zero
-//----------------------------------------------------------------------
lldb::pid_t PseudoTerminal::Fork(char *error_str, size_t error_len) {
if (error_str)
error_str[0] = '\0';
@@ -265,7 +247,6 @@ lldb::pid_t PseudoTerminal::Fork(char *e
return pid;
}
-//----------------------------------------------------------------------
// The master file descriptor accessor. This object retains ownership of the
// master file descriptor when this accessor is used. Use
// ReleaseMasterFileDescriptor() if you wish this object to release ownership
@@ -273,23 +254,18 @@ lldb::pid_t PseudoTerminal::Fork(char *e
//
// Returns the master file descriptor, or -1 if the master file descriptor is
// not currently valid.
-//----------------------------------------------------------------------
int PseudoTerminal::GetMasterFileDescriptor() const { return m_master_fd; }
-//----------------------------------------------------------------------
// The slave file descriptor accessor.
//
// Returns the slave file descriptor, or -1 if the slave file descriptor is not
// currently valid.
-//----------------------------------------------------------------------
int PseudoTerminal::GetSlaveFileDescriptor() const { return m_slave_fd; }
-//----------------------------------------------------------------------
// Release 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.
-//----------------------------------------------------------------------
int PseudoTerminal::ReleaseMasterFileDescriptor() {
// Release ownership of the master pseudo terminal file descriptor without
// closing it. (the destructor for this class will close it otherwise!)
@@ -298,12 +274,10 @@ int PseudoTerminal::ReleaseMasterFileDes
return fd;
}
-//----------------------------------------------------------------------
// 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.
-//----------------------------------------------------------------------
int PseudoTerminal::ReleaseSlaveFileDescriptor() {
// Release ownership of the slave pseudo terminal file descriptor without
// closing it (the destructor for this class will close it otherwise!)
Modified: lldb/trunk/source/Host/common/SocketAddress.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/SocketAddress.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/SocketAddress.cpp (original)
+++ lldb/trunk/source/Host/common/SocketAddress.cpp Wed Apr 10 13:48:55 2019
@@ -71,9 +71,7 @@ const char *inet_ntop(int af, const void
using namespace lldb_private;
-//----------------------------------------------------------------------
// SocketAddress constructor
-//----------------------------------------------------------------------
SocketAddress::SocketAddress() { Clear(); }
SocketAddress::SocketAddress(const struct sockaddr &s) { m_socket_addr.sa = s; }
@@ -94,15 +92,11 @@ SocketAddress::SocketAddress(const struc
*this = addr_info;
}
-//----------------------------------------------------------------------
// SocketAddress copy constructor
-//----------------------------------------------------------------------
SocketAddress::SocketAddress(const SocketAddress &rhs)
: m_socket_addr(rhs.m_socket_addr) {}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
SocketAddress::~SocketAddress() {}
void SocketAddress::Clear() {
@@ -183,9 +177,7 @@ bool SocketAddress::SetPort(uint16_t por
return false;
}
-//----------------------------------------------------------------------
// SocketAddress assignment operator
-//----------------------------------------------------------------------
const SocketAddress &SocketAddress::operator=(const SocketAddress &rhs) {
if (this != &rhs)
m_socket_addr = rhs.m_socket_addr;
Modified: lldb/trunk/source/Host/common/Terminal.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Terminal.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Terminal.cpp (original)
+++ lldb/trunk/source/Host/common/Terminal.cpp Wed Apr 10 13:48:55 2019
@@ -81,9 +81,7 @@ bool Terminal::SetCanonical(bool enabled
return false;
}
-//----------------------------------------------------------------------
// Default constructor
-//----------------------------------------------------------------------
TerminalState::TerminalState()
: m_tty(), m_tflags(-1),
#ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
@@ -92,9 +90,7 @@ TerminalState::TerminalState()
m_process_group(-1) {
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
TerminalState::~TerminalState() {}
void TerminalState::Clear() {
@@ -106,11 +102,9 @@ void TerminalState::Clear() {
m_process_group = -1;
}
-//----------------------------------------------------------------------
// Save the current state of the TTY for the file descriptor "fd" and if
// "save_process_group" is true, attempt to save the process group info for the
// TTY.
-//----------------------------------------------------------------------
bool TerminalState::Save(int fd, bool save_process_group) {
m_tty.SetFileDescriptor(fd);
if (m_tty.IsATerminal()) {
@@ -141,10 +135,8 @@ bool TerminalState::Save(int fd, bool sa
return IsValid();
}
-//----------------------------------------------------------------------
// Restore the state of the TTY using the cached values from a previous call to
// Save().
-//----------------------------------------------------------------------
bool TerminalState::Restore() const {
#ifndef LLDB_DISABLE_POSIX
if (IsValid()) {
@@ -172,23 +164,17 @@ bool TerminalState::Restore() const {
return false;
}
-//----------------------------------------------------------------------
// Returns true if this object has valid saved TTY state settings that can be
// used to restore a previous state.
-//----------------------------------------------------------------------
bool TerminalState::IsValid() const {
return m_tty.FileDescriptorIsValid() &&
(TFlagsIsValid() || TTYStateIsValid());
}
-//----------------------------------------------------------------------
// Returns true if m_tflags is valid
-//----------------------------------------------------------------------
bool TerminalState::TFlagsIsValid() const { return m_tflags != -1; }
-//----------------------------------------------------------------------
// Returns true if m_ttystate is valid
-//----------------------------------------------------------------------
bool TerminalState::TTYStateIsValid() const {
#ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
return m_termios_up != 0;
@@ -197,35 +183,25 @@ bool TerminalState::TTYStateIsValid() co
#endif
}
-//----------------------------------------------------------------------
// Returns true if m_process_group is valid
-//----------------------------------------------------------------------
bool TerminalState::ProcessGroupIsValid() const {
return static_cast<int32_t>(m_process_group) != -1;
}
-//------------------------------------------------------------------
// Constructor
-//------------------------------------------------------------------
TerminalStateSwitcher::TerminalStateSwitcher() : m_currentState(UINT32_MAX) {}
-//------------------------------------------------------------------
// Destructor
-//------------------------------------------------------------------
TerminalStateSwitcher::~TerminalStateSwitcher() {}
-//------------------------------------------------------------------
// Returns the number of states that this switcher contains
-//------------------------------------------------------------------
uint32_t TerminalStateSwitcher::GetNumberOfStates() const {
return llvm::array_lengthof(m_ttystates);
}
-//------------------------------------------------------------------
// Restore the state at index "idx".
//
// Returns true if the restore was successful, false otherwise.
-//------------------------------------------------------------------
bool TerminalStateSwitcher::Restore(uint32_t idx) const {
const uint32_t num_states = GetNumberOfStates();
if (idx >= num_states)
@@ -247,12 +223,10 @@ bool TerminalStateSwitcher::Restore(uint
return false;
}
-//------------------------------------------------------------------
// Save the state at index "idx" for file descriptor "fd" and save the process
// group if requested.
//
// Returns true if the restore was successful, false otherwise.
-//------------------------------------------------------------------
bool TerminalStateSwitcher::Save(uint32_t idx, int fd,
bool save_process_group) {
const uint32_t num_states = GetNumberOfStates();
Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCBundle.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCBundle.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCBundle.cpp (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCBundle.cpp Wed Apr 10 13:48:55 2019
@@ -9,9 +9,7 @@
#include "CFCBundle.h"
#include "CFCString.h"
-//----------------------------------------------------------------------
// CFCBundle constructor
-//----------------------------------------------------------------------
CFCBundle::CFCBundle(const char *path) : CFCReleaser<CFBundleRef>() {
if (path && path[0])
SetPath(path);
@@ -20,14 +18,10 @@ CFCBundle::CFCBundle(const char *path) :
CFCBundle::CFCBundle(CFURLRef url)
: CFCReleaser<CFBundleRef>(url ? CFBundleCreate(NULL, url) : NULL) {}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
CFCBundle::~CFCBundle() {}
-//----------------------------------------------------------------------
// Set the path for a bundle by supplying a
-//----------------------------------------------------------------------
bool CFCBundle::SetPath(const char *path) {
CFAllocatorRef alloc = kCFAllocatorDefault;
// Release our old bundle and URL
Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCBundle.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCBundle.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCBundle.h (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCBundle.h Wed Apr 10 13:48:55 2019
@@ -13,9 +13,7 @@
class CFCBundle : public CFCReleaser<CFBundleRef> {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CFCBundle(const char *path = NULL);
CFCBundle(CFURLRef url);
Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCData.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCData.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCData.cpp (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCData.cpp Wed Apr 10 13:48:55 2019
@@ -8,19 +8,13 @@
#include "CFCData.h"
-//----------------------------------------------------------------------
// CFCData constructor
-//----------------------------------------------------------------------
CFCData::CFCData(CFDataRef data) : CFCReleaser<CFDataRef>(data) {}
-//----------------------------------------------------------------------
// CFCData copy constructor
-//----------------------------------------------------------------------
CFCData::CFCData(const CFCData &rhs) : CFCReleaser<CFDataRef>(rhs) {}
-//----------------------------------------------------------------------
// CFCData copy constructor
-//----------------------------------------------------------------------
CFCData &CFCData::operator=(const CFCData &rhs)
{
@@ -29,9 +23,7 @@ CFCData &CFCData::operator=(const CFCDat
return *this;
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
CFCData::~CFCData() {}
CFIndex CFCData::GetLength() const {
Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCData.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCData.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCData.h (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCData.h Wed Apr 10 13:48:55 2019
@@ -13,9 +13,7 @@
class CFCData : public CFCReleaser<CFDataRef> {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CFCData(CFDataRef data = NULL);
CFCData(const CFCData &rhs);
CFCData &operator=(const CFCData &rhs);
@@ -26,9 +24,7 @@ public:
CFIndex GetLength() const;
protected:
- //------------------------------------------------------------------
// Classes that inherit from CFCData can see and modify these
- //------------------------------------------------------------------
};
#endif // #ifndef CoreFoundationCPP_CFData_h_
Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCMutableArray.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCMutableArray.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCMutableArray.cpp (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCMutableArray.cpp Wed Apr 10 13:48:55 2019
@@ -9,24 +9,18 @@
#include "CFCMutableArray.h"
#include "CFCString.h"
-//----------------------------------------------------------------------
// CFCString constructor
-//----------------------------------------------------------------------
CFCMutableArray::CFCMutableArray(CFMutableArrayRef s)
: CFCReleaser<CFMutableArrayRef>(s) {}
-//----------------------------------------------------------------------
// CFCMutableArray copy constructor
-//----------------------------------------------------------------------
CFCMutableArray::CFCMutableArray(const CFCMutableArray &rhs)
: CFCReleaser<CFMutableArrayRef>(rhs) // NOTE: this won't make a copy of the
// array, just add a new reference to
// it
{}
-//----------------------------------------------------------------------
// CFCMutableArray copy constructor
-//----------------------------------------------------------------------
CFCMutableArray &CFCMutableArray::operator=(const CFCMutableArray &rhs) {
if (this != &rhs)
*this = rhs; // NOTE: this operator won't make a copy of the array, just add
@@ -34,9 +28,7 @@ CFCMutableArray &CFCMutableArray::operat
return *this;
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
CFCMutableArray::~CFCMutableArray() {}
CFIndex CFCMutableArray::GetCount() const {
Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCMutableArray.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCMutableArray.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCMutableArray.h (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCMutableArray.h Wed Apr 10 13:48:55 2019
@@ -13,9 +13,7 @@
class CFCMutableArray : public CFCReleaser<CFMutableArrayRef> {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CFCMutableArray(CFMutableArrayRef array = NULL);
CFCMutableArray(const CFCMutableArray &rhs); // This will copy the array
// contents into a new array
Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp Wed Apr 10 13:48:55 2019
@@ -8,21 +8,15 @@
#include "CFCMutableDictionary.h"
#include "CFCString.h"
-//----------------------------------------------------------------------
// CFCString constructor
-//----------------------------------------------------------------------
CFCMutableDictionary::CFCMutableDictionary(CFMutableDictionaryRef s)
: CFCReleaser<CFMutableDictionaryRef>(s) {}
-//----------------------------------------------------------------------
// CFCMutableDictionary copy constructor
-//----------------------------------------------------------------------
CFCMutableDictionary::CFCMutableDictionary(const CFCMutableDictionary &rhs)
: CFCReleaser<CFMutableDictionaryRef>(rhs) {}
-//----------------------------------------------------------------------
// CFCMutableDictionary copy constructor
-//----------------------------------------------------------------------
const CFCMutableDictionary &CFCMutableDictionary::
operator=(const CFCMutableDictionary &rhs) {
if (this != &rhs)
@@ -30,9 +24,7 @@ operator=(const CFCMutableDictionary &rh
return *this;
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
CFCMutableDictionary::~CFCMutableDictionary() {}
CFIndex CFCMutableDictionary::GetCount() const {
Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCMutableDictionary.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCMutableDictionary.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCMutableDictionary.h (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCMutableDictionary.h Wed Apr 10 13:48:55 2019
@@ -13,16 +13,12 @@
class CFCMutableDictionary : public CFCReleaser<CFMutableDictionaryRef> {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CFCMutableDictionary(CFMutableDictionaryRef s = NULL);
CFCMutableDictionary(const CFCMutableDictionary &rhs);
virtual ~CFCMutableDictionary();
- //------------------------------------------------------------------
// Operators
- //------------------------------------------------------------------
const CFCMutableDictionary &operator=(const CFCMutableDictionary &rhs);
CFIndex GetCount() const;
@@ -61,14 +57,10 @@ public:
CFMutableDictionaryRef Dictionary(bool can_create);
protected:
- //------------------------------------------------------------------
// Classes that inherit from CFCMutableDictionary can see and modify these
- //------------------------------------------------------------------
private:
- //------------------------------------------------------------------
// For CFCMutableDictionary only
- //------------------------------------------------------------------
};
#endif // CoreFoundationCPP_CFMutableDictionary_h_
Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCMutableSet.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCMutableSet.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCMutableSet.cpp (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCMutableSet.cpp Wed Apr 10 13:48:55 2019
@@ -9,30 +9,22 @@
#include "CFCMutableSet.h"
-//----------------------------------------------------------------------
// CFCString constructor
-//----------------------------------------------------------------------
CFCMutableSet::CFCMutableSet(CFMutableSetRef s)
: CFCReleaser<CFMutableSetRef>(s) {}
-//----------------------------------------------------------------------
// CFCMutableSet copy constructor
-//----------------------------------------------------------------------
CFCMutableSet::CFCMutableSet(const CFCMutableSet &rhs)
: CFCReleaser<CFMutableSetRef>(rhs) {}
-//----------------------------------------------------------------------
// CFCMutableSet copy constructor
-//----------------------------------------------------------------------
const CFCMutableSet &CFCMutableSet::operator=(const CFCMutableSet &rhs) {
if (this != &rhs)
*this = rhs;
return *this;
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
CFCMutableSet::~CFCMutableSet() {}
CFIndex CFCMutableSet::GetCount() const {
Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCMutableSet.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCMutableSet.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCMutableSet.h (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCMutableSet.h Wed Apr 10 13:48:55 2019
@@ -13,16 +13,12 @@
class CFCMutableSet : public CFCReleaser<CFMutableSetRef> {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CFCMutableSet(CFMutableSetRef s = NULL);
CFCMutableSet(const CFCMutableSet &rhs);
virtual ~CFCMutableSet();
- //------------------------------------------------------------------
// Operators
- //------------------------------------------------------------------
const CFCMutableSet &operator=(const CFCMutableSet &rhs);
CFIndex GetCount() const;
@@ -33,14 +29,10 @@ public:
void RemoveAllValues();
protected:
- //------------------------------------------------------------------
// Classes that inherit from CFCMutableSet can see and modify these
- //------------------------------------------------------------------
private:
- //------------------------------------------------------------------
// For CFCMutableSet only
- //------------------------------------------------------------------
};
#endif // CoreFoundationCPP_CFMutableSet_h_
Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCReleaser.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCReleaser.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCReleaser.h (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCReleaser.h Wed Apr 10 13:48:55 2019
@@ -15,7 +15,6 @@
#include <assert.h>
-//----------------------------------------------------------------------
// Templatized CF helper class that can own any CF pointer and will
// call CFRelease() on any valid pointer it owns unless that pointer is
// explicitly released using the release() member function. This class
@@ -24,42 +23,33 @@
// CFCReleaser<T>::release() function won't actually CFRelease any owned
// pointer, it is designed to relinquish ownership of the pointer just
// like std:auto_ptr<T>::release() does.
-//----------------------------------------------------------------------
template <class T> class CFCReleaser {
public:
- //----------------------------------------------------------
// Constructor that takes a pointer to a CF object that is
// to be released when this object goes out of scope
- //----------------------------------------------------------
CFCReleaser(T ptr = NULL) : _ptr(ptr) {}
- //----------------------------------------------------------
// Copy constructor
//
// Note that copying a CFCReleaser will not transfer
// ownership of the contained pointer, but it will bump its
// reference count. This is where this class differs from
// std::auto_ptr.
- //----------------------------------------------------------
CFCReleaser(const CFCReleaser &rhs) : _ptr(rhs.get()) {
if (get())
::CFRetain(get());
}
- //----------------------------------------------------------
// The destructor will release the pointer that it contains
// if it has a valid pointer.
- //----------------------------------------------------------
virtual ~CFCReleaser() { reset(); }
- //----------------------------------------------------------
// Assignment operator.
//
// Note that assigning one CFCReleaser to another will
// not transfer ownership of the contained pointer, but it
// will bump its reference count. This is where this class
// differs from std::auto_ptr.
- //----------------------------------------------------------
CFCReleaser &operator=(const CFCReleaser<T> &rhs) {
if (this != &rhs) {
// Replace our owned pointer with the new one
@@ -71,7 +61,6 @@ public:
return *this;
}
- //----------------------------------------------------------
// Get the address of the contained type in case it needs
// to be passed to a function that will fill in a pointer
// value. The function currently will assert if _ptr is not
@@ -83,36 +72,29 @@ public:
// sure any owned objects has CFRelease called on it.
// I had to add the "enforce_null" bool here because some
// API's require the pointer address even though they don't change it.
- //----------------------------------------------------------
T *ptr_address(bool enforce_null = true) {
if (enforce_null)
assert(_ptr == NULL);
return &_ptr;
}
- //----------------------------------------------------------
// Access the pointer itself
- //----------------------------------------------------------
T get() { return _ptr; }
const T get() const { return _ptr; }
- //----------------------------------------------------------
// Set a new value for the pointer and CFRelease our old
// value if we had a valid one.
- //----------------------------------------------------------
void reset(T ptr = NULL) {
if ((_ptr != NULL) && (ptr != _ptr))
::CFRelease(_ptr);
_ptr = ptr;
}
- //----------------------------------------------------------
// Release ownership without calling CFRelease. This class
// is designed to mimic std::auto_ptr<T>, so the release
// method releases ownership of the contained pointer
// and does NOT call CFRelease.
- //----------------------------------------------------------
T release() {
T tmp = _ptr;
_ptr = NULL;
Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCString.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCString.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCString.cpp (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCString.cpp Wed Apr 10 13:48:55 2019
@@ -10,19 +10,13 @@
#include <glob.h>
#include <string>
-//----------------------------------------------------------------------
// CFCString constructor
-//----------------------------------------------------------------------
CFCString::CFCString(CFStringRef s) : CFCReleaser<CFStringRef>(s) {}
-//----------------------------------------------------------------------
// CFCString copy constructor
-//----------------------------------------------------------------------
CFCString::CFCString(const CFCString &rhs) : CFCReleaser<CFStringRef>(rhs) {}
-//----------------------------------------------------------------------
// CFCString copy constructor
-//----------------------------------------------------------------------
CFCString &CFCString::operator=(const CFCString &rhs) {
if (this != &rhs)
*this = rhs;
@@ -37,9 +31,7 @@ CFCString::CFCString(const char *cstr, C
}
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
CFCString::~CFCString() {}
const char *CFCString::GetFileSystemRepresentation(std::string &s) {
Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCString.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCString.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCString.h (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCString.h Wed Apr 10 13:48:55 2019
@@ -15,9 +15,7 @@
class CFCString : public CFCReleaser<CFStringRef> {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CFCString(CFStringRef cf_str = NULL);
CFCString(const char *s, CFStringEncoding encoding = kCFStringEncodingUTF8);
CFCString(const CFCString &rhs);
Modified: lldb/trunk/source/Host/macosx/cfcpp/CoreFoundationCPP.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CoreFoundationCPP.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CoreFoundationCPP.h (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CoreFoundationCPP.h Wed Apr 10 13:48:55 2019
@@ -5,7 +5,6 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-//----------------------------------------------------------------------
//
// CoreFoundationCPP.h
// CoreFoundationCPP
@@ -13,7 +12,6 @@
// Created by Greg Clayton on 4/23/09.
//
//
-//----------------------------------------------------------------------
#ifndef CoreFoundationCPP_CoreFoundationCPP_H_
#define CoreFoundationCPP_CoreFoundationCPP_H_
Modified: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Initialization/SystemInitializerCommon.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp (original)
+++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp Wed Apr 10 13:48:55 2019
@@ -108,9 +108,7 @@ llvm::Error SystemInitializerCommon::Ini
EmulateInstructionMIPS::Initialize();
EmulateInstructionMIPS64::Initialize();
- //----------------------------------------------------------------------
// Apple/Darwin hosted plugins
- //----------------------------------------------------------------------
ObjectContainerUniversalMachO::Initialize();
#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
Modified: lldb/trunk/source/Interpreter/CommandObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObject.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObject.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObject.cpp Wed Apr 10 13:48:55 2019
@@ -35,9 +35,7 @@
using namespace lldb;
using namespace lldb_private;
-//-------------------------------------------------------------------------
// CommandObject
-//-------------------------------------------------------------------------
CommandObject::CommandObject(CommandInterpreter &interpreter, llvm::StringRef name,
llvm::StringRef help, llvm::StringRef syntax, uint32_t flags)
Modified: lldb/trunk/source/Interpreter/CommandObjectRegexCommand.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObjectRegexCommand.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObjectRegexCommand.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObjectRegexCommand.cpp Wed Apr 10 13:48:55 2019
@@ -14,9 +14,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// CommandObjectRegexCommand constructor
-//----------------------------------------------------------------------
CommandObjectRegexCommand::CommandObjectRegexCommand(
CommandInterpreter &interpreter, llvm::StringRef name, llvm::StringRef help,
llvm::StringRef syntax, uint32_t max_matches, uint32_t completion_type_mask,
@@ -25,9 +23,7 @@ CommandObjectRegexCommand::CommandObject
m_max_matches(max_matches), m_completion_type_mask(completion_type_mask),
m_entries(), m_is_removable(is_removable) {}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
CommandObjectRegexCommand::~CommandObjectRegexCommand() {}
bool CommandObjectRegexCommand::DoExecute(llvm::StringRef command,
Modified: lldb/trunk/source/Interpreter/CommandObjectScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObjectScript.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObjectScript.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObjectScript.cpp Wed Apr 10 13:48:55 2019
@@ -21,9 +21,7 @@
using namespace lldb;
using namespace lldb_private;
-//-------------------------------------------------------------------------
// CommandObjectScript
-//-------------------------------------------------------------------------
CommandObjectScript::CommandObjectScript(CommandInterpreter &interpreter,
ScriptLanguage script_lang)
Modified: lldb/trunk/source/Interpreter/CommandObjectScript.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObjectScript.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObjectScript.h (original)
+++ lldb/trunk/source/Interpreter/CommandObjectScript.h Wed Apr 10 13:48:55 2019
@@ -13,9 +13,7 @@
namespace lldb_private {
-//-------------------------------------------------------------------------
// CommandObjectScript
-//-------------------------------------------------------------------------
class CommandObjectScript : public CommandObjectRaw {
public:
Modified: lldb/trunk/source/Interpreter/OptionValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValue.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionValue.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionValue.cpp Wed Apr 10 13:48:55 2019
@@ -14,10 +14,8 @@
using namespace lldb;
using namespace lldb_private;
-//-------------------------------------------------------------------------
// Get this value as a uint64_t value if it is encoded as a boolean, uint64_t
// or int64_t. Other types will cause "fail_value" to be returned
-//-------------------------------------------------------------------------
uint64_t OptionValue::GetUInt64Value(uint64_t fail_value, bool *success_ptr) {
if (success_ptr)
*success_ptr = true;
Modified: lldb/trunk/source/Interpreter/Options.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Options.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/Options.cpp (original)
+++ lldb/trunk/source/Interpreter/Options.cpp Wed Apr 10 13:48:55 2019
@@ -24,9 +24,7 @@
using namespace lldb;
using namespace lldb_private;
-//-------------------------------------------------------------------------
// Options
-//-------------------------------------------------------------------------
Options::Options() : m_getopt_table() { BuildValidOptionSets(); }
Options::~Options() {}
Modified: lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp Wed Apr 10 13:48:55 2019
@@ -1316,9 +1316,7 @@ ABIMacOSX_arm::GetRegisterInfoArray(uint
size_t ABIMacOSX_arm::GetRedZoneSize() const { return 0; }
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
ABISP
ABIMacOSX_arm::CreateInstance(ProcessSP process_sp, const ArchSpec &arch) {
@@ -2045,9 +2043,7 @@ lldb_private::ConstString ABIMacOSX_arm:
return g_name;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ABIMacOSX_arm::GetPluginName() {
return GetPluginNameStatic();
Modified: lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h (original)
+++ lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h Wed Apr 10 13:48:55 2019
@@ -63,9 +63,7 @@ public:
bool IsArmv7kProcess() const;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
@@ -75,9 +73,7 @@ public:
static lldb_private::ConstString GetPluginNameStatic();
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
Modified: lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp Wed Apr 10 13:48:55 2019
@@ -1657,9 +1657,7 @@ ABIMacOSX_arm64::GetRegisterInfoArray(ui
size_t ABIMacOSX_arm64::GetRedZoneSize() const { return 128; }
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
ABISP
ABIMacOSX_arm64::CreateInstance(ProcessSP process_sp, const ArchSpec &arch) {
@@ -2439,9 +2437,7 @@ void ABIMacOSX_arm64::Terminate() {
PluginManager::UnregisterPlugin(CreateInstance);
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
ConstString ABIMacOSX_arm64::GetPluginNameStatic() {
static ConstString g_plugin_name("ABIMacOSX_arm64");
Modified: lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h (original)
+++ lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h Wed Apr 10 13:48:55 2019
@@ -65,9 +65,7 @@ public:
const lldb_private::RegisterInfo *
GetRegisterInfoArray(uint32_t &count) override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
@@ -75,9 +73,7 @@ public:
static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
static lldb_private::ConstString GetPluginNameStatic();
Modified: lldb/trunk/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp Wed Apr 10 13:48:55 2019
@@ -703,9 +703,7 @@ ABIMacOSX_i386::GetRegisterInfoArray(uin
size_t ABIMacOSX_i386::GetRedZoneSize() const { return 0; }
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
ABISP
ABIMacOSX_i386::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
@@ -1123,9 +1121,7 @@ lldb_private::ConstString ABIMacOSX_i386
return g_short_name;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ABIMacOSX_i386::GetPluginName() {
return GetPluginNameStatic();
Modified: lldb/trunk/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h (original)
+++ lldb/trunk/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h Wed Apr 10 13:48:55 2019
@@ -68,9 +68,7 @@ public:
const lldb_private::RegisterInfo *
GetRegisterInfoArray(uint32_t &count) override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
@@ -78,9 +76,7 @@ public:
static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
static lldb_private::ConstString GetPluginNameStatic();
Modified: lldb/trunk/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp Wed Apr 10 13:48:55 2019
@@ -1317,9 +1317,7 @@ ABISysV_arm::GetRegisterInfoArray(uint32
size_t ABISysV_arm::GetRedZoneSize() const { return 0; }
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
ABISP
ABISysV_arm::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
@@ -2149,9 +2147,7 @@ lldb_private::ConstString ABISysV_arm::G
return g_name;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ABISysV_arm::GetPluginName() {
return GetPluginNameStatic();
Modified: lldb/trunk/source/Plugins/ABI/SysV-arm/ABISysV_arm.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-arm/ABISysV_arm.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-arm/ABISysV_arm.h (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-arm/ABISysV_arm.h Wed Apr 10 13:48:55 2019
@@ -63,9 +63,7 @@ public:
bool IsArmHardFloat(lldb_private::Thread &thread) const;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
@@ -75,9 +73,7 @@ public:
static lldb_private::ConstString GetPluginNameStatic();
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
Modified: lldb/trunk/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp Wed Apr 10 13:48:55 2019
@@ -1660,9 +1660,7 @@ bool ABISysV_arm64::GetPointerReturnRegi
size_t ABISysV_arm64::GetRedZoneSize() const { return 128; }
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
ABISP
ABISysV_arm64::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
@@ -2412,9 +2410,7 @@ lldb_private::ConstString ABISysV_arm64:
return g_name;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
ConstString ABISysV_arm64::GetPluginName() { return GetPluginNameStatic(); }
Modified: lldb/trunk/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h Wed Apr 10 13:48:55 2019
@@ -70,9 +70,7 @@ public:
bool GetPointerReturnRegister(const char *&name) override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
@@ -82,9 +80,7 @@ public:
static lldb_private::ConstString GetPluginNameStatic();
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
Modified: lldb/trunk/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp Wed Apr 10 13:48:55 2019
@@ -1009,9 +1009,7 @@ ABISysV_hexagon::GetRegisterInfoArray(ui
*/
size_t ABISysV_hexagon::GetRedZoneSize() const { return 0; }
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
ABISP
ABISysV_hexagon::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
@@ -1294,9 +1292,7 @@ lldb_private::ConstString ABISysV_hexago
return g_name;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ABISysV_hexagon::GetPluginName() {
return GetPluginNameStatic();
Modified: lldb/trunk/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h Wed Apr 10 13:48:55 2019
@@ -71,9 +71,7 @@ public:
const lldb_private::RegisterInfo *
GetRegisterInfoArray(uint32_t &count) override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
@@ -83,9 +81,7 @@ public:
static lldb_private::ConstString GetPluginNameStatic();
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
Modified: lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp Wed Apr 10 13:48:55 2019
@@ -192,9 +192,7 @@ ABISysV_i386::GetRegisterInfoArray(uint3
return g_register_infos;
}
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
ABISP
ABISysV_i386::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
@@ -839,9 +837,7 @@ void ABISysV_i386::Terminate() {
PluginManager::UnregisterPlugin(CreateInstance);
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ABISysV_i386::GetPluginNameStatic() {
static ConstString g_name("sysv-i386");
Modified: lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.h (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.h Wed Apr 10 13:48:55 2019
@@ -76,9 +76,7 @@ public:
const lldb_private::RegisterInfo *
GetRegisterInfoArray(uint32_t &count) override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
@@ -86,9 +84,7 @@ public:
static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
static lldb_private::ConstString GetPluginNameStatic();
Modified: lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp Wed Apr 10 13:48:55 2019
@@ -549,9 +549,7 @@ ABISysV_mips::GetRegisterInfoArray(uint3
size_t ABISysV_mips::GetRedZoneSize() const { return 0; }
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
ABISP
ABISysV_mips::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
@@ -1062,9 +1060,7 @@ lldb_private::ConstString ABISysV_mips::
return g_name;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ABISysV_mips::GetPluginName() {
return GetPluginNameStatic();
Modified: lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.h (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.h Wed Apr 10 13:48:55 2019
@@ -61,9 +61,7 @@ public:
const lldb_private::RegisterInfo *
GetRegisterInfoArray(uint32_t &count) override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
@@ -73,9 +71,7 @@ public:
static lldb_private::ConstString GetPluginNameStatic();
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
Modified: lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp Wed Apr 10 13:48:55 2019
@@ -549,9 +549,7 @@ ABISysV_mips64::GetRegisterInfoArray(uin
size_t ABISysV_mips64::GetRedZoneSize() const { return 0; }
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
ABISP
ABISysV_mips64::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
@@ -1213,9 +1211,7 @@ lldb_private::ConstString ABISysV_mips64
return g_name;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ABISysV_mips64::GetPluginName() {
return GetPluginNameStatic();
Modified: lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h Wed Apr 10 13:48:55 2019
@@ -74,9 +74,7 @@ public:
const lldb_private::RegisterInfo *
GetRegisterInfoArray(uint32_t &count) override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
@@ -86,9 +84,7 @@ public:
static lldb_private::ConstString GetPluginNameStatic();
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
Modified: lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp Wed Apr 10 13:48:55 2019
@@ -213,9 +213,7 @@ ABISysV_ppc::GetRegisterInfoArray(uint32
size_t ABISysV_ppc::GetRedZoneSize() const { return 224; }
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
ABISP
ABISysV_ppc::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
@@ -975,9 +973,7 @@ lldb_private::ConstString ABISysV_ppc::G
return g_name;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ABISysV_ppc::GetPluginName() {
return GetPluginNameStatic();
Modified: lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h Wed Apr 10 13:48:55 2019
@@ -70,9 +70,7 @@ public:
const lldb_private::RegisterInfo *
GetRegisterInfoArray(uint32_t &count) override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
@@ -82,9 +80,7 @@ public:
static lldb_private::ConstString GetPluginNameStatic();
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
Modified: lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp Wed Apr 10 13:48:55 2019
@@ -64,9 +64,7 @@ lldb::ByteOrder ABISysV_ppc64::GetByteOr
return GetProcessSP()->GetByteOrder();
}
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
ABISP
ABISysV_ppc64::CreateInstance(lldb::ProcessSP process_sp,
@@ -1086,9 +1084,7 @@ lldb_private::ConstString ABISysV_ppc64:
return g_name;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ABISysV_ppc64::GetPluginName() {
return GetPluginNameStatic();
Modified: lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h Wed Apr 10 13:48:55 2019
@@ -70,9 +70,7 @@ public:
const lldb_private::RegisterInfo *
GetRegisterInfoArray(uint32_t &count) override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
@@ -82,9 +80,7 @@ public:
static lldb_private::ConstString GetPluginNameStatic();
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
Modified: lldb/trunk/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp Wed Apr 10 13:48:55 2019
@@ -195,9 +195,7 @@ ABISysV_s390x::GetRegisterInfoArray(uint
size_t ABISysV_s390x::GetRedZoneSize() const { return 0; }
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
ABISP
ABISysV_s390x::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
@@ -742,9 +740,7 @@ lldb_private::ConstString ABISysV_s390x:
return g_name;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ABISysV_s390x::GetPluginName() {
return GetPluginNameStatic();
Modified: lldb/trunk/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h Wed Apr 10 13:48:55 2019
@@ -62,9 +62,7 @@ public:
const lldb_private::RegisterInfo *
GetRegisterInfoArray(uint32_t &count) override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
@@ -74,9 +72,7 @@ public:
static lldb_private::ConstString GetPluginNameStatic();
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
Modified: lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp Wed Apr 10 13:48:55 2019
@@ -1084,9 +1084,7 @@ bool ABISysV_x86_64::GetPointerReturnReg
size_t ABISysV_x86_64::GetRedZoneSize() const { return 128; }
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
ABISP
ABISysV_x86_64::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
@@ -1897,9 +1895,7 @@ lldb_private::ConstString ABISysV_x86_64
return g_name;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ABISysV_x86_64::GetPluginName() {
return GetPluginNameStatic();
Modified: lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h Wed Apr 10 13:48:55 2019
@@ -72,9 +72,7 @@ public:
bool GetPointerReturnRegister(const char *&name) override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
@@ -84,9 +82,7 @@ public:
static lldb_private::ConstString GetPluginNameStatic();
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
Modified: lldb/trunk/source/Plugins/Architecture/PPC64/ArchitecturePPC64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Architecture/PPC64/ArchitecturePPC64.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Architecture/PPC64/ArchitecturePPC64.h (original)
+++ lldb/trunk/source/Plugins/Architecture/PPC64/ArchitecturePPC64.h Wed Apr 10 13:48:55 2019
@@ -24,10 +24,8 @@ public:
void OverrideStopInfo(Thread &thread) const override {}
- //------------------------------------------------------------------
/// This method compares current address with current function's
/// local entry point, returning the bytes to skip if they match.
- //------------------------------------------------------------------
size_t GetBytesToSkip(Symbol &func, const Address &curr_addr) const override;
void AdjustBreakpointAddress(const Symbol &func,
Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp (original)
+++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Wed Apr 10 13:48:55 2019
@@ -1433,9 +1433,7 @@ const char *DisassemblerLLVMC::SymbolLoo
return NULL;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
ConstString DisassemblerLLVMC::GetPluginName() { return GetPluginNameStatic(); }
uint32_t DisassemblerLLVMC::GetPluginVersion() { return 1; }
Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h (original)
+++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h Wed Apr 10 13:48:55 2019
@@ -26,9 +26,7 @@ public:
~DisassemblerLLVMC() override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -43,9 +41,7 @@ public:
lldb::offset_t data_offset, size_t num_instructions,
bool append, bool data_from_file) override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Modified: lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp Wed Apr 10 13:48:55 2019
@@ -119,11 +119,9 @@ static const DynamicLoaderDarwinKernelPr
return g_settings_sp;
}
-//----------------------------------------------------------------------
// Create an instance of this class. This function is filled into the plugin
// info class that gets handed out by the plugin factory and allows the lldb to
// instantiate an instance of this class.
-//----------------------------------------------------------------------
DynamicLoader *DynamicLoaderDarwinKernel::CreateInstance(Process *process,
bool force) {
if (!force) {
@@ -194,11 +192,9 @@ DynamicLoaderDarwinKernel::SearchForDarw
return kernel_load_address;
}
-//----------------------------------------------------------------------
// Check if the kernel binary is loaded in memory without a slide. First verify
// that the ExecutableModule is a kernel before we proceed. Returns the address
// of the kernel if one was found, else LLDB_INVALID_ADDRESS.
-//----------------------------------------------------------------------
lldb::addr_t
DynamicLoaderDarwinKernel::SearchForKernelAtSameLoadAddr(Process *process) {
Module *exe_module = process->GetTarget().GetExecutableModulePointer();
@@ -224,11 +220,9 @@ DynamicLoaderDarwinKernel::SearchForKern
return LLDB_INVALID_ADDRESS;
}
-//----------------------------------------------------------------------
// If the debug flag is included in the boot-args nvram setting, the kernel's
// load address will be noted in the lowglo page at a fixed address Returns the
// address of the kernel if one was found, else LLDB_INVALID_ADDRESS.
-//----------------------------------------------------------------------
lldb::addr_t
DynamicLoaderDarwinKernel::SearchForKernelWithDebugHints(Process *process) {
if (GetGlobalProperties()->GetScanType() == eKASLRScanNone)
@@ -275,13 +269,11 @@ DynamicLoaderDarwinKernel::SearchForKern
return LLDB_INVALID_ADDRESS;
}
-//----------------------------------------------------------------------
// If the kernel is currently executing when lldb attaches, and we don't have a
// better way of finding the kernel's load address, try searching backwards
// from the current pc value looking for the kernel's Mach header in memory.
// Returns the address of the kernel if one was found, else
// LLDB_INVALID_ADDRESS.
-//----------------------------------------------------------------------
lldb::addr_t
DynamicLoaderDarwinKernel::SearchForKernelNearPC(Process *process) {
if (GetGlobalProperties()->GetScanType() == eKASLRScanNone ||
@@ -336,12 +328,10 @@ DynamicLoaderDarwinKernel::SearchForKern
return LLDB_INVALID_ADDRESS;
}
-//----------------------------------------------------------------------
// Scan through the valid address range for a kernel binary. This is uselessly
// slow in 64-bit environments so we don't even try it. This scan is not
// enabled by default even for 32-bit targets. Returns the address of the
// kernel if one was found, else LLDB_INVALID_ADDRESS.
-//----------------------------------------------------------------------
lldb::addr_t DynamicLoaderDarwinKernel::SearchForKernelViaExhaustiveSearch(
Process *process) {
if (GetGlobalProperties()->GetScanType() != eKASLRScanExhaustiveScan) {
@@ -381,12 +371,10 @@ lldb::addr_t DynamicLoaderDarwinKernel::
return LLDB_INVALID_ADDRESS;
}
-//----------------------------------------------------------------------
// Read the mach_header struct out of memory and return it.
// Returns true if the mach_header was successfully read,
// Returns false if there was a problem reading the header, or it was not
// a Mach-O header.
-//----------------------------------------------------------------------
bool
DynamicLoaderDarwinKernel::ReadMachHeader(addr_t addr, Process *process, llvm::MachO::mach_header &header,
@@ -427,12 +415,10 @@ DynamicLoaderDarwinKernel::ReadMachHeade
return true;
}
-//----------------------------------------------------------------------
// Given an address in memory, look to see if there is a kernel image at that
// address.
// Returns a UUID; if a kernel was not found at that address, UUID.IsValid()
// will be false.
-//----------------------------------------------------------------------
lldb_private::UUID
DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress(lldb::addr_t addr,
Process *process,
@@ -504,9 +490,7 @@ DynamicLoaderDarwinKernel::CheckForKerne
return UUID();
}
-//----------------------------------------------------------------------
// Constructor
-//----------------------------------------------------------------------
DynamicLoaderDarwinKernel::DynamicLoaderDarwinKernel(Process *process,
lldb::addr_t kernel_addr)
: DynamicLoader(process), m_kernel_load_address(kernel_addr), m_kernel(),
@@ -524,40 +508,32 @@ DynamicLoaderDarwinKernel::DynamicLoader
}
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
DynamicLoaderDarwinKernel::~DynamicLoaderDarwinKernel() { Clear(true); }
void DynamicLoaderDarwinKernel::UpdateIfNeeded() {
LoadKernelModuleIfNeeded();
SetNotificationBreakpointIfNeeded();
}
-//------------------------------------------------------------------
/// Called after attaching a process.
///
/// Allow DynamicLoader plug-ins to execute some code after
/// attaching to a process.
-//------------------------------------------------------------------
void DynamicLoaderDarwinKernel::DidAttach() {
PrivateInitialize(m_process);
UpdateIfNeeded();
}
-//------------------------------------------------------------------
/// Called after attaching a process.
///
/// Allow DynamicLoader plug-ins to execute some code after
/// attaching to a process.
-//------------------------------------------------------------------
void DynamicLoaderDarwinKernel::DidLaunch() {
PrivateInitialize(m_process);
UpdateIfNeeded();
}
-//----------------------------------------------------------------------
// Clear out the state of this class.
-//----------------------------------------------------------------------
void DynamicLoaderDarwinKernel::Clear(bool clear_process) {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
@@ -985,11 +961,9 @@ DynamicLoaderDarwinKernel::KextImageInfo
return lldb_private::ArchSpec();
}
-//----------------------------------------------------------------------
// Load the kernel module and initialize the "m_kernel" member. Return true
// _only_ if the kernel is loaded the first time through (subsequent calls to
// this function should return false after the kernel has been already loaded).
-//----------------------------------------------------------------------
void DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded() {
if (!m_kext_summary_header_ptr_addr.IsValid()) {
m_kernel.Clear();
@@ -1064,12 +1038,10 @@ void DynamicLoaderDarwinKernel::LoadKern
}
}
-//----------------------------------------------------------------------
// Static callback function that gets called when our DYLD notification
// breakpoint gets hit. We update all of our image infos and then let our super
// class DynamicLoader class decide if we should stop or not (based on global
// preference).
-//----------------------------------------------------------------------
bool DynamicLoaderDarwinKernel::BreakpointHitCallback(
void *baton, StoppointCallbackContext *context, user_id_t break_id,
user_id_t break_loc_id) {
@@ -1439,9 +1411,7 @@ bool DynamicLoaderDarwinKernel::ReadAllK
return false;
}
-//----------------------------------------------------------------------
// Dump an image info structure to the file handle provided.
-//----------------------------------------------------------------------
void DynamicLoaderDarwinKernel::KextImageInfo::PutToLog(Log *log) const {
if (m_load_address == LLDB_INVALID_ADDRESS) {
LLDB_LOG(log, "uuid={0} name=\"{1}\" (UNLOADED)", m_uuid.GetAsString(),
@@ -1452,10 +1422,8 @@ void DynamicLoaderDarwinKernel::KextImag
}
}
-//----------------------------------------------------------------------
// Dump the _dyld_all_image_infos members and all current image infos that we
// have parsed to the file handle provided.
-//----------------------------------------------------------------------
void DynamicLoaderDarwinKernel::PutToLog(Log *log) const {
if (log == NULL)
return;
@@ -1507,9 +1475,7 @@ void DynamicLoaderDarwinKernel::SetNotif
}
}
-//----------------------------------------------------------------------
// Member function that gets called when the process state changes.
-//----------------------------------------------------------------------
void DynamicLoaderDarwinKernel::PrivateProcessStateChanged(Process *process,
StateType state) {
DEBUG_PRINTF("DynamicLoaderDarwinKernel::%s(%s)\n", __FUNCTION__,
@@ -1586,9 +1552,7 @@ const char *DynamicLoaderDarwinKernel::G
"in the MacOSX kernel.";
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString DynamicLoaderDarwinKernel::GetPluginName() {
return GetPluginNameStatic();
}
Modified: lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h Wed Apr 10 13:48:55 2019
@@ -28,9 +28,7 @@ public:
~DynamicLoaderDarwinKernel() override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -46,12 +44,10 @@ public:
static lldb::addr_t SearchForDarwinKernel(lldb_private::Process *process);
- //------------------------------------------------------------------
/// Called after attaching a process.
///
/// Allow DynamicLoader plug-ins to execute some code after
/// attaching to a process.
- //------------------------------------------------------------------
void DidAttach() override;
void DidLaunch() override;
@@ -61,9 +57,7 @@ public:
lldb_private::Status CanLoadImage() override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Modified: lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.h (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.h Wed Apr 10 13:48:55 2019
@@ -31,9 +31,7 @@ public:
static lldb_private::DynamicLoader *
CreateInstance(lldb_private::Process *process, bool force);
- //------------------------------------------------------------------
// DynamicLoader protocol
- //------------------------------------------------------------------
void DidAttach() override;
@@ -48,9 +46,7 @@ public:
const lldb::ThreadSP thread,
lldb::addr_t tls_file_addr) override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp Wed Apr 10 13:48:55 2019
@@ -51,46 +51,36 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// Constructor
-//----------------------------------------------------------------------
DynamicLoaderDarwin::DynamicLoaderDarwin(Process *process)
: DynamicLoader(process), m_dyld_module_wp(), m_libpthread_module_wp(),
m_pthread_getspecific_addr(), m_tid_to_tls_map(), m_dyld_image_infos(),
m_dyld_image_infos_stop_id(UINT32_MAX), m_dyld(), m_mutex() {}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
DynamicLoaderDarwin::~DynamicLoaderDarwin() {}
-//------------------------------------------------------------------
/// Called after attaching a process.
///
/// Allow DynamicLoader plug-ins to execute some code after
/// attaching to a process.
-//------------------------------------------------------------------
void DynamicLoaderDarwin::DidAttach() {
PrivateInitialize(m_process);
DoInitialImageFetch();
SetNotificationBreakpoint();
}
-//------------------------------------------------------------------
/// Called after attaching a process.
///
/// Allow DynamicLoader plug-ins to execute some code after
/// attaching to a process.
-//------------------------------------------------------------------
void DynamicLoaderDarwin::DidLaunch() {
PrivateInitialize(m_process);
DoInitialImageFetch();
SetNotificationBreakpoint();
}
-//----------------------------------------------------------------------
// Clear out the state of this class.
-//----------------------------------------------------------------------
void DynamicLoaderDarwin::Clear(bool clear_process) {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
if (clear_process)
@@ -220,10 +210,8 @@ void DynamicLoaderDarwin::UnloadAllImage
}
}
-//----------------------------------------------------------------------
// Update the load addresses for all segments in MODULE using the updated INFO
// that is passed in.
-//----------------------------------------------------------------------
bool DynamicLoaderDarwin::UpdateImageLoadAddress(Module *module,
ImageInfo &info) {
bool changed = false;
@@ -300,9 +288,7 @@ bool DynamicLoaderDarwin::UpdateImageLoa
return changed;
}
-//----------------------------------------------------------------------
// Unload the segments in MODULE using the INFO that is passed in.
-//----------------------------------------------------------------------
bool DynamicLoaderDarwin::UnloadModuleSections(Module *module,
ImageInfo &info) {
bool changed = false;
@@ -683,7 +669,6 @@ bool DynamicLoaderDarwin::AddModulesUsin
return true;
}
-//----------------------------------------------------------------------
// On Mac OS X libobjc (the Objective-C runtime) has several critical dispatch
// functions written in hand-written assembly, and also have hand-written
// unwind information in the eh_frame section. Normally we prefer analyzing
@@ -695,7 +680,6 @@ bool DynamicLoaderDarwin::AddModulesUsin
// extensible so they could have an Apple-specific flag) which indicates that
// the instructions are asynchronous -- accurate at every instruction, instead
// of our normal default assumption that they are not.
-//----------------------------------------------------------------------
bool DynamicLoaderDarwin::AlwaysRelyOnEHUnwindInfo(SymbolContext &sym_ctx) {
ModuleSP module_sp;
@@ -713,9 +697,7 @@ bool DynamicLoaderDarwin::AlwaysRelyOnEH
return objc_runtime != NULL && objc_runtime->IsModuleObjCLibrary(module_sp);
}
-//----------------------------------------------------------------------
// Dump a Segment to the file handle provided.
-//----------------------------------------------------------------------
void DynamicLoaderDarwin::Segment::PutToLog(Log *log,
lldb::addr_t slide) const {
if (log) {
@@ -740,9 +722,7 @@ DynamicLoaderDarwin::ImageInfo::FindSegm
return NULL;
}
-//----------------------------------------------------------------------
// Dump an image info structure to the file handle provided.
-//----------------------------------------------------------------------
void DynamicLoaderDarwin::ImageInfo::PutToLog(Log *log) const {
if (!log)
return;
@@ -765,9 +745,7 @@ void DynamicLoaderDarwin::PrivateInitial
m_process->GetTarget().ClearAllLoadedSections();
}
-//----------------------------------------------------------------------
// Member function that gets called when the process state changes.
-//----------------------------------------------------------------------
void DynamicLoaderDarwin::PrivateProcessStateChanged(Process *process,
StateType state) {
DEBUG_PRINTF("DynamicLoaderDarwin::%s(%s)\n", __FUNCTION__,
Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h Wed Apr 10 13:48:55 2019
@@ -30,12 +30,10 @@ public:
virtual ~DynamicLoaderDarwin() override;
- //------------------------------------------------------------------
/// Called after attaching a process.
///
/// Allow DynamicLoader plug-ins to execute some code after
/// attaching to a process.
- //------------------------------------------------------------------
void DidAttach() override;
void DidLaunch() override;
Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp Wed Apr 10 13:48:55 2019
@@ -27,11 +27,9 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// Create an instance of this class. This function is filled into the plugin
// info class that gets handed out by the plugin factory and allows the lldb to
// instantiate an instance of this class.
-//----------------------------------------------------------------------
DynamicLoader *DynamicLoaderMacOS::CreateInstance(Process *process,
bool force) {
bool create = force;
@@ -73,17 +71,13 @@ DynamicLoader *DynamicLoaderMacOS::Creat
return NULL;
}
-//----------------------------------------------------------------------
// Constructor
-//----------------------------------------------------------------------
DynamicLoaderMacOS::DynamicLoaderMacOS(Process *process)
: DynamicLoaderDarwin(process), m_image_infos_stop_id(UINT32_MAX),
m_break_id(LLDB_INVALID_BREAK_ID), m_mutex(),
m_maybe_image_infos_address(LLDB_INVALID_ADDRESS) {}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
DynamicLoaderMacOS::~DynamicLoaderMacOS() {
if (LLDB_BREAK_ID_IS_VALID(m_break_id))
m_process->GetTarget().RemoveBreakpointByID(m_break_id);
@@ -133,9 +127,7 @@ bool DynamicLoaderMacOS::ProcessDidExec(
return did_exec;
}
-//----------------------------------------------------------------------
// Clear out the state of this class.
-//----------------------------------------------------------------------
void DynamicLoaderMacOS::DoClear() {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
@@ -145,9 +137,7 @@ void DynamicLoaderMacOS::DoClear() {
m_break_id = LLDB_INVALID_BREAK_ID;
}
-//----------------------------------------------------------------------
// Check if we have found DYLD yet
-//----------------------------------------------------------------------
bool DynamicLoaderMacOS::DidSetNotificationBreakpoint() {
return LLDB_BREAK_ID_IS_VALID(m_break_id);
}
@@ -159,12 +149,10 @@ void DynamicLoaderMacOS::ClearNotificati
}
}
-//----------------------------------------------------------------------
// Try and figure out where dyld is by first asking the Process if it knows
// (which currently calls down in the lldb::Process to get the DYLD info
// (available on SnowLeopard only). If that fails, then check in the default
// addresses.
-//----------------------------------------------------------------------
void DynamicLoaderMacOS::DoInitialImageFetch() {
Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
@@ -200,12 +188,10 @@ void DynamicLoaderMacOS::DoInitialImageF
bool DynamicLoaderMacOS::NeedToDoInitialImageFetch() { return true; }
-//----------------------------------------------------------------------
// Static callback function that gets called when our DYLD notification
// breakpoint gets hit. We update all of our image infos and then let our super
// class DynamicLoader class decide if we should stop or not (based on global
// preference).
-//----------------------------------------------------------------------
bool DynamicLoaderMacOS::NotifyBreakpointHit(void *baton,
StoppointCallbackContext *context,
lldb::user_id_t break_id,
@@ -347,7 +333,6 @@ void DynamicLoaderMacOS::AddBinaries(
// Dump the _dyld_all_image_infos members and all current image infos that we
// have parsed to the file handle provided.
-//----------------------------------------------------------------------
void DynamicLoaderMacOS::PutToLog(Log *log) const {
if (log == NULL)
return;
@@ -537,9 +522,7 @@ const char *DynamicLoaderMacOS::GetPlugi
"in MacOSX user processes.";
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString DynamicLoaderMacOS::GetPluginName() {
return GetPluginNameStatic();
}
Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h Wed Apr 10 13:48:55 2019
@@ -34,9 +34,7 @@ public:
virtual ~DynamicLoaderMacOS() override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -48,12 +46,10 @@ public:
static lldb_private::DynamicLoader *
CreateInstance(lldb_private::Process *process, bool force);
- //------------------------------------------------------------------
/// Called after attaching a process.
///
/// Allow DynamicLoader plug-ins to execute some code after
/// attaching to a process.
- //------------------------------------------------------------------
bool ProcessDidExec() override;
lldb_private::Status CanLoadImage() override;
@@ -63,9 +59,7 @@ public:
lldb_private::LazyBool &using_shared_cache,
lldb_private::LazyBool &private_shared_cache) override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp Wed Apr 10 13:48:55 2019
@@ -47,11 +47,9 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// Create an instance of this class. This function is filled into the plugin
// info class that gets handed out by the plugin factory and allows the lldb to
// instantiate an instance of this class.
-//----------------------------------------------------------------------
DynamicLoader *DynamicLoaderMacOSXDYLD::CreateInstance(Process *process,
bool force) {
bool create = force;
@@ -93,9 +91,7 @@ DynamicLoader *DynamicLoaderMacOSXDYLD::
return NULL;
}
-//----------------------------------------------------------------------
// Constructor
-//----------------------------------------------------------------------
DynamicLoaderMacOSXDYLD::DynamicLoaderMacOSXDYLD(Process *process)
: DynamicLoaderDarwin(process),
m_dyld_all_image_infos_addr(LLDB_INVALID_ADDRESS),
@@ -103,9 +99,7 @@ DynamicLoaderMacOSXDYLD::DynamicLoaderMa
m_break_id(LLDB_INVALID_BREAK_ID), m_mutex(),
m_process_image_addr_is_all_images_infos(false) {}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
DynamicLoaderMacOSXDYLD::~DynamicLoaderMacOSXDYLD() {
if (LLDB_BREAK_ID_IS_VALID(m_break_id))
m_process->GetTarget().RemoveBreakpointByID(m_break_id);
@@ -158,9 +152,7 @@ bool DynamicLoaderMacOSXDYLD::ProcessDid
return did_exec;
}
-//----------------------------------------------------------------------
// Clear out the state of this class.
-//----------------------------------------------------------------------
void DynamicLoaderMacOSXDYLD::DoClear() {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
@@ -172,9 +164,7 @@ void DynamicLoaderMacOSXDYLD::DoClear()
m_break_id = LLDB_INVALID_BREAK_ID;
}
-//----------------------------------------------------------------------
// Check if we have found DYLD yet
-//----------------------------------------------------------------------
bool DynamicLoaderMacOSXDYLD::DidSetNotificationBreakpoint() {
return LLDB_BREAK_ID_IS_VALID(m_break_id);
}
@@ -185,12 +175,10 @@ void DynamicLoaderMacOSXDYLD::ClearNotif
}
}
-//----------------------------------------------------------------------
// Try and figure out where dyld is by first asking the Process if it knows
// (which currently calls down in the lldb::Process to get the DYLD info
// (available on SnowLeopard only). If that fails, then check in the default
// addresses.
-//----------------------------------------------------------------------
void DynamicLoaderMacOSXDYLD::DoInitialImageFetch() {
if (m_dyld_all_image_infos_addr == LLDB_INVALID_ADDRESS) {
// Check the image info addr as it might point to the mach header for dyld,
@@ -254,9 +242,7 @@ void DynamicLoaderMacOSXDYLD::DoInitialI
return;
}
-//----------------------------------------------------------------------
// Assume that dyld is in memory at ADDR and try to parse it's load commands
-//----------------------------------------------------------------------
bool DynamicLoaderMacOSXDYLD::ReadDYLDInfoFromMemoryAndSetNotificationCallback(
lldb::addr_t addr) {
std::lock_guard<std::recursive_mutex> baseclass_guard(GetMutex());
@@ -312,12 +298,10 @@ bool DynamicLoaderMacOSXDYLD::NeedToDoIn
return m_dyld_all_image_infos_addr == LLDB_INVALID_ADDRESS;
}
-//----------------------------------------------------------------------
// Static callback function that gets called when our DYLD notification
// breakpoint gets hit. We update all of our image infos and then let our super
// class DynamicLoader class decide if we should stop or not (based on global
// preference).
-//----------------------------------------------------------------------
bool DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(
void *baton, StoppointCallbackContext *context, lldb::user_id_t break_id,
lldb::user_id_t break_loc_id) {
@@ -701,12 +685,10 @@ bool DynamicLoaderMacOSXDYLD::ReadImageI
}
}
-//----------------------------------------------------------------------
// If we have found where the "_dyld_all_image_infos" lives in memory, read the
// current info from it, and then update all image load addresses (or lack
// thereof). Only do this if this is the first time we're reading the dyld
// infos. Return true if we actually read anything, and false otherwise.
-//----------------------------------------------------------------------
bool DynamicLoaderMacOSXDYLD::InitializeFromAllImageInfos() {
Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
@@ -768,12 +750,10 @@ bool DynamicLoaderMacOSXDYLD::Initialize
return false;
}
-//----------------------------------------------------------------------
// Read a mach_header at ADDR into HEADER, and also fill in the load command
// data into LOAD_COMMAND_DATA if it is non-NULL.
//
// Returns true if we succeed, false if we fail for any reason.
-//----------------------------------------------------------------------
bool DynamicLoaderMacOSXDYLD::ReadMachHeader(lldb::addr_t addr,
llvm::MachO::mach_header *header,
DataExtractor *load_command_data) {
@@ -840,9 +820,7 @@ bool DynamicLoaderMacOSXDYLD::ReadMachHe
return false; // We failed the read the mach_header
}
-//----------------------------------------------------------------------
// Parse the load commands for an image
-//----------------------------------------------------------------------
uint32_t DynamicLoaderMacOSXDYLD::ParseLoadCommands(const DataExtractor &data,
ImageInfo &dylib_info,
FileSpec *lc_id_dylinker) {
@@ -929,10 +907,8 @@ uint32_t DynamicLoaderMacOSXDYLD::ParseL
return cmd_idx;
}
-//----------------------------------------------------------------------
// Read the mach_header and load commands for each image that the
// _dyld_all_image_infos structure points to and cache the results.
-//----------------------------------------------------------------------
void DynamicLoaderMacOSXDYLD::UpdateImageInfosHeaderAndLoadCommands(
ImageInfo::collection &image_infos, uint32_t infos_count,
@@ -990,10 +966,8 @@ void DynamicLoaderMacOSXDYLD::UpdateImag
}
}
-//----------------------------------------------------------------------
// Dump the _dyld_all_image_infos members and all current image infos that we
// have parsed to the file handle provided.
-//----------------------------------------------------------------------
void DynamicLoaderMacOSXDYLD::PutToLog(Log *log) const {
if (log == NULL)
return;
@@ -1159,9 +1133,7 @@ const char *DynamicLoaderMacOSXDYLD::Get
"in MacOSX user processes.";
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString DynamicLoaderMacOSXDYLD::GetPluginName() {
return GetPluginNameStatic();
}
Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h Wed Apr 10 13:48:55 2019
@@ -38,9 +38,7 @@ public:
virtual ~DynamicLoaderMacOSXDYLD() override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -52,12 +50,10 @@ public:
static lldb_private::DynamicLoader *
CreateInstance(lldb_private::Process *process, bool force);
- //------------------------------------------------------------------
/// Called after attaching a process.
///
/// Allow DynamicLoader plug-ins to execute some code after
/// attaching to a process.
- //------------------------------------------------------------------
bool ProcessDidExec() override;
lldb_private::Status CanLoadImage() override;
@@ -67,9 +63,7 @@ public:
lldb_private::LazyBool &using_shared_cache,
lldb_private::LazyBool &private_shared_cache) override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h Wed Apr 10 13:48:55 2019
@@ -36,9 +36,7 @@ public:
static lldb_private::DynamicLoader *
CreateInstance(lldb_private::Process *process, bool force);
- //------------------------------------------------------------------
// DynamicLoader protocol
- //------------------------------------------------------------------
void DidAttach() override;
@@ -53,9 +51,7 @@ public:
const lldb::ThreadSP thread,
lldb::addr_t tls_file_addr) override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Modified: lldb/trunk/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp Wed Apr 10 13:48:55 2019
@@ -17,11 +17,9 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// Create an instance of this class. This function is filled into the plugin
// info class that gets handed out by the plugin factory and allows the lldb to
// instantiate an instance of this class.
-//----------------------------------------------------------------------
DynamicLoader *DynamicLoaderStatic::CreateInstance(Process *process,
bool force) {
bool create = force;
@@ -48,31 +46,23 @@ DynamicLoader *DynamicLoaderStatic::Crea
return NULL;
}
-//----------------------------------------------------------------------
// Constructor
-//----------------------------------------------------------------------
DynamicLoaderStatic::DynamicLoaderStatic(Process *process)
: DynamicLoader(process) {}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
DynamicLoaderStatic::~DynamicLoaderStatic() {}
-//------------------------------------------------------------------
/// Called after attaching a process.
///
/// Allow DynamicLoader plug-ins to execute some code after
/// attaching to a process.
-//------------------------------------------------------------------
void DynamicLoaderStatic::DidAttach() { LoadAllImagesAtFileAddresses(); }
-//------------------------------------------------------------------
/// Called after attaching a process.
///
/// Allow DynamicLoader plug-ins to execute some code after
/// attaching to a process.
-//------------------------------------------------------------------
void DynamicLoaderStatic::DidLaunch() { LoadAllImagesAtFileAddresses(); }
void DynamicLoaderStatic::LoadAllImagesAtFileAddresses() {
@@ -156,9 +146,7 @@ const char *DynamicLoaderStatic::GetPlug
"addresses contained in each image.";
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString DynamicLoaderStatic::GetPluginName() {
return GetPluginNameStatic();
}
Modified: lldb/trunk/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.h (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.h Wed Apr 10 13:48:55 2019
@@ -20,9 +20,7 @@ public:
~DynamicLoaderStatic() override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -34,12 +32,10 @@ public:
static lldb_private::DynamicLoader *
CreateInstance(lldb_private::Process *process, bool force);
- //------------------------------------------------------------------
/// Called after attaching a process.
///
/// Allow DynamicLoader plug-ins to execute some code after
/// attaching to a process.
- //------------------------------------------------------------------
void DidAttach() override;
void DidLaunch() override;
@@ -49,9 +45,7 @@ public:
lldb_private::Status CanLoadImage() override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h Wed Apr 10 13:48:55 2019
@@ -15,7 +15,6 @@
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class ASTResultSynthesizer ASTResultSynthesizer.h
/// "lldb/Expression/ASTResultSynthesizer.h" Adds a result variable
/// declaration to the ASTs for an expression.
@@ -28,10 +27,8 @@ namespace lldb_private {
/// ASTResultSynthesizer's job is to add the variable and its initialization
/// to the ASTs for the expression, and it does so by acting as a SemaConsumer
/// for Clang.
-//----------------------------------------------------------------------
class ASTResultSynthesizer : public clang::SemaConsumer {
public:
- //----------------------------------------------------------------------
/// Constructor
///
/// \param[in] passthrough
@@ -47,25 +44,19 @@ public:
/// \param[in] target
/// The target, which contains the persistent variable store and the
/// AST importer.
- //----------------------------------------------------------------------
ASTResultSynthesizer(clang::ASTConsumer *passthrough, bool top_level,
Target &target);
- //----------------------------------------------------------------------
/// Destructor
- //----------------------------------------------------------------------
~ASTResultSynthesizer() override;
- //----------------------------------------------------------------------
/// Link this consumer with a particular AST context
///
/// \param[in] Context
/// This AST context will be used for types and identifiers, and also
/// forwarded to the passthrough consumer, if one exists.
- //----------------------------------------------------------------------
void Initialize(clang::ASTContext &Context) override;
- //----------------------------------------------------------------------
/// Examine a list of Decls to find the function $__lldb_expr and transform
/// its code
///
@@ -73,82 +64,58 @@ public:
/// The list of Decls to search. These may contain LinkageSpecDecls,
/// which need to be searched recursively. That job falls to
/// TransformTopLevelDecl.
- //----------------------------------------------------------------------
bool HandleTopLevelDecl(clang::DeclGroupRef D) override;
- //----------------------------------------------------------------------
/// Passthrough stub
- //----------------------------------------------------------------------
void HandleTranslationUnit(clang::ASTContext &Ctx) override;
- //----------------------------------------------------------------------
/// Passthrough stub
- //----------------------------------------------------------------------
void HandleTagDeclDefinition(clang::TagDecl *D) override;
- //----------------------------------------------------------------------
/// Passthrough stub
- //----------------------------------------------------------------------
void CompleteTentativeDefinition(clang::VarDecl *D) override;
- //----------------------------------------------------------------------
/// Passthrough stub
- //----------------------------------------------------------------------
void HandleVTable(clang::CXXRecordDecl *RD) override;
- //----------------------------------------------------------------------
/// Passthrough stub
- //----------------------------------------------------------------------
void PrintStats() override;
- //----------------------------------------------------------------------
/// Set the Sema object to use when performing transforms, and pass it on
///
/// \param[in] S
/// The Sema to use. Because Sema isn't externally visible, this class
/// casts it to an Action for actual use.
- //----------------------------------------------------------------------
void InitializeSema(clang::Sema &S) override;
- //----------------------------------------------------------------------
/// Reset the Sema to NULL now that transformations are done
- //----------------------------------------------------------------------
void ForgetSema() override;
- //----------------------------------------------------------------------
/// The parse has succeeded, so record its persistent decls
- //----------------------------------------------------------------------
void CommitPersistentDecls();
private:
- //----------------------------------------------------------------------
/// Hunt the given Decl for FunctionDecls named $__lldb_expr, recursing as
/// necessary through LinkageSpecDecls, and calling SynthesizeResult on
/// anything that was found
///
/// \param[in] D
/// The Decl to hunt.
- //----------------------------------------------------------------------
void TransformTopLevelDecl(clang::Decl *D);
- //----------------------------------------------------------------------
/// Process an Objective-C method and produce the result variable and
/// initialization
///
/// \param[in] MethodDecl
/// The method to process.
- //----------------------------------------------------------------------
bool SynthesizeObjCMethodResult(clang::ObjCMethodDecl *MethodDecl);
- //----------------------------------------------------------------------
/// Process a function and produce the result variable and initialization
///
/// \param[in] FunDecl
/// The function to process.
- //----------------------------------------------------------------------
bool SynthesizeFunctionResult(clang::FunctionDecl *FunDecl);
- //----------------------------------------------------------------------
/// Process a function body and produce the result variable and
/// initialization
///
@@ -158,35 +125,28 @@ private:
/// \param[in] DC
/// The DeclContext of the function, into which the result variable
/// is inserted.
- //----------------------------------------------------------------------
bool SynthesizeBodyResult(clang::CompoundStmt *Body, clang::DeclContext *DC);
- //----------------------------------------------------------------------
/// Given a DeclContext for a function or method, find all types declared in
/// the context and record any persistent types found.
///
/// \param[in] FunDeclCtx
/// The context for the function to process.
- //----------------------------------------------------------------------
void RecordPersistentTypes(clang::DeclContext *FunDeclCtx);
- //----------------------------------------------------------------------
/// Given a TypeDecl, if it declares a type whose name starts with a dollar
/// sign, register it as a pointer type in the target's scratch
/// AST context.
///
/// \param[in] Body
/// The body of the function.
- //----------------------------------------------------------------------
void MaybeRecordPersistentType(clang::TypeDecl *D);
- //----------------------------------------------------------------------
/// Given a NamedDecl, register it as a pointer type in the target's scratch
/// AST context.
///
/// \param[in] Body
/// The body of the function.
- //----------------------------------------------------------------------
void RecordPersistentDecl(clang::NamedDecl *D);
clang::ASTContext
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.h Wed Apr 10 13:48:55 2019
@@ -17,7 +17,6 @@
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class ASTStructExtractor ASTStructExtractor.h
/// "lldb/Expression/ASTStructExtractor.h" Extracts and describes the argument
/// structure for a wrapped function.
@@ -32,10 +31,8 @@ namespace lldb_private {
/// The definition of this struct is itself in the body of the wrapper
/// function, so Clang does the structure layout itself. ASTStructExtractor
/// reads through the AST for the wrapper function and finds the struct.
-//----------------------------------------------------------------------
class ASTStructExtractor : public clang::SemaConsumer {
public:
- //----------------------------------------------------------------------
/// Constructor
///
/// \param[in] passthrough
@@ -52,25 +49,19 @@ public:
/// about the argument struct. ClangFunctionCaller friends
/// ASTStructExtractor
/// for this purpose.
- //----------------------------------------------------------------------
ASTStructExtractor(clang::ASTConsumer *passthrough, const char *struct_name,
ClangFunctionCaller &function);
- //----------------------------------------------------------------------
/// Destructor
- //----------------------------------------------------------------------
~ASTStructExtractor() override;
- //----------------------------------------------------------------------
/// Link this consumer with a particular AST context
///
/// \param[in] Context
/// This AST context will be used for types and identifiers, and also
/// forwarded to the passthrough consumer, if one exists.
- //----------------------------------------------------------------------
void Initialize(clang::ASTContext &Context) override;
- //----------------------------------------------------------------------
/// Examine a list of Decls to find the function $__lldb_expr and transform
/// its code
///
@@ -78,66 +69,47 @@ public:
/// The list of Decls to search. These may contain LinkageSpecDecls,
/// which need to be searched recursively. That job falls to
/// TransformTopLevelDecl.
- //----------------------------------------------------------------------
bool HandleTopLevelDecl(clang::DeclGroupRef D) override;
- //----------------------------------------------------------------------
/// Passthrough stub
- //----------------------------------------------------------------------
void HandleTranslationUnit(clang::ASTContext &Ctx) override;
- //----------------------------------------------------------------------
/// Passthrough stub
- //----------------------------------------------------------------------
void HandleTagDeclDefinition(clang::TagDecl *D) override;
- //----------------------------------------------------------------------
/// Passthrough stub
- //----------------------------------------------------------------------
void CompleteTentativeDefinition(clang::VarDecl *D) override;
- //----------------------------------------------------------------------
/// Passthrough stub
- //----------------------------------------------------------------------
void HandleVTable(clang::CXXRecordDecl *RD) override;
- //----------------------------------------------------------------------
/// Passthrough stub
- //----------------------------------------------------------------------
void PrintStats() override;
- //----------------------------------------------------------------------
/// Set the Sema object to use when performing transforms, and pass it on
///
/// \param[in] S
/// The Sema to use. Because Sema isn't externally visible, this class
/// casts it to an Action for actual use.
- //----------------------------------------------------------------------
void InitializeSema(clang::Sema &S) override;
- //----------------------------------------------------------------------
/// Reset the Sema to NULL now that transformations are done
- //----------------------------------------------------------------------
void ForgetSema() override;
private:
- //----------------------------------------------------------------------
/// Hunt the given FunctionDecl for the argument struct and place
/// information about it into m_function
///
/// \param[in] F
/// The FunctionDecl to hunt.
- //----------------------------------------------------------------------
void ExtractFromFunctionDecl(clang::FunctionDecl *F);
- //----------------------------------------------------------------------
/// Hunt the given Decl for FunctionDecls named the same as the wrapper
/// function name, recursing as necessary through LinkageSpecDecls, and
/// calling ExtractFromFunctionDecl on anything that was found
///
/// \param[in] D
/// The Decl to hunt.
- //----------------------------------------------------------------------
void ExtractFromTopLevelDecl(clang::Decl *D);
clang::ASTContext
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp Wed Apr 10 13:48:55 2019
@@ -32,10 +32,8 @@
using namespace clang;
using namespace lldb_private;
-//------------------------------------------------------------------
// Scoped class that will remove an active lexical decl from the set when it
// goes out of scope.
-//------------------------------------------------------------------
namespace {
class ScopedLexicalDeclEraser {
public:
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.h Wed Apr 10 13:48:55 2019
@@ -22,7 +22,6 @@
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class ClangASTSource ClangASTSource.h "lldb/Expression/ClangASTSource.h"
/// Provider for named objects defined in the debug info for Clang
///
@@ -31,28 +30,21 @@ namespace lldb_private {
/// knows the name it is looking for, but nothing else. The ExternalSemaSource
/// class provides Decls (VarDecl, FunDecl, TypeDecl) to Clang for these
/// names, consulting the ClangExpressionDeclMap to do the actual lookups.
-//----------------------------------------------------------------------
class ClangASTSource : public ClangExternalASTSourceCommon,
public ClangASTImporter::MapCompleter {
public:
- //------------------------------------------------------------------
/// Constructor
///
/// Initializes class variables.
///
/// \param[in] target
/// A reference to the target containing debug information to use.
- //------------------------------------------------------------------
ClangASTSource(const lldb::TargetSP &target);
- //------------------------------------------------------------------
/// Destructor
- //------------------------------------------------------------------
~ClangASTSource() override;
- //------------------------------------------------------------------
/// Interface stubs.
- //------------------------------------------------------------------
clang::Decl *GetExternalDecl(uint32_t) override { return NULL; }
clang::Stmt *GetExternalDeclStmt(uint64_t) override { return NULL; }
clang::Selector GetExternalSelector(uint32_t) override {
@@ -73,7 +65,6 @@ public:
// APIs for ExternalASTSource
//
- //------------------------------------------------------------------
/// Look up all Decls that match a particular name. Only handles
/// Identifiers and DeclContexts that are either NamespaceDecls or
/// TranslationUnitDecls. Calls SetExternalVisibleDeclsForName with the
@@ -90,11 +81,9 @@ public:
///
/// \return
/// Whatever SetExternalVisibleDeclsForName returns.
- //------------------------------------------------------------------
bool FindExternalVisibleDeclsByName(const clang::DeclContext *DC,
clang::DeclarationName Name) override;
- //------------------------------------------------------------------
/// Enumerate all Decls in a given lexical context.
///
/// \param[in] DC
@@ -106,13 +95,11 @@ public:
///
/// \param[in] Decls
/// A vector that is filled in with matching Decls.
- //------------------------------------------------------------------
void FindExternalLexicalDecls(
const clang::DeclContext *DC,
llvm::function_ref<bool(clang::Decl::Kind)> IsKindWeWant,
llvm::SmallVectorImpl<clang::Decl *> &Decls) override;
- //------------------------------------------------------------------
/// Specify the layout of the contents of a RecordDecl.
///
/// \param[in] Record
@@ -144,7 +131,6 @@ public:
///
/// \return
/// True <=> the layout is valid.
- //-----------------------------------------------------------------
bool layoutRecordType(
const clang::RecordDecl *Record, uint64_t &Size, uint64_t &Alignment,
llvm::DenseMap<const clang::FieldDecl *, uint64_t> &FieldOffsets,
@@ -153,37 +139,30 @@ public:
llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
&VirtualBaseOffsets) override;
- //------------------------------------------------------------------
/// Complete a TagDecl.
///
/// \param[in] Tag
/// The Decl to be completed in place.
- //------------------------------------------------------------------
void CompleteType(clang::TagDecl *Tag) override;
- //------------------------------------------------------------------
/// Complete an ObjCInterfaceDecl.
///
/// \param[in] Class
/// The Decl to be completed in place.
- //------------------------------------------------------------------
void CompleteType(clang::ObjCInterfaceDecl *Class) override;
- //------------------------------------------------------------------
/// Called on entering a translation unit. Tells Clang by calling
/// setHasExternalVisibleStorage() and setHasExternalLexicalStorage() that
/// this object has something to say about undefined names.
///
/// \param[in] ASTConsumer
/// Unused.
- //------------------------------------------------------------------
void StartTranslationUnit(clang::ASTConsumer *Consumer) override;
//
// APIs for NamespaceMapCompleter
//
- //------------------------------------------------------------------
/// Look up the modules containing a given namespace and put the appropriate
/// entries in the namespace map.
///
@@ -196,7 +175,6 @@ public:
/// \param[in] parent_map
/// The map for the namespace's parent namespace, if there is
/// one.
- //------------------------------------------------------------------
void CompleteNamespaceMap(
ClangASTImporter::NamespaceMapSP &namespace_map, ConstString name,
ClangASTImporter::NamespaceMapSP &parent_map) const override;
@@ -209,12 +187,10 @@ public:
AddNamespace(NameSearchContext &context,
ClangASTImporter::NamespaceMapSP &namespace_decls);
- //------------------------------------------------------------------
/// The worker function for FindExternalVisibleDeclsByName.
///
/// \param[in] context
/// The NameSearchContext to use when filing results.
- //------------------------------------------------------------------
virtual void FindExternalVisibleDecls(NameSearchContext &context);
void SetImportInProgress(bool import_in_progress) {
@@ -227,13 +203,11 @@ public:
}
bool GetLookupsEnabled() { return m_lookups_enabled; }
- //----------------------------------------------------------------------
/// \class ClangASTSourceProxy ClangASTSource.h
/// "lldb/Expression/ClangASTSource.h" Proxy for ClangASTSource
///
/// Clang AST contexts like to own their AST sources, so this is a state-
/// free proxy object.
- //----------------------------------------------------------------------
class ClangASTSourceProxy : public ClangExternalASTSourceCommon {
public:
ClangASTSourceProxy(ClangASTSource &original) : m_original(original) {}
@@ -294,7 +268,6 @@ public:
}
protected:
- //------------------------------------------------------------------
/// Look for the complete version of an Objective-C interface, and return it
/// if found.
///
@@ -304,11 +277,9 @@ protected:
/// \return
/// NULL if the complete interface couldn't be found;
/// the complete interface otherwise.
- //------------------------------------------------------------------
clang::ObjCInterfaceDecl *
GetCompleteObjCInterface(const clang::ObjCInterfaceDecl *interface_decl);
- //------------------------------------------------------------------
/// Find all entities matching a given name in a given module, using a
/// NameSearchContext to make Decls for them.
///
@@ -324,33 +295,27 @@ protected:
/// \param[in] current_id
/// The ID for the current FindExternalVisibleDecls invocation,
/// for logging purposes.
- //------------------------------------------------------------------
void FindExternalVisibleDecls(NameSearchContext &context,
lldb::ModuleSP module,
CompilerDeclContext &namespace_decl,
unsigned int current_id);
- //------------------------------------------------------------------
/// Find all Objective-C methods matching a given selector.
///
/// \param[in] context
/// The NameSearchContext that can construct Decls for this name.
/// Its m_decl_name contains the selector and its m_decl_context
/// is the containing object.
- //------------------------------------------------------------------
void FindObjCMethodDecls(NameSearchContext &context);
- //------------------------------------------------------------------
/// Find all Objective-C properties and ivars with a given name.
///
/// \param[in] context
/// The NameSearchContext that can construct Decls for this name.
/// Its m_decl_name contains the name and its m_decl_context
/// is the containing object.
- //------------------------------------------------------------------
void FindObjCPropertyAndIvarDecls(NameSearchContext &context);
- //------------------------------------------------------------------
/// A wrapper for ClangASTContext::CopyType that sets a flag that
/// indicates that we should not respond to queries during import.
///
@@ -366,11 +331,9 @@ protected:
///
/// \return
/// The imported type.
- //------------------------------------------------------------------
CompilerType GuardedCopyType(const CompilerType &src_type);
public:
- //------------------------------------------------------------------
/// Returns true if a name should be ignored by name lookup.
///
/// \param[in] name
@@ -382,11 +345,9 @@ public:
/// \return
/// True if the name is one of a class of names that are ignored by
/// global lookup for performance reasons.
- //------------------------------------------------------------------
bool IgnoreName(const ConstString name, bool ignore_all_dollar_names);
public:
- //------------------------------------------------------------------
/// Copies a single Decl into the parser's AST context.
///
/// \param[in] src_decl
@@ -394,10 +355,8 @@ public:
///
/// \return
/// A copy of the Decl in m_ast_context, or NULL if the copy failed.
- //------------------------------------------------------------------
clang::Decl *CopyDecl(clang::Decl *src_decl);
- //------------------------------------------------------------------
/// Copies a single Type to the target of the given ExternalASTMerger.
///
/// \param[in] src_context
@@ -412,12 +371,10 @@ public:
///
/// \return
/// A copy of the Type in the merger's target context.
- //------------------------------------------------------------------
clang::QualType CopyTypeWithMerger(clang::ASTContext &src_context,
clang::ExternalASTMerger &merger,
clang::QualType type);
- //------------------------------------------------------------------
/// Determined the origin of a single Decl, if it can be found.
///
/// \param[in] decl
@@ -431,20 +388,15 @@ public:
///
/// \return
/// True if lookup succeeded; false otherwise.
- //------------------------------------------------------------------
bool ResolveDeclOrigin(const clang::Decl *decl, clang::Decl **original_decl,
clang::ASTContext **original_ctx);
- //------------------------------------------------------------------
/// Returns m_merger_up. Only call this if the target is configured to use
/// modern lookup,
- //------------------------------------------------------------------
clang::ExternalASTMerger &GetMergerUnchecked();
- //------------------------------------------------------------------
/// Returns true if there is a merger. This only occurs if the target is
/// using modern lookup.
- //------------------------------------------------------------------
bool HasMerger() { return (bool)m_merger_up; }
protected:
@@ -470,7 +422,6 @@ protected:
std::set<const char *> m_active_lookups;
};
-//----------------------------------------------------------------------
/// \class NameSearchContext ClangASTSource.h
/// "lldb/Expression/ClangASTSource.h" Container for all objects relevant to a
/// single name lookup
@@ -478,7 +429,6 @@ protected:
/// LLDB needs to create Decls for entities it finds. This class communicates
/// what name is being searched for and provides helper functions to construct
/// Decls given appropriate type information.
-//----------------------------------------------------------------------
struct NameSearchContext {
ClangASTSource &m_ast_source; ///< The AST source making the request
llvm::SmallVectorImpl<clang::NamedDecl *>
@@ -503,7 +453,6 @@ struct NameSearchContext {
bool type : 1;
} m_found;
- //------------------------------------------------------------------
/// Constructor
///
/// Initializes class variables.
@@ -520,7 +469,6 @@ struct NameSearchContext {
///
/// \param[in] dc
/// The DeclContext to register Decls in.
- //------------------------------------------------------------------
NameSearchContext(ClangASTSource &astSource,
llvm::SmallVectorImpl<clang::NamedDecl *> &decls,
clang::DeclarationName &name, const clang::DeclContext *dc)
@@ -529,16 +477,13 @@ struct NameSearchContext {
memset(&m_found, 0, sizeof(m_found));
}
- //------------------------------------------------------------------
/// Create a VarDecl with the name being searched for and the provided type
/// and register it in the right places.
///
/// \param[in] type
/// The opaque QualType for the VarDecl being registered.
- //------------------------------------------------------------------
clang::NamedDecl *AddVarDecl(const CompilerType &type);
- //------------------------------------------------------------------
/// Create a FunDecl with the name being searched for and the provided type
/// and register it in the right places.
///
@@ -547,41 +492,32 @@ struct NameSearchContext {
///
/// \param[in] extern_c
/// If true, build an extern "C" linkage specification for this.
- //------------------------------------------------------------------
clang::NamedDecl *AddFunDecl(const CompilerType &type, bool extern_c = false);
- //------------------------------------------------------------------
/// Create a FunDecl with the name being searched for and generic type (i.e.
/// intptr_t NAME_GOES_HERE(...)) and register it in the right places.
- //------------------------------------------------------------------
clang::NamedDecl *AddGenericFunDecl();
- //------------------------------------------------------------------
/// Create a TypeDecl with the name being searched for and the provided type
/// and register it in the right places.
///
/// \param[in] compiler_type
/// The opaque QualType for the TypeDecl being registered.
- //------------------------------------------------------------------
clang::NamedDecl *AddTypeDecl(const CompilerType &compiler_type);
- //------------------------------------------------------------------
/// Add Decls from the provided DeclContextLookupResult to the list of
/// results.
///
/// \param[in] result
/// The DeclContextLookupResult, usually returned as the result
/// of querying a DeclContext.
- //------------------------------------------------------------------
void AddLookupResult(clang::DeclContextLookupResult result);
- //------------------------------------------------------------------
/// Add a NamedDecl to the list of results.
///
/// \param[in] decl
/// The NamedDecl, usually returned as the result
/// of querying a DeclContext.
- //------------------------------------------------------------------
void AddNamedDecl(clang::NamedDecl *decl);
};
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h Wed Apr 10 13:48:55 2019
@@ -29,7 +29,6 @@
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class ClangExpressionDeclMap ClangExpressionDeclMap.h
/// "lldb/Expression/ClangExpressionDeclMap.h" Manages named entities that are
/// defined in LLDB's debug information.
@@ -53,10 +52,8 @@ namespace lldb_private {
///
/// Fourth and finally, it "dematerializes" the struct after the JITted code
/// has has executed, placing the new values back where it found the old ones.
-//----------------------------------------------------------------------
class ClangExpressionDeclMap : public ClangASTSource {
public:
- //------------------------------------------------------------------
/// Constructor
///
/// Initializes class variables.
@@ -76,19 +73,15 @@ public:
/// \param[in] ctx_obj
/// If not empty, then expression is evaluated in context of this object.
/// See the comment to `UserExpression::Evaluate` for details.
- //------------------------------------------------------------------
ClangExpressionDeclMap(
bool keep_result_in_memory,
Materializer::PersistentVariableDelegate *result_delegate,
ExecutionContext &exe_ctx,
ValueObject *ctx_obj);
- //------------------------------------------------------------------
/// Destructor
- //------------------------------------------------------------------
~ClangExpressionDeclMap() override;
- //------------------------------------------------------------------
/// Enable the state needed for parsing and IR transformation.
///
/// \param[in] exe_ctx
@@ -101,26 +94,20 @@ public:
///
/// \return
/// True if parsing is possible; false if it is unsafe to continue.
- //------------------------------------------------------------------
bool WillParse(ExecutionContext &exe_ctx, Materializer *materializer);
void InstallCodeGenerator(clang::ASTConsumer *code_gen);
- //------------------------------------------------------------------
/// [Used by ClangExpressionParser] For each variable that had an unknown
/// type at the beginning of parsing, determine its final type now.
///
/// \return
/// True on success; false otherwise.
- //------------------------------------------------------------------
bool ResolveUnknownTypes();
- //------------------------------------------------------------------
/// Disable the state needed for parsing and IR transformation.
- //------------------------------------------------------------------
void DidParse();
- //------------------------------------------------------------------
/// [Used by IRForTarget] Add a variable to the list of persistent
/// variables for the process.
///
@@ -136,12 +123,10 @@ public:
///
/// \return
/// True on success; false otherwise.
- //------------------------------------------------------------------
bool AddPersistentVariable(const clang::NamedDecl *decl,
ConstString name, TypeFromParser type,
bool is_result, bool is_lvalue);
- //------------------------------------------------------------------
/// [Used by IRForTarget] Add a variable to the struct that needs to
/// be materialized each time the expression runs.
///
@@ -162,21 +147,17 @@ public:
///
/// \return
/// True on success; false otherwise.
- //------------------------------------------------------------------
bool AddValueToStruct(const clang::NamedDecl *decl, ConstString name,
llvm::Value *value, size_t size,
lldb::offset_t alignment);
- //------------------------------------------------------------------
/// [Used by IRForTarget] Finalize the struct, laying out the position of
/// each object in it.
///
/// \return
/// True on success; false otherwise.
- //------------------------------------------------------------------
bool DoStructLayout();
- //------------------------------------------------------------------
/// [Used by IRForTarget] Get general information about the laid-out struct
/// after DoStructLayout() has been called.
///
@@ -191,11 +172,9 @@ public:
///
/// \return
/// True if the information could be retrieved; false otherwise.
- //------------------------------------------------------------------
bool GetStructInfo(uint32_t &num_elements, size_t &size,
lldb::offset_t &alignment);
- //------------------------------------------------------------------
/// [Used by IRForTarget] Get specific information about one field of the
/// laid-out struct after DoStructLayout() has been called.
///
@@ -225,12 +204,10 @@ public:
///
/// \return
/// True if the information could be retrieved; false otherwise.
- //------------------------------------------------------------------
bool GetStructElement(const clang::NamedDecl *&decl, llvm::Value *&value,
lldb::offset_t &offset, ConstString &name,
uint32_t index);
- //------------------------------------------------------------------
/// [Used by IRForTarget] Get information about a function given its Decl.
///
/// \param[in] decl
@@ -242,10 +219,8 @@ public:
///
/// \return
/// True if the information could be retrieved; false otherwise.
- //------------------------------------------------------------------
bool GetFunctionInfo(const clang::NamedDecl *decl, uint64_t &ptr);
- //------------------------------------------------------------------
/// [Used by IRForTarget] Get the address of a symbol given nothing but its
/// name.
///
@@ -266,7 +241,6 @@ public:
///
/// \return
/// Valid load address for the symbol
- //------------------------------------------------------------------
lldb::addr_t GetSymbolAddress(Target &target, Process *process,
ConstString name,
lldb::SymbolType symbol_type,
@@ -275,7 +249,6 @@ public:
lldb::addr_t GetSymbolAddress(ConstString name,
lldb::SymbolType symbol_type);
- //------------------------------------------------------------------
/// [Used by IRInterpreter] Get basic target information.
///
/// \param[out] byte_order
@@ -287,7 +260,6 @@ public:
/// \return
/// True if the information could be determined; false
/// otherwise.
- //------------------------------------------------------------------
struct TargetInfo {
lldb::ByteOrder byte_order;
size_t address_byte_size;
@@ -300,7 +272,6 @@ public:
};
TargetInfo GetTargetInfo();
- //------------------------------------------------------------------
/// [Used by ClangASTSource] Find all entities matching a given name, using
/// a NameSearchContext to make Decls for them.
///
@@ -309,10 +280,8 @@ public:
///
/// \return
/// True on success; false otherwise.
- //------------------------------------------------------------------
void FindExternalVisibleDecls(NameSearchContext &context) override;
- //------------------------------------------------------------------
/// Find all entities matching a given name in a given module/namespace,
/// using a NameSearchContext to make Decls for them.
///
@@ -331,7 +300,6 @@ public:
///
/// \return
/// True on success; false otherwise.
- //------------------------------------------------------------------
void FindExternalVisibleDecls(NameSearchContext &context,
lldb::ModuleSP module,
CompilerDeclContext &namespace_decl,
@@ -353,9 +321,7 @@ private:
///For details see the comment to
///`UserExpression::Evaluate`.
- //----------------------------------------------------------------------
/// The following values should not live beyond parsing
- //----------------------------------------------------------------------
class ParserVars {
public:
ParserVars() {}
@@ -388,23 +354,17 @@ private:
std::unique_ptr<ParserVars> m_parser_vars;
- //----------------------------------------------------------------------
/// Activate parser-specific variables
- //----------------------------------------------------------------------
void EnableParserVars() {
if (!m_parser_vars.get())
m_parser_vars = llvm::make_unique<ParserVars>();
}
- //----------------------------------------------------------------------
/// Deallocate parser-specific variables
- //----------------------------------------------------------------------
void DisableParserVars() { m_parser_vars.reset(); }
- //----------------------------------------------------------------------
/// The following values contain layout information for the materialized
/// struct, but are not specific to a single materialization
- //----------------------------------------------------------------------
struct StructVars {
StructVars()
: m_struct_alignment(0), m_struct_size(0), m_struct_laid_out(false),
@@ -424,26 +384,19 @@ private:
std::unique_ptr<StructVars> m_struct_vars;
- //----------------------------------------------------------------------
/// Activate struct variables
- //----------------------------------------------------------------------
void EnableStructVars() {
if (!m_struct_vars.get())
m_struct_vars.reset(new struct StructVars);
}
- //----------------------------------------------------------------------
/// Deallocate struct variables
- //----------------------------------------------------------------------
void DisableStructVars() { m_struct_vars.reset(); }
- //----------------------------------------------------------------------
/// Get this parser's ID for use in extracting parser- and JIT-specific data
/// from persistent variables.
- //----------------------------------------------------------------------
uint64_t GetParserID() { return (uint64_t) this; }
- //------------------------------------------------------------------
/// Given a target, find a variable that matches the given name and type.
///
/// \param[in] target
@@ -465,13 +418,11 @@ private:
///
/// \return
/// The LLDB Variable found, or NULL if none was found.
- //------------------------------------------------------------------
lldb::VariableSP FindGlobalVariable(Target &target, lldb::ModuleSP &module,
ConstString name,
CompilerDeclContext *namespace_decl,
TypeFromUser *type = NULL);
- //------------------------------------------------------------------
/// Get the value of a variable in a given execution context and return the
/// associated Types if needed.
///
@@ -496,13 +447,11 @@ private:
///
/// \return
/// Return true if the value was successfully filled in.
- //------------------------------------------------------------------
bool GetVariableValue(lldb::VariableSP &var,
lldb_private::Value &var_location,
TypeFromUser *found_type = NULL,
TypeFromParser *parser_type = NULL);
- //------------------------------------------------------------------
/// Use the NameSearchContext to generate a Decl for the given LLDB
/// Variable, and put it in the Tuple list.
///
@@ -514,11 +463,9 @@ private:
///
/// \param[in] valobj
/// The LLDB ValueObject for that variable.
- //------------------------------------------------------------------
void AddOneVariable(NameSearchContext &context, lldb::VariableSP var,
lldb::ValueObjectSP valobj, unsigned int current_id);
- //------------------------------------------------------------------
/// Use the NameSearchContext to generate a Decl for the given persistent
/// variable, and put it in the list of found entities.
///
@@ -531,12 +478,10 @@ private:
/// \param[in] current_id
/// The ID of the current invocation of FindExternalVisibleDecls
/// for logging purposes.
- //------------------------------------------------------------------
void AddOneVariable(NameSearchContext &context,
lldb::ExpressionVariableSP &pvar_sp,
unsigned int current_id);
- //------------------------------------------------------------------
/// Use the NameSearchContext to generate a Decl for the given LLDB symbol
/// (treated as a variable), and put it in the list of found entities.
///
@@ -545,11 +490,9 @@ private:
///
/// \param[in] var
/// The LLDB Variable that needs a Decl.
- //------------------------------------------------------------------
void AddOneGenericVariable(NameSearchContext &context, const Symbol &symbol,
unsigned int current_id);
- //------------------------------------------------------------------
/// Use the NameSearchContext to generate a Decl for the given function.
/// (Functions are not placed in the Tuple list.) Can handle both fully
/// typed functions and generic functions.
@@ -564,11 +507,9 @@ private:
/// \param[in] sym
/// The Symbol that corresponds to a function that needs to be
/// created with generic type (unitptr_t foo(...)).
- //------------------------------------------------------------------
void AddOneFunction(NameSearchContext &context, Function *fun, Symbol *sym,
unsigned int current_id);
- //------------------------------------------------------------------
/// Use the NameSearchContext to generate a Decl for the given register.
///
/// \param[in] context
@@ -576,11 +517,9 @@ private:
///
/// \param[in] reg_info
/// The information corresponding to that register.
- //------------------------------------------------------------------
void AddOneRegister(NameSearchContext &context, const RegisterInfo *reg_info,
unsigned int current_id);
- //------------------------------------------------------------------
/// Use the NameSearchContext to generate a Decl for the given type. (Types
/// are not placed in the Tuple list.)
///
@@ -589,11 +528,9 @@ private:
///
/// \param[in] type
/// The type that needs to be created.
- //------------------------------------------------------------------
void AddOneType(NameSearchContext &context, const TypeFromUser &type,
unsigned int current_id);
- //------------------------------------------------------------------
/// Generate a Decl for "*this" and add a member function declaration to it
/// for the expression, then report it.
///
@@ -602,11 +539,9 @@ private:
///
/// \param[in] type
/// The type for *this.
- //------------------------------------------------------------------
void AddThisType(NameSearchContext &context, const TypeFromUser &type,
unsigned int current_id);
- //------------------------------------------------------------------
/// Move a type out of the current ASTContext into another, but make sure to
/// export all components of the type also.
///
@@ -619,7 +554,6 @@ private:
///
/// \return
/// Returns the moved type, or an empty type if there was a problem.
- //------------------------------------------------------------------
TypeFromUser DeportType(ClangASTContext &target, ClangASTContext &source,
TypeFromParser parser_type);
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h Wed Apr 10 13:48:55 2019
@@ -23,9 +23,7 @@ namespace lldb_private {
class RecordingMemoryManager;
-//----------------------------------------------------------------------
// ClangExpressionHelper
-//----------------------------------------------------------------------
class ClangExpressionHelper : public ExpressionTypeSystemHelper {
public:
static bool classof(const ExpressionTypeSystemHelper *ts) {
@@ -36,25 +34,19 @@ public:
: ExpressionTypeSystemHelper(
ExpressionTypeSystemHelper::LLVMCastKind::eKindClangHelper) {}
- //------------------------------------------------------------------
/// Destructor
- //------------------------------------------------------------------
virtual ~ClangExpressionHelper() {}
- //------------------------------------------------------------------
/// Return the object that the parser should use when resolving external
/// values. May be NULL if everything should be self-contained.
- //------------------------------------------------------------------
virtual ClangExpressionDeclMap *DeclMap() = 0;
- //------------------------------------------------------------------
/// Return the object that the parser should allow to access ASTs.
/// May be NULL if the ASTs do not need to be transformed.
///
/// \param[in] passthrough
/// The ASTConsumer that the returned transformer should send
/// the ASTs to after transformation.
- //------------------------------------------------------------------
virtual clang::ASTConsumer *
ASTTransformer(clang::ASTConsumer *passthrough) = 0;
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp Wed Apr 10 13:48:55 2019
@@ -613,13 +613,11 @@ ClangExpressionParser::~ClangExpressionP
namespace {
-//----------------------------------------------------------------------
/// \class CodeComplete
///
/// A code completion consumer for the clang Sema that is responsible for
/// creating the completion suggestions when a user requests completion
/// of an incomplete `expr` invocation.
-//----------------------------------------------------------------------
class CodeComplete : public CodeCompleteConsumer {
CodeCompletionTUInfo m_info;
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h Wed Apr 10 13:48:55 2019
@@ -27,7 +27,6 @@ namespace lldb_private {
class IRExecutionUnit;
-//----------------------------------------------------------------------
/// \class ClangExpressionParser ClangExpressionParser.h
/// "lldb/Expression/ClangExpressionParser.h" Encapsulates an instance of
/// Clang that can parse expressions.
@@ -37,10 +36,8 @@ class IRExecutionUnit;
/// as a glorified parameter list, performing the required parsing and
/// conversion to formats (DWARF bytecode, or JIT compiled machine code) that
/// can be executed.
-//----------------------------------------------------------------------
class ClangExpressionParser : public ExpressionParser {
public:
- //------------------------------------------------------------------
/// Constructor
///
/// Initializes class variables.
@@ -56,20 +53,16 @@ public:
/// @param[in] include_directories
/// List of include directories that should be used when parsing the
/// expression.
- //------------------------------------------------------------------
ClangExpressionParser(ExecutionContextScope *exe_scope, Expression &expr,
bool generate_debug_info,
std::vector<ConstString> include_directories = {});
- //------------------------------------------------------------------
/// Destructor
- //------------------------------------------------------------------
~ClangExpressionParser() override;
bool Complete(CompletionRequest &request, unsigned line, unsigned pos,
unsigned typed_pos) override;
- //------------------------------------------------------------------
/// Parse a single expression and convert it to IR using Clang. Don't wrap
/// the expression in anything at all.
///
@@ -79,12 +72,10 @@ public:
/// \return
/// The number of errors encountered during parsing. 0 means
/// success.
- //------------------------------------------------------------------
unsigned Parse(DiagnosticManager &diagnostic_manager) override;
bool RewriteExpression(DiagnosticManager &diagnostic_manager) override;
- //------------------------------------------------------------------
/// Ready an already-parsed expression for execution, possibly evaluating it
/// statically.
///
@@ -120,14 +111,12 @@ public:
/// \return
/// An error code indicating the success or failure of the operation.
/// Test with Success().
- //------------------------------------------------------------------
Status
PrepareForExecution(lldb::addr_t &func_addr, lldb::addr_t &func_end,
lldb::IRExecutionUnitSP &execution_unit_sp,
ExecutionContext &exe_ctx, bool &can_interpret,
lldb_private::ExecutionPolicy execution_policy) override;
- //------------------------------------------------------------------
/// Run all static initializers for an execution unit.
///
/// \param[in] execution_unit_sp
@@ -138,11 +127,9 @@ public:
///
/// \return
/// The error code indicating the
- //------------------------------------------------------------------
Status RunStaticInitializers(lldb::IRExecutionUnitSP &execution_unit_sp,
ExecutionContext &exe_ctx);
- //------------------------------------------------------------------
/// Returns a string representing current ABI.
///
/// \param[in] target_arch
@@ -150,11 +137,9 @@ public:
///
/// \return
/// A string representing target ABI for the current architecture.
- //-------------------------------------------------------------------
std::string GetClangTargetABI(const ArchSpec &target_arch);
private:
- //------------------------------------------------------------------
/// Parses the expression.
///
/// \param[in] diagnostic_manager
@@ -175,7 +160,6 @@ private:
///
/// \return
/// The number of parsing errors.
- //-------------------------------------------------------------------
unsigned ParseInternal(DiagnosticManager &diagnostic_manager,
clang::CodeCompleteConsumer *completion = nullptr,
unsigned completion_line = 0,
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h Wed Apr 10 13:48:55 2019
@@ -34,7 +34,6 @@ namespace lldb_private {
class ValueObjectConstResult;
-//----------------------------------------------------------------------
/// \class ClangExpressionVariable ClangExpressionVariable.h
/// "lldb/Expression/ClangExpressionVariable.h" Encapsulates one variable for
/// the expression parser.
@@ -55,7 +54,6 @@ class ValueObjectConstResult;
///
/// This class supports all of these use cases using simple type polymorphism,
/// and provides necessary support methods. Its interface is RTTI-neutral.
-//----------------------------------------------------------------------
class ClangExpressionVariable : public ExpressionVariable {
public:
ClangExpressionVariable(ExecutionContextScope *exe_scope,
@@ -71,12 +69,9 @@ public:
const TypeFromUser &user_type,
lldb::ByteOrder byte_order, uint32_t addr_byte_size);
- //----------------------------------------------------------------------
/// Utility functions for dealing with ExpressionVariableLists in Clang-
/// specific ways
- //----------------------------------------------------------------------
- //----------------------------------------------------------------------
/// Finds a variable by NamedDecl in the list.
///
/// \param[in] name
@@ -84,7 +79,6 @@ public:
///
/// \return
/// The variable requested, or NULL if that variable is not in the list.
- //----------------------------------------------------------------------
static ClangExpressionVariable *
FindVariableInList(ExpressionVariableList &list, const clang::NamedDecl *decl,
uint64_t parser_id) {
@@ -104,7 +98,6 @@ public:
return nullptr;
}
- //----------------------------------------------------------------------
/// If the variable contains its own data, make a Value point at it. If \a
/// exe_ctx in not NULL, the value will be resolved in with that execution
/// context.
@@ -118,12 +111,9 @@ public:
/// \return
/// True on success; false otherwise (in particular, if this variable
/// does not contain its own data).
- //----------------------------------------------------------------------
bool PointValueAtData(Value &value, ExecutionContext *exe_ctx);
- //----------------------------------------------------------------------
/// The following values should not live beyond parsing
- //----------------------------------------------------------------------
class ParserVars {
public:
ParserVars()
@@ -148,22 +138,16 @@ private:
ParserVarMap m_parser_vars;
public:
- //----------------------------------------------------------------------
/// Make this variable usable by the parser by allocating space for parser-
/// specific variables
- //----------------------------------------------------------------------
void EnableParserVars(uint64_t parser_id) {
m_parser_vars.insert(std::make_pair(parser_id, ParserVars()));
}
- //----------------------------------------------------------------------
/// Deallocate parser-specific variables
- //----------------------------------------------------------------------
void DisableParserVars(uint64_t parser_id) { m_parser_vars.erase(parser_id); }
- //----------------------------------------------------------------------
/// Access parser-specific variables
- //----------------------------------------------------------------------
ParserVars *GetParserVars(uint64_t parser_id) {
ParserVarMap::iterator i = m_parser_vars.find(parser_id);
@@ -173,9 +157,7 @@ public:
return &i->second;
}
- //----------------------------------------------------------------------
/// The following values are valid if the variable is used by JIT code
- //----------------------------------------------------------------------
struct JITVars {
JITVars() : m_alignment(0), m_size(0), m_offset(0) {}
@@ -191,17 +173,13 @@ private:
JITVarMap m_jit_vars;
public:
- //----------------------------------------------------------------------
/// Make this variable usable for materializing for the JIT by allocating
/// space for JIT-specific variables
- //----------------------------------------------------------------------
void EnableJITVars(uint64_t parser_id) {
m_jit_vars.insert(std::make_pair(parser_id, JITVars()));
}
- //----------------------------------------------------------------------
/// Deallocate JIT-specific variables
- //----------------------------------------------------------------------
void DisableJITVars(uint64_t parser_id) { m_jit_vars.erase(parser_id); }
JITVars *GetJITVars(uint64_t parser_id) {
@@ -215,16 +193,12 @@ public:
TypeFromUser GetTypeFromUser();
- //------------------------------------------------------------------
// llvm casting support
- //------------------------------------------------------------------
static bool classof(const ExpressionVariable *ev) {
return ev->getKind() == ExpressionVariable::eKindClang;
}
- //----------------------------------------------------------------------
/// Members
- //----------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(ClangExpressionVariable);
};
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp Wed Apr 10 13:48:55 2019
@@ -42,9 +42,7 @@
using namespace lldb_private;
-//----------------------------------------------------------------------
// ClangFunctionCaller constructor
-//----------------------------------------------------------------------
ClangFunctionCaller::ClangFunctionCaller(ExecutionContextScope &exe_scope,
const CompilerType &return_type,
const Address &functionAddress,
@@ -58,9 +56,7 @@ ClangFunctionCaller::ClangFunctionCaller
assert(m_jit_process_wp.lock());
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
ClangFunctionCaller::~ClangFunctionCaller() {}
unsigned
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h Wed Apr 10 13:48:55 2019
@@ -24,7 +24,6 @@ namespace lldb_private {
class ASTStructExtractor;
class ClangExpressionParser;
-//----------------------------------------------------------------------
/// \class ClangFunctionCaller ClangFunctionCaller.h
/// "lldb/Expression/ClangFunctionCaller.h" Encapsulates a function that can
/// be called.
@@ -57,7 +56,6 @@ class ClangExpressionParser;
///
/// Any of the methods that take arg_addr_ptr can be passed NULL, and the
/// argument space will be managed for you.
-//----------------------------------------------------------------------
class ClangFunctionCaller : public FunctionCaller {
friend class ASTStructExtractor;
@@ -72,20 +70,16 @@ class ClangFunctionCaller : public Funct
~ClangFunctionCallerHelper() override = default;
- //------------------------------------------------------------------
/// Return the object that the parser should use when resolving external
/// values. May be NULL if everything should be self-contained.
- //------------------------------------------------------------------
ClangExpressionDeclMap *DeclMap() override { return NULL; }
- //------------------------------------------------------------------
/// Return the object that the parser should allow to access ASTs. May be
/// NULL if the ASTs do not need to be transformed.
///
/// \param[in] passthrough
/// The ASTConsumer that the returned transformer should send
/// the ASTs to after transformation.
- //------------------------------------------------------------------
clang::ASTConsumer *
ASTTransformer(clang::ASTConsumer *passthrough) override;
@@ -98,7 +92,6 @@ class ClangFunctionCaller : public Funct
};
public:
- //------------------------------------------------------------------
/// Constructor
///
/// \param[in] exe_scope
@@ -118,7 +111,6 @@ public:
/// \param[in] arg_value_list
/// The default values to use when calling this function. Can
/// be overridden using WriteFunctionArguments().
- //------------------------------------------------------------------
ClangFunctionCaller(ExecutionContextScope &exe_scope,
const CompilerType &return_type,
const Address &function_address,
@@ -126,7 +118,6 @@ public:
~ClangFunctionCaller() override;
- //------------------------------------------------------------------
/// Compile the wrapper function
///
/// \param[in] thread_to_use_sp
@@ -139,7 +130,6 @@ public:
///
/// \return
/// The number of errors.
- //------------------------------------------------------------------
unsigned CompileFunction(lldb::ThreadSP thread_to_use_sp,
DiagnosticManager &diagnostic_manager) override;
@@ -151,9 +141,7 @@ protected:
const char *GetWrapperStructName() { return m_wrapper_struct_name.c_str(); }
private:
- //------------------------------------------------------------------
// For ClangFunctionCaller only
- //------------------------------------------------------------------
// Note: the parser needs to be destructed before the execution unit, so
// declare the execution unit first.
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h Wed Apr 10 13:48:55 2019
@@ -21,9 +21,7 @@ namespace lldb_private {
class ClangModulesDeclVendor : public DeclVendor {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
ClangModulesDeclVendor();
~ClangModulesDeclVendor() override;
@@ -34,7 +32,6 @@ public:
typedef uintptr_t ModuleID;
typedef std::vector<ModuleID> ModuleVector;
- //------------------------------------------------------------------
/// Add a module to the list of modules to search.
///
/// \param[in] module
@@ -53,12 +50,10 @@ public:
/// True if the module could be loaded; false if not. If the
/// compiler encountered a fatal error during a previous module
/// load, then this will always return false for this ModuleImporter.
- //------------------------------------------------------------------
virtual bool AddModule(const SourceModule &module,
ModuleVector *exported_modules,
Stream &error_stream) = 0;
- //------------------------------------------------------------------
/// Add all modules referred to in a given compilation unit to the list
/// of modules to search.
///
@@ -78,12 +73,10 @@ public:
/// loaded; false if one could not be loaded. If the compiler
/// encountered a fatal error during a previous module
/// load, then this will always return false for this ModuleImporter.
- //------------------------------------------------------------------
virtual bool AddModulesForCompileUnit(CompileUnit &cu,
ModuleVector &exported_modules,
Stream &error_stream) = 0;
- //------------------------------------------------------------------
/// Enumerate all the macros that are defined by a given set of modules
/// that are already imported.
///
@@ -97,12 +90,10 @@ public:
/// #define directive). #undef directives are not included; we simply
/// elide any corresponding #define. If this function returns true,
/// we stop the iteration immediately.
- //------------------------------------------------------------------
virtual void
ForEachMacro(const ModuleVector &modules,
std::function<bool(const std::string &)> handler) = 0;
- //------------------------------------------------------------------
/// Query whether Clang supports modules for a particular language.
/// LLDB uses this to decide whether to try to find the modules loaded
/// by a given compile unit.
@@ -112,7 +103,6 @@ public:
///
/// \return
/// True if Clang has modules for the given language.
- //------------------------------------------------------------------
static bool LanguageSupportsClangModules(lldb::LanguageType language);
};
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h Wed Apr 10 13:48:55 2019
@@ -18,7 +18,6 @@
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class ClangPersistentVariables ClangPersistentVariables.h
/// "lldb/Expression/ClangPersistentVariables.h" Manages persistent values
/// that need to be preserved between expression invocations.
@@ -26,16 +25,13 @@ namespace lldb_private {
/// A list of variables that can be accessed and updated by any expression. See
/// ClangPersistentVariable for more discussion. Also provides an increasing,
/// 0-based counter for naming result variables.
-//----------------------------------------------------------------------
class ClangPersistentVariables : public PersistentExpressionState {
public:
ClangPersistentVariables();
~ClangPersistentVariables() override = default;
- //------------------------------------------------------------------
// llvm casting support
- //------------------------------------------------------------------
static bool classof(const PersistentExpressionState *pv) {
return pv->getKind() == PersistentExpressionState::eKindClang;
}
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp Wed Apr 10 13:48:55 2019
@@ -686,7 +686,6 @@ bool ClangUserExpression::Parse(Diagnost
return true;
}
-//------------------------------------------------------------------
/// Converts an absolute position inside a given code string into
/// a column/line pair.
///
@@ -704,7 +703,6 @@ bool ClangUserExpression::Parse(Diagnost
/// \param[out] column
/// The column in the line that contains the absolute position.
/// The first character in a line is indexed as 0.
-//------------------------------------------------------------------
static void AbsPosToLineColumnPos(size_t abs_pos, llvm::StringRef code,
unsigned &line, unsigned &column) {
// Reset to code position to beginning of the file.
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h Wed Apr 10 13:48:55 2019
@@ -28,7 +28,6 @@
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class ClangUserExpression ClangUserExpression.h
/// "lldb/Expression/ClangUserExpression.h" Encapsulates a single expression
/// for use with Clang
@@ -37,7 +36,6 @@ namespace lldb_private {
/// and as a backend for the expr command. ClangUserExpression encapsulates
/// the objects needed to parse and interpret or JIT an expression. It uses
/// the Clang parser to produce LLVM IR from the expression.
-//----------------------------------------------------------------------
class ClangUserExpression : public LLVMUserExpression {
public:
/// LLVM-style RTTI support.
@@ -54,10 +52,8 @@ public:
~ClangUserExpressionHelper() override = default;
- //------------------------------------------------------------------
/// Return the object that the parser should use when resolving external
/// values. May be NULL if everything should be self-contained.
- //------------------------------------------------------------------
ClangExpressionDeclMap *DeclMap() override {
return m_expr_decl_map_up.get();
}
@@ -69,14 +65,12 @@ public:
bool keep_result_in_memory,
ValueObject *ctx_obj);
- //------------------------------------------------------------------
/// Return the object that the parser should allow to access ASTs. May be
/// NULL if the ASTs do not need to be transformed.
///
/// \param[in] passthrough
/// The ASTConsumer that the returned transformer should send
/// the ASTs to after transformation.
- //------------------------------------------------------------------
clang::ASTConsumer *
ASTTransformer(clang::ASTConsumer *passthrough) override;
@@ -93,7 +87,6 @@ public:
bool m_top_level;
};
- //------------------------------------------------------------------
/// Constructor
///
/// \param[in] expr
@@ -116,7 +109,6 @@ public:
/// The object (if any) in which context the expression
/// must be evaluated. For details see the comment to
/// `UserExpression::Evaluate`.
- //------------------------------------------------------------------
ClangUserExpression(ExecutionContextScope &exe_scope, llvm::StringRef expr,
llvm::StringRef prefix, lldb::LanguageType language,
ResultType desired_type,
@@ -125,7 +117,6 @@ public:
~ClangUserExpression() override;
- //------------------------------------------------------------------
/// Parse the expression
///
/// \param[in] diagnostic_manager
@@ -145,7 +136,6 @@ public:
///
/// \return
/// True on success (no errors); false otherwise.
- //------------------------------------------------------------------
bool Parse(DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx,
lldb_private::ExecutionPolicy execution_policy,
bool keep_result_in_memory, bool generate_debug_info) override;
@@ -175,10 +165,8 @@ public:
bool DidImportCxxModules() const { return m_imported_cpp_modules; }
private:
- //------------------------------------------------------------------
/// Populate m_in_cplusplus_method and m_in_objectivec_method based on the
/// environment.
- //------------------------------------------------------------------
void ScanContext(ExecutionContext &exe_ctx,
lldb_private::Status &err) override;
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp Wed Apr 10 13:48:55 2019
@@ -29,7 +29,6 @@
using namespace lldb_private;
-//------------------------------------------------------------------
/// Constructor
///
/// \param[in] text
@@ -37,7 +36,6 @@ using namespace lldb_private;
///
/// \param[in] name
/// The name of the function, as used in the text.
-//------------------------------------------------------------------
ClangUtilityFunction::ClangUtilityFunction(ExecutionContextScope &exe_scope,
const char *text, const char *name)
: UtilityFunction(exe_scope, text, name, eKindClangUtilityFunction) {
@@ -48,7 +46,6 @@ ClangUtilityFunction::ClangUtilityFuncti
ClangUtilityFunction::~ClangUtilityFunction() {}
-//------------------------------------------------------------------
/// Install the utility function into a process
///
/// \param[in] diagnostic_manager
@@ -59,7 +56,6 @@ ClangUtilityFunction::~ClangUtilityFunct
///
/// \return
/// True on success (no errors); false otherwise.
-//------------------------------------------------------------------
bool ClangUtilityFunction::Install(DiagnosticManager &diagnostic_manager,
ExecutionContext &exe_ctx) {
if (m_jit_start_addr != LLDB_INVALID_ADDRESS) {
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h Wed Apr 10 13:48:55 2019
@@ -22,7 +22,6 @@
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class ClangUtilityFunction ClangUtilityFunction.h
/// "lldb/Expression/ClangUtilityFunction.h" Encapsulates a single expression
/// for use with Clang
@@ -33,7 +32,6 @@ namespace lldb_private {
/// functions can perform error-checking for ClangUserExpressions, or can
/// simply provide a way to push a function into the target for the debugger
/// to call later on.
-//----------------------------------------------------------------------
class ClangUtilityFunction : public UtilityFunction {
public:
/// LLVM-style RTTI support.
@@ -47,10 +45,8 @@ public:
~ClangUtilityFunctionHelper() override {}
- //------------------------------------------------------------------
/// Return the object that the parser should use when resolving external
/// values. May be NULL if everything should be self-contained.
- //------------------------------------------------------------------
ClangExpressionDeclMap *DeclMap() override {
return m_expr_decl_map_up.get();
}
@@ -59,14 +55,12 @@ public:
void ResetDeclMap(ExecutionContext &exe_ctx, bool keep_result_in_memory);
- //------------------------------------------------------------------
/// Return the object that the parser should allow to access ASTs. May be
/// NULL if the ASTs do not need to be transformed.
///
/// \param[in] passthrough
/// The ASTConsumer that the returned transformer should send
/// the ASTs to after transformation.
- //------------------------------------------------------------------
clang::ASTConsumer *
ASTTransformer(clang::ASTConsumer *passthrough) override {
return nullptr;
@@ -75,7 +69,6 @@ public:
private:
std::unique_ptr<ClangExpressionDeclMap> m_expr_decl_map_up;
};
- //------------------------------------------------------------------
/// Constructor
///
/// \param[in] text
@@ -83,7 +76,6 @@ public:
///
/// \param[in] name
/// The name of the function, as used in the text.
- //------------------------------------------------------------------
ClangUtilityFunction(ExecutionContextScope &exe_scope, const char *text,
const char *name);
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.h Wed Apr 10 13:48:55 2019
@@ -43,7 +43,6 @@ class IRExecutionUnit;
class IRMemoryMap;
}
-//----------------------------------------------------------------------
/// \class IRForTarget IRForTarget.h "lldb/Expression/IRForTarget.h"
/// Transforms the IR for a function to run in the target
///
@@ -55,12 +54,10 @@ class IRMemoryMap;
/// transformations to the IR which make it relocatable. These
/// transformations are discussed in more detail next to their relevant
/// functions.
-//----------------------------------------------------------------------
class IRForTarget : public llvm::ModulePass {
public:
enum class LookupResult { Success, Fail, Ignore };
- //------------------------------------------------------------------
/// Constructor
///
/// \param[in] decl_map
@@ -90,18 +87,14 @@ public:
///
/// \param[in] func_name
/// The name of the function to prepare for execution in the target.
- //------------------------------------------------------------------
IRForTarget(lldb_private::ClangExpressionDeclMap *decl_map, bool resolve_vars,
lldb_private::IRExecutionUnit &execution_unit,
lldb_private::Stream &error_stream,
const char *func_name = "$__lldb_expr");
- //------------------------------------------------------------------
/// Destructor
- //------------------------------------------------------------------
~IRForTarget() override;
- //------------------------------------------------------------------
/// Run this IR transformer on a single module
///
/// Implementation of the llvm::ModulePass::runOnModule() function.
@@ -117,28 +110,22 @@ public:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool runOnModule(llvm::Module &llvm_module) override;
- //------------------------------------------------------------------
/// Interface stub
///
/// Implementation of the llvm::ModulePass::assignPassManager() function.
- //------------------------------------------------------------------
void assignPassManager(llvm::PMStack &pass_mgr_stack,
llvm::PassManagerType pass_mgr_type =
llvm::PMT_ModulePassManager) override;
- //------------------------------------------------------------------
/// Returns PMT_ModulePassManager
///
/// Implementation of the llvm::ModulePass::getPotentialPassManagerType()
/// function.
- //------------------------------------------------------------------
llvm::PassManagerType getPotentialPassManagerType() const override;
private:
- //------------------------------------------------------------------
/// Ensures that the current function's linkage is set to external.
/// Otherwise the JIT may not return an address for it.
///
@@ -147,15 +134,11 @@ private:
///
/// \return
/// True on success; false otherwise.
- //------------------------------------------------------------------
bool FixFunctionLinkage(llvm::Function &llvm_function);
- //------------------------------------------------------------------
/// A module-level pass to replace all function pointers with their
/// integer equivalents.
- //------------------------------------------------------------------
- //------------------------------------------------------------------
/// The top-level pass implementation
///
/// \param[in] llvm_module
@@ -166,15 +149,11 @@ private:
///
/// \return
/// True on success; false otherwise.
- //------------------------------------------------------------------
bool HasSideEffects(llvm::Function &llvm_function);
- //------------------------------------------------------------------
/// A function-level pass to check whether the function has side
/// effects.
- //------------------------------------------------------------------
- //------------------------------------------------------------------
/// Get the address of a function, and a location to put the complete Value
/// of the function if one is available.
///
@@ -193,18 +172,14 @@ private:
///
/// \return
/// The pointer.
- //------------------------------------------------------------------
LookupResult GetFunctionAddress(llvm::Function *function, uint64_t &ptr,
lldb_private::ConstString &name,
llvm::Constant **&value_ptr);
- //------------------------------------------------------------------
/// A function-level pass to take the generated global value
/// $__lldb_expr_result and make it into a persistent variable. Also see
/// ASTResultSynthesizer.
- //------------------------------------------------------------------
- //------------------------------------------------------------------
/// Find the NamedDecl corresponding to a Value. This interface is exposed
/// for the IR interpreter.
///
@@ -216,7 +191,6 @@ private:
///
/// \return
/// The corresponding variable declaration
- //------------------------------------------------------------------
public:
static clang::NamedDecl *DeclForGlobal(const llvm::GlobalValue *global_val,
llvm::Module *module);
@@ -224,7 +198,6 @@ public:
private:
clang::NamedDecl *DeclForGlobal(llvm::GlobalValue *global);
- //------------------------------------------------------------------
/// Set the constant result variable m_const_result to the provided
/// constant, assuming it can be evaluated. The result variable will be
/// reset to NULL later if the expression has side effects.
@@ -237,22 +210,18 @@ private:
///
/// \param[in] type
/// The Clang type of the result variable.
- //------------------------------------------------------------------
void MaybeSetConstantResult(llvm::Constant *initializer,
lldb_private::ConstString name,
lldb_private::TypeFromParser type);
- //------------------------------------------------------------------
/// If the IR represents a cast of a variable, set m_const_result to the
/// result of the cast. The result variable will be reset to
/// NULL latger if the expression has side effects.
///
/// \param[in] type
/// The Clang type of the result variable.
- //------------------------------------------------------------------
void MaybeSetCastResult(lldb_private::TypeFromParser type);
- //------------------------------------------------------------------
/// The top-level pass implementation
///
/// \param[in] llvm_function
@@ -260,15 +229,11 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool CreateResultVariable(llvm::Function &llvm_function);
- //------------------------------------------------------------------
/// A module-level pass to find Objective-C constant strings and
/// transform them to calls to CFStringCreateWithBytes.
- //------------------------------------------------------------------
- //------------------------------------------------------------------
/// Rewrite a single Objective-C constant string.
///
/// \param[in] NSStr
@@ -280,19 +245,15 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool RewriteObjCConstString(llvm::GlobalVariable *NSStr,
llvm::GlobalVariable *CStr);
- //------------------------------------------------------------------
/// The top-level pass implementation
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool RewriteObjCConstStrings();
- //------------------------------------------------------------------
/// A basic block-level pass to find all Objective-C method calls and
/// rewrite them to use sel_registerName instead of statically allocated
/// selectors. The reason is that the selectors are created on the
@@ -300,9 +261,7 @@ private:
/// section and prepare them. This doesn't happen when code is copied into
/// the target, though, and there's no easy way to induce the runtime to
/// scan them. So instead we get our selectors from sel_registerName.
- //------------------------------------------------------------------
- //------------------------------------------------------------------
/// Replace a single selector reference
///
/// \param[in] selector_load
@@ -310,10 +269,8 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool RewriteObjCSelector(llvm::Instruction *selector_load);
- //------------------------------------------------------------------
/// The top-level pass implementation
///
/// \param[in] basic_block
@@ -321,16 +278,12 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool RewriteObjCSelectors(llvm::BasicBlock &basic_block);
- //------------------------------------------------------------------
/// A basic block-level pass to find all Objective-C class references that
/// use the old-style Objective-C runtime and rewrite them to use
/// class_getClass instead of statically allocated class references.
- //------------------------------------------------------------------
- //------------------------------------------------------------------
/// Replace a single old-style class reference
///
/// \param[in] selector_load
@@ -338,10 +291,8 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool RewriteObjCClassReference(llvm::Instruction *class_load);
- //------------------------------------------------------------------
/// The top-level pass implementation
///
/// \param[in] basic_block
@@ -349,10 +300,8 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool RewriteObjCClassReferences(llvm::BasicBlock &basic_block);
- //------------------------------------------------------------------
/// A basic block-level pass to find all newly-declared persistent
/// variables and register them with the ClangExprDeclMap. This allows them
/// to be materialized and dematerialized like normal external variables.
@@ -360,9 +309,7 @@ private:
/// locals, so they have an allocation. This pass excises these allocations
/// and makes references look like external references where they will be
/// resolved -- like all other external references -- by ResolveExternals().
- //------------------------------------------------------------------
- //------------------------------------------------------------------
/// Handle a single allocation of a persistent variable
///
/// \param[in] persistent_alloc
@@ -370,26 +317,20 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool RewritePersistentAlloc(llvm::Instruction *persistent_alloc);
- //------------------------------------------------------------------
/// The top-level pass implementation
///
/// \param[in] basic_block
/// The basic block currently being processed.
- //------------------------------------------------------------------
bool RewritePersistentAllocs(llvm::BasicBlock &basic_block);
- //------------------------------------------------------------------
/// A function-level pass to find all external variables and functions
/// used in the IR. Each found external variable is added to the struct,
/// and each external function is resolved in place, its call replaced with
/// a call to a function pointer whose value is the address of the function
/// in the target process.
- //------------------------------------------------------------------
- //------------------------------------------------------------------
/// Write an initializer to a memory array of assumed sufficient size.
///
/// \param[in] data
@@ -400,10 +341,8 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool MaterializeInitializer(uint8_t *data, llvm::Constant *initializer);
- //------------------------------------------------------------------
/// Move an internal variable into the static allocation section.
///
/// \param[in] global_variable
@@ -411,10 +350,8 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool MaterializeInternalVariable(llvm::GlobalVariable *global_variable);
- //------------------------------------------------------------------
/// Handle a single externally-defined variable
///
/// \param[in] value
@@ -422,10 +359,8 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool MaybeHandleVariable(llvm::Value *value);
- //------------------------------------------------------------------
/// Handle a single externally-defined symbol
///
/// \param[in] symbol
@@ -433,10 +368,8 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool HandleSymbol(llvm::Value *symbol);
- //------------------------------------------------------------------
/// Handle a single externally-defined Objective-C class
///
/// \param[in] classlist_reference
@@ -445,10 +378,8 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool HandleObjCClass(llvm::Value *classlist_reference);
- //------------------------------------------------------------------
/// Handle all the arguments to a function call
///
/// \param[in] C
@@ -456,10 +387,8 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool MaybeHandleCallArguments(llvm::CallInst *call_inst);
- //------------------------------------------------------------------
/// Resolve variable references in calls to external functions
///
/// \param[in] basic_block
@@ -467,10 +396,8 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool ResolveCalls(llvm::BasicBlock &basic_block);
- //------------------------------------------------------------------
/// Remove calls to __cxa_atexit, which should never be generated by
/// expressions.
///
@@ -480,10 +407,8 @@ private:
/// \return
/// True if the scan was successful; false if some operation
/// failed
- //------------------------------------------------------------------
bool RemoveCXAAtExit(llvm::BasicBlock &basic_block);
- //------------------------------------------------------------------
/// The top-level pass implementation
///
/// \param[in] basic_block
@@ -491,25 +416,19 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool ResolveExternals(llvm::Function &llvm_function);
- //------------------------------------------------------------------
/// A basic block-level pass to excise guard variables from the code.
/// The result for the function is passed through Clang as a static
/// variable. Static variables normally have guard variables to ensure that
/// they are only initialized once.
- //------------------------------------------------------------------
- //------------------------------------------------------------------
/// Rewrite a load to a guard variable to return constant 0.
///
/// \param[in] guard_load
/// The load instruction to zero out.
- //------------------------------------------------------------------
void TurnGuardLoadIntoZero(llvm::Instruction *guard_load);
- //------------------------------------------------------------------
/// The top-level pass implementation
///
/// \param[in] basic_block
@@ -517,17 +436,13 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool RemoveGuards(llvm::BasicBlock &basic_block);
- //------------------------------------------------------------------
/// A function-level pass to make all external variable references
/// point at the correct offsets from the void* passed into the function.
/// ClangExpressionDeclMap::DoStructLayout() must be called beforehand, so
/// that the offsets are valid.
- //------------------------------------------------------------------
- //------------------------------------------------------------------
/// The top-level pass implementation
///
/// \param[in] llvm_function
@@ -535,7 +450,6 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool ReplaceVariables(llvm::Function &llvm_function);
/// Flags
@@ -585,7 +499,6 @@ private:
///final
/// location of the static allocation.
- //------------------------------------------------------------------
/// UnfoldConstant operates on a constant [Old] which has just been replaced
/// with a value [New]. We assume that new_value has been properly placed
/// early in the function, in front of the first instruction in the entry
@@ -603,7 +516,6 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
class FunctionValueCache {
public:
@@ -627,7 +539,6 @@ private:
FunctionValueCache &entry_instruction_finder,
lldb_private::Stream &error_stream);
- //------------------------------------------------------------------
/// Construct a reference to m_reloc_placeholder with a given type and
/// offset. This typically happens after inserting data into
/// m_data_allocator.
@@ -640,10 +551,8 @@ private:
///
/// \return
/// The Constant for the reference, usually a ConstantExpr.
- //------------------------------------------------------------------
llvm::Constant *BuildRelocation(llvm::Type *type, uint64_t offset);
- //------------------------------------------------------------------
/// Commit the allocation in m_data_allocator and use its final location to
/// replace m_reloc_placeholder.
///
@@ -652,7 +561,6 @@ private:
///
/// \return
/// True on success; false otherwise
- //------------------------------------------------------------------
bool CompleteDataAllocation();
};
Modified: lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp Wed Apr 10 13:48:55 2019
@@ -36,11 +36,9 @@ using namespace lldb_private;
#define AlignPC(pc_val) (pc_val & 0xFFFFFFFC)
-//----------------------------------------------------------------------
//
// ITSession implementation
//
-//----------------------------------------------------------------------
static bool GetARMDWARFRegisterInfo(unsigned reg_num, RegisterInfo ®_info) {
::memset(®_info, 0, sizeof(RegisterInfo));
@@ -709,11 +707,9 @@ uint32_t ITSession::GetCond() {
#define VFPv2_ABOVE (VFPv2 | VFPv3 | AdvancedSIMD)
#define VFPv2v3 (VFPv2 | VFPv3)
-//----------------------------------------------------------------------
//
// EmulateInstructionARM implementation
//
-//----------------------------------------------------------------------
void EmulateInstructionARM::Initialize() {
PluginManager::RegisterPlugin(GetPluginNameStatic(),
@@ -12852,9 +12848,7 @@ EmulateInstructionARM::ARMOpcode *
EmulateInstructionARM::GetARMOpcodeForInstruction(const uint32_t opcode,
uint32_t arm_isa) {
static ARMOpcode g_arm_opcodes[] = {
- //----------------------------------------------------------------------
// Prologue instructions
- //----------------------------------------------------------------------
// push register(s)
{0x0fff0000, 0x092d0000, ARMvAll, eEncodingA1, No_VFP, eSize32,
@@ -12893,9 +12887,7 @@ EmulateInstructionARM::GetARMOpcodeForIn
{0x0fbf0f00, 0x0d2d0a00, ARMV6T2_ABOVE, eEncodingA2, No_VFP, eSize32,
&EmulateInstructionARM::EmulateVPUSH, "vpush.32 <list>"},
- //----------------------------------------------------------------------
// Epilogue instructions
- //----------------------------------------------------------------------
{0x0fff0000, 0x08bd0000, ARMvAll, eEncodingA1, No_VFP, eSize32,
&EmulateInstructionARM::EmulatePOP, "pop <registers>"},
@@ -12906,15 +12898,11 @@ EmulateInstructionARM::GetARMOpcodeForIn
{0x0fbf0f00, 0x0cbd0a00, ARMV6T2_ABOVE, eEncodingA2, No_VFP, eSize32,
&EmulateInstructionARM::EmulateVPOP, "vpop.32 <list>"},
- //----------------------------------------------------------------------
// Supervisor Call (previously Software Interrupt)
- //----------------------------------------------------------------------
{0x0f000000, 0x0f000000, ARMvAll, eEncodingA1, No_VFP, eSize32,
&EmulateInstructionARM::EmulateSVC, "svc #imm24"},
- //----------------------------------------------------------------------
// Branch instructions
- //----------------------------------------------------------------------
// To resolve ambiguity, "blx <label>" should come before "b #imm24" and
// "bl <label>".
{0xfe000000, 0xfa000000, ARMV5_ABOVE, eEncodingA2, No_VFP, eSize32,
@@ -12932,9 +12920,7 @@ EmulateInstructionARM::GetARMOpcodeForIn
{0x0ffffff0, 0x012fff20, ARMvAll, eEncodingA1, No_VFP, eSize32,
&EmulateInstructionARM::EmulateBXJRm, "bxj <Rm>"},
- //----------------------------------------------------------------------
// Data-processing instructions
- //----------------------------------------------------------------------
// adc (immediate)
{0x0fe00000, 0x02a00000, ARMvAll, eEncodingA1, No_VFP, eSize32,
&EmulateInstructionARM::EmulateADCImm, "adc{s}<c> <Rd>, <Rn>, #const"},
@@ -13098,9 +13084,7 @@ EmulateInstructionARM::GetARMOpcodeForIn
&EmulateInstructionARM::EmulateSUBSPcLrEtc,
"<opc>S<c> PC,<Rn>,<Rm{,<shift>}"},
- //----------------------------------------------------------------------
// Load instructions
- //----------------------------------------------------------------------
{0x0fd00000, 0x08900000, ARMvAll, eEncodingA1, No_VFP, eSize32,
&EmulateInstructionARM::EmulateLDM, "ldm<c> <Rn>{!} <registers>"},
{0x0fd00000, 0x08100000, ARMvAll, eEncodingA1, No_VFP, eSize32,
@@ -13165,9 +13149,7 @@ EmulateInstructionARM::GetARMOpcodeForIn
&EmulateInstructionARM::EmulateVLD1SingleAll,
"vld1<c>.<size> <list>, [<Rn>{@<align>}], <Rm>"},
- //----------------------------------------------------------------------
// Store instructions
- //----------------------------------------------------------------------
{0x0fd00000, 0x08800000, ARMvAll, eEncodingA1, No_VFP, eSize32,
&EmulateInstructionARM::EmulateSTM, "stm<c> <Rn>{!} <registers>"},
{0x0fd00000, 0x08000000, ARMvAll, eEncodingA1, No_VFP, eSize32,
@@ -13211,9 +13193,7 @@ EmulateInstructionARM::GetARMOpcodeForIn
&EmulateInstructionARM::EmulateVST1Single,
"vst1<c>.<size> <list>, [<Rn>{@<align>}], <Rm>"},
- //----------------------------------------------------------------------
// Other instructions
- //----------------------------------------------------------------------
{0x0fff00f0, 0x06af00f0, ARMV6_ABOVE, eEncodingA1, No_VFP, eSize32,
&EmulateInstructionARM::EmulateSXTB, "sxtb<c> <Rd>,<Rm>{,<rotation>}"},
{0x0fff00f0, 0x06bf0070, ARMV6_ABOVE, eEncodingA1, No_VFP, eSize32,
@@ -13241,9 +13221,7 @@ EmulateInstructionARM::GetThumbOpcodeFor
uint32_t arm_isa) {
static ARMOpcode g_thumb_opcodes[] = {
- //----------------------------------------------------------------------
// Prologue instructions
- //----------------------------------------------------------------------
// push register(s)
{0xfffffe00, 0x0000b400, ARMvAll, eEncodingT1, No_VFP, eSize16,
@@ -13287,9 +13265,7 @@ EmulateInstructionARM::GetThumbOpcodeFor
{0xffbf0f00, 0xed2d0a00, ARMV6T2_ABOVE, eEncodingT2, No_VFP, eSize32,
&EmulateInstructionARM::EmulateVPUSH, "vpush.32 <list>"},
- //----------------------------------------------------------------------
// Epilogue instructions
- //----------------------------------------------------------------------
{0xfffff800, 0x0000a800, ARMV4T_ABOVE, eEncodingT1, No_VFP, eSize16,
&EmulateInstructionARM::EmulateADDSPImm, "add<c> <Rd>, sp, #imm"},
@@ -13306,15 +13282,11 @@ EmulateInstructionARM::GetThumbOpcodeFor
{0xffbf0f00, 0xecbd0a00, ARMV6T2_ABOVE, eEncodingT2, No_VFP, eSize32,
&EmulateInstructionARM::EmulateVPOP, "vpop.32 <list>"},
- //----------------------------------------------------------------------
// Supervisor Call (previously Software Interrupt)
- //----------------------------------------------------------------------
{0xffffff00, 0x0000df00, ARMvAll, eEncodingT1, No_VFP, eSize16,
&EmulateInstructionARM::EmulateSVC, "svc #imm8"},
- //----------------------------------------------------------------------
// If Then makes up to four following instructions conditional.
- //----------------------------------------------------------------------
// The next 5 opcode _must_ come before the if then instruction
{0xffffffff, 0x0000bf00, ARMV6T2_ABOVE, eEncodingT1, No_VFP, eSize16,
&EmulateInstructionARM::EmulateNop, "nop"},
@@ -13329,9 +13301,7 @@ EmulateInstructionARM::GetThumbOpcodeFor
{0xffffff00, 0x0000bf00, ARMV6T2_ABOVE, eEncodingT1, No_VFP, eSize16,
&EmulateInstructionARM::EmulateIT, "it{<x>{<y>{<z>}}} <firstcond>"},
- //----------------------------------------------------------------------
// Branch instructions
- //----------------------------------------------------------------------
// To resolve ambiguity, "b<c> #imm8" should come after "svc #imm8".
{0xfffff000, 0x0000d000, ARMvAll, eEncodingT1, No_VFP, eSize16,
&EmulateInstructionARM::EmulateB, "b<c> #imm8 (outside IT)"},
@@ -13366,9 +13336,7 @@ EmulateInstructionARM::GetThumbOpcodeFor
{0xfff0fff0, 0xe8d0f010, ARMV6T2_ABOVE, eEncodingT1, No_VFP, eSize32,
&EmulateInstructionARM::EmulateTB, "tbh<c> <Rn>, <Rm>, lsl #1"},
- //----------------------------------------------------------------------
// Data-processing instructions
- //----------------------------------------------------------------------
// adc (immediate)
{0xfbe08000, 0xf1400000, ARMV6T2_ABOVE, eEncodingT1, No_VFP, eSize32,
&EmulateInstructionARM::EmulateADCImm, "adc{s}<c> <Rd>, <Rn>, #<const>"},
@@ -13596,20 +13564,16 @@ EmulateInstructionARM::GetThumbOpcodeFor
{0xffffff00, 0xf3de8f00, ARMV6T2_ABOVE, eEncodingT1, No_VFP, eSize32,
&EmulateInstructionARM::EmulateSUBSPcLrEtc, "SUBS<c> PC, LR, #<imm8>"},
- //----------------------------------------------------------------------
// RFE instructions *** IMPORTANT *** THESE MUST BE LISTED **BEFORE** THE
// LDM.. Instructions in this table;
// otherwise the wrong instructions will be selected.
- //----------------------------------------------------------------------
{0xffd0ffff, 0xe810c000, ARMV6T2_ABOVE, eEncodingT1, No_VFP, eSize32,
&EmulateInstructionARM::EmulateRFE, "rfedb<c> <Rn>{!}"},
{0xffd0ffff, 0xe990c000, ARMV6T2_ABOVE, eEncodingT2, No_VFP, eSize32,
&EmulateInstructionARM::EmulateRFE, "rfe{ia}<c> <Rn>{!}"},
- //----------------------------------------------------------------------
// Load instructions
- //----------------------------------------------------------------------
{0xfffff800, 0x0000c800, ARMV4T_ABOVE, eEncodingT1, No_VFP, eSize16,
&EmulateInstructionARM::EmulateLDM, "ldm<c> <Rn>{!} <registers>"},
{0xffd02000, 0xe8900000, ARMV6T2_ABOVE, eEncodingT2, No_VFP, eSize32,
@@ -13717,9 +13681,7 @@ EmulateInstructionARM::GetThumbOpcodeFor
&EmulateInstructionARM::EmulateVLD1SingleAll,
"vld1<c>.<size> <list>, [<Rn>{@<align>}], <Rm>"},
- //----------------------------------------------------------------------
// Store instructions
- //----------------------------------------------------------------------
{0xfffff800, 0x0000c000, ARMV4T_ABOVE, eEncodingT1, No_VFP, eSize16,
&EmulateInstructionARM::EmulateSTM, "stm<c> <Rn>{!} <registers>"},
{0xffd00000, 0xe8800000, ARMV6T2_ABOVE, eEncodingT2, No_VFP, eSize32,
@@ -13776,9 +13738,7 @@ EmulateInstructionARM::GetThumbOpcodeFor
&EmulateInstructionARM::EmulateVST1Single,
"vst1<c>.<size> <list>, [<Rn>{@<align>}], <Rm>"},
- //----------------------------------------------------------------------
// Other instructions
- //----------------------------------------------------------------------
{0xffffffc0, 0x0000b240, ARMV6_ABOVE, eEncodingT1, No_VFP, eSize16,
&EmulateInstructionARM::EmulateSXTB, "sxtb<c> <Rd>,<Rm>"},
{0xfffff080, 0xfa4ff080, ARMV6_ABOVE, eEncodingT2, No_VFP, eSize32,
Modified: lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp Wed Apr 10 13:48:55 2019
@@ -117,11 +117,9 @@ ConstrainUnpredictable(EmulateInstructio
return result;
}
-//----------------------------------------------------------------------
//
// EmulateInstructionARM implementation
//
-//----------------------------------------------------------------------
void EmulateInstructionARM64::Initialize() {
PluginManager::RegisterPlugin(GetPluginNameStatic(),
@@ -207,9 +205,7 @@ bool EmulateInstructionARM64::GetRegiste
EmulateInstructionARM64::Opcode *
EmulateInstructionARM64::GetOpcodeForInstruction(const uint32_t opcode) {
static EmulateInstructionARM64::Opcode g_opcodes[] = {
- //----------------------------------------------------------------------
// Prologue instructions
- //----------------------------------------------------------------------
// push register(s)
{0xff000000, 0xd1000000, No_VFP,
Modified: lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp Wed Apr 10 13:48:55 2019
@@ -42,11 +42,9 @@ using namespace lldb_private;
#define UInt(x) ((uint64_t)x)
#define integer int64_t
-//----------------------------------------------------------------------
//
// EmulateInstructionMIPS implementation
//
-//----------------------------------------------------------------------
#ifdef __mips__
extern "C" {
@@ -677,9 +675,7 @@ bool EmulateInstructionMIPS::GetRegister
EmulateInstructionMIPS::MipsOpcode *
EmulateInstructionMIPS::GetOpcodeForInstruction(const char *op_name) {
static EmulateInstructionMIPS::MipsOpcode g_opcodes[] = {
- //----------------------------------------------------------------------
// Prologue/Epilogue instructions
- //----------------------------------------------------------------------
{"ADDiu", &EmulateInstructionMIPS::Emulate_ADDiu,
"ADDIU rt, rs, immediate"},
{"SW", &EmulateInstructionMIPS::Emulate_SW, "SW rt, offset(rs)"},
@@ -688,9 +684,7 @@ EmulateInstructionMIPS::GetOpcodeForInst
{"ADDU", &EmulateInstructionMIPS::Emulate_SUBU_ADDU, "ADDU rd, rs, rt"},
{"LUI", &EmulateInstructionMIPS::Emulate_LUI, "LUI rt, immediate"},
- //----------------------------------------------------------------------
// MicroMIPS Prologue/Epilogue instructions
- //----------------------------------------------------------------------
{"ADDIUSP_MM", &EmulateInstructionMIPS::Emulate_ADDIUSP,
"ADDIU immediate"},
{"ADDIUS5_MM", &EmulateInstructionMIPS::Emulate_ADDIUS5,
@@ -711,10 +705,8 @@ EmulateInstructionMIPS::GetOpcodeForInst
"LWP rd,offset(base)"},
{"JRADDIUSP", &EmulateInstructionMIPS::Emulate_JRADDIUSP,
"JRADDIUSP immediate"},
- //----------------------------------------------------------------------
// Load/Store instructions
- //----------------------------------------------------------------------
/* Following list of emulated instructions are required by implementation
of hardware watchpoint
for MIPS in lldb. As we just need the address accessed by instructions,
@@ -834,9 +826,7 @@ EmulateInstructionMIPS::GetOpcodeForInst
{"SCDX", &EmulateInstructionMIPS::Emulate_LDST_Imm,
"SCDX rt, offset(base)"},
- //----------------------------------------------------------------------
// MicroMIPS Load/Store instructions
- //----------------------------------------------------------------------
{"LBU16_MM", &EmulateInstructionMIPS::Emulate_LDST_Imm,
"LBU16 rt, decoded_offset(base)"},
{"LHU16_MM", &EmulateInstructionMIPS::Emulate_LDST_Imm,
@@ -854,9 +844,7 @@ EmulateInstructionMIPS::GetOpcodeForInst
{"SB16_MM", &EmulateInstructionMIPS::Emulate_LDST_Imm,
"SB16 rt, offset(base)"},
- //----------------------------------------------------------------------
// Branch instructions
- //----------------------------------------------------------------------
{"BEQ", &EmulateInstructionMIPS::Emulate_BXX_3ops, "BEQ rs,rt,offset"},
{"BNE", &EmulateInstructionMIPS::Emulate_BXX_3ops, "BNE rs,rt,offset"},
{"BEQL", &EmulateInstructionMIPS::Emulate_BXX_3ops, "BEQL rs,rt,offset"},
@@ -948,9 +936,7 @@ EmulateInstructionMIPS::GetOpcodeForInst
{"BNZ_V", &EmulateInstructionMIPS::Emulate_BNZV, "BNZ.V wt,s16"},
{"BZ_V", &EmulateInstructionMIPS::Emulate_BZV, "BZ.V wt,s16"},
- //----------------------------------------------------------------------
// MicroMIPS Branch instructions
- //----------------------------------------------------------------------
{"B16_MM", &EmulateInstructionMIPS::Emulate_B16_MM, "B16 offset"},
{"BEQZ16_MM", &EmulateInstructionMIPS::Emulate_Branch_MM,
"BEQZ16 rs, offset"},
Modified: lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp Wed Apr 10 13:48:55 2019
@@ -42,11 +42,9 @@ using namespace lldb_private;
#define UInt(x) ((uint64_t)x)
#define integer int64_t
-//----------------------------------------------------------------------
//
// EmulateInstructionMIPS64 implementation
//
-//----------------------------------------------------------------------
#ifdef __mips__
extern "C" {
@@ -664,9 +662,7 @@ bool EmulateInstructionMIPS64::GetRegist
EmulateInstructionMIPS64::MipsOpcode *
EmulateInstructionMIPS64::GetOpcodeForInstruction(const char *op_name) {
static EmulateInstructionMIPS64::MipsOpcode g_opcodes[] = {
- //----------------------------------------------------------------------
// Prologue/Epilogue instructions
- //----------------------------------------------------------------------
{"DADDiu", &EmulateInstructionMIPS64::Emulate_DADDiu,
"DADDIU rt, rs, immediate"},
{"ADDiu", &EmulateInstructionMIPS64::Emulate_DADDiu,
@@ -683,9 +679,7 @@ EmulateInstructionMIPS64::GetOpcodeForIn
"ADDU rd, rs, rt"},
{"LUI", &EmulateInstructionMIPS64::Emulate_LUI, "LUI rt, immediate"},
- //----------------------------------------------------------------------
// Load/Store instructions
- //----------------------------------------------------------------------
/* Following list of emulated instructions are required by implementation
of hardware watchpoint
for MIPS in lldb. As we just need the address accessed by instructions,
@@ -791,9 +785,7 @@ EmulateInstructionMIPS64::GetOpcodeForIn
{"SWXC1", &EmulateInstructionMIPS64::Emulate_LDST_Reg,
"SWXC1 fs, index (base)"},
- //----------------------------------------------------------------------
// Branch instructions
- //----------------------------------------------------------------------
{"BEQ", &EmulateInstructionMIPS64::Emulate_BXX_3ops, "BEQ rs,rt,offset"},
{"BEQ64", &EmulateInstructionMIPS64::Emulate_BXX_3ops, "BEQ rs,rt,offset"},
{"BNE", &EmulateInstructionMIPS64::Emulate_BXX_3ops, "BNE rs,rt,offset"},
Modified: lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp (original)
+++ lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp Wed Apr 10 13:48:55 2019
@@ -34,9 +34,7 @@
using namespace lldb;
using namespace lldb_private;
-//------------------------------------------------------------------
// Debug Interface Structures
-//------------------------------------------------------------------
typedef enum {
JIT_NOACTION = 0,
JIT_REGISTER_FN,
@@ -177,9 +175,7 @@ void JITLoaderGDB::ModulesDidLoad(Module
SetJITBreakpoint(module_list);
}
-//------------------------------------------------------------------
// Setup the JIT Breakpoint
-//------------------------------------------------------------------
void JITLoaderGDB::SetJITBreakpoint(lldb_private::ModuleList &module_list) {
if (DidSetJITBreakpoint())
return;
@@ -405,9 +401,7 @@ bool JITLoaderGDB::ReadJITDescriptorImpl
return false; // Continue Running.
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString JITLoaderGDB::GetPluginNameStatic() {
static ConstString g_name("gdb");
return g_name;
Modified: lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.h (original)
+++ lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.h Wed Apr 10 13:48:55 2019
@@ -20,9 +20,7 @@ public:
~JITLoaderGDB() override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -36,16 +34,12 @@ public:
static void DebuggerInitialize(lldb_private::Debugger &debugger);
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
- //------------------------------------------------------------------
// JITLoader interface
- //------------------------------------------------------------------
void DidAttach() override;
void DidLaunch() override;
Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp Wed Apr 10 13:48:55 2019
@@ -56,9 +56,7 @@ lldb_private::ConstString CPlusPlusLangu
return g_name;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString CPlusPlusLanguage::GetPluginName() {
return GetPluginNameStatic();
@@ -66,9 +64,7 @@ lldb_private::ConstString CPlusPlusLangu
uint32_t CPlusPlusLanguage::GetPluginVersion() { return 1; }
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
Language *CPlusPlusLanguage::CreateInstance(lldb::LanguageType language) {
if (Language::LanguageIsCPlusPlus(language))
Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h Wed Apr 10 13:48:55 2019
@@ -92,9 +92,7 @@ public:
const Highlighter *GetHighlighter() const override { return &m_highlighter; }
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -127,9 +125,7 @@ public:
FindAlternateFunctionManglings(const ConstString mangled,
std::set<ConstString> &candidates);
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Modified: lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp Wed Apr 10 13:48:55 2019
@@ -48,9 +48,7 @@ lldb_private::ConstString ObjCLanguage::
return g_name;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ObjCLanguage::GetPluginName() {
return GetPluginNameStatic();
@@ -58,9 +56,7 @@ lldb_private::ConstString ObjCLanguage::
uint32_t ObjCLanguage::GetPluginVersion() { return 1; }
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
Language *ObjCLanguage::CreateInstance(lldb::LanguageType language) {
switch (language) {
Modified: lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h Wed Apr 10 13:48:55 2019
@@ -123,9 +123,7 @@ public:
const Highlighter *GetHighlighter() const override { return &m_highlighter; }
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -154,9 +152,7 @@ public:
return false;
}
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Modified: lldb/trunk/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.cpp Wed Apr 10 13:48:55 2019
@@ -38,18 +38,14 @@ lldb_private::ConstString ObjCPlusPlusLa
return g_name;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ObjCPlusPlusLanguage::GetPluginName() {
return GetPluginNameStatic();
}
uint32_t ObjCPlusPlusLanguage::GetPluginVersion() { return 1; }
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
Language *ObjCPlusPlusLanguage::CreateInstance(lldb::LanguageType language) {
switch (language) {
case lldb::eLanguageTypeObjC_plus_plus:
Modified: lldb/trunk/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h (original)
+++ lldb/trunk/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h Wed Apr 10 13:48:55 2019
@@ -31,9 +31,7 @@ public:
const Highlighter *GetHighlighter() const override { return &m_highlighter; }
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -42,9 +40,7 @@ public:
static lldb_private::ConstString GetPluginNameStatic();
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Modified: lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp Wed Apr 10 13:48:55 2019
@@ -313,9 +313,7 @@ bool ItaniumABILanguageRuntime::IsVTable
return strstr(name, "_vptr$") == name;
}
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
LanguageRuntime *
ItaniumABILanguageRuntime::CreateInstance(Process *process,
lldb::LanguageType language) {
@@ -427,9 +425,7 @@ lldb_private::ConstString ItaniumABILang
return g_name;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ItaniumABILanguageRuntime::GetPluginName() {
return GetPluginNameStatic();
}
Modified: lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h Wed Apr 10 13:48:55 2019
@@ -26,9 +26,7 @@ class ItaniumABILanguageRuntime : public
public:
~ItaniumABILanguageRuntime() override = default;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -68,9 +66,7 @@ public:
lldb::ValueObjectSP GetExceptionObjectForThread(
lldb::ThreadSP thread_sp) override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp Wed Apr 10 13:48:55 2019
@@ -343,9 +343,7 @@ ThreadPlanSP AppleObjCRuntime::GetStepTh
return thread_plan_sp;
}
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
ObjCLanguageRuntime::ObjCRuntimeVersions
AppleObjCRuntime::GetObjCVersion(Process *process, ModuleSP &objc_module_sp) {
if (!process)
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h Wed Apr 10 13:48:55 2019
@@ -23,9 +23,7 @@ class AppleObjCRuntime : public lldb_pri
public:
~AppleObjCRuntime() override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
// Note there is no CreateInstance, Initialize & Terminate functions here,
// because
// you can't make an instance of this generic runtime.
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp Wed Apr 10 13:48:55 2019
@@ -61,9 +61,7 @@ bool AppleObjCRuntimeV1::GetDynamicTypeA
return !class_type_or_name.IsEmpty();
}
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
lldb_private::LanguageRuntime *
AppleObjCRuntimeV1::CreateInstance(Process *process,
lldb::LanguageType language) {
@@ -97,9 +95,7 @@ lldb_private::ConstString AppleObjCRunti
return g_name;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
ConstString AppleObjCRuntimeV1::GetPluginName() {
return GetPluginNameStatic();
}
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h Wed Apr 10 13:48:55 2019
@@ -19,9 +19,7 @@ class AppleObjCRuntimeV1 : public AppleO
public:
~AppleObjCRuntimeV1() override = default;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -99,9 +97,7 @@ public:
UtilityFunction *CreateObjectChecker(const char *) override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Wed Apr 10 13:48:55 2019
@@ -453,9 +453,7 @@ bool AppleObjCRuntimeV2::GetDynamicTypeA
return !class_type_or_name.IsEmpty();
}
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
LanguageRuntime *AppleObjCRuntimeV2::CreateInstance(Process *process,
LanguageType language) {
// FIXME: This should be a MacOS or iOS process, and we need to look for the
@@ -785,9 +783,7 @@ lldb_private::ConstString AppleObjCRunti
return g_name;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString AppleObjCRuntimeV2::GetPluginName() {
return GetPluginNameStatic();
}
@@ -868,20 +864,16 @@ size_t AppleObjCRuntimeV2::GetByteOffset
const char *class_name = parent_ast_type.GetConstTypeName().AsCString();
if (class_name && class_name[0] && ivar_name && ivar_name[0]) {
- //----------------------------------------------------------------------
// Make the objective C V2 mangled name for the ivar offset from the class
// name and ivar name
- //----------------------------------------------------------------------
std::string buffer("OBJC_IVAR_$_");
buffer.append(class_name);
buffer.push_back('.');
buffer.append(ivar_name);
ConstString ivar_const_str(buffer.c_str());
- //----------------------------------------------------------------------
// Try to get the ivar offset address from the symbol table first using the
// name we created above
- //----------------------------------------------------------------------
SymbolContextList sc_list;
Target &target = m_process->GetTarget();
target.GetImages().FindSymbolsWithNameAndType(ivar_const_str,
@@ -898,10 +890,8 @@ size_t AppleObjCRuntimeV2::GetByteOffset
ivar_offset_symbol.symbol->GetLoadAddress(&target);
}
- //----------------------------------------------------------------------
// If we didn't get the ivar offset address from the symbol table, fall
// back to getting it from the runtime
- //----------------------------------------------------------------------
if (ivar_offset_address == LLDB_INVALID_ADDRESS)
ivar_offset_address = LookupRuntimeSymbol(ivar_const_str);
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h Wed Apr 10 13:48:55 2019
@@ -25,9 +25,7 @@ class AppleObjCRuntimeV2 : public AppleO
public:
~AppleObjCRuntimeV2() override = default;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -55,9 +53,7 @@ public:
UtilityFunction *CreateObjectChecker(const char *) override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp Wed Apr 10 13:48:55 2019
@@ -1,5 +1,4 @@
//===-- AppleThreadPlanStepThroughObjCTrampoline.cpp
-//--------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -26,9 +25,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// ThreadPlanStepThroughObjCTrampoline constructor
-//----------------------------------------------------------------------
AppleThreadPlanStepThroughObjCTrampoline::
AppleThreadPlanStepThroughObjCTrampoline(
Thread &thread, AppleObjCTrampolineHandler *trampoline_handler,
@@ -42,9 +39,7 @@ AppleThreadPlanStepThroughObjCTrampoline
m_isa_addr(isa_addr), m_sel_addr(sel_addr), m_impl_function(NULL),
m_stop_others(stop_others) {}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
AppleThreadPlanStepThroughObjCTrampoline::
~AppleThreadPlanStepThroughObjCTrampoline() {}
Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp Wed Apr 10 13:48:55 2019
@@ -790,9 +790,7 @@ const uint32_t RenderScriptRuntime::Allo
// RS_TYPE_MATRIX_2X2
{eFormatVectorOfFloat32, eFormatVectorOfFloat32, sizeof(float) * 4}};
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
LanguageRuntime *
RenderScriptRuntime::CreateInstance(Process *process,
lldb::LanguageType language) {
@@ -1030,9 +1028,7 @@ void RenderScriptRuntime::ModulesDidLoad
}
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString RenderScriptRuntime::GetPluginName() {
return GetPluginNameStatic();
}
Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h Wed Apr 10 13:48:55 2019
@@ -301,9 +301,7 @@ public:
~RenderScriptRuntime() override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -395,9 +393,7 @@ public:
return false;
}
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Modified: lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp Wed Apr 10 13:48:55 2019
@@ -436,9 +436,7 @@ ObjectFileSP ObjectContainerBSDArchive::
return ObjectFileSP();
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ObjectContainerBSDArchive::GetPluginName() {
return GetPluginNameStatic();
}
Modified: lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h (original)
+++ lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h Wed Apr 10 13:48:55 2019
@@ -31,9 +31,7 @@ public:
~ObjectContainerBSDArchive() override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -56,9 +54,7 @@ public:
static bool MagicBytesMatch(const lldb_private::DataExtractor &data);
- //------------------------------------------------------------------
// Member Functions
- //------------------------------------------------------------------
bool ParseHeader() override;
size_t GetNumObjects() const override {
@@ -71,9 +67,7 @@ public:
lldb::ObjectFileSP GetObjectFile(const lldb_private::FileSpec *file) override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
@@ -153,9 +147,7 @@ protected:
protected:
typedef lldb_private::UniqueCStringMap<uint32_t> ObjectNameToIndexMap;
- //----------------------------------------------------------------------
// Member Variables
- //----------------------------------------------------------------------
lldb_private::ArchSpec m_arch;
llvm::sys::TimePoint<> m_time;
lldb::offset_t m_file_offset;
Modified: lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp Wed Apr 10 13:48:55 2019
@@ -202,9 +202,7 @@ ObjectContainerUniversalMachO::GetObject
return ObjectFileSP();
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ObjectContainerUniversalMachO::GetPluginName() {
return GetPluginNameStatic();
}
Modified: lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h (original)
+++ lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h Wed Apr 10 13:48:55 2019
@@ -23,9 +23,7 @@ public:
~ObjectContainerUniversalMachO() override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -48,9 +46,7 @@ public:
static bool MagicBytesMatch(const lldb_private::DataExtractor &data);
- //------------------------------------------------------------------
// Member Functions
- //------------------------------------------------------------------
bool ParseHeader() override;
void Dump(lldb_private::Stream *s) const override;
@@ -62,9 +58,7 @@ public:
lldb::ObjectFileSP GetObjectFile(const lldb_private::FileSpec *file) override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Modified: lldb/trunk/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.h (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.h Wed Apr 10 13:48:55 2019
@@ -17,9 +17,7 @@ namespace breakpad {
class ObjectFileBreakpad : public ObjectFile {
public:
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -45,16 +43,12 @@ public:
lldb::offset_t length,
ModuleSpecList &specs);
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
ConstString GetPluginName() override { return GetPluginNameStatic(); }
uint32_t GetPluginVersion() override { return 1; }
- //------------------------------------------------------------------
// ObjectFile Protocol.
- //------------------------------------------------------------------
bool ParseHeader() override;
Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp Wed Apr 10 13:48:55 2019
@@ -18,7 +18,6 @@ using namespace elf;
using namespace lldb;
using namespace llvm::ELF;
-//------------------------------------------------------------------------------
// Static utility functions.
//
// GetMaxU64 and GetMaxS64 wrap the similarly named methods from DataExtractor
@@ -67,7 +66,6 @@ static bool GetMaxS64(const lldb_private
return true;
}
-//------------------------------------------------------------------------------
// ELFHeader
ELFHeader::ELFHeader() { memset(this, 0, sizeof(ELFHeader)); }
@@ -215,7 +213,6 @@ unsigned ELFHeader::GetRelocationJumpSlo
return slot;
}
-//------------------------------------------------------------------------------
// ELFSectionHeader
ELFSectionHeader::ELFSectionHeader() {
@@ -249,7 +246,6 @@ bool ELFSectionHeader::Parse(const lldb_
return true;
}
-//------------------------------------------------------------------------------
// ELFSymbol
ELFSymbol::ELFSymbol() { memset(this, 0, sizeof(ELFSymbol)); }
@@ -357,7 +353,6 @@ bool ELFSymbol::Parse(const lldb_private
return true;
}
-//------------------------------------------------------------------------------
// ELFProgramHeader
ELFProgramHeader::ELFProgramHeader() {
@@ -398,7 +393,6 @@ bool ELFProgramHeader::Parse(const lldb_
return true;
}
-//------------------------------------------------------------------------------
// ELFDynamic
ELFDynamic::ELFDynamic() { memset(this, 0, sizeof(ELFDynamic)); }
@@ -409,7 +403,6 @@ bool ELFDynamic::Parse(const lldb_privat
return GetMaxS64(data, offset, &d_tag, byte_size, 2);
}
-//------------------------------------------------------------------------------
// ELFRel
ELFRel::ELFRel() { memset(this, 0, sizeof(ELFRel)); }
@@ -422,7 +415,6 @@ bool ELFRel::Parse(const lldb_private::D
return GetMaxU64(data, offset, &r_offset, byte_size, 2) != false;
}
-//------------------------------------------------------------------------------
// ELFRela
ELFRela::ELFRela() { memset(this, 0, sizeof(ELFRela)); }
Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.h (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.h Wed Apr 10 13:48:55 2019
@@ -31,7 +31,6 @@ class DataExtractor;
namespace elf {
-//------------------------------------------------------------------------------
/// \name ELF type definitions.
///
/// Types used to represent the various components of ELF structures. All
@@ -49,7 +48,6 @@ typedef uint64_t elf_xword;
typedef int64_t elf_sxword;
//@}
-//------------------------------------------------------------------------------
/// \class ELFHeader
/// Generic representation of an ELF file header.
///
@@ -80,7 +78,6 @@ struct ELFHeader {
ELFHeader();
- //--------------------------------------------------------------------------
/// Returns true if this is a 32 bit ELF file header.
///
/// \return
@@ -89,7 +86,6 @@ struct ELFHeader {
return e_ident[llvm::ELF::EI_CLASS] == llvm::ELF::ELFCLASS32;
}
- //--------------------------------------------------------------------------
/// Returns true if this is a 64 bit ELF file header.
///
/// \return
@@ -98,18 +94,15 @@ struct ELFHeader {
return e_ident[llvm::ELF::EI_CLASS] == llvm::ELF::ELFCLASS64;
}
- //--------------------------------------------------------------------------
/// The byte order of this ELF file header.
///
/// \return
/// The byte order of this ELF file as described by the header.
lldb::ByteOrder GetByteOrder() const;
- //--------------------------------------------------------------------------
/// The jump slot relocation type of this ELF.
unsigned GetRelocationJumpSlotType() const;
- //--------------------------------------------------------------------------
/// Check if there should be header extension in section header #0
///
/// \return
@@ -117,7 +110,6 @@ struct ELFHeader {
/// and false otherwise.
bool HasHeaderExtension() const;
- //--------------------------------------------------------------------------
/// Parse an ELFHeader entry starting at position \p offset and update the
/// data extractor with the address size and byte order attributes as
/// defined by the header.
@@ -135,7 +127,6 @@ struct ELFHeader {
/// otherwise.
bool Parse(lldb_private::DataExtractor &data, lldb::offset_t *offset);
- //--------------------------------------------------------------------------
/// Examines at most EI_NIDENT bytes starting from the given pointer and
/// determines if the magic ELF identification exists.
///
@@ -143,7 +134,6 @@ struct ELFHeader {
/// True if the given sequence of bytes identifies an ELF file.
static bool MagicBytesMatch(const uint8_t *magic);
- //--------------------------------------------------------------------------
/// Examines at most EI_NIDENT bytes starting from the given address and
/// determines the address size of the underlying ELF file. This function
/// should only be called on an pointer for which MagicBytesMatch returns
@@ -156,7 +146,6 @@ struct ELFHeader {
private:
- //--------------------------------------------------------------------------
/// Parse an ELFHeader header extension entry. This method is called by
/// Parse().
///
@@ -165,7 +154,6 @@ private:
void ParseHeaderExtension(lldb_private::DataExtractor &data);
};
-//------------------------------------------------------------------------------
/// \class ELFSectionHeader
/// Generic representation of an ELF section header.
struct ELFSectionHeader {
@@ -182,7 +170,6 @@ struct ELFSectionHeader {
ELFSectionHeader();
- //--------------------------------------------------------------------------
/// Parse an ELFSectionHeader entry from the given DataExtracter starting at
/// position \p offset.
///
@@ -200,7 +187,6 @@ struct ELFSectionHeader {
bool Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset);
};
-//------------------------------------------------------------------------------
/// \class ELFProgramHeader
/// Generic representation of an ELF program header.
struct ELFProgramHeader {
@@ -233,7 +219,6 @@ struct ELFProgramHeader {
bool Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset);
};
-//------------------------------------------------------------------------------
/// \class ELFSymbol
/// Represents a symbol within an ELF symbol table.
struct ELFSymbol {
@@ -286,7 +271,6 @@ struct ELFSymbol {
const lldb_private::SectionList *section_list);
};
-//------------------------------------------------------------------------------
/// \class ELFDynamic
/// Represents an entry in an ELF dynamic table.
struct ELFDynamic {
@@ -316,7 +300,6 @@ struct ELFDynamic {
bool Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset);
};
-//------------------------------------------------------------------------------
/// \class ELFRel
/// Represents a relocation entry with an implicit addend.
struct ELFRel {
@@ -358,7 +341,6 @@ struct ELFRel {
static unsigned RelocSymbol64(const ELFRel &rel) { return rel.r_info >> 32; }
};
-//------------------------------------------------------------------------------
/// \class ELFRela
/// Represents a relocation entry with an explicit addend.
struct ELFRela {
Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Wed Apr 10 13:48:55 2019
@@ -336,9 +336,7 @@ static uint32_t subTypeFromElfHeader(con
// Arbitrary constant used as UUID prefix for core files.
const uint32_t ObjectFileELF::g_core_uuid_magic(0xE210C);
-//------------------------------------------------------------------
// Static methods.
-//------------------------------------------------------------------
void ObjectFileELF::Initialize() {
PluginManager::RegisterPlugin(GetPluginNameStatic(),
GetPluginDescriptionStatic(), CreateInstance,
@@ -711,17 +709,13 @@ size_t ObjectFileELF::GetModuleSpecifica
return specs.GetSize() - initial_count;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ObjectFileELF::GetPluginName() {
return GetPluginNameStatic();
}
uint32_t ObjectFileELF::GetPluginVersion() { return m_plugin_version; }
-//------------------------------------------------------------------
// ObjectFile protocol
-//------------------------------------------------------------------
ObjectFileELF::ObjectFileELF(const lldb::ModuleSP &module_sp,
DataBufferSP &data_sp, lldb::offset_t data_offset,
@@ -1009,9 +1003,7 @@ Address ObjectFileELF::GetBaseAddress()
return LLDB_INVALID_ADDRESS;
}
-//----------------------------------------------------------------------
// ParseDependentModules
-//----------------------------------------------------------------------
size_t ObjectFileELF::ParseDependentModules() {
if (m_filespec_up)
return m_filespec_up->GetSize();
@@ -1070,9 +1062,7 @@ size_t ObjectFileELF::ParseDependentModu
return m_filespec_up->GetSize();
}
-//----------------------------------------------------------------------
// GetProgramHeaderInfo
-//----------------------------------------------------------------------
size_t ObjectFileELF::GetProgramHeaderInfo(ProgramHeaderColl &program_headers,
DataExtractor &object_data,
const ELFHeader &header) {
@@ -1107,9 +1097,7 @@ size_t ObjectFileELF::GetProgramHeaderIn
return program_headers.size();
}
-//----------------------------------------------------------------------
// ParseProgramHeaders
-//----------------------------------------------------------------------
bool ObjectFileELF::ParseProgramHeaders() {
return GetProgramHeaderInfo(m_program_headers, m_data, m_header) != 0;
}
@@ -1302,8 +1290,6 @@ ObjectFileELF::RefineModuleDetailsFromNo
// the contents look like this in a 64 bit ELF core file: count =
// 0x000000000000000a (10) page_size = 0x0000000000001000 (4096) Index
// start end file_ofs path =====
- // ------------------ ------------------ ------------------
- // ------------------------------------- [ 0] 0x0000000000400000
// 0x0000000000401000 0x0000000000000000 /tmp/a.out [ 1]
// 0x0000000000600000 0x0000000000601000 0x0000000000000000 /tmp/a.out [
// 2] 0x0000000000601000 0x0000000000602000 0x0000000000000001 /tmp/a.out
@@ -1427,9 +1413,7 @@ void ObjectFileELF::ParseARMAttributes(D
}
}
-//----------------------------------------------------------------------
// GetSectionHeaderInfo
-//----------------------------------------------------------------------
size_t ObjectFileELF::GetSectionHeaderInfo(SectionHeaderColl §ion_headers,
DataExtractor &object_data,
const elf::ELFHeader &header,
@@ -1662,9 +1646,7 @@ ObjectFileELF::StripLinkerSymbolAnnotati
return symbol_name.substr(0, pos);
}
-//----------------------------------------------------------------------
// ParseSectionHeaders
-//----------------------------------------------------------------------
size_t ObjectFileELF::ParseSectionHeaders() {
return GetSectionHeaderInfo(m_section_headers, m_data, m_header, m_uuid,
m_gnu_debuglink_file, m_gnu_debuglink_crc,
@@ -2932,7 +2914,6 @@ bool ObjectFileELF::IsStripped() {
//
// Dump the specifics of the runtime file container (such as any headers
// segments, sections, etc).
-//----------------------------------------------------------------------
void ObjectFileELF::Dump(Stream *s) {
ModuleSP module_sp(GetModule());
if (!module_sp) {
@@ -2966,11 +2947,9 @@ void ObjectFileELF::Dump(Stream *s) {
s->EOL();
}
-//----------------------------------------------------------------------
// DumpELFHeader
//
// Dump the ELF header to the specified output stream
-//----------------------------------------------------------------------
void ObjectFileELF::DumpELFHeader(Stream *s, const ELFHeader &header) {
s->PutCString("ELF Header\n");
s->Printf("e_ident[EI_MAG0 ] = 0x%2.2x\n", header.e_ident[EI_MAG0]);
@@ -3003,11 +2982,9 @@ void ObjectFileELF::DumpELFHeader(Stream
s->Printf("e_shstrndx = 0x%8.8x\n", header.e_shstrndx);
}
-//----------------------------------------------------------------------
// DumpELFHeader_e_type
//
// Dump an token value for the ELF header member e_type
-//----------------------------------------------------------------------
void ObjectFileELF::DumpELFHeader_e_type(Stream *s, elf_half e_type) {
switch (e_type) {
case ET_NONE:
@@ -3030,11 +3007,9 @@ void ObjectFileELF::DumpELFHeader_e_type
}
}
-//----------------------------------------------------------------------
// DumpELFHeader_e_ident_EI_DATA
//
// Dump an token value for the ELF header member e_ident[EI_DATA]
-//----------------------------------------------------------------------
void ObjectFileELF::DumpELFHeader_e_ident_EI_DATA(Stream *s,
unsigned char ei_data) {
switch (ei_data) {
@@ -3052,11 +3027,9 @@ void ObjectFileELF::DumpELFHeader_e_iden
}
}
-//----------------------------------------------------------------------
// DumpELFProgramHeader
//
// Dump a single ELF program header to the specified output stream
-//----------------------------------------------------------------------
void ObjectFileELF::DumpELFProgramHeader(Stream *s,
const ELFProgramHeader &ph) {
DumpELFProgramHeader_p_type(s, ph.p_type);
@@ -3069,12 +3042,10 @@ void ObjectFileELF::DumpELFProgramHeader
s->Printf(") %8.8" PRIx64, ph.p_align);
}
-//----------------------------------------------------------------------
// DumpELFProgramHeader_p_type
//
// Dump an token value for the ELF program header member p_type which describes
// the type of the program header
-// ----------------------------------------------------------------------
void ObjectFileELF::DumpELFProgramHeader_p_type(Stream *s, elf_word p_type) {
const int kStrWidth = 15;
switch (p_type) {
@@ -3093,11 +3064,9 @@ void ObjectFileELF::DumpELFProgramHeader
}
}
-//----------------------------------------------------------------------
// DumpELFProgramHeader_p_flags
//
// Dump an token value for the ELF program header member p_flags
-//----------------------------------------------------------------------
void ObjectFileELF::DumpELFProgramHeader_p_flags(Stream *s, elf_word p_flags) {
*s << ((p_flags & PF_X) ? "PF_X" : " ")
<< (((p_flags & PF_X) && (p_flags & PF_W)) ? '+' : ' ')
@@ -3106,11 +3075,9 @@ void ObjectFileELF::DumpELFProgramHeader
<< ((p_flags & PF_R) ? "PF_R" : " ");
}
-//----------------------------------------------------------------------
// DumpELFProgramHeaders
//
// Dump all of the ELF program header to the specified output stream
-//----------------------------------------------------------------------
void ObjectFileELF::DumpELFProgramHeaders(Stream *s) {
if (!ParseProgramHeaders())
return;
@@ -3128,11 +3095,9 @@ void ObjectFileELF::DumpELFProgramHeader
}
}
-//----------------------------------------------------------------------
// DumpELFSectionHeader
//
// Dump a single ELF section header to the specified output stream
-//----------------------------------------------------------------------
void ObjectFileELF::DumpELFSectionHeader(Stream *s,
const ELFSectionHeaderInfo &sh) {
s->Printf("%8.8x ", sh.sh_name);
@@ -3145,12 +3110,10 @@ void ObjectFileELF::DumpELFSectionHeader
s->Printf(" %8.8" PRIx64 " %8.8" PRIx64, sh.sh_addralign, sh.sh_entsize);
}
-//----------------------------------------------------------------------
// DumpELFSectionHeader_sh_type
//
// Dump an token value for the ELF section header member sh_type which
// describes the type of the section
-//----------------------------------------------------------------------
void ObjectFileELF::DumpELFSectionHeader_sh_type(Stream *s, elf_word sh_type) {
const int kStrWidth = 12;
switch (sh_type) {
@@ -3176,11 +3139,9 @@ void ObjectFileELF::DumpELFSectionHeader
}
}
-//----------------------------------------------------------------------
// DumpELFSectionHeader_sh_flags
//
// Dump an token value for the ELF section header member sh_flags
-//----------------------------------------------------------------------
void ObjectFileELF::DumpELFSectionHeader_sh_flags(Stream *s,
elf_xword sh_flags) {
*s << ((sh_flags & SHF_WRITE) ? "WRITE" : " ")
@@ -3190,11 +3151,9 @@ void ObjectFileELF::DumpELFSectionHeader
<< ((sh_flags & SHF_EXECINSTR) ? "EXECINSTR" : " ");
}
-//----------------------------------------------------------------------
// DumpELFSectionHeaders
//
// Dump all of the ELF section header to the specified output stream
-//----------------------------------------------------------------------
void ObjectFileELF::DumpELFSectionHeaders(Stream *s) {
if (!ParseSectionHeaders())
return;
Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h Wed Apr 10 13:48:55 2019
@@ -49,7 +49,6 @@ struct ELFNote {
}
};
-//------------------------------------------------------------------------------
/// \class ObjectFileELF
/// Generic ELF object file reader.
///
@@ -59,9 +58,7 @@ class ObjectFileELF : public lldb_privat
public:
~ObjectFileELF() override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -89,16 +86,12 @@ public:
static bool MagicBytesMatch(lldb::DataBufferSP &data_sp, lldb::addr_t offset,
lldb::addr_t length);
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
- //------------------------------------------------------------------
// ObjectFile Protocol.
- //------------------------------------------------------------------
bool ParseHeader() override;
bool SetLoadAddress(lldb_private::Target &target, lldb::addr_t value,
Modified: lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp Wed Apr 10 13:48:55 2019
@@ -194,9 +194,7 @@ ArchSpec ObjectFileJIT::GetArchitecture(
return ArchSpec();
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ObjectFileJIT::GetPluginName() {
return GetPluginNameStatic();
}
Modified: lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h (original)
+++ lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h Wed Apr 10 13:48:55 2019
@@ -12,10 +12,8 @@
#include "lldb/Core/Address.h"
#include "lldb/Symbol/ObjectFile.h"
-//----------------------------------------------------------------------
// This class needs to be hidden as eventually belongs in a plugin that
// will export the ObjectFile protocol
-//----------------------------------------------------------------------
class ObjectFileJIT : public lldb_private::ObjectFile {
public:
ObjectFileJIT(const lldb::ModuleSP &module_sp,
@@ -23,9 +21,7 @@ public:
~ObjectFileJIT() override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -50,9 +46,7 @@ public:
lldb::offset_t length,
lldb_private::ModuleSpecList &specs);
- //------------------------------------------------------------------
// Member Functions
- //------------------------------------------------------------------
bool ParseHeader() override;
bool SetLoadAddress(lldb_private::Target &target, lldb::addr_t value,
@@ -94,9 +88,7 @@ public:
ObjectFile::Strata CalculateStrata() override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Wed Apr 10 13:48:55 2019
@@ -3104,9 +3104,7 @@ size_t ObjectFileMachO::ParseSymtab() {
type = eSymbolTypeLocal;
break;
- //----------------------------------------------------------------------
// INCL scopes
- //----------------------------------------------------------------------
case N_BINCL:
// include file beginning: name,,NO_SECT,0,sum We use
// the current number of symbols in the symbol table
@@ -3167,9 +3165,7 @@ size_t ObjectFileMachO::ParseSymtab() {
type = eSymbolTypeLineEntry;
break;
- //----------------------------------------------------------------------
// Left and Right Braces
- //----------------------------------------------------------------------
case N_LBRAC:
// left bracket: 0,,NO_SECT,nesting level,address We
// use the current number of symbols in the symbol
@@ -3204,9 +3200,7 @@ size_t ObjectFileMachO::ParseSymtab() {
type = eSymbolTypeHeaderFile;
break;
- //----------------------------------------------------------------------
// COMM scopes
- //----------------------------------------------------------------------
case N_BCOMM:
// begin common: name,,NO_SECT,0,0
// We use the current number of symbols in the symbol
@@ -4052,9 +4046,7 @@ size_t ObjectFileMachO::ParseSymtab() {
type = eSymbolTypeLocal;
break;
- //----------------------------------------------------------------------
// INCL scopes
- //----------------------------------------------------------------------
case N_BINCL:
// include file beginning: name,,NO_SECT,0,sum We use the current
// number of symbols in the symbol table in lieu of using nlist_idx
@@ -4112,9 +4104,7 @@ size_t ObjectFileMachO::ParseSymtab() {
type = eSymbolTypeLineEntry;
break;
- //----------------------------------------------------------------------
// Left and Right Braces
- //----------------------------------------------------------------------
case N_LBRAC:
// left bracket: 0,,NO_SECT,nesting level,address We use the
// current number of symbols in the symbol table in lieu of using
@@ -4146,9 +4136,7 @@ size_t ObjectFileMachO::ParseSymtab() {
type = eSymbolTypeHeaderFile;
break;
- //----------------------------------------------------------------------
// COMM scopes
- //----------------------------------------------------------------------
case N_BCOMM:
// begin common: name,,NO_SECT,0,0
// We use the current number of symbols in the symbol table in lieu
@@ -5966,9 +5954,7 @@ bool ObjectFileMachO::AllowAssemblyEmula
return m_allow_assembly_emulation_unwind_plans;
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
lldb_private::ConstString ObjectFileMachO::GetPluginName() {
return GetPluginNameStatic();
}
Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h Wed Apr 10 13:48:55 2019
@@ -17,10 +17,8 @@
#include "lldb/Utility/RangeMap.h"
#include "lldb/Utility/UUID.h"
-//----------------------------------------------------------------------
// This class needs to be hidden as eventually belongs in a plugin that
// will export the ObjectFile protocol
-//----------------------------------------------------------------------
class ObjectFileMachO : public lldb_private::ObjectFile {
public:
ObjectFileMachO(const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp,
@@ -33,9 +31,7 @@ public:
~ObjectFileMachO() override = default;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -67,9 +63,7 @@ public:
static bool MagicBytesMatch(lldb::DataBufferSP &data_sp, lldb::addr_t offset,
lldb::addr_t length);
- //------------------------------------------------------------------
// Member Functions
- //------------------------------------------------------------------
bool ParseHeader() override;
bool SetLoadAddress(lldb_private::Target &target, lldb::addr_t value,
@@ -132,9 +126,7 @@ public:
bool AllowAssemblyEmulationUnwindPlans() override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Modified: lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp Wed Apr 10 13:48:55 2019
@@ -303,12 +303,10 @@ uint32_t ObjectFilePECOFF::GetAddressByt
return 4;
}
-//----------------------------------------------------------------------
// NeedsEndianSwap
//
// Return true if an endian swap needs to occur when extracting data from this
// file.
-//----------------------------------------------------------------------
bool ObjectFilePECOFF::NeedsEndianSwap() const {
#if defined(__LITTLE_ENDIAN__)
return false;
@@ -316,9 +314,7 @@ bool ObjectFilePECOFF::NeedsEndianSwap()
return true;
#endif
}
-//----------------------------------------------------------------------
// ParseDOSHeader
-//----------------------------------------------------------------------
bool ObjectFilePECOFF::ParseDOSHeader(DataExtractor &data,
dos_header_t &dos_header) {
bool success = false;
@@ -377,9 +373,7 @@ bool ObjectFilePECOFF::ParseDOSHeader(Da
return success;
}
-//----------------------------------------------------------------------
// ParserCOFFHeader
-//----------------------------------------------------------------------
bool ObjectFilePECOFF::ParseCOFFHeader(DataExtractor &data,
lldb::offset_t *offset_ptr,
coff_header_t &coff_header) {
@@ -489,9 +483,7 @@ DataExtractor ObjectFilePECOFF::ReadImag
return data;
}
-//----------------------------------------------------------------------
// ParseSectionHeaders
-//----------------------------------------------------------------------
bool ObjectFilePECOFF::ParseSectionHeaders(
uint32_t section_header_data_offset) {
const uint32_t nsects = m_coff_header.nsects;
@@ -544,9 +536,7 @@ llvm::StringRef ObjectFilePECOFF::GetSec
return hdr_name;
}
-//----------------------------------------------------------------------
// GetNListSymtab
-//----------------------------------------------------------------------
Symtab *ObjectFilePECOFF::GetSymtab() {
ModuleSP module_sp(GetModule());
if (module_sp) {
@@ -930,12 +920,10 @@ Address ObjectFilePECOFF::GetBaseAddress
return Address(GetSectionList()->GetSectionAtIndex(0), 0);
}
-//----------------------------------------------------------------------
// Dump
//
// Dump the specifics of the runtime file container (such as any headers
// segments, sections, etc).
-//----------------------------------------------------------------------
void ObjectFilePECOFF::Dump(Stream *s) {
ModuleSP module_sp(GetModule());
if (module_sp) {
@@ -972,11 +960,9 @@ void ObjectFilePECOFF::Dump(Stream *s) {
}
}
-//----------------------------------------------------------------------
// DumpDOSHeader
//
// Dump the MS-DOS header to the specified output stream
-//----------------------------------------------------------------------
void ObjectFilePECOFF::DumpDOSHeader(Stream *s, const dos_header_t &header) {
s->PutCString("MSDOS Header\n");
s->Printf(" e_magic = 0x%4.4x\n", header.e_magic);
@@ -1006,11 +992,9 @@ void ObjectFilePECOFF::DumpDOSHeader(Str
s->Printf(" e_lfanew = 0x%8.8x\n", header.e_lfanew);
}
-//----------------------------------------------------------------------
// DumpCOFFHeader
//
// Dump the COFF header to the specified output stream
-//----------------------------------------------------------------------
void ObjectFilePECOFF::DumpCOFFHeader(Stream *s, const coff_header_t &header) {
s->PutCString("COFF Header\n");
s->Printf(" machine = 0x%4.4x\n", header.machine);
@@ -1021,11 +1005,9 @@ void ObjectFilePECOFF::DumpCOFFHeader(St
s->Printf(" hdrsize = 0x%4.4x\n", header.hdrsize);
}
-//----------------------------------------------------------------------
// DumpOptCOFFHeader
//
// Dump the optional COFF header to the specified output stream
-//----------------------------------------------------------------------
void ObjectFilePECOFF::DumpOptCOFFHeader(Stream *s,
const coff_opt_header_t &header) {
s->PutCString("Optional COFF Header\n");
@@ -1079,11 +1061,9 @@ void ObjectFilePECOFF::DumpOptCOFFHeader
header.data_dirs[i].vmaddr, header.data_dirs[i].vmsize);
}
}
-//----------------------------------------------------------------------
// DumpSectionHeader
//
// Dump a single ELF section header to the specified output stream
-//----------------------------------------------------------------------
void ObjectFilePECOFF::DumpSectionHeader(Stream *s,
const section_header_t &sh) {
std::string name = GetSectionName(sh);
@@ -1093,11 +1073,9 @@ void ObjectFilePECOFF::DumpSectionHeader
sh.lineoff, sh.nreloc, sh.nline, sh.flags);
}
-//----------------------------------------------------------------------
// DumpSectionHeaders
//
// Dump all of the ELF section header to the specified output stream
-//----------------------------------------------------------------------
void ObjectFilePECOFF::DumpSectionHeaders(Stream *s) {
s->PutCString("Section Headers\n");
@@ -1115,11 +1093,9 @@ void ObjectFilePECOFF::DumpSectionHeader
}
}
-//----------------------------------------------------------------------
// DumpDependentModules
//
// Dump all of the dependent modules to the specified output stream
-//----------------------------------------------------------------------
void ObjectFilePECOFF::DumpDependentModules(lldb_private::Stream *s) {
auto num_modules = ParseDependentModules();
if (num_modules > 0) {
@@ -1179,9 +1155,7 @@ ObjectFile::Type ObjectFilePECOFF::Calcu
ObjectFile::Strata ObjectFilePECOFF::CalculateStrata() { return eStrataUser; }
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
ConstString ObjectFilePECOFF::GetPluginName() { return GetPluginNameStatic(); }
uint32_t ObjectFilePECOFF::GetPluginVersion() { return 1; }
Modified: lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h (original)
+++ lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h Wed Apr 10 13:48:55 2019
@@ -52,9 +52,7 @@ public:
~ObjectFilePECOFF() override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static void Initialize();
static void Terminate();
@@ -123,9 +121,7 @@ public:
ObjectFile::Strata CalculateStrata() override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Modified: lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp (original)
+++ lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp Wed Apr 10 13:48:55 2019
@@ -139,9 +139,7 @@ DynamicRegisterInfo *OperatingSystemPyth
return m_register_info_up.get();
}
-//------------------------------------------------------------------
// PluginInterface protocol
-//------------------------------------------------------------------
ConstString OperatingSystemPython::GetPluginName() {
return GetPluginNameStatic();
}
Modified: lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h (original)
+++ lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h Wed Apr 10 13:48:55 2019
@@ -27,9 +27,7 @@ public:
~OperatingSystemPython() override;
- //------------------------------------------------------------------
// Static Functions
- //------------------------------------------------------------------
static lldb_private::OperatingSystem *
CreateInstance(lldb_private::Process *process, bool force);
@@ -41,16 +39,12 @@ public:
static const char *GetPluginDescriptionStatic();
- //------------------------------------------------------------------
// lldb_private::PluginInterface Methods
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
- //------------------------------------------------------------------
// lldb_private::OperatingSystem Methods
- //------------------------------------------------------------------
bool UpdateThreadList(lldb_private::ThreadList &old_thread_list,
lldb_private::ThreadList &real_thread_list,
lldb_private::ThreadList &new_thread_list) override;
@@ -64,9 +58,7 @@ public:
lldb::StopInfoSP
CreateThreadStopReason(lldb_private::Thread *thread) override;
- //------------------------------------------------------------------
// Method for lazy creation of threads on demand
- //------------------------------------------------------------------
lldb::ThreadSP CreateThread(lldb::tid_t tid, lldb::addr_t context) override;
protected:
Modified: lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.h (original)
+++ lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.h Wed Apr 10 13:48:55 2019
@@ -29,9 +29,7 @@ public:
static void Terminate();
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
- //------------------------------------------------------------
static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);
static ConstString GetPluginNameStatic(bool is_host);
@@ -42,9 +40,7 @@ public:
uint32_t GetPluginVersion() override { return 1; }
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
Status ConnectRemote(Args &args) override;
Modified: lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp Wed Apr 10 13:48:55 2019
@@ -38,7 +38,6 @@ using namespace lldb_private::platform_f
static uint32_t g_initialize_count = 0;
-//------------------------------------------------------------------
PlatformSP PlatformFreeBSD::CreateInstance(bool force, const ArchSpec *arch) {
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
@@ -119,9 +118,7 @@ void PlatformFreeBSD::Terminate() {
PlatformPOSIX::Terminate();
}
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformFreeBSD::PlatformFreeBSD(bool is_host)
: PlatformPOSIX(is_host) // This is the local host platform
{}
Modified: lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h (original)
+++ lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h Wed Apr 10 13:48:55 2019
@@ -24,9 +24,7 @@ public:
static void Terminate();
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
- //------------------------------------------------------------
static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);
static ConstString GetPluginNameStatic(bool is_host);
@@ -37,9 +35,7 @@ public:
uint32_t GetPluginVersion() override { return 1; }
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
const char *GetDescription() override {
return GetPluginDescriptionStatic(IsHost());
}
Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Wed Apr 10 13:48:55 2019
@@ -36,7 +36,6 @@ using namespace lldb_private::platform_l
static uint32_t g_initialize_count = 0;
-//------------------------------------------------------------------
PlatformSP PlatformLinux::CreateInstance(bool force, const ArchSpec *arch) {
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
@@ -118,9 +117,7 @@ void PlatformLinux::Terminate() {
PlatformPOSIX::Terminate();
}
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformLinux::PlatformLinux(bool is_host)
: PlatformPOSIX(is_host) // This is the local host platform
{}
Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h Wed Apr 10 13:48:55 2019
@@ -24,9 +24,7 @@ public:
static void Terminate();
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
- //------------------------------------------------------------
static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);
static ConstString GetPluginNameStatic(bool is_host);
@@ -37,9 +35,7 @@ public:
uint32_t GetPluginVersion() override { return 1; }
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
const char *GetDescription() override {
return GetPluginDescriptionStatic(IsHost());
}
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp Wed Apr 10 13:48:55 2019
@@ -28,26 +28,20 @@ using namespace lldb_private;
#define UNSUPPORTED_ERROR ("Apple simulators aren't supported on this platform")
#endif
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
void PlatformAppleSimulator::Initialize() { PlatformDarwin::Initialize(); }
void PlatformAppleSimulator::Terminate() { PlatformDarwin::Terminate(); }
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformAppleSimulator::PlatformAppleSimulator()
: PlatformDarwin(true), m_core_sim_path_mutex(),
m_core_simulator_framework_path(), m_device() {}
-//------------------------------------------------------------------
/// Destructor.
///
/// The destructor is virtual since this class is designed to be
/// inherited from by the plug-in instance.
-//------------------------------------------------------------------
PlatformAppleSimulator::~PlatformAppleSimulator() {}
lldb_private::Status PlatformAppleSimulator::LaunchProcess(
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h Wed Apr 10 13:48:55 2019
@@ -19,16 +19,12 @@
class PlatformAppleSimulator : public PlatformDarwin {
public:
- //------------------------------------------------------------
// Class Functions
- //------------------------------------------------------------
static void Initialize();
static void Terminate();
- //------------------------------------------------------------
// Class Methods
- //------------------------------------------------------------
PlatformAppleSimulator();
virtual ~PlatformAppleSimulator();
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp Wed Apr 10 13:48:55 2019
@@ -32,14 +32,10 @@ namespace lldb_private {
class Process;
}
-//------------------------------------------------------------------
// Static Variables
-//------------------------------------------------------------------
static uint32_t g_initialize_count = 0;
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
void PlatformAppleTVSimulator::Initialize() {
PlatformDarwin::Initialize();
@@ -147,18 +143,14 @@ const char *PlatformAppleTVSimulator::Ge
return "Apple TV simulator platform plug-in.";
}
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformAppleTVSimulator::PlatformAppleTVSimulator()
: PlatformDarwin(true), m_sdk_dir_mutex(), m_sdk_directory() {}
-//------------------------------------------------------------------
/// Destructor.
///
/// The destructor is virtual since this class is designed to be
/// inherited from by the plug-in instance.
-//------------------------------------------------------------------
PlatformAppleTVSimulator::~PlatformAppleTVSimulator() {}
void PlatformAppleTVSimulator::GetStatus(Stream &strm) {
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h Wed Apr 10 13:48:55 2019
@@ -13,9 +13,7 @@
class PlatformAppleTVSimulator : public PlatformDarwin {
public:
- //------------------------------------------------------------
// Class Functions
- //------------------------------------------------------------
static lldb::PlatformSP CreateInstance(bool force,
const lldb_private::ArchSpec *arch);
@@ -27,25 +25,19 @@ public:
static const char *GetDescriptionStatic();
- //------------------------------------------------------------
// Class Methods
- //------------------------------------------------------------
PlatformAppleTVSimulator();
virtual ~PlatformAppleTVSimulator();
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
- //------------------------------------------------------------
lldb_private::ConstString GetPluginName() override {
return GetPluginNameStatic();
}
uint32_t GetPluginVersion() override { return 1; }
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
lldb_private::Status ResolveExecutable(
const lldb_private::ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
const lldb_private::FileSpecList *module_search_paths_ptr) override;
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp Wed Apr 10 13:48:55 2019
@@ -30,14 +30,10 @@ namespace lldb_private {
class Process;
}
-//------------------------------------------------------------------
// Static Variables
-//------------------------------------------------------------------
static uint32_t g_initialize_count = 0;
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
void PlatformAppleWatchSimulator::Initialize() {
PlatformDarwin::Initialize();
@@ -147,18 +143,14 @@ const char *PlatformAppleWatchSimulator:
return "Apple Watch simulator platform plug-in.";
}
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformAppleWatchSimulator::PlatformAppleWatchSimulator()
: PlatformDarwin(true), m_sdk_directory() {}
-//------------------------------------------------------------------
/// Destructor.
///
/// The destructor is virtual since this class is designed to be
/// inherited from by the plug-in instance.
-//------------------------------------------------------------------
PlatformAppleWatchSimulator::~PlatformAppleWatchSimulator() {}
void PlatformAppleWatchSimulator::GetStatus(Stream &strm) {
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h Wed Apr 10 13:48:55 2019
@@ -13,9 +13,7 @@
class PlatformAppleWatchSimulator : public PlatformDarwin {
public:
- //------------------------------------------------------------
// Class Functions
- //------------------------------------------------------------
static lldb::PlatformSP CreateInstance(bool force,
const lldb_private::ArchSpec *arch);
@@ -27,25 +25,19 @@ public:
static const char *GetDescriptionStatic();
- //------------------------------------------------------------
// Class Methods
- //------------------------------------------------------------
PlatformAppleWatchSimulator();
virtual ~PlatformAppleWatchSimulator();
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
- //------------------------------------------------------------
lldb_private::ConstString GetPluginName() override {
return GetPluginNameStatic();
}
uint32_t GetPluginVersion() override { return 1; }
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
lldb_private::Status ResolveExecutable(
const lldb_private::ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
const lldb_private::FileSpecList *module_search_paths_ptr) override;
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Wed Apr 10 13:48:55 2019
@@ -46,19 +46,15 @@
using namespace lldb;
using namespace lldb_private;
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformDarwin::PlatformDarwin(bool is_host)
: PlatformPOSIX(is_host), // This is the local host platform
m_developer_directory() {}
-//------------------------------------------------------------------
/// Destructor.
///
/// The destructor is virtual since this class is designed to be
/// inherited from by the plug-in instance.
-//------------------------------------------------------------------
PlatformDarwin::~PlatformDarwin() {}
FileSpecList PlatformDarwin::LocateExecutableScriptingResources(
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h Wed Apr 10 13:48:55 2019
@@ -25,9 +25,7 @@ public:
~PlatformDarwin() override;
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
lldb_private::Status
ResolveSymbolFile(lldb_private::Target &target,
const lldb_private::ModuleSpec &sym_spec,
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp Wed Apr 10 13:48:55 2019
@@ -42,14 +42,10 @@
using namespace lldb;
using namespace lldb_private;
-//------------------------------------------------------------------
// Static Variables
-//------------------------------------------------------------------
static uint32_t g_initialize_count = 0;
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
void PlatformDarwinKernel::Initialize() {
PlatformDarwin::Initialize();
@@ -180,9 +176,7 @@ const char *PlatformDarwinKernel::GetDes
return "Darwin Kernel platform plug-in.";
}
-//------------------------------------------------------------------
/// Code to handle the PlatformDarwinKernel settings
-//------------------------------------------------------------------
static constexpr PropertyDefinition g_properties[] = {
{"search-locally-for-kexts", OptionValue::eTypeBoolean, true, true, NULL,
@@ -246,9 +240,7 @@ void PlatformDarwinKernel::DebuggerIniti
}
}
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformDarwinKernel::PlatformDarwinKernel(
lldb_private::LazyBool is_ios_debug_session)
: PlatformDarwin(false), // This is a remote platform
@@ -265,12 +257,10 @@ PlatformDarwinKernel::PlatformDarwinKern
}
}
-//------------------------------------------------------------------
/// Destructor.
///
/// The destructor is virtual since this class is designed to be
/// inherited from by the plug-in instance.
-//------------------------------------------------------------------
PlatformDarwinKernel::~PlatformDarwinKernel() {}
void PlatformDarwinKernel::GetStatus(Stream &strm) {
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h Wed Apr 10 13:48:55 2019
@@ -22,9 +22,7 @@
class PlatformDarwinKernel : public PlatformDarwin {
public:
- //------------------------------------------------------------
// Class Functions
- //------------------------------------------------------------
static lldb::PlatformSP CreateInstance(bool force,
const lldb_private::ArchSpec *arch);
@@ -38,25 +36,19 @@ public:
static const char *GetDescriptionStatic();
- //------------------------------------------------------------
// Class Methods
- //------------------------------------------------------------
PlatformDarwinKernel(lldb_private::LazyBool is_ios_debug_session);
virtual ~PlatformDarwinKernel();
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
- //------------------------------------------------------------
lldb_private::ConstString GetPluginName() override {
return GetPluginNameStatic();
}
uint32_t GetPluginVersion() override { return 1; }
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
const char *GetDescription() override { return GetDescriptionStatic(); }
void GetStatus(lldb_private::Stream &strm) override;
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp Wed Apr 10 13:48:55 2019
@@ -146,17 +146,13 @@ const char *PlatformMacOSX::GetDescripti
return "Remote Mac OS X user platform plug-in.";
}
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformMacOSX::PlatformMacOSX(bool is_host) : PlatformDarwin(is_host) {}
-//------------------------------------------------------------------
/// Destructor.
///
/// The destructor is virtual since this class is designed to be
/// inherited from by the plug-in instance.
-//------------------------------------------------------------------
PlatformMacOSX::~PlatformMacOSX() {}
ConstString PlatformMacOSX::GetSDKDirectory(lldb_private::Target &target) {
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h Wed Apr 10 13:48:55 2019
@@ -17,9 +17,7 @@ public:
~PlatformMacOSX() override;
- //------------------------------------------------------------
// Class functions
- //------------------------------------------------------------
static lldb::PlatformSP CreateInstance(bool force,
const lldb_private::ArchSpec *arch);
@@ -31,9 +29,7 @@ public:
static const char *GetDescriptionStatic(bool is_host);
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
- //------------------------------------------------------------
lldb_private::ConstString GetPluginName() override {
return GetPluginNameStatic(IsHost());
}
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.cpp Wed Apr 10 13:48:55 2019
@@ -27,20 +27,14 @@
using namespace lldb;
using namespace lldb_private;
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformRemoteAppleBridge::PlatformRemoteAppleBridge()
: PlatformRemoteDarwinDevice () {}
-//------------------------------------------------------------------
// Static Variables
-//------------------------------------------------------------------
static uint32_t g_initialize_count = 0;
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
void PlatformRemoteAppleBridge::Initialize() {
PlatformDarwin::Initialize();
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.h Wed Apr 10 13:48:55 2019
@@ -23,9 +23,7 @@ public:
~PlatformRemoteAppleBridge() override = default;
- //------------------------------------------------------------
// Class Functions
- //------------------------------------------------------------
static lldb::PlatformSP CreateInstance(bool force,
const lldb_private::ArchSpec *arch);
@@ -37,18 +35,14 @@ public:
static const char *GetDescriptionStatic();
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
- //------------------------------------------------------------
lldb_private::ConstString GetPluginName() override {
return GetPluginNameStatic();
}
uint32_t GetPluginVersion() override { return 1; }
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
const char *GetDescription() override { return GetDescriptionStatic(); }
@@ -57,9 +51,7 @@ public:
protected:
- //------------------------------------------------------------
// lldb_private::PlatformRemoteDarwinDevice functions
- //------------------------------------------------------------
void GetDeviceSupportDirectoryNames (std::vector<std::string> &dirnames) override;
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp Wed Apr 10 13:48:55 2019
@@ -28,20 +28,14 @@
using namespace lldb;
using namespace lldb_private;
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformRemoteAppleTV::PlatformRemoteAppleTV()
: PlatformRemoteDarwinDevice () {}
-//------------------------------------------------------------------
// Static Variables
-//------------------------------------------------------------------
static uint32_t g_initialize_count = 0;
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
void PlatformRemoteAppleTV::Initialize() {
PlatformDarwin::Initialize();
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h Wed Apr 10 13:48:55 2019
@@ -23,9 +23,7 @@ public:
~PlatformRemoteAppleTV() override = default;
- //------------------------------------------------------------
// Class Functions
- //------------------------------------------------------------
static lldb::PlatformSP CreateInstance(bool force,
const lldb_private::ArchSpec *arch);
@@ -37,18 +35,14 @@ public:
static const char *GetDescriptionStatic();
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
- //------------------------------------------------------------
lldb_private::ConstString GetPluginName() override {
return GetPluginNameStatic();
}
uint32_t GetPluginVersion() override { return 1; }
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
const char *GetDescription() override { return GetDescriptionStatic(); }
@@ -57,9 +51,7 @@ public:
protected:
- //------------------------------------------------------------
// lldb_private::PlatformRemoteDarwinDevice functions
- //------------------------------------------------------------
void GetDeviceSupportDirectoryNames (std::vector<std::string> &dirnames) override;
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp Wed Apr 10 13:48:55 2019
@@ -28,14 +28,10 @@
using namespace lldb;
using namespace lldb_private;
-//------------------------------------------------------------------
// Static Variables
-//------------------------------------------------------------------
static uint32_t g_initialize_count = 0;
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
void PlatformRemoteAppleWatch::Initialize() {
PlatformDarwin::Initialize();
@@ -149,9 +145,7 @@ const char *PlatformRemoteAppleWatch::Ge
return "Remote Apple Watch platform plug-in.";
}
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformRemoteAppleWatch::PlatformRemoteAppleWatch()
: PlatformRemoteDarwinDevice() {}
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h Wed Apr 10 13:48:55 2019
@@ -24,9 +24,7 @@ public:
~PlatformRemoteAppleWatch() override = default;
- //------------------------------------------------------------
// Class Functions
- //------------------------------------------------------------
static lldb::PlatformSP CreateInstance(bool force,
const lldb_private::ArchSpec *arch);
@@ -38,33 +36,25 @@ public:
static const char *GetDescriptionStatic();
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
const char *GetDescription() override { return GetDescriptionStatic(); }
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
- //------------------------------------------------------------
lldb_private::ConstString GetPluginName() override {
return GetPluginNameStatic();
}
uint32_t GetPluginVersion() override { return 1; }
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
bool GetSupportedArchitectureAtIndex(uint32_t idx,
lldb_private::ArchSpec &arch) override;
protected:
- //------------------------------------------------------------
// lldb_private::PlatformRemoteDarwinDevice functions
- //------------------------------------------------------------
void GetDeviceSupportDirectoryNames (std::vector<std::string> &dirnames) override;
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp Wed Apr 10 13:48:55 2019
@@ -34,9 +34,7 @@ PlatformRemoteDarwinDevice::SDKDirectory
build.SetString(build_str);
}
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformRemoteDarwinDevice::PlatformRemoteDarwinDevice()
: PlatformDarwin(false), // This is a remote platform
m_sdk_directory_infos(), m_device_support_directory(),
@@ -44,12 +42,10 @@ PlatformRemoteDarwinDevice::PlatformRemo
m_last_module_sdk_idx(UINT32_MAX),
m_connected_module_sdk_idx(UINT32_MAX) {}
-//------------------------------------------------------------------
/// Destructor.
///
/// The destructor is virtual since this class is designed to be
/// inherited from by the plug-in instance.
-//------------------------------------------------------------------
PlatformRemoteDarwinDevice::~PlatformRemoteDarwinDevice() {}
void PlatformRemoteDarwinDevice::GetStatus(Stream &strm) {
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.h Wed Apr 10 13:48:55 2019
@@ -22,9 +22,7 @@ public:
~PlatformRemoteDarwinDevice() override;
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
lldb_private::Status ResolveExecutable(
const lldb_private::ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
const lldb_private::FileSpecList *module_search_paths_ptr) override;
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp Wed Apr 10 13:48:55 2019
@@ -25,14 +25,10 @@
using namespace lldb;
using namespace lldb_private;
-//------------------------------------------------------------------
// Static Variables
-//------------------------------------------------------------------
static uint32_t g_initialize_count = 0;
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
void PlatformRemoteiOS::Initialize() {
PlatformDarwin::Initialize();
@@ -136,9 +132,7 @@ const char *PlatformRemoteiOS::GetDescri
return "Remote iOS platform plug-in.";
}
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformRemoteiOS::PlatformRemoteiOS()
: PlatformRemoteDarwinDevice() {}
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h Wed Apr 10 13:48:55 2019
@@ -22,9 +22,7 @@ public:
~PlatformRemoteiOS() override = default;
- //------------------------------------------------------------
// Class Functions
- //------------------------------------------------------------
static lldb::PlatformSP CreateInstance(bool force,
const lldb_private::ArchSpec *arch);
@@ -36,15 +34,11 @@ public:
static const char *GetDescriptionStatic();
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
const char *GetDescription() override { return GetDescriptionStatic(); }
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
- //------------------------------------------------------------
lldb_private::ConstString GetPluginName() override {
return GetPluginNameStatic();
}
@@ -56,9 +50,7 @@ public:
protected:
- //------------------------------------------------------------
// lldb_private::PlatformRemoteDarwinDevice functions
- //------------------------------------------------------------
void GetDeviceSupportDirectoryNames (std::vector<std::string> &dirnames) override;
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp Wed Apr 10 13:48:55 2019
@@ -33,14 +33,10 @@ namespace lldb_private {
class Process;
}
-//------------------------------------------------------------------
// Static Variables
-//------------------------------------------------------------------
static uint32_t g_initialize_count = 0;
-//------------------------------------------------------------------
// Static Functions
-//------------------------------------------------------------------
void PlatformiOSSimulator::Initialize() {
PlatformAppleSimulator::Initialize();
@@ -151,19 +147,15 @@ const char *PlatformiOSSimulator::GetDes
return "iOS simulator platform plug-in.";
}
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformiOSSimulator::PlatformiOSSimulator()
: PlatformAppleSimulator(), m_sdk_dir_mutex(), m_sdk_directory(),
m_build_update() {}
-//------------------------------------------------------------------
/// Destructor.
///
/// The destructor is virtual since this class is designed to be
/// inherited from by the plug-in instance.
-//------------------------------------------------------------------
PlatformiOSSimulator::~PlatformiOSSimulator() {}
void PlatformiOSSimulator::GetStatus(Stream &strm) {
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h Wed Apr 10 13:48:55 2019
@@ -20,9 +20,7 @@ public:
~PlatformiOSSimulator() override;
- //------------------------------------------------------------
// Class Functions
- //------------------------------------------------------------
static lldb::PlatformSP CreateInstance(bool force,
const lldb_private::ArchSpec *arch);
@@ -34,18 +32,14 @@ public:
static const char *GetDescriptionStatic();
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
- //------------------------------------------------------------
lldb_private::ConstString GetPluginName() override {
return GetPluginNameStatic();
}
uint32_t GetPluginVersion() override { return 1; }
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
lldb_private::Status ResolveExecutable(
const lldb_private::ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
const lldb_private::FileSpecList *module_search_paths_ptr) override;
Modified: lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp Wed Apr 10 13:48:55 2019
@@ -36,7 +36,6 @@ using namespace lldb_private::platform_n
static uint32_t g_initialize_count = 0;
-//------------------------------------------------------------------
PlatformSP PlatformNetBSD::CreateInstance(bool force, const ArchSpec *arch) {
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
@@ -111,9 +110,7 @@ void PlatformNetBSD::Terminate() {
PlatformPOSIX::Terminate();
}
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformNetBSD::PlatformNetBSD(bool is_host)
: PlatformPOSIX(is_host) // This is the local host platform
{}
Modified: lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.h (original)
+++ lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.h Wed Apr 10 13:48:55 2019
@@ -24,9 +24,7 @@ public:
static void Terminate();
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
- //------------------------------------------------------------
static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);
static ConstString GetPluginNameStatic(bool is_host);
@@ -37,9 +35,7 @@ public:
uint32_t GetPluginVersion() override { return 1; }
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
const char *GetDescription() override {
return GetPluginDescriptionStatic(IsHost());
}
Modified: lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp Wed Apr 10 13:48:55 2019
@@ -36,7 +36,6 @@ using namespace lldb_private::platform_o
static uint32_t g_initialize_count = 0;
-//------------------------------------------------------------------
PlatformSP PlatformOpenBSD::CreateInstance(bool force, const ArchSpec *arch) {
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
@@ -117,9 +116,7 @@ void PlatformOpenBSD::Terminate() {
PlatformPOSIX::Terminate();
}
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformOpenBSD::PlatformOpenBSD(bool is_host)
: PlatformPOSIX(is_host) // This is the local host platform
{}
Modified: lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.h (original)
+++ lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.h Wed Apr 10 13:48:55 2019
@@ -24,9 +24,7 @@ public:
static void Terminate();
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
- //------------------------------------------------------------
static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);
static ConstString GetPluginNameStatic(bool is_host);
@@ -37,9 +35,7 @@ public:
uint32_t GetPluginVersion() override { return 1; }
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
const char *GetDescription() override {
return GetPluginDescriptionStatic(IsHost());
}
Modified: lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp Wed Apr 10 13:48:55 2019
@@ -36,21 +36,17 @@
using namespace lldb;
using namespace lldb_private;
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformPOSIX::PlatformPOSIX(bool is_host)
: RemoteAwarePlatform(is_host), // This is the local host platform
m_option_group_platform_rsync(new OptionGroupPlatformRSync()),
m_option_group_platform_ssh(new OptionGroupPlatformSSH()),
m_option_group_platform_caching(new OptionGroupPlatformCaching()) {}
-//------------------------------------------------------------------
/// Destructor.
///
/// The destructor is virtual since this class is designed to be
/// inherited from by the plug-in instance.
-//------------------------------------------------------------------
PlatformPOSIX::~PlatformPOSIX() {}
lldb_private::OptionGroupOptions *PlatformPOSIX::GetConnectionOptions(
Modified: lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h (original)
+++ lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h Wed Apr 10 13:48:55 2019
@@ -21,9 +21,7 @@ public:
~PlatformPOSIX() override;
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
lldb_private::OptionGroupOptions *
GetConnectionOptions(lldb_private::CommandInterpreter &interpreter) override;
Modified: lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp Wed Apr 10 13:48:55 2019
@@ -147,17 +147,13 @@ void PlatformWindows::Terminate() {
Platform::Terminate();
}
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformWindows::PlatformWindows(bool is_host) : RemoteAwarePlatform(is_host) {}
-//------------------------------------------------------------------
/// Destructor.
///
/// The destructor is virtual since this class is designed to be
/// inherited from by the plug-in instance.
-//------------------------------------------------------------------
PlatformWindows::~PlatformWindows() = default;
Status PlatformWindows::ResolveExecutable(
Modified: lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h (original)
+++ lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h Wed Apr 10 13:48:55 2019
@@ -23,9 +23,7 @@ public:
static void Terminate();
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
- //------------------------------------------------------------
static lldb::PlatformSP CreateInstance(bool force,
const lldb_private::ArchSpec *arch);
@@ -37,9 +35,7 @@ public:
uint32_t GetPluginVersion() override { return 1; }
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
Status
ResolveExecutable(const lldb_private::ModuleSpec &module_spec,
lldb::ModuleSP &module_sp,
Modified: lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp Wed Apr 10 13:48:55 2019
@@ -195,19 +195,15 @@ Status PlatformRemoteGDBServer::GetFileW
return Status();
}
-//------------------------------------------------------------------
/// Default Constructor
-//------------------------------------------------------------------
PlatformRemoteGDBServer::PlatformRemoteGDBServer()
: Platform(false), // This is a remote platform
m_gdb_client() {}
-//------------------------------------------------------------------
/// Destructor.
///
/// The destructor is virtual since this class is designed to be
/// inherited from by the plug-in instance.
-//------------------------------------------------------------------
PlatformRemoteGDBServer::~PlatformRemoteGDBServer() {}
bool PlatformRemoteGDBServer::GetSupportedArchitectureAtIndex(uint32_t idx,
Modified: lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h (original)
+++ lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h Wed Apr 10 13:48:55 2019
@@ -35,16 +35,12 @@ public:
virtual ~PlatformRemoteGDBServer();
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
- //------------------------------------------------------------
ConstString GetPluginName() override { return GetPluginNameStatic(); }
uint32_t GetPluginVersion() override { return 1; }
- //------------------------------------------------------------
// lldb_private::Platform functions
- //------------------------------------------------------------
Status
ResolveExecutable(const ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
const FileSpecList *module_search_paths_ptr) override;
Modified: lldb/trunk/source/Plugins/Process/Darwin/CFBundle.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/CFBundle.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/CFBundle.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/CFBundle.cpp Wed Apr 10 13:48:55 2019
@@ -13,37 +13,27 @@
#include "CFBundle.h"
#include "CFString.h"
-//----------------------------------------------------------------------
// CFBundle constructor
-//----------------------------------------------------------------------
CFBundle::CFBundle(const char *path)
: CFReleaser<CFBundleRef>(), m_bundle_url() {
if (path && path[0])
SetPath(path);
}
-//----------------------------------------------------------------------
// CFBundle copy constructor
-//----------------------------------------------------------------------
CFBundle::CFBundle(const CFBundle &rhs)
: CFReleaser<CFBundleRef>(rhs), m_bundle_url(rhs.m_bundle_url) {}
-//----------------------------------------------------------------------
// CFBundle copy constructor
-//----------------------------------------------------------------------
CFBundle &CFBundle::operator=(const CFBundle &rhs) {
*this = rhs;
return *this;
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
CFBundle::~CFBundle() {}
-//----------------------------------------------------------------------
// Set the path for a bundle by supplying a
-//----------------------------------------------------------------------
bool CFBundle::SetPath(const char *path) {
CFAllocatorRef alloc = kCFAllocatorDefault;
// Release our old bundle and ULR
Modified: lldb/trunk/source/Plugins/Process/Darwin/CFBundle.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/CFBundle.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/CFBundle.h (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/CFBundle.h Wed Apr 10 13:48:55 2019
@@ -17,9 +17,7 @@
class CFBundle : public CFReleaser<CFBundleRef> {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CFBundle(const char *path = NULL);
CFBundle(const CFBundle &rhs);
CFBundle &operator=(const CFBundle &rhs);
Modified: lldb/trunk/source/Plugins/Process/Darwin/CFString.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/CFString.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/CFString.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/CFString.cpp Wed Apr 10 13:48:55 2019
@@ -14,19 +14,13 @@
#include <glob.h>
#include <string>
-//----------------------------------------------------------------------
// CFString constructor
-//----------------------------------------------------------------------
CFString::CFString(CFStringRef s) : CFReleaser<CFStringRef>(s) {}
-//----------------------------------------------------------------------
// CFString copy constructor
-//----------------------------------------------------------------------
CFString::CFString(const CFString &rhs) : CFReleaser<CFStringRef>(rhs) {}
-//----------------------------------------------------------------------
// CFString copy constructor
-//----------------------------------------------------------------------
CFString &CFString::operator=(const CFString &rhs) {
if (this != &rhs)
*this = rhs;
@@ -41,9 +35,7 @@ CFString::CFString(const char *cstr, CFS
}
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
CFString::~CFString() {}
const char *CFString::GetFileSystemRepresentation(std::string &s) {
Modified: lldb/trunk/source/Plugins/Process/Darwin/CFString.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/CFString.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/CFString.h (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/CFString.h Wed Apr 10 13:48:55 2019
@@ -18,9 +18,7 @@
class CFString : public CFReleaser<CFStringRef> {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CFString(CFStringRef cf_str = NULL);
CFString(const char *s, CFStringEncoding encoding = kCFStringEncodingUTF8);
CFString(const CFString &rhs);
Modified: lldb/trunk/source/Plugins/Process/Darwin/CFUtils.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/CFUtils.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/CFUtils.h (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/CFUtils.h Wed Apr 10 13:48:55 2019
@@ -17,11 +17,9 @@
#ifdef __cplusplus
-//----------------------------------------------------------------------
// Templatized CF helper class that can own any CF pointer and will
// call CFRelease() on any valid pointer it owns unless that pointer is
// explicitly released using the release() member function.
-//----------------------------------------------------------------------
template <class T> class CFReleaser {
public:
// Type names for the avlue
Modified: lldb/trunk/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp Wed Apr 10 13:48:55 2019
@@ -148,17 +148,13 @@ static Status ForkChildForPTraceDebuggin
memset(fork_error, 0, sizeof(fork_error));
*pid = static_cast<::pid_t>(pty.Fork(fork_error, sizeof(fork_error)));
if (*pid < 0) {
- //--------------------------------------------------------------
// Status during fork.
- //--------------------------------------------------------------
*pid = static_cast<::pid_t>(LLDB_INVALID_PROCESS_ID);
error.SetErrorStringWithFormat("%s(): fork failed: %s", __FUNCTION__,
fork_error);
return error;
} else if (pid == 0) {
- //--------------------------------------------------------------
// Child process
- //--------------------------------------------------------------
// Debug this process.
::ptrace(PT_TRACE_ME, 0, 0, 0);
@@ -186,9 +182,7 @@ static Status ForkChildForPTraceDebuggin
// call and if the exec fails it will exit the child process below.
::exit(127);
} else {
- //--------------------------------------------------------------
// Parent process
- //--------------------------------------------------------------
// Let the child have its own process group. We need to execute this call
// in both the child and parent to avoid a race condition between the two
// processes.
Modified: lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp Wed Apr 10 13:48:55 2019
@@ -37,9 +37,7 @@ using namespace lldb_private;
using namespace lldb_private::process_darwin;
using namespace lldb_private::darwin_process_launcher;
-// -----------------------------------------------------------------------------
// Hidden Impl
-// -----------------------------------------------------------------------------
namespace {
struct hack_task_dyld_info {
@@ -48,9 +46,7 @@ struct hack_task_dyld_info {
};
}
-// -----------------------------------------------------------------------------
// Public Static Methods
-// -----------------------------------------------------------------------------
Status NativeProcessProtocol::Launch(
ProcessLaunchInfo &launch_info,
@@ -153,9 +149,7 @@ Status NativeProcessProtocol::Attach(
return error;
}
-// -----------------------------------------------------------------------------
// ctor/dtor
-// -----------------------------------------------------------------------------
NativeProcessDarwin::NativeProcessDarwin(lldb::pid_t pid, int pty_master_fd)
: NativeProcessProtocol(pid), m_task(TASK_NULL), m_did_exec(false),
@@ -170,9 +164,7 @@ NativeProcessDarwin::NativeProcessDarwin
NativeProcessDarwin::~NativeProcessDarwin() {}
-// -----------------------------------------------------------------------------
// Instance methods
-// -----------------------------------------------------------------------------
Status NativeProcessDarwin::FinalizeLaunch(LaunchFlavor launch_flavor,
MainLoop &main_loop) {
@@ -1547,9 +1539,7 @@ Status NativeProcessDarwin::GetFileLoadA
return error;
}
-// -----------------------------------------------------------------
// NativeProcessProtocol protected interface
-// -----------------------------------------------------------------
Status NativeProcessDarwin::GetSoftwareBreakpointTrapOpcode(
size_t trap_opcode_size_hint, size_t &actual_opcode_size,
const uint8_t *&trap_opcode_bytes) {
Modified: lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.h (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.h Wed Apr 10 13:48:55 2019
@@ -59,9 +59,7 @@ class NativeProcessDarwin : public Nativ
public:
~NativeProcessDarwin() override;
- // -----------------------------------------------------------------
// NativeProcessProtocol Interface
- // -----------------------------------------------------------------
Status Resume(const ResumeActionList &resume_actions) override;
Status Halt() override;
@@ -112,9 +110,7 @@ public:
task_t GetTask() const { return m_task; }
- // -----------------------------------------------------------------
// Interface used by NativeRegisterContext-derived classes.
- // -----------------------------------------------------------------
static Status PtraceWrapper(int req, lldb::pid_t pid, void *addr = nullptr,
void *data = nullptr, size_t data_size = 0,
long *result = nullptr);
@@ -122,18 +118,14 @@ public:
bool SupportHardwareSingleStepping() const;
protected:
- // -----------------------------------------------------------------
// NativeProcessProtocol protected interface
- // -----------------------------------------------------------------
Status
GetSoftwareBreakpointTrapOpcode(size_t trap_opcode_size_hint,
size_t &actual_opcode_size,
const uint8_t *&trap_opcode_bytes) override;
private:
- // -----------------------------------------------------------------
/// Mach task-related Member Variables
- // -----------------------------------------------------------------
// The task port for the inferior process.
mutable task_t m_task;
@@ -145,9 +137,7 @@ private:
// The CPU type of this process.
mutable cpu_type_t m_cpu_type;
- // -----------------------------------------------------------------
/// Exception/Signal Handling Member Variables
- // -----------------------------------------------------------------
// Exception port on which we will receive child exceptions
mach_port_t m_exception_port;
@@ -175,15 +165,11 @@ private:
// interrupt signal (if this is non-zero).
int m_auto_resume_signo;
- // -----------------------------------------------------------------
/// Thread-related Member Variables
- // -----------------------------------------------------------------
NativeThreadListDarwin m_thread_list;
ResumeActionList m_thread_actions;
- // -----------------------------------------------------------------
/// Process Lifetime Member Variable
- // -----------------------------------------------------------------
// The pipe over which the waitpid thread and the main loop will
// communicate.
@@ -195,12 +181,9 @@ private:
// waitpid reader callback handle.
MainLoop::ReadHandleUP m_waitpid_reader_handle;
- // -----------------------------------------------------------------
// Private Instance Methods
- // -----------------------------------------------------------------
NativeProcessDarwin(lldb::pid_t pid, int pty_master_fd);
- // -----------------------------------------------------------------
/// Finalize the launch.
///
/// This method associates the NativeProcessDarwin instance with the host
@@ -220,7 +203,6 @@ private:
/// Any error that occurred during the aforementioned
/// operations. Failure here will force termination of the
/// launched process and debugging session.
- // -----------------------------------------------------------------
Status FinalizeLaunch(LaunchFlavor launch_flavor, MainLoop &main_loop);
Status SaveExceptionPortInfo();
Modified: lldb/trunk/source/Plugins/Process/Darwin/NativeThreadDarwin.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/NativeThreadDarwin.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/NativeThreadDarwin.h (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/NativeThreadDarwin.h Wed Apr 10 13:48:55 2019
@@ -45,9 +45,7 @@ public:
lldb::tid_t unique_thread_id = 0,
::thread_t mach_thread_port = 0);
- // -----------------------------------------------------------------
// NativeThreadProtocol Interface
- // -----------------------------------------------------------------
std::string GetName() override;
lldb::StateType GetState() override;
@@ -62,15 +60,11 @@ public:
Status RemoveWatchpoint(lldb::addr_t addr) override;
- // -----------------------------------------------------------------
// New methods that are fine for others to call.
- // -----------------------------------------------------------------
void Dump(Stream &stream) const;
private:
- // -----------------------------------------------------------------
// Interface for friend classes
- // -----------------------------------------------------------------
/// Resumes the thread. If \p signo is anything but
/// LLDB_INVALID_SIGNAL_NUMBER, deliver that signal to the thread.
@@ -118,20 +112,16 @@ private:
Status RequestStop();
- // -------------------------------------------------------------------------
/// Return the mach thread port number for this thread.
///
/// \return
/// The mach port number for this thread. Returns NULL_THREAD
/// when the thread is invalid.
- // -------------------------------------------------------------------------
thread_t GetMachPortNumber() const { return m_mach_thread_port; }
static bool MachPortNumberIsValid(::thread_t thread);
- // ---------------------------------------------------------------------
// Private interface
- // ---------------------------------------------------------------------
bool GetIdentifierInfo();
void MaybeLogStateChange(lldb::StateType new_state);
@@ -144,9 +134,7 @@ private:
inline void MaybeCleanupSingleStepWorkaround();
- // -----------------------------------------------------------------
// Member Variables
- // -----------------------------------------------------------------
// The mach thread port for the thread.
::thread_t m_mach_thread_port;
Modified: lldb/trunk/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp Wed Apr 10 13:48:55 2019
@@ -548,7 +548,6 @@ uint32_t NativeThreadListDarwin::Process
return (uint32_t)m_threads.size();
}
-//----------------------------------------------------------------------
// Check each thread in our thread list to see if we should notify our client
// of the current halt in execution.
//
@@ -558,7 +557,6 @@ uint32_t NativeThreadListDarwin::Process
// RETURNS
// true if we should stop and notify our clients
// false if we should resume our child process and skip notification
-//----------------------------------------------------------------------
bool NativeThreadListDarwin::ShouldStop(bool &step_more) {
std::lock_guard<std::recursive_mutex> locker(m_threads_mutex);
for (auto thread_sp : m_threads) {
Modified: lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.h (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.h Wed Apr 10 13:48:55 2019
@@ -19,14 +19,11 @@ class ProcessMessage;
class ProcessMonitor;
class POSIXBreakpointProtocol;
-//------------------------------------------------------------------------------
// @class FreeBSDThread
// Abstraction of a FreeBSD thread.
class FreeBSDThread : public lldb_private::Thread {
public:
- //------------------------------------------------------------------
// Constructors and destructors
- //------------------------------------------------------------------
FreeBSDThread(lldb_private::Process &process, lldb::tid_t tid);
virtual ~FreeBSDThread();
@@ -50,7 +47,6 @@ public:
lldb::addr_t GetThreadPointer() override;
- //--------------------------------------------------------------------------
// These functions provide a mapping from the register offset
// back to the register index or name for use in debugging or log
// output.
@@ -61,14 +57,12 @@ public:
const char *GetRegisterNameFromOffset(unsigned offset);
- //--------------------------------------------------------------------------
// These methods form a specialized interface to POSIX threads.
//
bool Resume();
void Notify(const ProcessMessage &message);
- //--------------------------------------------------------------------------
// These methods provide an interface to watchpoints
//
bool EnableHardwareWatchpoint(lldb_private::Watchpoint *wp);
@@ -110,7 +104,6 @@ protected:
lldb_private::Unwind *GetUnwinder() override;
- //--------------------------------------------------------------------------
// FreeBSDThread internal API.
// POSIXThread override
Modified: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp Wed Apr 10 13:48:55 2019
@@ -64,7 +64,6 @@ UnixSignalsSP &GetFreeBSDSignals() {
}
}
-//------------------------------------------------------------------------------
// Static functions.
lldb::ProcessSP
@@ -96,7 +95,6 @@ const char *ProcessFreeBSD::GetPluginDes
return "Process plugin for FreeBSD";
}
-//------------------------------------------------------------------------------
// ProcessInterface protocol.
lldb_private::ConstString ProcessFreeBSD::GetPluginName() {
@@ -250,7 +248,6 @@ void ProcessFreeBSD::SendMessage(const P
m_message_queue.push(message);
}
-//------------------------------------------------------------------------------
// Constructors and destructors.
ProcessFreeBSD::ProcessFreeBSD(lldb::TargetSP target_sp,
@@ -269,7 +266,6 @@ ProcessFreeBSD::ProcessFreeBSD(lldb::Tar
ProcessFreeBSD::~ProcessFreeBSD() { delete m_monitor; }
-//------------------------------------------------------------------------------
// Process protocol.
void ProcessFreeBSD::Finalize() {
Process::Finalize();
@@ -835,7 +831,6 @@ size_t ProcessFreeBSD::PutSTDIN(const ch
return status;
}
-//------------------------------------------------------------------------------
// Utility functions.
bool ProcessFreeBSD::HasExited() {
Modified: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h Wed Apr 10 13:48:55 2019
@@ -23,9 +23,7 @@ class FreeBSDThread;
class ProcessFreeBSD : public lldb_private::Process {
public:
- //------------------------------------------------------------------
// Static functions.
- //------------------------------------------------------------------
static lldb::ProcessSP
CreateInstance(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp,
const lldb_private::FileSpec *crash_file_path);
@@ -38,9 +36,7 @@ public:
static const char *GetPluginDescriptionStatic();
- //------------------------------------------------------------------
// Constructors and destructors
- //------------------------------------------------------------------
ProcessFreeBSD(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp,
lldb::UnixSignalsSP &unix_signals_sp);
@@ -48,17 +44,13 @@ public:
virtual lldb_private::Status WillResume() override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
virtual lldb_private::ConstString GetPluginName() override;
virtual uint32_t GetPluginVersion() override;
public:
- //------------------------------------------------------------------
// Process protocol.
- //------------------------------------------------------------------
void Finalize() override;
bool CanDebug(lldb::TargetSP target_sp,
@@ -137,7 +129,6 @@ public:
const lldb::DataBufferSP GetAuxvData() override;
- //--------------------------------------------------------------------------
// ProcessFreeBSD internal API.
/// Registers the given message with this process.
Modified: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Wed Apr 10 13:48:55 2019
@@ -140,7 +140,6 @@ extern long PtraceWrapper(int req, lldb:
PtraceWrapper((req), (pid), (addr), (data))
#endif
-//------------------------------------------------------------------------------
// Static implementations of ProcessMonitor::ReadMemory and
// ProcessMonitor::WriteMemory. This enables mutual recursion between these
// functions without needed to go thru the thread funnel.
@@ -195,7 +194,6 @@ static bool EnsureFDFlags(int fd, int fl
return true;
}
-//------------------------------------------------------------------------------
/// \class Operation
/// Represents a ProcessMonitor operation.
///
@@ -213,7 +211,6 @@ public:
virtual void Execute(ProcessMonitor *monitor) = 0;
};
-//------------------------------------------------------------------------------
/// \class ReadOperation
/// Implements ProcessMonitor::ReadMemory.
class ReadOperation : public Operation {
@@ -239,7 +236,6 @@ void ReadOperation::Execute(ProcessMonit
m_result = DoReadMemory(pid, m_addr, m_buff, m_size, m_error);
}
-//------------------------------------------------------------------------------
/// \class WriteOperation
/// Implements ProcessMonitor::WriteMemory.
class WriteOperation : public Operation {
@@ -265,7 +261,6 @@ void WriteOperation::Execute(ProcessMoni
m_result = DoWriteMemory(pid, m_addr, m_buff, m_size, m_error);
}
-//------------------------------------------------------------------------------
/// \class ReadRegOperation
/// Implements ProcessMonitor::ReadRegisterValue.
class ReadRegOperation : public Operation {
@@ -305,7 +300,6 @@ void ReadRegOperation::Execute(ProcessMo
}
}
-//------------------------------------------------------------------------------
/// \class WriteRegOperation
/// Implements ProcessMonitor::WriteRegisterValue.
class WriteRegOperation : public Operation {
@@ -338,7 +332,6 @@ void WriteRegOperation::Execute(ProcessM
m_result = true;
}
-//------------------------------------------------------------------------------
/// \class ReadDebugRegOperation
/// Implements ProcessMonitor::ReadDebugRegisterValue.
class ReadDebugRegOperation : public Operation {
@@ -373,7 +366,6 @@ void ReadDebugRegOperation::Execute(Proc
}
}
-//------------------------------------------------------------------------------
/// \class WriteDebugRegOperation
/// Implements ProcessMonitor::WriteDebugRegisterValue.
class WriteDebugRegOperation : public Operation {
@@ -406,7 +398,6 @@ void WriteDebugRegOperation::Execute(Pro
m_result = true;
}
-//------------------------------------------------------------------------------
/// \class ReadGPROperation
/// Implements ProcessMonitor::ReadGPR.
class ReadGPROperation : public Operation {
@@ -433,7 +424,6 @@ void ReadGPROperation::Execute(ProcessMo
m_result = true;
}
-//------------------------------------------------------------------------------
/// \class ReadFPROperation
/// Implements ProcessMonitor::ReadFPR.
class ReadFPROperation : public Operation {
@@ -456,7 +446,6 @@ void ReadFPROperation::Execute(ProcessMo
m_result = true;
}
-//------------------------------------------------------------------------------
/// \class WriteGPROperation
/// Implements ProcessMonitor::WriteGPR.
class WriteGPROperation : public Operation {
@@ -479,7 +468,6 @@ void WriteGPROperation::Execute(ProcessM
m_result = true;
}
-//------------------------------------------------------------------------------
/// \class WriteFPROperation
/// Implements ProcessMonitor::WriteFPR.
class WriteFPROperation : public Operation {
@@ -502,7 +490,6 @@ void WriteFPROperation::Execute(ProcessM
m_result = true;
}
-//------------------------------------------------------------------------------
/// \class ResumeOperation
/// Implements ProcessMonitor::Resume.
class ResumeOperation : public Operation {
@@ -533,7 +520,6 @@ void ResumeOperation::Execute(ProcessMon
m_result = true;
}
-//------------------------------------------------------------------------------
/// \class SingleStepOperation
/// Implements ProcessMonitor::SingleStep.
class SingleStepOperation : public Operation {
@@ -561,7 +547,6 @@ void SingleStepOperation::Execute(Proces
m_result = true;
}
-//------------------------------------------------------------------------------
/// \class LwpInfoOperation
/// Implements ProcessMonitor::GetLwpInfo.
class LwpInfoOperation : public Operation {
@@ -590,7 +575,6 @@ void LwpInfoOperation::Execute(ProcessMo
}
}
-//------------------------------------------------------------------------------
/// \class ThreadSuspendOperation
/// Implements ProcessMonitor::ThreadSuspend.
class ThreadSuspendOperation : public Operation {
@@ -610,7 +594,6 @@ void ThreadSuspendOperation::Execute(Pro
m_result = !PTRACE(m_suspend ? PT_SUSPEND : PT_RESUME, m_tid, NULL, 0);
}
-//------------------------------------------------------------------------------
/// \class EventMessageOperation
/// Implements ProcessMonitor::GetEventMessage.
class EventMessageOperation : public Operation {
@@ -640,7 +623,6 @@ void EventMessageOperation::Execute(Proc
}
}
-//------------------------------------------------------------------------------
/// \class KillOperation
/// Implements ProcessMonitor::Kill.
class KillOperation : public Operation {
@@ -662,7 +644,6 @@ void KillOperation::Execute(ProcessMonit
m_result = true;
}
-//------------------------------------------------------------------------------
/// \class DetachOperation
/// Implements ProcessMonitor::Detach.
class DetachOperation : public Operation {
@@ -708,7 +689,6 @@ ProcessMonitor::AttachArgs::AttachArgs(P
ProcessMonitor::AttachArgs::~AttachArgs() {}
-//------------------------------------------------------------------------------
/// The basic design of the ProcessMonitor is built around two threads.
///
/// One thread (@see SignalThread) simply blocks on a call to waitpid()
@@ -805,7 +785,6 @@ ProcessMonitor::ProcessMonitor(ProcessFr
ProcessMonitor::~ProcessMonitor() { StopMonitor(); }
-//------------------------------------------------------------------------------
// Thread setup and tear down.
void ProcessMonitor::StartLaunchOpThread(LaunchArgs *args, Status &error) {
static const char *g_thread_name = "lldb.process.freebsd.operation";
Modified: lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIX.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIX.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIX.h (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIX.h Wed Apr 10 13:48:55 2019
@@ -13,7 +13,6 @@
#include "lldb/Target/RegisterContext.h"
#include "lldb/Utility/ArchSpec.h"
-//------------------------------------------------------------------------------
/// \class POSIXBreakpointProtocol
///
/// Extends RegisterClass with a few virtual operations useful on POSIX.
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Wed Apr 10 13:48:55 2019
@@ -206,9 +206,7 @@ static Status EnsureFDFlags(int fd, int
return error;
}
-// -----------------------------------------------------------------------------
// Public Static Methods
-// -----------------------------------------------------------------------------
llvm::Expected<std::unique_ptr<NativeProcessProtocol>>
NativeProcessLinux::Factory::Launch(ProcessLaunchInfo &launch_info,
@@ -284,9 +282,7 @@ NativeProcessLinux::Factory::Attach(
pid, -1, native_delegate, Info.GetArchitecture(), mainloop, *tids_or));
}
-// -----------------------------------------------------------------------------
// Public Instance Methods
-// -----------------------------------------------------------------------------
NativeProcessLinux::NativeProcessLinux(::pid_t pid, int terminal_fd,
NativeDelegate &delegate,
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h Wed Apr 10 13:48:55 2019
@@ -49,9 +49,7 @@ public:
MainLoop &mainloop) const override;
};
- // ---------------------------------------------------------------------
// NativeProcessProtocol Interface
- // ---------------------------------------------------------------------
Status Resume(const ResumeActionList &resume_actions) override;
Status Halt() override;
@@ -120,9 +118,7 @@ public:
Status GetTraceConfig(lldb::user_id_t traceid, TraceOptions &config) override;
- // ---------------------------------------------------------------------
// Interface used by NativeRegisterContext-derived classes.
- // ---------------------------------------------------------------------
static Status PtraceWrapper(int req, lldb::pid_t pid, void *addr = nullptr,
void *data = nullptr, size_t data_size = 0,
long *result = nullptr);
@@ -146,9 +142,7 @@ private:
// the relevan breakpoint
std::map<lldb::tid_t, lldb::addr_t> m_threads_stepping_with_breakpoint;
- // ---------------------------------------------------------------------
// Private Instance Methods
- // ---------------------------------------------------------------------
NativeProcessLinux(::pid_t pid, int terminal_fd, NativeDelegate &delegate,
const ArchSpec &arch, MainLoop &mainloop,
llvm::ArrayRef<::pid_t> tids);
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h Wed Apr 10 13:48:55 2019
@@ -40,9 +40,7 @@ public:
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
- //------------------------------------------------------------------
// Hardware breakpoints/watchpoint management functions
- //------------------------------------------------------------------
uint32_t NumSupportedHardwareBreakpoints() override;
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h Wed Apr 10 13:48:55 2019
@@ -40,9 +40,7 @@ public:
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
- //------------------------------------------------------------------
// Hardware breakpoints/watchpoint management functions
- //------------------------------------------------------------------
uint32_t NumSupportedHardwareBreakpoints() override;
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp Wed Apr 10 13:48:55 2019
@@ -87,9 +87,7 @@ NativeRegisterContextLinux::CreateHostNa
(GetRegisterInfoInterface().GetGPRSize() + sizeof(FPR_linux_mips) + \
sizeof(MSA_linux_mips))
-// ----------------------------------------------------------------------------
// NativeRegisterContextLinux_mips64 members.
-// ----------------------------------------------------------------------------
static RegisterInfoInterface *
CreateRegisterInfoInterface(const ArchSpec &target_arch) {
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h Wed Apr 10 13:48:55 2019
@@ -47,9 +47,7 @@ public:
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
- //------------------------------------------------------------------
// Hardware watchpoint management functions
- //------------------------------------------------------------------
uint32_t NumSupportedHardwareWatchpoints() override;
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp Wed Apr 10 13:48:55 2019
@@ -25,9 +25,7 @@
using namespace lldb_private;
using namespace lldb_private::process_linux;
-// ----------------------------------------------------------------------------
// Private namespace.
-// ----------------------------------------------------------------------------
namespace {
// s390x 64-bit general purpose registers.
@@ -89,9 +87,7 @@ static const RegisterSet g_reg_sets_s390
#define REG_CONTEXT_SIZE (sizeof(s390_regs) + sizeof(s390_fp_regs) + 4)
-// ----------------------------------------------------------------------------
// Required ptrace defines.
-// ----------------------------------------------------------------------------
#define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */
#define NT_S390_SYSTEM_CALL 0x307 /* s390 system call restart data */
@@ -103,9 +99,7 @@ NativeRegisterContextLinux::CreateHostNa
native_thread);
}
-// ----------------------------------------------------------------------------
// NativeRegisterContextLinux_s390x members.
-// ----------------------------------------------------------------------------
static RegisterInfoInterface *
CreateRegisterInfoInterface(const ArchSpec &target_arch) {
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp Wed Apr 10 13:48:55 2019
@@ -24,9 +24,7 @@
using namespace lldb_private;
using namespace lldb_private::process_linux;
-// ----------------------------------------------------------------------------
// Private namespace.
-// ----------------------------------------------------------------------------
namespace {
// x86 32-bit general purpose registers.
@@ -207,9 +205,7 @@ static const RegisterSet g_reg_sets_x86_
#define REG_CONTEXT_SIZE (GetRegisterInfoInterface().GetGPRSize() + sizeof(FPR))
-// ----------------------------------------------------------------------------
// Required ptrace defines.
-// ----------------------------------------------------------------------------
// Support ptrace extensions even when compiled without required kernel support
#ifndef NT_X86_XSTATE
@@ -225,18 +221,14 @@ static inline unsigned int fxsr_regset(c
return arch.GetAddressByteSize() == 8 ? NT_PRFPREG : NT_PRXFPREG;
}
-// ----------------------------------------------------------------------------
// Required MPX define.
-// ----------------------------------------------------------------------------
// Support MPX extensions also if compiled with compiler without MPX support.
#ifndef bit_MPX
#define bit_MPX 0x4000
#endif
-// ----------------------------------------------------------------------------
// XCR0 extended register sets masks.
-// ----------------------------------------------------------------------------
#define mask_XSTATE_AVX (1ULL << 2)
#define mask_XSTATE_BNDREGS (1ULL << 3)
#define mask_XSTATE_BNDCFG (1ULL << 4)
@@ -249,9 +241,7 @@ NativeRegisterContextLinux::CreateHostNa
new NativeRegisterContextLinux_x86_64(target_arch, native_thread));
}
-// ----------------------------------------------------------------------------
// NativeRegisterContextLinux_x86_64 members.
-// ----------------------------------------------------------------------------
static RegisterInfoInterface *
CreateRegisterInfoInterface(const ArchSpec &target_arch) {
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.h Wed Apr 10 13:48:55 2019
@@ -30,9 +30,7 @@ class NativeThreadLinux : public NativeT
public:
NativeThreadLinux(NativeProcessLinux &process, lldb::tid_t tid);
- // ---------------------------------------------------------------------
// NativeThreadProtocol Interface
- // ---------------------------------------------------------------------
std::string GetName() override;
lldb::StateType GetState() override;
@@ -54,9 +52,7 @@ public:
Status RemoveHardwareBreakpoint(lldb::addr_t addr) override;
private:
- // ---------------------------------------------------------------------
// Interface for friend classes
- // ---------------------------------------------------------------------
/// Resumes the thread. If \p signo is anything but
/// LLDB_INVALID_SIGNAL_NUMBER, deliver that signal to the thread.
@@ -91,18 +87,14 @@ private:
Status RequestStop();
- // ---------------------------------------------------------------------
// Private interface
- // ---------------------------------------------------------------------
void MaybeLogStateChange(lldb::StateType new_state);
NativeProcessLinux &GetProcess();
void SetStopped();
- // ---------------------------------------------------------------------
// Member Variables
- // ---------------------------------------------------------------------
lldb::StateType m_state;
ThreadStopInfo m_stop_info;
std::unique_ptr<NativeRegisterContextLinux> m_reg_context_up;
Modified: lldb/trunk/source/Plugins/Process/Linux/ProcessorTrace.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/ProcessorTrace.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessorTrace.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessorTrace.h Wed Apr 10 13:48:55 2019
@@ -23,7 +23,6 @@ namespace lldb_private {
namespace process_linux {
-// ---------------------------------------------------------------------
// This class keeps track of one tracing instance of
// Intel(R) Processor Trace on Linux OS. There is a map keeping track
// of different tracing instances on each thread, which enables trace
@@ -36,7 +35,6 @@ namespace process_linux {
// The trace id could map to trace instances for a group of threads
// (spanning to all the threads in the process) or a single thread.
// The kernel interface for us is the perf_event_open.
-// ---------------------------------------------------------------------
class ProcessorTraceMonitor;
typedef std::unique_ptr<ProcessorTraceMonitor> ProcessorTraceMonitorUP;
@@ -115,7 +113,6 @@ public:
Status GetTraceConfig(TraceOptions &config) const;
- // ---------------------------------------------------------------------
/// Read data from a cyclic buffer
///
/// \param[in] [out] buf
@@ -130,7 +127,6 @@ public:
///
/// \param[in] offset
/// The offset to begin reading the data in the cyclic buffer.
- // ---------------------------------------------------------------------
static void ReadCyclicBuffer(llvm::MutableArrayRef<uint8_t> &dst,
llvm::MutableArrayRef<uint8_t> src,
size_t src_cyc_index, size_t offset);
Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp Wed Apr 10 13:48:55 2019
@@ -28,9 +28,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// CommunicationKDP constructor
-//----------------------------------------------------------------------
CommunicationKDP::CommunicationKDP(const char *comm_name)
: Communication(comm_name), m_addr_byte_size(4),
m_byte_order(eByteOrderLittle), m_packet_timeout(5), m_sequence_mutex(),
@@ -39,9 +37,7 @@ CommunicationKDP::CommunicationKDP(const
m_kdp_version_feature(0u), m_kdp_hostinfo_cpu_mask(0u),
m_kdp_hostinfo_cpu_type(0u), m_kdp_hostinfo_cpu_subtype(0u) {}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
CommunicationKDP::~CommunicationKDP() {
if (IsConnected()) {
Disconnect();
Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h Wed Apr 10 13:48:55 2019
@@ -76,9 +76,7 @@ public:
ePacketTypeMask = 0x80u,
eCommandTypeMask = 0x7fu
} PacketType;
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CommunicationKDP(const char *comm_name);
virtual ~CommunicationKDP();
@@ -96,14 +94,12 @@ public:
lldb_private::DataExtractor &packet);
bool IsRunning() const { return m_is_running.GetValue(); }
- //------------------------------------------------------------------
// Set the global packet timeout.
//
// For clients, this is the timeout that gets used when sending
// packets and waiting for responses. For servers, this might not
// get used, and if it doesn't this should be moved to the
// CommunicationKDPClient.
- //------------------------------------------------------------------
std::chrono::seconds SetPacketTimeout(std::chrono::seconds packet_timeout) {
const auto old_packet_timeout = m_packet_timeout;
m_packet_timeout = packet_timeout;
@@ -112,9 +108,7 @@ public:
std::chrono::seconds GetPacketTimeout() const { return m_packet_timeout; }
- //------------------------------------------------------------------
// Public Request Packets
- //------------------------------------------------------------------
bool SendRequestConnect(uint16_t reply_port, uint16_t exc_port,
const char *greeting);
@@ -188,10 +182,8 @@ protected:
PacketStreamType &request_packet,
uint16_t request_length);
- //------------------------------------------------------------------
// Protected Request Packets (use public accessors which will cache
// results.
- //------------------------------------------------------------------
bool SendRequestVersion();
bool SendRequestHostInfo();
@@ -228,9 +220,7 @@ protected:
bool SendRequestAndGetReply(const CommandType command,
const PacketStreamType &request_packet,
lldb_private::DataExtractor &reply_packet);
- //------------------------------------------------------------------
// Classes that inherit from CommunicationKDP can see and modify these
- //------------------------------------------------------------------
uint32_t m_addr_byte_size;
lldb::ByteOrder m_byte_order;
std::chrono::seconds m_packet_timeout;
@@ -250,9 +240,7 @@ protected:
// hang the KDP connection...
lldb::addr_t m_last_read_memory_addr; // Last memory read address for logging
private:
- //------------------------------------------------------------------
// For CommunicationKDP only
- //------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(CommunicationKDP);
};
Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp Wed Apr 10 13:48:55 2019
@@ -143,9 +143,7 @@ bool ProcessKDP::CanDebug(TargetSP targe
return false;
}
-//----------------------------------------------------------------------
// ProcessKDP constructor
-//----------------------------------------------------------------------
ProcessKDP::ProcessKDP(TargetSP target_sp, ListenerSP listener_sp)
: Process(target_sp, listener_sp),
m_comm("lldb.process.kdp-remote.communication"),
@@ -162,9 +160,7 @@ ProcessKDP::ProcessKDP(TargetSP target_s
m_comm.SetPacketTimeout(std::chrono::seconds(timeout_seconds));
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
ProcessKDP::~ProcessKDP() {
Clear();
// We need to call finalize on the process before destroying ourselves to
@@ -174,9 +170,7 @@ ProcessKDP::~ProcessKDP() {
Finalize();
}
-//----------------------------------------------------------------------
// PluginInterface
-//----------------------------------------------------------------------
lldb_private::ConstString ProcessKDP::GetPluginName() {
return GetPluginNameStatic();
}
@@ -369,9 +363,7 @@ Status ProcessKDP::DoConnectRemote(Strea
return error;
}
-//----------------------------------------------------------------------
// Process Control
-//----------------------------------------------------------------------
Status ProcessKDP::DoLaunch(Module *exe_module,
ProcessLaunchInfo &launch_info) {
Status error;
@@ -595,17 +587,13 @@ Status ProcessKDP::DoDestroy() {
return DoDetach(keep_stopped);
}
-//------------------------------------------------------------------
// Process Queries
-//------------------------------------------------------------------
bool ProcessKDP::IsAlive() {
return m_comm.IsConnected() && Process::IsAlive();
}
-//------------------------------------------------------------------
// Process Memory
-//------------------------------------------------------------------
size_t ProcessKDP::DoReadMemory(addr_t addr, void *buf, size_t size,
Status &error) {
uint8_t *data_buffer = (uint8_t *)buf;
Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h Wed Apr 10 13:48:55 2019
@@ -30,9 +30,7 @@ class ThreadKDP;
class ProcessKDP : public lldb_private::Process {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
static lldb::ProcessSP
CreateInstance(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp,
const lldb_private::FileSpec *crash_file_path);
@@ -47,23 +45,17 @@ public:
static const char *GetPluginDescriptionStatic();
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
ProcessKDP(lldb::TargetSP target_sp, lldb::ListenerSP listener);
~ProcessKDP() override;
- //------------------------------------------------------------------
// Check if a given Process
- //------------------------------------------------------------------
bool CanDebug(lldb::TargetSP target_sp,
bool plugin_specified_by_name) override;
lldb_private::CommandObject *GetPluginCommandObject() override;
- //------------------------------------------------------------------
// Creating a new process, or attaching to an existing one
- //------------------------------------------------------------------
lldb_private::Status WillLaunch(lldb_private::Module *module) override;
lldb_private::Status
@@ -93,16 +85,12 @@ public:
lldb_private::DynamicLoader *GetDynamicLoader() override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
- //------------------------------------------------------------------
// Process Control
- //------------------------------------------------------------------
lldb_private::Status WillResume() override;
lldb_private::Status DoResume() override;
@@ -117,14 +105,10 @@ public:
void RefreshStateAfterStop() override;
- //------------------------------------------------------------------
// Process Queries
- //------------------------------------------------------------------
bool IsAlive() override;
- //------------------------------------------------------------------
// Process Memory
- //------------------------------------------------------------------
size_t DoReadMemory(lldb::addr_t addr, void *buf, size_t size,
lldb_private::Status &error) override;
@@ -136,18 +120,14 @@ public:
lldb_private::Status DoDeallocateMemory(lldb::addr_t ptr) override;
- //----------------------------------------------------------------------
// Process Breakpoints
- //----------------------------------------------------------------------
lldb_private::Status
EnableBreakpointSite(lldb_private::BreakpointSite *bp_site) override;
lldb_private::Status
DisableBreakpointSite(lldb_private::BreakpointSite *bp_site) override;
- //----------------------------------------------------------------------
// Process Watchpoints
- //----------------------------------------------------------------------
lldb_private::Status EnableWatchpoint(lldb_private::Watchpoint *wp,
bool notify = true) override;
@@ -160,9 +140,7 @@ protected:
friend class ThreadKDP;
friend class CommunicationKDP;
- //----------------------------------------------------------------------
// Accessors
- //----------------------------------------------------------------------
bool IsRunning(lldb::StateType state) {
return state == lldb::eStateRunning || IsStepping(state);
}
@@ -191,9 +169,7 @@ protected:
lldb::ThreadSP GetKernelThread();
- //------------------------------------------------------------------
/// Broadcaster event bits definitions.
- //------------------------------------------------------------------
CommunicationKDP m_comm;
lldb_private::Broadcaster m_async_broadcaster;
lldb_private::HostThread m_async_thread;
@@ -209,9 +185,7 @@ protected:
static void *AsyncThread(void *arg);
private:
- //------------------------------------------------------------------
// For ProcessKDP only
- //------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(ProcessKDP);
};
Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp Wed Apr 10 13:48:55 2019
@@ -34,9 +34,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// Thread Registers
-//----------------------------------------------------------------------
ThreadKDP::ThreadKDP(Process &process, lldb::tid_t tid)
: Thread(process, tid), m_thread_name(), m_dispatch_queue_name(),
Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.h (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.h Wed Apr 10 13:48:55 2019
@@ -60,16 +60,12 @@ public:
protected:
friend class ProcessKDP;
- //------------------------------------------------------------------
// Member variables.
- //------------------------------------------------------------------
std::string m_thread_name;
std::string m_dispatch_queue_name;
lldb::addr_t m_thread_dispatch_qaddr;
lldb::StopInfoSP m_cached_stop_info_sp;
- //------------------------------------------------------------------
// Protected member functions.
- //------------------------------------------------------------------
virtual bool CalculateStopInfo();
};
Modified: lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp Wed Apr 10 13:48:55 2019
@@ -54,9 +54,7 @@ static Status EnsureFDFlags(int fd, int
return error;
}
-// -----------------------------------------------------------------------------
// Public Static Methods
-// -----------------------------------------------------------------------------
llvm::Expected<std::unique_ptr<NativeProcessProtocol>>
NativeProcessNetBSD::Factory::Launch(ProcessLaunchInfo &launch_info,
@@ -136,9 +134,7 @@ NativeProcessNetBSD::Factory::Attach(
return std::move(process_up);
}
-// -----------------------------------------------------------------------------
// Public Instance Methods
-// -----------------------------------------------------------------------------
NativeProcessNetBSD::NativeProcessNetBSD(::pid_t pid, int terminal_fd,
NativeDelegate &delegate,
Modified: lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h (original)
+++ lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h Wed Apr 10 13:48:55 2019
@@ -38,9 +38,7 @@ public:
MainLoop &mainloop) const override;
};
- // ---------------------------------------------------------------------
// NativeProcessProtocol Interface
- // ---------------------------------------------------------------------
Status Resume(const ResumeActionList &resume_actions) override;
Status Halt() override;
@@ -83,9 +81,7 @@ public:
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
GetAuxvData() const override;
- // ---------------------------------------------------------------------
// Interface used by NativeRegisterContext-derived classes.
- // ---------------------------------------------------------------------
static Status PtraceWrapper(int req, lldb::pid_t pid, void *addr = nullptr,
int data = 0, int *result = nullptr);
@@ -95,9 +91,7 @@ private:
LazyBool m_supports_mem_region = eLazyBoolCalculate;
std::vector<std::pair<MemoryRegionInfo, FileSpec>> m_mem_region_cache;
- // ---------------------------------------------------------------------
// Private Instance Methods
- // ---------------------------------------------------------------------
NativeProcessNetBSD(::pid_t pid, int terminal_fd, NativeDelegate &delegate,
const ArchSpec &arch, MainLoop &mainloop);
Modified: lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp Wed Apr 10 13:48:55 2019
@@ -31,9 +31,7 @@
using namespace lldb_private;
using namespace lldb_private::process_netbsd;
-// ----------------------------------------------------------------------------
// Private namespace.
-// ----------------------------------------------------------------------------
namespace {
// x86 64-bit general purpose registers.
@@ -152,9 +150,7 @@ NativeRegisterContextNetBSD::CreateHostN
return new NativeRegisterContextNetBSD_x86_64(target_arch, native_thread);
}
-// ----------------------------------------------------------------------------
// NativeRegisterContextNetBSD_x86_64 members.
-// ----------------------------------------------------------------------------
static RegisterInfoInterface *
CreateRegisterInfoInterface(const ArchSpec &target_arch) {
Modified: lldb/trunk/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h (original)
+++ lldb/trunk/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h Wed Apr 10 13:48:55 2019
@@ -26,9 +26,7 @@ class NativeThreadNetBSD : public Native
public:
NativeThreadNetBSD(NativeProcessNetBSD &process, lldb::tid_t tid);
- // ---------------------------------------------------------------------
// NativeThreadProtocol Interface
- // ---------------------------------------------------------------------
std::string GetName() override;
lldb::StateType GetState() override;
@@ -48,9 +46,7 @@ public:
Status RemoveHardwareBreakpoint(lldb::addr_t addr) override;
private:
- // ---------------------------------------------------------------------
// Interface for friend classes
- // ---------------------------------------------------------------------
void SetStoppedBySignal(uint32_t signo, const siginfo_t *info = nullptr);
void SetStoppedByBreakpoint();
@@ -61,9 +57,7 @@ private:
void SetRunning();
void SetStepping();
- // ---------------------------------------------------------------------
// Member Variables
- // ---------------------------------------------------------------------
lldb::StateType m_state;
ThreadStopInfo m_stop_info;
std::unique_ptr<NativeRegisterContext> m_reg_context_up;
Modified: lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.h Wed Apr 10 13:48:55 2019
@@ -64,9 +64,7 @@ public:
void Clear();
protected:
- //------------------------------------------------------------------
// Classes that inherit from DynamicRegisterInfo can see and modify these
- //------------------------------------------------------------------
typedef std::vector<lldb_private::RegisterInfo> reg_collection;
typedef std::vector<lldb_private::RegisterSet> set_collection;
typedef std::vector<uint32_t> reg_num_collection;
Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryThread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/HistoryThread.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/HistoryThread.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/HistoryThread.h Wed Apr 10 13:48:55 2019
@@ -22,7 +22,6 @@
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class HistoryThread HistoryThread.h "HistoryThread.h"
/// A thread object representing a backtrace from a previous point in the
/// process execution
@@ -31,7 +30,6 @@ namespace lldb_private {
/// process execution. It is given a backtrace list of pc addresses and
/// optionally a stop_id of when those pc addresses were collected, and it
/// will create stack frames for them.
-//----------------------------------------------------------------------
class HistoryThread : public lldb_private::Thread {
public:
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp Wed Apr 10 13:48:55 2019
@@ -960,11 +960,9 @@ const size_t k_num_gpr_registers = llvm:
const size_t k_num_fpu_registers = llvm::array_lengthof(g_fpu_regnums);
const size_t k_num_exc_registers = llvm::array_lengthof(g_exc_regnums);
-//----------------------------------------------------------------------
// Register set definitions. The first definitions at register set index of
// zero is for all registers, followed by other registers sets. The register
// information for the all register set need not be filled in.
-//----------------------------------------------------------------------
static const RegisterSet g_reg_sets[] = {
{
"General Purpose Registers", "gpr", k_num_gpr_registers, g_gpr_regnums,
@@ -984,9 +982,7 @@ const RegisterSet *RegisterContextDarwin
return NULL;
}
-//----------------------------------------------------------------------
// Register information definitions for 32 bit i386.
-//----------------------------------------------------------------------
int RegisterContextDarwin_arm::GetSetForNativeRegNum(int reg) {
if (reg < fpu_s0)
return GPRRegSet;
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp Wed Apr 10 13:48:55 2019
@@ -67,9 +67,7 @@ using namespace lldb_private;
sizeof(RegisterContextDarwin_arm64::FPU) + \
sizeof(RegisterContextDarwin_arm64::EXC))
-//-----------------------------------------------------------------------------
// Include RegisterInfos_arm64 to declare our g_register_infos_arm64 structure.
-//-----------------------------------------------------------------------------
#define DECLARE_REGISTER_INFOS_ARM64_STRUCT
#include "RegisterInfos_arm64.h"
#undef DECLARE_REGISTER_INFOS_ARM64_STRUCT
@@ -140,11 +138,9 @@ const size_t k_num_gpr_registers = llvm:
const size_t k_num_fpu_registers = llvm::array_lengthof(g_fpu_regnums);
const size_t k_num_exc_registers = llvm::array_lengthof(g_exc_regnums);
-//----------------------------------------------------------------------
// Register set definitions. The first definitions at register set index of
// zero is for all registers, followed by other registers sets. The register
// information for the all register set need not be filled in.
-//----------------------------------------------------------------------
static const RegisterSet g_reg_sets[] = {
{
"General Purpose Registers", "gpr", k_num_gpr_registers, g_gpr_regnums,
@@ -164,9 +160,7 @@ const RegisterSet *RegisterContextDarwin
return NULL;
}
-//----------------------------------------------------------------------
// Register information definitions for arm64
-//----------------------------------------------------------------------
int RegisterContextDarwin_arm64::GetSetForNativeRegNum(int reg) {
if (reg < fpu_v0)
return GPRRegSet;
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp Wed Apr 10 13:48:55 2019
@@ -460,11 +460,9 @@ const size_t k_num_gpr_registers = llvm:
const size_t k_num_fpu_registers = llvm::array_lengthof(g_fpu_regnums);
const size_t k_num_exc_registers = llvm::array_lengthof(g_exc_regnums);
-//----------------------------------------------------------------------
// Register set definitions. The first definitions at register set index of
// zero is for all registers, followed by other registers sets. The register
// information for the all register set need not be filled in.
-//----------------------------------------------------------------------
static const RegisterSet g_reg_sets[] = {
{
"General Purpose Registers", "gpr", k_num_gpr_registers, g_gpr_regnums,
@@ -484,9 +482,7 @@ const RegisterSet *RegisterContextDarwin
return NULL;
}
-//----------------------------------------------------------------------
// Register information definitions for 32 bit i386.
-//----------------------------------------------------------------------
int RegisterContextDarwin_i386::GetSetForNativeRegNum(int reg_num) {
if (reg_num < fpu_fcw)
return GPRRegSet;
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp Wed Apr 10 13:48:55 2019
@@ -521,11 +521,9 @@ const size_t k_num_gpr_registers = llvm:
const size_t k_num_fpu_registers = llvm::array_lengthof(g_fpu_regnums);
const size_t k_num_exc_registers = llvm::array_lengthof(g_exc_regnums);
-//----------------------------------------------------------------------
// Register set definitions. The first definitions at register set index of
// zero is for all registers, followed by other registers sets. The register
// information for the all register set need not be filled in.
-//----------------------------------------------------------------------
static const RegisterSet g_reg_sets[] = {
{
"General Purpose Registers", "gpr", k_num_gpr_registers, g_gpr_regnums,
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDummy.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDummy.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDummy.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDummy.h Wed Apr 10 13:48:55 2019
@@ -51,9 +51,7 @@ public:
uint32_t num) override;
private:
- //------------------------------------------------------------------
// For RegisterContextLLDB only
- //------------------------------------------------------------------
lldb_private::RegisterSet m_reg_set0; // register set 0 (PC only)
lldb_private::RegisterInfo m_pc_reg_info;
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.cpp Wed Apr 10 13:48:55 2019
@@ -53,9 +53,7 @@ struct UserArea {
#define DR_SIZE sizeof(uint32_t)
#define DR_OFFSET(reg_index) (LLVM_EXTENSION offsetof(dbreg, dr[reg_index]))
-//---------------------------------------------------------------------------
// Include RegisterInfos_i386 to declare our g_register_infos_i386 structure.
-//---------------------------------------------------------------------------
#define DECLARE_REGISTER_INFOS_I386_STRUCT
#include "RegisterInfos_i386.h"
#undef DECLARE_REGISTER_INFOS_I386_STRUCT
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp Wed Apr 10 13:48:55 2019
@@ -79,10 +79,8 @@ typedef struct _GPR {
uint64_t dummy;
} GPR_freebsd_mips;
-//---------------------------------------------------------------------------
// Include RegisterInfos_mips64 to declare our g_register_infos_mips64
// structure.
-//---------------------------------------------------------------------------
#define DECLARE_REGISTER_INFOS_MIPS64_STRUCT
#include "RegisterInfos_mips64.h"
#undef DECLARE_REGISTER_INFOS_MIPS64_STRUCT
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp Wed Apr 10 13:48:55 2019
@@ -168,10 +168,8 @@ typedef struct _VMX {
uint32_t vscr;
} VMX;
-//---------------------------------------------------------------------------
// Include RegisterInfos_powerpc to declare our g_register_infos_powerpc
// structure.
-//---------------------------------------------------------------------------
#define DECLARE_REGISTER_INFOS_POWERPC_STRUCT
#include "RegisterInfos_powerpc.h"
#undef DECLARE_REGISTER_INFOS_POWERPC_STRUCT
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.cpp Wed Apr 10 13:48:55 2019
@@ -61,10 +61,8 @@ struct UserArea {
#define DR_OFFSET(reg_index) (LLVM_EXTENSION offsetof(DBG, dr[reg_index]))
-//---------------------------------------------------------------------------
// Include RegisterInfos_x86_64 to declare our g_register_infos_x86_64
// structure.
-//---------------------------------------------------------------------------
#define DECLARE_REGISTER_INFOS_X86_64_STRUCT
#include "RegisterInfos_x86_64.h"
#undef DECLARE_REGISTER_INFOS_X86_64_STRUCT
@@ -88,10 +86,8 @@ GetRegisterInfo_i386(const lldb_private:
g_register_infos.insert(g_register_infos.end(), &base_info[0],
&base_info[k_num_registers_i386]);
-//---------------------------------------------------------------------------
// Include RegisterInfos_x86_64 to update the g_register_infos structure
// with x86_64 offsets.
-//---------------------------------------------------------------------------
#define UPDATE_REGISTER_INFOS_I386_STRUCT_WITH_X86_64_OFFSETS
#include "RegisterInfos_x86_64.h"
#undef UPDATE_REGISTER_INFOS_I386_STRUCT_WITH_X86_64_OFFSETS
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextHistory.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextHistory.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextHistory.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextHistory.h Wed Apr 10 13:48:55 2019
@@ -51,9 +51,7 @@ public:
uint32_t num) override;
private:
- //------------------------------------------------------------------
// For RegisterContextLLDB only
- //------------------------------------------------------------------
lldb_private::RegisterSet m_reg_set0; // register set 0 (PC only)
lldb_private::RegisterInfo m_pc_reg_info;
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.h Wed Apr 10 13:48:55 2019
@@ -110,7 +110,6 @@ private:
// user somehow.
bool IsSkipFrame() const;
- //------------------------------------------------------------------
/// Determines if a SymbolContext is a trap handler or not
///
/// Given a SymbolContext, determines if this is a trap handler function
@@ -118,7 +117,6 @@ private:
///
/// \return
/// Returns true if the SymbolContext is a trap handler.
- //------------------------------------------------------------------
bool IsTrapHandlerSymbol(lldb_private::Process *process,
const lldb_private::SymbolContext &m_sym_ctx) const;
@@ -154,7 +152,6 @@ private:
const lldb_private::RegisterInfo *reg_info,
const lldb_private::RegisterValue &value);
- //------------------------------------------------------------------
/// If the unwind has to the caller frame has failed, try something else
///
/// If lldb is using an assembly language based UnwindPlan for a frame and
@@ -165,10 +162,8 @@ private:
///
/// \return
/// Returns true if a fallback unwindplan was found & was installed.
- //------------------------------------------------------------------
bool TryFallbackUnwindPlan();
- //------------------------------------------------------------------
/// Switch to the fallback unwind plan unconditionally without any safety
/// checks that it is providing better results than the normal unwind plan.
///
@@ -176,7 +171,6 @@ private:
/// found to be fundamentally incorrect/impossible.
///
/// Returns true if it was able to install the fallback unwind plan.
- //------------------------------------------------------------------
bool ForceSwitchToFallbackUnwindPlan();
// Get the contents of a general purpose (address-size) register for this
@@ -249,9 +243,7 @@ private:
lldb_private::UnwindLLDB &m_parent_unwind; // The UnwindLLDB that is creating
// this RegisterContextLLDB
- //------------------------------------------------------------------
// For RegisterContextLLDB only
- //------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(RegisterContextLLDB);
};
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp Wed Apr 10 13:48:55 2019
@@ -81,9 +81,7 @@ struct UserArea {
#define DR_OFFSET(reg_index) (DR_0_OFFSET + (reg_index * 4))
#define FPR_SIZE(reg) sizeof(((FPR_i386 *)NULL)->reg)
-//---------------------------------------------------------------------------
// Include RegisterInfos_i386 to declare our g_register_infos_i386 structure.
-//---------------------------------------------------------------------------
#define DECLARE_REGISTER_INFOS_I386_STRUCT
#include "RegisterInfos_i386.h"
#undef DECLARE_REGISTER_INFOS_I386_STRUCT
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp Wed Apr 10 13:48:55 2019
@@ -21,9 +21,7 @@
using namespace lldb_private;
using namespace lldb;
-//---------------------------------------------------------------------------
// Include RegisterInfos_mips to declare our g_register_infos_mips structure.
-//---------------------------------------------------------------------------
#define DECLARE_REGISTER_INFOS_MIPS_STRUCT
#include "RegisterInfos_mips.h"
#undef DECLARE_REGISTER_INFOS_MIPS_STRUCT
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp Wed Apr 10 13:48:55 2019
@@ -22,19 +22,15 @@
using namespace lldb;
using namespace lldb_private;
-//---------------------------------------------------------------------------
// Include RegisterInfos_mips64 to declare our g_register_infos_mips64
// structure.
-//---------------------------------------------------------------------------
#define DECLARE_REGISTER_INFOS_MIPS64_STRUCT
#define LINUX_MIPS64
#include "RegisterInfos_mips64.h"
#undef LINUX_MIPS64
#undef DECLARE_REGISTER_INFOS_MIPS64_STRUCT
-//---------------------------------------------------------------------------
// Include RegisterInfos_mips to declare our g_register_infos_mips structure.
-//---------------------------------------------------------------------------
#define DECLARE_REGISTER_INFOS_MIPS_STRUCT
#include "RegisterInfos_mips.h"
#undef DECLARE_REGISTER_INFOS_MIPS_STRUCT
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_s390x.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_s390x.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_s390x.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_s390x.cpp Wed Apr 10 13:48:55 2019
@@ -12,9 +12,7 @@
using namespace lldb_private;
using namespace lldb;
-//---------------------------------------------------------------------------
// Include RegisterInfos_s390x to declare our g_register_infos_s390x structure.
-//---------------------------------------------------------------------------
#define DECLARE_REGISTER_INFOS_S390X_STRUCT
#include "RegisterInfos_s390x.h"
#undef DECLARE_REGISTER_INFOS_S390X_STRUCT
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp Wed Apr 10 13:48:55 2019
@@ -75,10 +75,8 @@ struct UserArea {
(LLVM_EXTENSION offsetof(UserArea, dbg) + \
LLVM_EXTENSION offsetof(DBG, dr[reg_index]))
-//---------------------------------------------------------------------------
// Include RegisterInfos_x86_64 to declare our g_register_infos_x86_64
// structure.
-//---------------------------------------------------------------------------
#define DECLARE_REGISTER_INFOS_X86_64_STRUCT
#include "RegisterInfos_x86_64.h"
#undef DECLARE_REGISTER_INFOS_X86_64_STRUCT
@@ -102,10 +100,8 @@ GetRegisterInfo_i386(const lldb_private:
g_register_infos.insert(g_register_infos.end(), &base_info[0],
&base_info[k_num_registers_i386]);
-//---------------------------------------------------------------------------
// Include RegisterInfos_x86_64 to update the g_register_infos structure
// with x86_64 offsets.
-//---------------------------------------------------------------------------
#define UPDATE_REGISTER_INFOS_I386_STRUCT_WITH_X86_64_OFFSETS
#include "RegisterInfos_x86_64.h"
#undef UPDATE_REGISTER_INFOS_I386_STRUCT_WITH_X86_64_OFFSETS
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp Wed Apr 10 13:48:55 2019
@@ -19,18 +19,14 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// RegisterContextMacOSXFrameBackchain constructor
-//----------------------------------------------------------------------
RegisterContextMacOSXFrameBackchain::RegisterContextMacOSXFrameBackchain(
Thread &thread, uint32_t concrete_frame_idx,
const UnwindMacOSXFrameBackchain::Cursor &cursor)
: RegisterContext(thread, concrete_frame_idx), m_cursor(cursor),
m_cursor_is_valid(true) {}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
RegisterContextMacOSXFrameBackchain::~RegisterContextMacOSXFrameBackchain() {}
void RegisterContextMacOSXFrameBackchain::InvalidateAllRegisters() {
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.cpp Wed Apr 10 13:48:55 2019
@@ -18,9 +18,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// RegisterContextMemory constructor
-//----------------------------------------------------------------------
RegisterContextMemory::RegisterContextMemory(Thread &thread,
uint32_t concrete_frame_idx,
DynamicRegisterInfo ®_infos,
@@ -40,9 +38,7 @@ RegisterContextMemory::RegisterContextMe
m_reg_data.SetData(reg_data_sp);
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
RegisterContextMemory::~RegisterContextMemory() {}
void RegisterContextMemory::InvalidateAllRegisters() {
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.h Wed Apr 10 13:48:55 2019
@@ -39,13 +39,11 @@ public:
uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind,
uint32_t num) override;
- //------------------------------------------------------------------
// If all of the thread register are in a contiguous buffer in
// memory, then the default ReadRegister/WriteRegister and
// ReadAllRegisterValues/WriteAllRegisterValues will work. If thread
// registers are not contiguous, clients will want to subclass this
// class and modify the read/write functions as needed.
- //------------------------------------------------------------------
bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
lldb_private::RegisterValue ®_value) override;
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp Wed Apr 10 13:48:55 2019
@@ -77,10 +77,8 @@ struct UserArea {
LLVM_EXTENSION offsetof(DBG, dr[reg_index]))
-//---------------------------------------------------------------------------
// Include RegisterInfos_x86_64 to declare our g_register_infos_x86_64
// structure.
-//---------------------------------------------------------------------------
#define DECLARE_REGISTER_INFOS_X86_64_STRUCT
#include "RegisterInfos_x86_64.h"
#undef DECLARE_REGISTER_INFOS_X86_64_STRUCT
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextOpenBSD_i386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextOpenBSD_i386.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextOpenBSD_i386.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextOpenBSD_i386.cpp Wed Apr 10 13:48:55 2019
@@ -50,9 +50,7 @@ struct UserArea {
#define DR_SIZE sizeof(uint32_t)
#define DR_OFFSET(reg_index) (LLVM_EXTENSION offsetof(dbreg, dr[reg_index]))
-//---------------------------------------------------------------------------
// Include RegisterInfos_i386 to declare our g_register_infos_i386 structure.
-//---------------------------------------------------------------------------
#define DECLARE_REGISTER_INFOS_I386_STRUCT
#include "RegisterInfos_i386.h"
#undef DECLARE_REGISTER_INFOS_I386_STRUCT
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextOpenBSD_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextOpenBSD_x86_64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextOpenBSD_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextOpenBSD_x86_64.cpp Wed Apr 10 13:48:55 2019
@@ -58,10 +58,8 @@ struct UserArea {
#define DR_OFFSET(reg_index) (LLVM_EXTENSION offsetof(DBG, dr[reg_index]))
-//---------------------------------------------------------------------------
// Include RegisterInfos_x86_64 to declare our g_register_infos_x86_64
// structure.
-//---------------------------------------------------------------------------
#define DECLARE_REGISTER_INFOS_X86_64_STRUCT
#include "RegisterInfos_x86_64.h"
#undef DECLARE_REGISTER_INFOS_X86_64_STRUCT
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h Wed Apr 10 13:48:55 2019
@@ -16,9 +16,7 @@
class ProcessMonitor;
-// ---------------------------------------------------------------------------
// Internal codes for all powerpc registers.
-// ---------------------------------------------------------------------------
enum {
k_first_gpr_powerpc,
gpr_r0_powerpc = k_first_gpr_powerpc,
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h Wed Apr 10 13:48:55 2019
@@ -50,9 +50,7 @@ public:
uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind,
uint32_t num) override;
- //---------------------------------------------------------------------------
// Note: prefer kernel definitions over user-land
- //---------------------------------------------------------------------------
enum FPRType {
eNotValid = 0,
eFSAVE, // TODO
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp Wed Apr 10 13:48:55 2019
@@ -54,9 +54,7 @@ void RegisterContextThreadMemory::Update
}
}
-//------------------------------------------------------------------
// Subclasses must override these functions
-//------------------------------------------------------------------
void RegisterContextThreadMemory::InvalidateAllRegisters() {
UpdateRegisterContext();
if (m_reg_ctx_sp)
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContext_s390x.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContext_s390x.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContext_s390x.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContext_s390x.h Wed Apr 10 13:48:55 2019
@@ -9,9 +9,7 @@
#ifndef liblldb_RegisterContext_s390x_h_
#define liblldb_RegisterContext_s390x_h_
-//---------------------------------------------------------------------------
// SystemZ ehframe, dwarf regnums
-//---------------------------------------------------------------------------
// EHFrame and DWARF Register numbers (eRegisterKindEHFrame &
// eRegisterKindDWARF)
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h Wed Apr 10 13:48:55 2019
@@ -16,9 +16,7 @@
#include "llvm/Support/Compiler.h"
namespace lldb_private {
-//---------------------------------------------------------------------------
// i386 ehframe, dwarf regnums
-//---------------------------------------------------------------------------
// Register numbers seen in eh_frame (eRegisterKindEHFrame) on i386 systems
// (non-Darwin)
@@ -131,9 +129,7 @@ enum {
dwarf_bnd3_i386,
};
-//---------------------------------------------------------------------------
// AMD x86_64, AMD64, Intel EM64T, or Intel 64 ehframe, dwarf regnums
-//---------------------------------------------------------------------------
// EHFrame and DWARF Register numbers (eRegisterKindEHFrame &
// eRegisterKindDWARF)
@@ -241,9 +237,7 @@ enum {
// dwarf_k7_x86_64,
};
-//---------------------------------------------------------------------------
// Generic floating-point registers
-//---------------------------------------------------------------------------
struct MMSReg {
uint8_t bytes[10];
@@ -282,9 +276,7 @@ struct FXSAVE {
uint8_t padding2[40];
};
-//---------------------------------------------------------------------------
// Extended floating-point registers
-//---------------------------------------------------------------------------
struct YMMHReg {
uint8_t bytes[16]; // 16 * 8 bits for the high bytes of each YMM register
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterInfoInterface.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterInfoInterface.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterInfoInterface.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterInfoInterface.h Wed Apr 10 13:48:55 2019
@@ -15,11 +15,9 @@
namespace lldb_private {
-///------------------------------------------------------------------------------
/// \class RegisterInfoInterface
///
/// RegisterInfo interface to patch RegisterInfo structure for archs.
-///------------------------------------------------------------------------------
class RegisterInfoInterface {
public:
RegisterInfoInterface(const lldb_private::ArchSpec &target_arch)
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm.cpp Wed Apr 10 13:48:55 2019
@@ -43,9 +43,7 @@ using namespace lldb_private;
(sizeof(RegisterInfoPOSIX_arm::GPR) + sizeof(RegisterInfoPOSIX_arm::FPU) + \
sizeof(RegisterInfoPOSIX_arm::EXC))
-//-----------------------------------------------------------------------------
// Include RegisterInfos_arm to declare our g_register_infos_arm structure.
-//-----------------------------------------------------------------------------
#define DECLARE_REGISTER_INFOS_ARM_STRUCT
#include "RegisterInfos_arm.h"
#undef DECLARE_REGISTER_INFOS_ARM_STRUCT
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp Wed Apr 10 13:48:55 2019
@@ -48,9 +48,7 @@
sizeof(RegisterInfoPOSIX_arm64::FPU) + \
sizeof(RegisterInfoPOSIX_arm64::EXC))
-//-----------------------------------------------------------------------------
// Include RegisterInfos_arm64 to declare our g_register_infos_arm64 structure.
-//-----------------------------------------------------------------------------
#define DECLARE_REGISTER_INFOS_ARM64_STRUCT
#include "RegisterInfos_arm64.h"
#undef DECLARE_REGISTER_INFOS_ARM64_STRUCT
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_ppc64le.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_ppc64le.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_ppc64le.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_ppc64le.cpp Wed Apr 10 13:48:55 2019
@@ -15,9 +15,7 @@
#include "RegisterInfoPOSIX_ppc64le.h"
-//-----------------------------------------------------------------------------
// Include RegisterInfoPOSIX_ppc64le to declare our g_register_infos_ppc64le
-//-----------------------------------------------------------------------------
#define DECLARE_REGISTER_INFOS_PPC64LE_STRUCT
#include "RegisterInfos_ppc64le.h"
#undef DECLARE_REGISTER_INFOS_PPC64LE_STRUCT
Modified: lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.h Wed Apr 10 13:48:55 2019
@@ -17,9 +17,7 @@ namespace lldb_private {
class StopInfoMachException : public StopInfo {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
StopInfoMachException(Thread &thread, uint32_t exc_type,
uint32_t exc_data_count, uint64_t exc_code,
uint64_t exc_subcode)
Modified: lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.h Wed Apr 10 13:48:55 2019
@@ -93,7 +93,6 @@ protected:
uint32_t lldb_regnum, lldb_private::UnwindLLDB::RegisterLocation ®loc,
uint32_t starting_frame_num, bool pc_register);
- //------------------------------------------------------------------
/// Provide the list of user-specified trap handler functions
///
/// The Platform is one source of trap handler function names; that
@@ -104,7 +103,6 @@ protected:
/// \return
/// Vector of ConstStrings of trap handler function names. May be
/// empty.
- //------------------------------------------------------------------
const std::vector<ConstString> &GetUserSpecifiedTrapHandlerFunctionNames() {
return m_user_supplied_trap_handler_functions;
}
@@ -138,12 +136,10 @@ private:
std::vector<ConstString> m_user_supplied_trap_handler_functions;
- //-----------------------------------------------------------------
// Check if Full UnwindPlan of First frame is valid or not.
// If not then try Fallback UnwindPlan of the frame. If Fallback
// UnwindPlan succeeds then update the Full UnwindPlan with the
// Fallback UnwindPlan.
- //-----------------------------------------------------------------
void UpdateUnwindPlanForFirstFrameIfInvalid(ABI *abi);
CursorSP GetOneMoreFrame(ABI *abi);
@@ -152,9 +148,7 @@ private:
bool AddFirstFrame();
- //------------------------------------------------------------------
// For UnwindLLDB only
- //------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(UnwindLLDB);
};
Modified: lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h Wed Apr 10 13:48:55 2019
@@ -46,9 +46,7 @@ private:
size_t
GetStackFrameData_x86_64(const lldb_private::ExecutionContext &exe_ctx);
- //------------------------------------------------------------------
// For UnwindMacOSXFrameBackchain only
- //------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(UnwindMacOSXFrameBackchain);
};
Modified: lldb/trunk/source/Plugins/Process/Utility/lldb-arm-register-enums.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/lldb-arm-register-enums.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/lldb-arm-register-enums.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/lldb-arm-register-enums.h Wed Apr 10 13:48:55 2019
@@ -12,9 +12,7 @@
namespace lldb_private {
// LLDB register codes (e.g. RegisterKind == eRegisterKindLLDB)
-//---------------------------------------------------------------------------
// Internal codes for all ARM registers.
-//---------------------------------------------------------------------------
enum {
k_first_gpr_arm = 0,
gpr_r0_arm = k_first_gpr_arm,
Modified: lldb/trunk/source/Plugins/Process/Utility/lldb-arm64-register-enums.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/lldb-arm64-register-enums.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/lldb-arm64-register-enums.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/lldb-arm64-register-enums.h Wed Apr 10 13:48:55 2019
@@ -12,9 +12,7 @@
namespace lldb_private {
// LLDB register codes (e.g. RegisterKind == eRegisterKindLLDB)
-//---------------------------------------------------------------------------
// Internal codes for all ARM64 registers.
-//---------------------------------------------------------------------------
enum {
k_first_gpr_arm64,
gpr_x0_arm64 = k_first_gpr_arm64,
Modified: lldb/trunk/source/Plugins/Process/Utility/lldb-mips-freebsd-register-enums.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/lldb-mips-freebsd-register-enums.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/lldb-mips-freebsd-register-enums.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/lldb-mips-freebsd-register-enums.h Wed Apr 10 13:48:55 2019
@@ -12,9 +12,7 @@
namespace lldb_private {
// LLDB register codes (e.g. RegisterKind == eRegisterKindLLDB)
-//---------------------------------------------------------------------------
// Internal codes for all mips registers.
-//---------------------------------------------------------------------------
enum {
k_first_gpr_mips64,
gpr_zero_mips64 = k_first_gpr_mips64,
Modified: lldb/trunk/source/Plugins/Process/Utility/lldb-mips-linux-register-enums.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/lldb-mips-linux-register-enums.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/lldb-mips-linux-register-enums.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/lldb-mips-linux-register-enums.h Wed Apr 10 13:48:55 2019
@@ -13,9 +13,7 @@
namespace lldb_private {
// LLDB register codes (e.g. RegisterKind == eRegisterKindLLDB)
-//---------------------------------------------------------------------------
// Internal codes for all mips registers.
-//---------------------------------------------------------------------------
enum {
k_first_gpr_mips,
gpr_zero_mips = k_first_gpr_mips,
@@ -148,9 +146,7 @@ enum {
k_num_msa_registers_mips
};
-//---------------------------------------------------------------------------
// Internal codes for all mips64 registers.
-//---------------------------------------------------------------------------
enum {
k_first_gpr_mips64,
gpr_zero_mips64 = k_first_gpr_mips64,
Modified: lldb/trunk/source/Plugins/Process/Utility/lldb-ppc64-register-enums.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/lldb-ppc64-register-enums.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/lldb-ppc64-register-enums.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/lldb-ppc64-register-enums.h Wed Apr 10 13:48:55 2019
@@ -11,9 +11,7 @@
// LLDB register codes (e.g. RegisterKind == eRegisterKindLLDB)
-// ---------------------------------------------------------------------------
// Internal codes for all ppc64 registers.
-// ---------------------------------------------------------------------------
enum {
k_first_gpr_ppc64,
gpr_r0_ppc64 = k_first_gpr_ppc64,
Modified: lldb/trunk/source/Plugins/Process/Utility/lldb-ppc64le-register-enums.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/lldb-ppc64le-register-enums.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/lldb-ppc64le-register-enums.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/lldb-ppc64le-register-enums.h Wed Apr 10 13:48:55 2019
@@ -11,9 +11,7 @@
// LLDB register codes (e.g. RegisterKind == eRegisterKindLLDB)
-// ---------------------------------------------------------------------------
// Internal codes for all ppc64le registers.
-// ---------------------------------------------------------------------------
enum {
k_first_gpr_ppc64le,
gpr_r0_ppc64le = k_first_gpr_ppc64le,
Modified: lldb/trunk/source/Plugins/Process/Utility/lldb-s390x-register-enums.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/lldb-s390x-register-enums.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/lldb-s390x-register-enums.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/lldb-s390x-register-enums.h Wed Apr 10 13:48:55 2019
@@ -12,9 +12,7 @@
namespace lldb_private {
// LLDB register codes (e.g. RegisterKind == eRegisterKindLLDB)
-//---------------------------------------------------------------------------
// Internal codes for all s390x registers.
-//---------------------------------------------------------------------------
enum {
k_first_gpr_s390x,
lldb_r0_s390x = k_first_gpr_s390x,
Modified: lldb/trunk/source/Plugins/Process/Utility/lldb-x86-register-enums.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/lldb-x86-register-enums.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/lldb-x86-register-enums.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/lldb-x86-register-enums.h Wed Apr 10 13:48:55 2019
@@ -12,9 +12,7 @@
namespace lldb_private {
// LLDB register codes (e.g. RegisterKind == eRegisterKindLLDB)
-//---------------------------------------------------------------------------
// Internal codes for all i386 registers.
-//---------------------------------------------------------------------------
enum {
k_first_gpr_i386,
lldb_eax_i386 = k_first_gpr_i386,
@@ -135,9 +133,7 @@ enum {
k_num_mpx_registers_i386,
};
-//---------------------------------------------------------------------------
// Internal codes for all x86_64 registers.
-//---------------------------------------------------------------------------
enum {
k_first_gpr_x86_64,
lldb_rax_x86_64 = k_first_gpr_x86_64,
Modified: lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.h (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.h Wed Apr 10 13:48:55 2019
@@ -20,12 +20,10 @@
namespace lldb_private {
-//----------------------------------------------------------------------
// DebuggerThread
//
// Debugs a single process, notifying listeners as appropriate when interesting
// things occur.
-//----------------------------------------------------------------------
class DebuggerThread : public std::enable_shared_from_this<DebuggerThread> {
public:
DebuggerThread(DebugDelegateSP debug_delegate);
Modified: lldb/trunk/source/Plugins/Process/Windows/Common/ExceptionRecord.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/ExceptionRecord.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/ExceptionRecord.h (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/ExceptionRecord.h Wed Apr 10 13:48:55 2019
@@ -18,12 +18,10 @@
namespace lldb_private {
-//----------------------------------------------------------------------
// ExceptionRecord
//
// ExceptionRecord defines an interface which allows implementors to receive
// notification of events that happen in a debugged process.
-//----------------------------------------------------------------------
class ExceptionRecord {
public:
ExceptionRecord(const EXCEPTION_RECORD &record, lldb::tid_t thread_id) {
Modified: lldb/trunk/source/Plugins/Process/Windows/Common/IDebugDelegate.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/IDebugDelegate.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/IDebugDelegate.h (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/IDebugDelegate.h Wed Apr 10 13:48:55 2019
@@ -18,12 +18,10 @@ namespace lldb_private {
class Status;
class HostThread;
-//----------------------------------------------------------------------
// IDebugDelegate
//
// IDebugDelegate defines an interface which allows implementors to receive
// notification of events that happen in a debugged process.
-//----------------------------------------------------------------------
class IDebugDelegate {
public:
virtual ~IDebugDelegate() {}
Modified: lldb/trunk/source/Plugins/Process/Windows/Common/LocalDebugDelegate.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/LocalDebugDelegate.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/LocalDebugDelegate.h (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/LocalDebugDelegate.h Wed Apr 10 13:48:55 2019
@@ -20,7 +20,6 @@ namespace lldb_private {
class ProcessWindows;
typedef std::shared_ptr<ProcessWindows> ProcessWindowsSP;
-//----------------------------------------------------------------------
// LocalDebugDelegate
//
// LocalDebugDelegate creates a connection between a ProcessWindows and the
@@ -39,7 +38,6 @@ typedef std::shared_ptr<ProcessWindows>
// a ProcessSP (which is exactly what we are trying to decouple from the
// driver), so this adapter serves as a way to transparently hold the
// ProcessSP while still keeping it decoupled from the driver.
-//----------------------------------------------------------------------
class LocalDebugDelegate : public IDebugDelegate {
public:
explicit LocalDebugDelegate(lldb::ProcessWP process);
Modified: lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp Wed Apr 10 13:48:55 2019
@@ -136,7 +136,6 @@ const char *ProcessWindows::GetPluginDes
return "Process plugin for Windows";
}
-//------------------------------------------------------------------------------
// Constructors and destructors.
ProcessWindows::ProcessWindows(lldb::TargetSP target_sp,
@@ -161,7 +160,6 @@ size_t ProcessWindows::PutSTDIN(const ch
return 0;
}
-//------------------------------------------------------------------------------
// ProcessInterface protocol.
lldb_private::ConstString ProcessWindows::GetPluginName() {
Modified: lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.h (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.h Wed Apr 10 13:48:55 2019
@@ -25,9 +25,7 @@ class ProcessWindowsData;
class ProcessWindows : public Process, public IDebugDelegate {
public:
- //------------------------------------------------------------------
// Static functions.
- //------------------------------------------------------------------
static lldb::ProcessSP CreateInstance(lldb::TargetSP target_sp,
lldb::ListenerSP listener_sp,
const FileSpec *);
@@ -40,9 +38,7 @@ public:
static const char *GetPluginDescriptionStatic();
- //------------------------------------------------------------------
// Constructors and destructors
- //------------------------------------------------------------------
ProcessWindows(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp);
~ProcessWindows();
Modified: lldb/trunk/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp Wed Apr 10 13:48:55 2019
@@ -23,9 +23,7 @@ using namespace lldb_private;
const DWORD kWinContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER;
-//------------------------------------------------------------------
// Constructors and Destructors
-//------------------------------------------------------------------
RegisterContextWindows::RegisterContextWindows(Thread &thread,
uint32_t concrete_frame_idx)
: RegisterContext(thread, concrete_frame_idx), m_context(),
@@ -78,9 +76,7 @@ uint32_t RegisterContextWindows::Convert
return LLDB_INVALID_REGNUM;
}
-//------------------------------------------------------------------
// Subclasses can these functions if desired
-//------------------------------------------------------------------
uint32_t RegisterContextWindows::NumSupportedHardwareBreakpoints() {
// Support for hardware breakpoints not yet implemented.
return 0;
Modified: lldb/trunk/source/Plugins/Process/Windows/Common/RegisterContextWindows.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/RegisterContextWindows.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/RegisterContextWindows.h (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/RegisterContextWindows.h Wed Apr 10 13:48:55 2019
@@ -18,16 +18,12 @@ class Thread;
class RegisterContextWindows : public lldb_private::RegisterContext {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
RegisterContextWindows(Thread &thread, uint32_t concrete_frame_idx);
virtual ~RegisterContextWindows();
- //------------------------------------------------------------------
// Subclasses must override these functions
- //------------------------------------------------------------------
void InvalidateAllRegisters() override;
bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
@@ -37,9 +33,7 @@ public:
uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind,
uint32_t num) override;
- //------------------------------------------------------------------
// Subclasses can override these functions if desired
- //------------------------------------------------------------------
uint32_t NumSupportedHardwareBreakpoints() override;
uint32_t SetHardwareBreakpoint(lldb::addr_t addr, size_t size) override;
Modified: lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp Wed Apr 10 13:48:55 2019
@@ -172,9 +172,7 @@ RegisterSet g_register_sets[] = {
};
}
-//------------------------------------------------------------------
// Constructors and Destructors
-//------------------------------------------------------------------
RegisterContextWindows_x64::RegisterContextWindows_x64(
Thread &thread, uint32_t concrete_frame_idx)
: RegisterContextWindows(thread, concrete_frame_idx) {}
Modified: lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.h (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.h Wed Apr 10 13:48:55 2019
@@ -18,16 +18,12 @@ class Thread;
class RegisterContextWindows_x64 : public RegisterContextWindows {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
RegisterContextWindows_x64(Thread &thread, uint32_t concrete_frame_idx);
virtual ~RegisterContextWindows_x64();
- //------------------------------------------------------------------
// Subclasses must override these functions
- //------------------------------------------------------------------
size_t GetRegisterCount() override;
const RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
Modified: lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp Wed Apr 10 13:48:55 2019
@@ -142,9 +142,7 @@ RegisterSet g_register_sets[] = {
};
}
-//------------------------------------------------------------------
// Constructors and Destructors
-//------------------------------------------------------------------
RegisterContextWindows_x86::RegisterContextWindows_x86(
Thread &thread, uint32_t concrete_frame_idx)
: RegisterContextWindows(thread, concrete_frame_idx) {}
Modified: lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.h (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.h Wed Apr 10 13:48:55 2019
@@ -18,16 +18,12 @@ class Thread;
class RegisterContextWindows_x86 : public RegisterContextWindows {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
RegisterContextWindows_x86(Thread &thread, uint32_t concrete_frame_idx);
virtual ~RegisterContextWindows_x86();
- //------------------------------------------------------------------
// Subclasses must override these functions
- //------------------------------------------------------------------
size_t GetRegisterCount() override;
const RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
Modified: lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp Wed Apr 10 13:48:55 2019
@@ -90,17 +90,13 @@ bool ProcessElfCore::CanDebug(lldb::Targ
return false;
}
-//----------------------------------------------------------------------
// ProcessElfCore constructor
-//----------------------------------------------------------------------
ProcessElfCore::ProcessElfCore(lldb::TargetSP target_sp,
lldb::ListenerSP listener_sp,
const FileSpec &core_file)
: Process(target_sp, listener_sp), m_core_file(core_file) {}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
ProcessElfCore::~ProcessElfCore() {
Clear();
// We need to call finalize on the process before destroying ourselves to
@@ -110,9 +106,7 @@ ProcessElfCore::~ProcessElfCore() {
Finalize();
}
-//----------------------------------------------------------------------
// PluginInterface
-//----------------------------------------------------------------------
ConstString ProcessElfCore::GetPluginName() { return GetPluginNameStatic(); }
uint32_t ProcessElfCore::GetPluginVersion() { return 1; }
@@ -146,9 +140,7 @@ lldb::addr_t ProcessElfCore::AddAddressR
return addr;
}
-//----------------------------------------------------------------------
// Process Control
-//----------------------------------------------------------------------
Status ProcessElfCore::DoLoadCore() {
Status error;
if (!m_core_module_sp) {
@@ -279,15 +271,11 @@ void ProcessElfCore::RefreshStateAfterSt
Status ProcessElfCore::DoDestroy() { return Status(); }
-//------------------------------------------------------------------
// Process Queries
-//------------------------------------------------------------------
bool ProcessElfCore::IsAlive() { return true; }
-//------------------------------------------------------------------
// Process Memory
-//------------------------------------------------------------------
size_t ProcessElfCore::ReadMemory(lldb::addr_t addr, void *buf, size_t size,
Status &error) {
// Don't allow the caching that lldb_private::Process::ReadMemory does since
Modified: lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.h (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.h Wed Apr 10 13:48:55 2019
@@ -30,9 +30,7 @@ struct ThreadData;
class ProcessElfCore : public lldb_private::Process {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
static lldb::ProcessSP
CreateInstance(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp,
const lldb_private::FileSpec *crash_file_path);
@@ -45,37 +43,27 @@ public:
static const char *GetPluginDescriptionStatic();
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
ProcessElfCore(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp,
const lldb_private::FileSpec &core_file);
~ProcessElfCore() override;
- //------------------------------------------------------------------
// Check if a given Process
- //------------------------------------------------------------------
bool CanDebug(lldb::TargetSP target_sp,
bool plugin_specified_by_name) override;
- //------------------------------------------------------------------
// Creating a new process, or attaching to an existing one
- //------------------------------------------------------------------
lldb_private::Status DoLoadCore() override;
lldb_private::DynamicLoader *GetDynamicLoader() override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
- //------------------------------------------------------------------
// Process Control
- //------------------------------------------------------------------
lldb_private::Status DoDestroy() override;
void RefreshStateAfterStop() override;
@@ -88,16 +76,12 @@ public:
return error;
}
- //------------------------------------------------------------------
// Process Queries
- //------------------------------------------------------------------
bool IsAlive() override;
bool WarnBeforeDetach() const override { return false; }
- //------------------------------------------------------------------
// Process Memory
- //------------------------------------------------------------------
size_t ReadMemory(lldb::addr_t addr, void *buf, size_t size,
lldb_private::Status &error) override;
@@ -131,9 +115,7 @@ private:
lldb_private::ConstString path;
};
- //------------------------------------------------------------------
// For ProcessElfCore only
- //------------------------------------------------------------------
typedef lldb_private::Range<lldb::addr_t, lldb::addr_t> FileRange;
typedef lldb_private::RangeDataVector<lldb::addr_t, lldb::addr_t, FileRange>
VMRangeToFileOffset;
Modified: lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp Wed Apr 10 13:48:55 2019
@@ -43,9 +43,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// Construct a Thread object with given data
-//----------------------------------------------------------------------
ThreadElfCore::ThreadElfCore(Process &process, const ThreadData &td)
: Thread(process, td.tid), m_thread_name(td.name), m_thread_reg_ctx_sp(),
m_signo(td.signo), m_gpregset_data(td.gpregset), m_notes(td.notes) {}
@@ -248,9 +246,7 @@ bool ThreadElfCore::CalculateStopInfo()
return false;
}
-//----------------------------------------------------------------
// Parse PRSTATUS from NOTE entry
-//----------------------------------------------------------------
ELFLinuxPrStatus::ELFLinuxPrStatus() {
memset(this, 0, sizeof(ELFLinuxPrStatus));
}
@@ -324,9 +320,7 @@ Status ELFLinuxPrStatus::Parse(const Dat
return error;
}
-//----------------------------------------------------------------
// Parse PRPSINFO from NOTE entry
-//----------------------------------------------------------------
ELFLinuxPrPsInfo::ELFLinuxPrPsInfo() {
memset(this, 0, sizeof(ELFLinuxPrPsInfo));
}
@@ -402,9 +396,7 @@ Status ELFLinuxPrPsInfo::Parse(const Dat
return error;
}
-//----------------------------------------------------------------
// Parse SIGINFO from NOTE entry
-//----------------------------------------------------------------
ELFLinuxSigInfo::ELFLinuxSigInfo() { memset(this, 0, sizeof(ELFLinuxSigInfo)); }
size_t ELFLinuxSigInfo::GetSize(const lldb_private::ArchSpec &arch) {
Modified: lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.h (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.h Wed Apr 10 13:48:55 2019
@@ -161,9 +161,7 @@ public:
}
protected:
- //------------------------------------------------------------------
// Member variables.
- //------------------------------------------------------------------
std::string m_thread_name;
lldb::RegisterContextSP m_thread_reg_ctx_sp;
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Wed Apr 10 13:48:55 2019
@@ -53,9 +53,7 @@ using namespace lldb;
using namespace lldb_private;
using namespace lldb_private::process_gdb_remote;
-//----------------------------------------------------------------------
// GDBRemoteCommunication constructor
-//----------------------------------------------------------------------
GDBRemoteCommunication::GDBRemoteCommunication(const char *comm_name,
const char *listener_name)
: Communication(comm_name),
@@ -69,9 +67,7 @@ GDBRemoteCommunication::GDBRemoteCommuni
m_listen_url() {
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
GDBRemoteCommunication::~GDBRemoteCommunication() {
if (IsConnected()) {
Disconnect();
@@ -300,7 +296,6 @@ GDBRemoteCommunication::WaitForPacketNoL
case eConnectionStatusTimedOut:
case eConnectionStatusInterrupted:
if (sync_on_timeout) {
- //------------------------------------------------------------------
/// Sync the remote GDB server and make sure we get a response that
/// corresponds to what we send.
///
@@ -323,7 +318,6 @@ GDBRemoteCommunication::WaitForPacketNoL
/// packets. So if we timeout, we need to ensure that we can get
/// back on track. If we can't get back on track, we must
/// disconnect.
- //------------------------------------------------------------------
bool sync_success = false;
bool got_actual_response = false;
// We timed out, we need to sync back up with the
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h Wed Apr 10 13:48:55 2019
@@ -109,13 +109,11 @@ public:
bool GetSendAcks() { return m_send_acks; }
- //------------------------------------------------------------------
// Set the global packet timeout.
//
// For clients, this is the timeout that gets used when sending
// packets and waiting for responses. For servers, this is used when waiting
// for ACKs.
- //------------------------------------------------------------------
std::chrono::seconds SetPacketTimeout(std::chrono::seconds packet_timeout) {
const auto old_packet_timeout = m_packet_timeout;
m_packet_timeout = packet_timeout;
@@ -124,10 +122,8 @@ public:
std::chrono::seconds GetPacketTimeout() const { return m_packet_timeout; }
- //------------------------------------------------------------------
// Start a debugserver instance on the current host using the
// supplied connection URL.
- //------------------------------------------------------------------
Status StartDebugserverProcess(
const char *url,
Platform *platform, // If non nullptr, then check with the platform for
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Wed Apr 10 13:48:55 2019
@@ -48,9 +48,7 @@ using namespace lldb_private;
using namespace lldb_private::process_gdb_remote;
using namespace std::chrono;
-//----------------------------------------------------------------------
// GDBRemoteCommunicationClient constructor
-//----------------------------------------------------------------------
GDBRemoteCommunicationClient::GDBRemoteCommunicationClient()
: GDBRemoteClientBase("gdb-remote.client", "gdb-remote.client.rx_packet"),
m_supports_not_sending_acks(eLazyBoolCalculate),
@@ -105,9 +103,7 @@ GDBRemoteCommunicationClient::GDBRemoteC
m_supported_async_json_packets_sp(), m_qXfer_memory_map(),
m_qXfer_memory_map_loaded(false) {}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
GDBRemoteCommunicationClient::~GDBRemoteCommunicationClient() {
if (IsConnected())
Disconnect();
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h Wed Apr 10 13:48:55 2019
@@ -33,10 +33,8 @@ public:
~GDBRemoteCommunicationClient() override;
- //------------------------------------------------------------------
// After connecting, send the handshake to the server to make sure
// we are communicating with it.
- //------------------------------------------------------------------
bool HandshakeWithServer(Status *error_ptr);
// For packets which specify a range of output to be returned,
@@ -84,7 +82,6 @@ public:
bool KillSpawnedProcess(lldb::pid_t pid);
- //------------------------------------------------------------------
/// Sends a GDB remote protocol 'A' packet that delivers program
/// arguments to the remote server.
///
@@ -97,10 +94,8 @@ public:
/// the response was "Exx" where xx are two hex digits, or
/// -1 if the call is unsupported or any other unexpected
/// response was received.
- //------------------------------------------------------------------
int SendArgumentsPacket(const ProcessLaunchInfo &launch_info);
- //------------------------------------------------------------------
/// Sends a "QEnvironment:NAME=VALUE" packet that will build up the
/// environment that will get used when launching an application
/// in conjunction with the 'A' packet. This function can be called
@@ -116,7 +111,6 @@ public:
/// the response was "Exx" where xx are two hex digits, or
/// -1 if the call is unsupported or any other unexpected
/// response was received.
- //------------------------------------------------------------------
int SendEnvironmentPacket(char const *name_equal_value);
int SendEnvironment(const Environment &env);
@@ -125,7 +119,6 @@ public:
int SendLaunchEventDataPacket(const char *data,
bool *was_supported = nullptr);
- //------------------------------------------------------------------
/// Sends a "vAttach:PID" where PID is in hex.
///
/// \param[in] pid
@@ -139,10 +132,8 @@ public:
/// \return
/// Zero if the attach was successful, or an error indicating
/// an error code.
- //------------------------------------------------------------------
int SendAttach(lldb::pid_t pid, StringExtractorGDBRemote &response);
- //------------------------------------------------------------------
/// Sends a GDB remote protocol 'I' packet that delivers stdin
/// data to the remote process.
///
@@ -155,10 +146,8 @@ public:
/// \return
/// Zero if the attach was successful, or an error indicating
/// an error code.
- //------------------------------------------------------------------
int SendStdinNotification(const char *data, size_t data_len);
- //------------------------------------------------------------------
/// Sets the path to use for stdin/out/err for a process
/// that will be launched with the 'A' packet.
///
@@ -167,12 +156,10 @@ public:
///
/// \return
/// Zero if the for success, or an error code for failure.
- //------------------------------------------------------------------
int SetSTDIN(const FileSpec &file_spec);
int SetSTDOUT(const FileSpec &file_spec);
int SetSTDERR(const FileSpec &file_spec);
- //------------------------------------------------------------------
/// Sets the disable ASLR flag to \a enable for a process that will
/// be launched with the 'A' packet.
///
@@ -181,10 +168,8 @@ public:
///
/// \return
/// Zero if the for success, or an error code for failure.
- //------------------------------------------------------------------
int SetDisableASLR(bool enable);
- //------------------------------------------------------------------
/// Sets the DetachOnError flag to \a enable for the process controlled by the
/// stub.
///
@@ -193,10 +178,8 @@ public:
///
/// \return
/// Zero if the for success, or an error code for failure.
- //------------------------------------------------------------------
int SetDetachOnError(bool enable);
- //------------------------------------------------------------------
/// Sets the working directory to \a path for a process that will
/// be launched with the 'A' packet for non platform based
/// connections. If this packet is sent to a GDB server that
@@ -208,10 +191,8 @@ public:
///
/// \return
/// Zero if the for success, or an error code for failure.
- //------------------------------------------------------------------
int SetWorkingDir(const FileSpec &working_dir);
- //------------------------------------------------------------------
/// Gets the current working directory of a remote platform GDB
/// server.
///
@@ -220,7 +201,6 @@ public:
///
/// \return
/// Boolean for success
- //------------------------------------------------------------------
bool GetWorkingDir(FileSpec &working_dir);
lldb::addr_t AllocateMemory(size_t size, uint32_t permissions);
@@ -455,7 +435,6 @@ public:
// Sends QPassSignals packet to the server with given signals to ignore.
Status SendSignalsToIgnore(llvm::ArrayRef<int32_t> signals);
- //------------------------------------------------------------------
/// Return the feature set supported by the gdb-remote server.
///
/// This method returns the remote side's response to the qSupported
@@ -464,12 +443,10 @@ public:
///
/// \return
/// The string returned by the server to the qSupported query.
- //------------------------------------------------------------------
const std::string &GetServerSupportedFeatures() const {
return m_qSupported_response;
}
- //------------------------------------------------------------------
/// Return the array of async JSON packet types supported by the remote.
///
/// This method returns the remote side's array of supported JSON
@@ -487,14 +464,11 @@ public:
///
/// \return
/// The string returned by the server to the qSupported query.
- //------------------------------------------------------------------
lldb_private::StructuredData::Array *GetSupportedStructuredDataPlugins();
- //------------------------------------------------------------------
/// Configure a StructuredData feature on the remote end.
///
/// \see \b Process::ConfigureStructuredData(...) for details.
- //------------------------------------------------------------------
Status
ConfigureRemoteStructuredData(ConstString type_name,
const StructuredData::ObjectSP &config_sp);
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp Wed Apr 10 13:48:55 2019
@@ -55,9 +55,7 @@ const static uint32_t g_default_packet_t
const static uint32_t g_default_packet_timeout_sec = 0; // not specified
#endif
-//----------------------------------------------------------------------
// GDBRemoteCommunicationServerCommon constructor
-//----------------------------------------------------------------------
GDBRemoteCommunicationServerCommon::GDBRemoteCommunicationServerCommon(
const char *comm_name, const char *listener_name)
: GDBRemoteCommunicationServer(comm_name, listener_name),
@@ -176,9 +174,7 @@ GDBRemoteCommunicationServerCommon::GDBR
&GDBRemoteCommunicationServerCommon::Handle_vFile_unlink);
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
GDBRemoteCommunicationServerCommon::~GDBRemoteCommunicationServerCommon() {}
GDBRemoteCommunication::PacketResult
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h Wed Apr 10 13:48:55 2019
@@ -131,7 +131,6 @@ protected:
});
}
- //------------------------------------------------------------------
/// Launch a process with the current launch settings.
///
/// This method supports running an lldb-gdbserver or similar
@@ -141,7 +140,6 @@ protected:
/// \return
/// An Status object indicating the success or failure of the
/// launch.
- //------------------------------------------------------------------
virtual Status LaunchProcess() = 0;
virtual FileSpec FindModuleFile(const std::string &module_path,
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp Wed Apr 10 13:48:55 2019
@@ -51,9 +51,7 @@ using namespace lldb_private;
using namespace lldb_private::process_gdb_remote;
using namespace llvm;
-//----------------------------------------------------------------------
// GDBRemote Errors
-//----------------------------------------------------------------------
namespace {
enum GDBRemoteServerError {
@@ -65,9 +63,7 @@ enum GDBRemoteServerError {
};
}
-//----------------------------------------------------------------------
// GDBRemoteCommunicationServerLLGS constructor
-//----------------------------------------------------------------------
GDBRemoteCommunicationServerLLGS::GDBRemoteCommunicationServerLLGS(
MainLoop &mainloop, const NativeProcessProtocol::Factory &process_factory)
: GDBRemoteCommunicationServerCommon("gdb-remote.server",
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h Wed Apr 10 13:48:55 2019
@@ -31,16 +31,13 @@ class GDBRemoteCommunicationServerLLGS
: public GDBRemoteCommunicationServerCommon,
public NativeProcessProtocol::NativeDelegate {
public:
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
GDBRemoteCommunicationServerLLGS(
MainLoop &mainloop,
const NativeProcessProtocol::Factory &process_factory);
void SetLaunchInfo(const ProcessLaunchInfo &info);
- //------------------------------------------------------------------
/// Launch a process with the current launch settings.
///
/// This method supports running an lldb-gdbserver or similar
@@ -50,10 +47,8 @@ public:
/// \return
/// An Status object indicating the success or failure of the
/// launch.
- //------------------------------------------------------------------
Status LaunchProcess() override;
- //------------------------------------------------------------------
/// Attach to a process.
///
/// This method supports attaching llgs to a process accessible via the
@@ -62,12 +57,9 @@ public:
/// \return
/// An Status object indicating the success or failure of the
/// attach operation.
- //------------------------------------------------------------------
Status AttachToProcess(lldb::pid_t pid);
- //------------------------------------------------------------------
// NativeProcessProtocol::NativeDelegate overrides
- //------------------------------------------------------------------
void InitializeDelegate(NativeProcessProtocol *process) override;
void ProcessStateChanged(NativeProcessProtocol *process,
@@ -222,9 +214,7 @@ private:
void StopSTDIOForwarding();
- //------------------------------------------------------------------
// For GDBRemoteCommunicationServerLLGS only
- //------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(GDBRemoteCommunicationServerLLGS);
};
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp Wed Apr 10 13:48:55 2019
@@ -40,9 +40,7 @@ using namespace lldb;
using namespace lldb_private;
using namespace lldb_private::process_gdb_remote;
-//----------------------------------------------------------------------
// GDBRemoteCommunicationServerPlatform constructor
-//----------------------------------------------------------------------
GDBRemoteCommunicationServerPlatform::GDBRemoteCommunicationServerPlatform(
const Socket::SocketProtocol socket_protocol, const char *socket_scheme)
: GDBRemoteCommunicationServerCommon("gdb-remote.server",
@@ -86,9 +84,7 @@ GDBRemoteCommunicationServerPlatform::GD
});
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
GDBRemoteCommunicationServerPlatform::~GDBRemoteCommunicationServerPlatform() {}
Status GDBRemoteCommunicationServerPlatform::LaunchGDBServer(
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h Wed Apr 10 13:48:55 2019
@@ -35,7 +35,6 @@ public:
// a port chosen by the OS.
void SetPortMap(PortMap &&port_map);
- //----------------------------------------------------------------------
// If we are using a port map where we can only use certain ports,
// get the next available port.
//
@@ -43,7 +42,6 @@ public:
//
// If we aren't using a port map, return 0 to indicate we should bind to
// port 0 and then figure out which port we used.
- //----------------------------------------------------------------------
uint16_t GetNextAvailablePort();
bool AssociatePortWithProcess(uint16_t port, lldb::pid_t pid);
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp?rev=358135&r1=358134&r2=358135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp Wed Apr 10 13:48:55 2019
@@ -28,9 +28,7 @@ using namespace lldb;
using namespace lldb_private;
using namespace lldb_private::process_gdb_remote;
-//----------------------------------------------------------------------
// GDBRemoteRegisterContext constructor
-//----------------------------------------------------------------------
GDBRemoteRegisterContext::GDBRemoteRegisterContext(
ThreadGDBRemote &thread, uint32_t concrete_frame_idx,
GDBRemoteDynamicRegisterInfo ®_info, bool read_all_at_once)
@@ -48,9 +46,7 @@ GDBRemoteRegisterContext::GDBRemoteRegis
m_reg_data.SetByteOrder(thread.GetProcess()->GetByteOrder());
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
GDBRemoteRegisterContext::~GDBRemoteRegisterContext() {}
void GDBRemoteRegisterContext::InvalidateAllRegisters() {
More information about the lldb-commits
mailing list