summaryrefslogtreecommitdiff
path: root/include/lldb/Target
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/Target')
-rw-r--r--include/lldb/Target/Platform.h26
-rw-r--r--include/lldb/Target/Process.h9
-rw-r--r--include/lldb/Target/ProcessInfo.h2
-rw-r--r--include/lldb/Target/ProcessLaunchInfo.h4
-rw-r--r--include/lldb/Target/Target.h62
-rw-r--r--include/lldb/Target/UnwindAssembly.h2
6 files changed, 85 insertions, 20 deletions
diff --git a/include/lldb/Target/Platform.h b/include/lldb/Target/Platform.h
index cc007d959c65..6288a3ab684f 100644
--- a/include/lldb/Target/Platform.h
+++ b/include/lldb/Target/Platform.h
@@ -21,10 +21,10 @@
// Other libraries and framework includes
// Project includes
-#include "lldb/Core/ArchSpec.h"
#include "lldb/Core/PluginInterface.h"
#include "lldb/Core/UserSettingsController.h"
#include "lldb/Interpreter/Options.h"
+#include "lldb/Utility/ArchSpec.h"
#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/FileSpec.h"
#include "lldb/lldb-private-forward.h"
@@ -53,6 +53,7 @@ public:
};
typedef std::shared_ptr<PlatformProperties> PlatformPropertiesSP;
+typedef llvm::SmallVector<lldb::addr_t, 6> MmapArgList;
//----------------------------------------------------------------------
/// @class Platform Platform.h "lldb/Target/Platform.h"
@@ -116,9 +117,12 @@ public:
static lldb::PlatformSP Create(const ArchSpec &arch,
ArchSpec *platform_arch_ptr, Status &error);
- static uint32_t GetNumConnectedRemotePlatforms();
-
- static lldb::PlatformSP GetConnectedRemotePlatformAtIndex(uint32_t idx);
+ //------------------------------------------------------------------------
+ /// Augments the triple either with information from platform or the host
+ /// system (if platform is null).
+ //------------------------------------------------------------------------
+ static ArchSpec GetAugmentedArchSpec(Platform *platform,
+ llvm::StringRef triple);
//------------------------------------------------------------------
/// Find a platform plugin for a given process.
@@ -512,6 +516,13 @@ public:
m_os_version_set_while_connected = m_system_arch.IsValid();
}
+ //---------------------------------------------------------------------------
+ /// If the triple contains not specify the vendor, os, and environment parts,
+ /// we "augment" these using information from the platform and return the
+ /// resulting ArchSpec object.
+ //---------------------------------------------------------------------------
+ ArchSpec GetAugmentedArchSpec(llvm::StringRef triple);
+
// Used for column widths
size_t GetMaxUserIDNameLength() const { return m_max_uid_name_len; }
@@ -628,8 +639,11 @@ public:
virtual Status Unlink(const FileSpec &file_spec);
- virtual uint64_t ConvertMmapFlagsToPlatform(const ArchSpec &arch,
- unsigned flags);
+ virtual MmapArgList GetMmapArgumentList(const ArchSpec &arch,
+ lldb::addr_t addr,
+ lldb::addr_t length,
+ unsigned prot, unsigned flags,
+ lldb::addr_t fd, lldb::addr_t offset);
virtual bool GetSupportsRSync() { return m_supports_rsync; }
diff --git a/include/lldb/Target/Process.h b/include/lldb/Target/Process.h
index df09570057a1..16f37f4dd5dc 100644
--- a/include/lldb/Target/Process.h
+++ b/include/lldb/Target/Process.h
@@ -27,7 +27,6 @@
// Other libraries and framework includes
// Project includes
#include "lldb/Breakpoint/BreakpointSiteList.h"
-#include "lldb/Core/ArchSpec.h"
#include "lldb/Core/Broadcaster.h"
#include "lldb/Core/Communication.h"
#include "lldb/Core/Event.h"
@@ -46,6 +45,7 @@
#include "lldb/Target/ProcessLaunchInfo.h"
#include "lldb/Target/QueueList.h"
#include "lldb/Target/ThreadList.h"
+#include "lldb/Utility/ArchSpec.h"
#include "lldb/Utility/NameMatches.h"
#include "lldb/Utility/Status.h"
#include "lldb/Utility/StructuredData.h"
@@ -99,6 +99,8 @@ public:
bool GetWarningsOptimization() const;
+ bool GetStopOnExec() const;
+
protected:
static void OptionValueChangedCallback(void *baton,
OptionValue *option_value);
@@ -2514,10 +2516,6 @@ public:
OperatingSystem *GetOperatingSystem() { return m_os_ap.get(); }
- ArchSpec::StopInfoOverrideCallbackType GetStopInfoOverrideCallback() const {
- return m_stop_info_override_callback;
- }
-
virtual LanguageRuntime *GetLanguageRuntime(lldb::LanguageType language,
bool retry_if_null = true);
@@ -3106,7 +3104,6 @@ protected:
std::vector<PreResumeCallbackAndBaton> m_pre_resume_actions;
ProcessRunLock m_public_run_lock;
ProcessRunLock m_private_run_lock;
- ArchSpec::StopInfoOverrideCallbackType m_stop_info_override_callback;
bool m_currently_handling_do_on_removals;
bool m_resume_requested; // If m_currently_handling_event or
// m_currently_handling_do_on_removals are true,
diff --git a/include/lldb/Target/ProcessInfo.h b/include/lldb/Target/ProcessInfo.h
index 03b15242f7ee..4077abf89baf 100644
--- a/include/lldb/Target/ProcessInfo.h
+++ b/include/lldb/Target/ProcessInfo.h
@@ -11,8 +11,8 @@
#define liblldb_ProcessInfo_h_
// LLDB headers
-#include "lldb/Core/ArchSpec.h"
#include "lldb/Interpreter/Args.h"
+#include "lldb/Utility/ArchSpec.h"
#include "lldb/Utility/FileSpec.h"
namespace lldb_private {
diff --git a/include/lldb/Target/ProcessLaunchInfo.h b/include/lldb/Target/ProcessLaunchInfo.h
index 93a1a9ebd239..fc715f28544d 100644
--- a/include/lldb/Target/ProcessLaunchInfo.h
+++ b/include/lldb/Target/ProcessLaunchInfo.h
@@ -117,7 +117,7 @@ public:
bool MonitorProcess() const;
- lldb_utility::PseudoTerminal &GetPTY() { return *m_pty; }
+ PseudoTerminal &GetPTY() { return *m_pty; }
// Get and set the actual listener that will be used for the process events
lldb::ListenerSP GetListener() const { return m_listener_sp; }
@@ -150,7 +150,7 @@ protected:
FileSpec m_shell;
Flags m_flags; // Bitwise OR of bits from lldb::LaunchFlags
std::vector<FileAction> m_file_actions; // File actions for any other files
- std::shared_ptr<lldb_utility::PseudoTerminal> m_pty;
+ std::shared_ptr<PseudoTerminal> m_pty;
uint32_t m_resume_count; // How many times do we resume after launching
Host::MonitorChildProcessCallback m_monitor_callback;
void *m_monitor_callback_baton;
diff --git a/include/lldb/Target/Target.h b/include/lldb/Target/Target.h
index ff9451939909..242ec14165eb 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;
diff --git a/include/lldb/Target/UnwindAssembly.h b/include/lldb/Target/UnwindAssembly.h
index 66fc27f71aa1..3028ffeaa51d 100644
--- a/include/lldb/Target/UnwindAssembly.h
+++ b/include/lldb/Target/UnwindAssembly.h
@@ -10,8 +10,8 @@
#ifndef utility_UnwindAssembly_h_
#define utility_UnwindAssembly_h_
-#include "lldb/Core/ArchSpec.h"
#include "lldb/Core/PluginInterface.h"
+#include "lldb/Utility/ArchSpec.h"
#include "lldb/lldb-private.h"
namespace lldb_private {