diff options
Diffstat (limited to 'include/lldb/Target/Target.h')
-rw-r--r-- | include/lldb/Target/Target.h | 62 |
1 files changed, 58 insertions, 4 deletions
diff --git a/include/lldb/Target/Target.h b/include/lldb/Target/Target.h index ff9451939909a..242ec14165ebf 100644 --- a/include/lldb/Target/Target.h +++ b/include/lldb/Target/Target.h @@ -21,8 +21,9 @@ // Other libraries and framework includes // Project includes #include "lldb/Breakpoint/BreakpointList.h" +#include "lldb/Breakpoint/BreakpointName.h" #include "lldb/Breakpoint/WatchpointList.h" -#include "lldb/Core/ArchSpec.h" +#include "lldb/Core/Architecture.h" #include "lldb/Core/Broadcaster.h" #include "lldb/Core/Disassembler.h" #include "lldb/Core/ModuleList.h" @@ -33,6 +34,7 @@ #include "lldb/Target/PathMappingList.h" #include "lldb/Target/ProcessLaunchInfo.h" #include "lldb/Target/SectionLoadHistory.h" +#include "lldb/Utility/ArchSpec.h" #include "lldb/Utility/Timeout.h" #include "lldb/lldb-public.h" @@ -195,6 +197,8 @@ public: void SetInjectLocalVariables(ExecutionContext *exe_ctx, bool b); + bool GetUseModernTypeLookup() const; + private: //------------------------------------------------------------------ // Callbacks for m_launch_info. @@ -651,12 +655,45 @@ public: } WatchpointList &GetWatchpointList() { return m_watchpoint_list; } - + + // Manages breakpoint names: + void AddNameToBreakpoint(BreakpointID &id, const char *name, Status &error); + + void AddNameToBreakpoint(lldb::BreakpointSP &bp_sp, const char *name, + Status &error); + + void RemoveNameFromBreakpoint(lldb::BreakpointSP &bp_sp, + const ConstString &name); + + BreakpointName *FindBreakpointName(const ConstString &name, bool can_create, + Status &error); + + void DeleteBreakpointName(const ConstString &name); + + void ConfigureBreakpointName(BreakpointName &bp_name, + const BreakpointOptions &options, + const BreakpointName::Permissions &permissions); + void ApplyNameToBreakpoints(BreakpointName &bp_name); + + + // This takes ownership of the name obj passed in. + void AddBreakpointName(BreakpointName *bp_name); + + void GetBreakpointNames(std::vector<std::string> &names); + + //This call removes ALL breakpoints regardless of permission. void RemoveAllBreakpoints(bool internal_also = false); + + // This removes all the breakpoints, but obeys the ePermDelete on them. + void RemoveAllowedBreakpoints(); void DisableAllBreakpoints(bool internal_also = false); + + void DisableAllowedBreakpoints(); void EnableAllBreakpoints(bool internal_also = false); + + void EnableAllowedBreakpoints(); bool DisableBreakpointByID(lldb::break_id_t break_id); @@ -881,7 +918,7 @@ public: bool ModuleIsExcludedForUnconstrainedSearches(const lldb::ModuleSP &module_sp); - const ArchSpec &GetArchitecture() const { return m_arch; } + const ArchSpec &GetArchitecture() const { return m_arch.GetSpec(); } //------------------------------------------------------------------ /// Set the architecture for this target. @@ -912,6 +949,8 @@ public: bool MergeArchitecture(const ArchSpec &arch_spec); + Architecture *GetArchitecturePlugin() { return m_arch.GetPlugin(); } + Debugger &GetDebugger() { return m_debugger; } size_t ReadMemoryFromFileCache(const Address &addr, void *dst, size_t dst_len, @@ -1205,6 +1244,18 @@ protected: const lldb::ModuleSP &new_module_sp) override; void WillClearList(const ModuleList &module_list) override; + class Arch { + public: + explicit Arch(const ArchSpec &spec); + const Arch &operator=(const ArchSpec &spec); + + const ArchSpec &GetSpec() const { return m_spec; } + Architecture *GetPlugin() const { return m_plugin_up.get(); } + + private: + ArchSpec m_spec; + std::unique_ptr<Architecture> m_plugin_up; + }; //------------------------------------------------------------------ // Member variables. //------------------------------------------------------------------ @@ -1212,12 +1263,15 @@ protected: lldb::PlatformSP m_platform_sp; ///< The platform for this target. std::recursive_mutex m_mutex; ///< An API mutex that is used by the lldb::SB* /// classes make the SB interface thread safe - ArchSpec m_arch; + Arch m_arch; ModuleList m_images; ///< The list of images for this process (shared /// libraries and anything dynamically loaded). SectionLoadHistory m_section_load_history; BreakpointList m_breakpoint_list; BreakpointList m_internal_breakpoint_list; + using BreakpointNameList = std::map<ConstString, BreakpointName *>; + BreakpointNameList m_breakpoint_names; + lldb::BreakpointSP m_last_created_breakpoint; WatchpointList m_watchpoint_list; lldb::WatchpointSP m_last_created_watchpoint; |