summaryrefslogtreecommitdiff
path: root/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-07-28 11:09:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-07-28 11:09:23 +0000
commitf73363f1dd94996356cefbf24388f561891acf0b (patch)
treee3c31248bdb36eaec5fd833490d4278162dba2a0 /source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
parent160ee69dd7ae18978f4068116777639ea98dc951 (diff)
Notes
Diffstat (limited to 'source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h')
-rw-r--r--source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h b/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
index 9a42f41a4c94..be64518064b5 100644
--- a/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
+++ b/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
@@ -86,7 +86,7 @@ public:
uint32_t GetAddressByteSize() const override;
- lldb::AddressClass GetAddressClass(lldb::addr_t file_addr) override;
+ lldb_private::AddressClass GetAddressClass(lldb::addr_t file_addr) override;
lldb_private::Symtab *GetSymtab() override;
@@ -123,10 +123,9 @@ public:
ObjectFile::Strata CalculateStrata() override;
- uint32_t GetVersion(uint32_t *versions, uint32_t num_versions) override;
+ llvm::VersionTuple GetVersion() override;
- uint32_t GetMinimumOSVersion(uint32_t *versions,
- uint32_t num_versions) override;
+ llvm::VersionTuple GetMinimumOSVersion() override;
uint32_t GetSDKVersion(uint32_t *versions, uint32_t num_versions) override;
@@ -162,14 +161,14 @@ protected:
// with an on-disk dyld_shared_cache file. The process will record
// the shared cache UUID so the on-disk cache can be matched or rejected
// correctly.
- lldb_private::UUID GetProcessSharedCacheUUID(lldb_private::Process *);
+ void GetProcessSharedCacheUUID(lldb_private::Process *, lldb::addr_t &base_addr, lldb_private::UUID &uuid);
// Intended for same-host arm device debugging where lldb will read
// shared cache libraries out of its own memory instead of the remote
// process' memory as an optimization. If lldb's shared cache UUID
// does not match the process' shared cache UUID, this optimization
// should not be used.
- lldb_private::UUID GetLLDBSharedCacheUUID();
+ void GetLLDBSharedCacheUUID(lldb::addr_t &base_addir, lldb_private::UUID &uuid);
lldb_private::Section *GetMachHeaderSection();
@@ -185,6 +184,18 @@ protected:
size_t ParseSymtab();
+ typedef lldb_private::RangeArray<uint32_t, uint32_t, 8> EncryptedFileRanges;
+ EncryptedFileRanges GetEncryptedFileRanges();
+
+ struct SegmentParsingContext;
+ void ProcessDysymtabCommand(const llvm::MachO::load_command &load_cmd,
+ lldb::offset_t offset);
+ void ProcessSegmentCommand(const llvm::MachO::load_command &load_cmd,
+ lldb::offset_t offset, uint32_t cmd_idx,
+ SegmentParsingContext &context);
+ void SanitizeSegmentCommand(llvm::MachO::segment_command_64 &seg_cmd,
+ uint32_t cmd_idx);
+
llvm::MachO::mach_header m_header;
static const lldb_private::ConstString &GetSegmentNameTEXT();
static const lldb_private::ConstString &GetSegmentNameDATA();
@@ -197,7 +208,7 @@ protected:
llvm::MachO::dysymtab_command m_dysymtab;
std::vector<llvm::MachO::segment_command_64> m_mach_segments;
std::vector<llvm::MachO::section_64> m_mach_sections;
- std::vector<uint32_t> m_min_os_versions;
+ llvm::Optional<llvm::VersionTuple> m_min_os_version;
std::vector<uint32_t> m_sdk_versions;
typedef lldb_private::RangeVector<uint32_t, uint32_t> FileRangeArray;
lldb_private::Address m_entry_point_address;