diff options
Diffstat (limited to 'include/lldb/Target')
-rw-r--r-- | include/lldb/Target/CPPLanguageRuntime.h | 3 | ||||
-rw-r--r-- | include/lldb/Target/Process.h | 35 | ||||
-rw-r--r-- | include/lldb/Target/SystemRuntime.h | 17 | ||||
-rw-r--r-- | include/lldb/Target/Thread.h | 89 | ||||
-rw-r--r-- | include/lldb/Target/ThreadPlanStepOut.h | 3 |
5 files changed, 142 insertions, 5 deletions
diff --git a/include/lldb/Target/CPPLanguageRuntime.h b/include/lldb/Target/CPPLanguageRuntime.h index ac537d0ad1e5..788f4e60a493 100644 --- a/include/lldb/Target/CPPLanguageRuntime.h +++ b/include/lldb/Target/CPPLanguageRuntime.h @@ -42,9 +42,6 @@ public: bool GetObjectDescription(Stream &str, Value &value, ExecutionContextScope *exe_scope) override; - virtual size_t - GetAlternateManglings(const ConstString &mangled, std::vector<ConstString> &alternates) = 0; - protected: //------------------------------------------------------------------ diff --git a/include/lldb/Target/Process.h b/include/lldb/Target/Process.h index 2e063c5bbccc..6bb7a3d783de 100644 --- a/include/lldb/Target/Process.h +++ b/include/lldb/Target/Process.h @@ -30,6 +30,7 @@ #include "lldb/Core/Communication.h" #include "lldb/Core/Error.h" #include "lldb/Core/Event.h" +#include "lldb/Core/LoadedModuleInfoList.h" #include "lldb/Core/ThreadSafeValue.h" #include "lldb/Core/PluginInterface.h" #include "lldb/Core/StructuredData.h" @@ -1152,6 +1153,12 @@ public: return 0; } + virtual size_t + LoadModules (LoadedModuleInfoList &) + { + return 0; + } + protected: virtual JITLoaderList & GetJITLoaders (); @@ -3149,6 +3156,34 @@ public: void ResetImageToken(size_t token); + //------------------------------------------------------------------ + /// Find the next branch instruction to set a breakpoint on + /// + /// When instruction stepping through a source line, instead of + /// stepping through each instruction, we can put a breakpoint on + /// the next branch instruction (within the range of instructions + /// we are stepping through) and continue the process to there, + /// yielding significant performance benefits over instruction + /// stepping. + /// + /// @param[in] default_stop_addr + /// The address of the instruction where lldb would put a + /// breakpoint normally. + /// + /// @param[in] range_bounds + /// The range which the breakpoint must be contained within. + /// Typically a source line. + /// + /// @return + /// The address of the next branch instruction, or the end of + /// the range provided in range_bounds. If there are any + /// problems with the disassembly or getting the instructions, + /// the original default_stop_addr will be returned. + //------------------------------------------------------------------ + Address + AdvanceAddressToNextBranchInstruction (Address default_stop_addr, + AddressRange range_bounds); + protected: void SetState (lldb::EventSP &event_sp); diff --git a/include/lldb/Target/SystemRuntime.h b/include/lldb/Target/SystemRuntime.h index 54fde88c8d12..cefd72400450 100644 --- a/include/lldb/Target/SystemRuntime.h +++ b/include/lldb/Target/SystemRuntime.h @@ -275,6 +275,23 @@ public: return LLDB_INVALID_ADDRESS; } + + //------------------------------------------------------------------ + /// Retrieve the Queue kind for the queue at a thread's dispatch_qaddr. + /// + /// Retrieve the Queue kind - either eQueueKindSerial or + /// eQueueKindConcurrent, indicating that this queue processes work + /// items serially or concurrently. + /// + /// @return + /// The Queue kind, if it could be read, else eQueueKindUnknown. + //------------------------------------------------------------------ + virtual lldb::QueueKind + GetQueueKind (lldb::addr_t dispatch_qaddr) + { + return lldb::eQueueKindUnknown; + } + //------------------------------------------------------------------ /// Get the pending work items for a libdispatch Queue /// diff --git a/include/lldb/Target/Thread.h b/include/lldb/Target/Thread.h index 7aff77bd16f4..ba73e0b49da8 100644 --- a/include/lldb/Target/Thread.h +++ b/include/lldb/Target/Thread.h @@ -367,6 +367,35 @@ public: } //------------------------------------------------------------------ + /// Whether this thread can be associated with a libdispatch queue + /// + /// The Thread may know if it is associated with a libdispatch queue, + /// it may know definitively that it is NOT associated with a libdispatch + /// queue, or it may be unknown whether it is associated with a libdispatch + /// queue. + /// + /// @return + /// eLazyBoolNo if this thread is definitely not associated with a + /// libdispatch queue (e.g. on a non-Darwin system where GCD aka + /// libdispatch is not available). + /// + /// eLazyBoolYes this thread is associated with a libdispatch queue. + /// + /// eLazyBoolCalculate this thread may be associated with a libdispatch + /// queue but the thread doesn't know one way or the other. + //------------------------------------------------------------------ + virtual lldb_private::LazyBool + GetAssociatedWithLibdispatchQueue () + { + return eLazyBoolNo; + } + + virtual void + SetAssociatedWithLibdispatchQueue (lldb_private::LazyBool associated_with_libdispatch_queue) + { + } + + //------------------------------------------------------------------ /// Retrieve the Queue ID for the queue currently using this Thread /// /// If this Thread is doing work on behalf of a libdispatch/GCD queue, @@ -414,6 +443,29 @@ public: } //------------------------------------------------------------------ + /// Retrieve the Queue kind for the queue currently using this Thread + /// + /// If this Thread is doing work on behalf of a libdispatch/GCD queue, + /// retrieve the Queue kind - either eQueueKindSerial or + /// eQueueKindConcurrent, indicating that this queue processes work + /// items serially or concurrently. + /// + /// @return + /// The Queue kind, if the Thread subclass implements this, else + /// eQueueKindUnknown. + //------------------------------------------------------------------ + virtual lldb::QueueKind + GetQueueKind () + { + return lldb::eQueueKindUnknown; + } + + virtual void + SetQueueKind (lldb::QueueKind kind) + { + } + + //------------------------------------------------------------------ /// Retrieve the Queue for this thread, if any. /// /// @return @@ -451,6 +503,30 @@ public: return LLDB_INVALID_ADDRESS; } + virtual void + SetQueueLibdispatchQueueAddress (lldb::addr_t dispatch_queue_t) + { + } + + //------------------------------------------------------------------ + /// Whether this Thread already has all the Queue information cached or not + /// + /// A Thread may be associated with a libdispatch work Queue at a given + /// public stop event. If so, the thread can satisify requests like + /// GetQueueLibdispatchQueueAddress, GetQueueKind, GetQueueName, and GetQueueID + /// either from information from the remote debug stub when it is initially + /// created, or it can query the SystemRuntime for that information. + /// + /// This method allows the SystemRuntime to discover if a thread has this + /// information already, instead of calling the thread to get the information + /// and having the thread call the SystemRuntime again. + //------------------------------------------------------------------ + virtual bool + ThreadHasQueueInformation () const + { + return false; + } + virtual uint32_t GetStackFrameCount() { @@ -888,6 +964,16 @@ public: /// @param[in] run_vote /// See standard meanings for the stop & run votes in ThreadPlan.h. /// + /// @param[in] continue_to_next_branch + /// Normally this will enqueue a plan that will put a breakpoint on the return address and continue + /// to there. If continue_to_next_branch is true, this is an operation not involving the user -- + /// e.g. stepping "next" in a source line and we instruction stepped into another function -- + /// so instead of putting a breakpoint on the return address, advance the breakpoint to the + /// end of the source line that is doing the call, or until the next flow control instruction. + /// If the return value from the function call is to be retrieved / displayed to the user, you must stop + /// on the return address. The return value may be stored in volatile registers which are overwritten + /// before the next branch instruction. + /// /// @return /// A shared pointer to the newly queued thread plan, or nullptr if the plan could not be queued. //------------------------------------------------------------------ @@ -898,7 +984,8 @@ public: bool stop_other_threads, Vote stop_vote, // = eVoteYes, Vote run_vote, // = eVoteNoOpinion); - uint32_t frame_idx); + uint32_t frame_idx, + bool continue_to_next_branch = false); //------------------------------------------------------------------ /// Gets the plan used to step through the code that steps from a function diff --git a/include/lldb/Target/ThreadPlanStepOut.h b/include/lldb/Target/ThreadPlanStepOut.h index ac5696357e9b..ccf829f636df 100644 --- a/include/lldb/Target/ThreadPlanStepOut.h +++ b/include/lldb/Target/ThreadPlanStepOut.h @@ -31,7 +31,8 @@ public: Vote stop_vote, Vote run_vote, uint32_t frame_idx, - LazyBool step_out_avoids_code_without_debug_info); + LazyBool step_out_avoids_code_without_debug_info, + bool continue_to_next_branch = false); ~ThreadPlanStepOut() override; |