|
LLDB mainline
|
#include "llvm/ADT/ScopeExit.h"#include "llvm/ADT/StringRef.h"#include "Plugins/Process/Utility/RegisterContextDarwin_arm.h"#include "Plugins/Process/Utility/RegisterContextDarwin_arm64.h"#include "Plugins/Process/Utility/RegisterContextDarwin_riscv32.h"#include "Plugins/Process/Utility/RegisterContextDarwin_x86_64.h"#include "lldb/Core/Debugger.h"#include "lldb/Core/Module.h"#include "lldb/Core/ModuleSpec.h"#include "lldb/Core/PluginManager.h"#include "lldb/Core/Progress.h"#include "lldb/Core/Section.h"#include "lldb/Host/Host.h"#include "lldb/Symbol/DWARFCallFrameInfo.h"#include "lldb/Symbol/ObjectFile.h"#include "lldb/Target/DynamicLoader.h"#include "lldb/Target/MemoryRegionInfo.h"#include "lldb/Target/Platform.h"#include "lldb/Target/Process.h"#include "lldb/Target/SectionLoadList.h"#include "lldb/Target/Target.h"#include "lldb/Target/Thread.h"#include "lldb/Target/ThreadList.h"#include "lldb/Utility/ArchSpec.h"#include "lldb/Utility/DataBuffer.h"#include "lldb/Utility/FileSpec.h"#include "lldb/Utility/FileSpecList.h"#include "lldb/Utility/LLDBLog.h"#include "lldb/Utility/Log.h"#include "lldb/Utility/RangeMap.h"#include "lldb/Utility/RegisterValue.h"#include "lldb/Utility/Status.h"#include "lldb/Utility/StreamString.h"#include "lldb/Utility/Timer.h"#include "lldb/Utility/UUID.h"#include "lldb/Host/SafeMachO.h"#include "llvm/ADT/DenseSet.h"#include "llvm/Support/FormatVariadic.h"#include "llvm/Support/MemoryBuffer.h"#include "ObjectFileMachO.h"#include "lldb/Utility/AppleUuidCompatibility.h"#include <bitset>#include <memory>#include <optional>Go to the source code of this file.
Classes | |
| class | RegisterContextDarwin_x86_64_Mach |
| class | RegisterContextDarwin_arm_Mach |
| class | RegisterContextDarwin_arm64_Mach |
| class | RegisterContextDarwin_riscv32_Mach |
| struct | ObjectFileMachO::SegmentParsingContext |
| class | MachSymtabSectionInfo |
| struct | MachSymtabSectionInfo::SectionInfo |
| struct | TrieEntry |
| struct | TrieEntryWithOffset |
| struct | lldb_copy__dyld_process_cache_info |
| struct | all_image_infos_header |
| struct | image_entry |
| struct | segment_vmaddr |
| struct | page_object |
Macros | |
| #define | THUMB_ADDRESS_BIT_MASK 0xfffffffffffffffeull |
| #define | MACHO_NLIST_ARM_SYMBOL_IS_THUMB 0x0008 |
| #define | TRIE_SYMBOL_IS_THUMB (1ULL << 63) |
Typedefs | |
| typedef void * | dyld_process_info |
Enumerations | |
| enum | { DebugSymbols = true , NonDebugSymbols = false } |
Functions | |
| static void | PrintRegisterValue (RegisterContext *reg_ctx, const char *name, const char *alt_name, size_t reg_byte_size, Stream &data) |
| static uint32_t | MachHeaderSizeFromMagic (uint32_t magic) |
| static uint32_t | GetSegmentPermissions (const llvm::MachO::segment_command_64 &seg_cmd) |
| static lldb::SectionType | GetSectionType (uint32_t flags, ConstString section_name) |
| static bool | ParseTrieEntries (DataExtractor &data, lldb::offset_t offset, const bool is_arm, addr_t text_seg_base_addr, std::vector< llvm::StringRef > &nameSlices, std::set< lldb::addr_t > &resolver_addresses, std::vector< TrieEntryWithOffset > &reexports, std::vector< TrieEntryWithOffset > &ext_symbols) |
| static bool | TryParseV2ObjCMetadataSymbol (const char *&symbol_name, const char *&symbol_name_non_abi_mangled, SymbolType &type) |
| static SymbolType | GetSymbolType (const char *&symbol_name, bool &demangled_is_synthesized, const SectionSP &text_section_sp, const SectionSP &data_section_sp, const SectionSP &data_dirty_section_sp, const SectionSP &data_const_section_sp, const SectionSP &symbol_section) |
| static std::optional< struct nlist_64 > | ParseNList (DataExtractor &nlist_data, lldb::offset_t &nlist_data_offset, size_t nlist_byte_size) |
| static llvm::StringRef | GetOSName (uint32_t cmd) |
| unsigned int | mach_task_self () |
| static llvm::VersionTuple | FindMinimumVersionInfo (DataExtractor &data, lldb::offset_t offset, size_t ncmds) |
| static offset_t | CreateAllImageInfosPayload (const lldb::ProcessSP &process_sp, offset_t initial_file_offset, StreamString &all_image_infos_payload, lldb_private::SaveCoreOptions &options) |
Variables | |
| static constexpr llvm::StringLiteral | g_loader_path = "@loader_path" |
| static constexpr llvm::StringLiteral | g_executable_path = "@executable_path" |
| #define MACHO_NLIST_ARM_SYMBOL_IS_THUMB 0x0008 |
Definition at line 769 of file ObjectFileMachO.cpp.
Referenced by ObjectFileMachO::GetAddressClass(), and ObjectFileMachO::ParseSymtab().
| #define THUMB_ADDRESS_BIT_MASK 0xfffffffffffffffeull |
Definition at line 132 of file ObjectFileMachO.cpp.
Referenced by ObjectFileMachO::ParseSymtab(), and ParseTrieEntries().
| #define TRIE_SYMBOL_IS_THUMB (1ULL << 63) |
Definition at line 1953 of file ObjectFileMachO.cpp.
Referenced by ObjectFileMachO::ParseSymtab(), and ParseTrieEntries().
| typedef void* dyld_process_info |
Definition at line 5737 of file ObjectFileMachO.cpp.
| anonymous enum |
| Enumerator | |
|---|---|
| DebugSymbols | |
| NonDebugSymbols | |
Definition at line 2195 of file ObjectFileMachO.cpp.
|
static |
Definition at line 6130 of file ObjectFileMachO.cpp.
References lldb_private::ModuleList::AppendIfNeeded(), lldb_private::ConstString::AsCString(), lldb_private::ModuleList::Clear(), all_image_infos_header::entries_fileoff, all_image_infos_header::entries_size, lldb::eSaveCoreStackOnly, image_entry::filepath_offset, lldb_private::UUID::GetAsString(), lldb_private::ObjectFile::GetBaseAddress(), lldb_private::Target::GetImages(), lldb_private::Address::GetLoadAddress(), lldb_private::ModuleList::GetModuleAtIndex(), lldb_private::SectionList::GetSectionAtIndex(), lldb_private::ModuleList::GetSize(), lldb_private::SectionList::GetSize(), lldb_private::SaveCoreOptions::GetStyle(), all_image_infos_header::imgcount, lldb_private::Address::IsValid(), lldb_private::UUID::IsValid(), LLDB_INVALID_ADDRESS, image_entry::load_address, pc, lldb_private::Stream::PutHex32(), lldb_private::Stream::PutHex64(), lldb_private::Stream::PutRawBytes(), image_entry::seg_addrs_offset, image_entry::segment_count, segment_vmaddr::segname, all_image_infos_header::unused, segment_vmaddr::unused, image_entry::uuid, all_image_infos_header::version, and segment_vmaddr::vmaddr.
Referenced by ObjectFileMachO::SaveCore().
|
static |
Definition at line 5832 of file ObjectFileMachO.cpp.
References lldb_private::DataExtractor::GetU32().
Referenced by ObjectFileMachO::GetMinimumOSVersion(), and ObjectFileMachO::GetSDKVersion().
|
static |
Definition at line 4622 of file ObjectFileMachO.cpp.
Referenced by ObjectFileMachO::GetAllArchSpecs().
|
static |
Definition at line 1421 of file ObjectFileMachO.cpp.
References lldb::eSectionTypeCode, lldb::eSectionTypeCompactUnwind, lldb::eSectionTypeCTF, lldb::eSectionTypeData, lldb::eSectionTypeData16, lldb::eSectionTypeData4, lldb::eSectionTypeData8, lldb::eSectionTypeDataCString, lldb::eSectionTypeDataCStringPointers, lldb::eSectionTypeDataObjCCFStrings, lldb::eSectionTypeDataObjCMessageRefs, lldb::eSectionTypeDataPointers, lldb::eSectionTypeDebug, lldb::eSectionTypeDWARFAppleNames, lldb::eSectionTypeDWARFAppleNamespaces, lldb::eSectionTypeDWARFAppleObjC, lldb::eSectionTypeDWARFAppleTypes, lldb::eSectionTypeDWARFDebugStrOffsets, lldb::eSectionTypeDWARFDebugStrOffsetsDwo, lldb::eSectionTypeEHFrame, lldb::eSectionTypeGoSymtab, lldb::eSectionTypeLLDBFormatters, lldb::eSectionTypeLLDBTypeSummaries, lldb::eSectionTypeOther, lldb::eSectionTypeSwiftModules, lldb::eSectionTypeZeroFill, lldb_private::ObjectFile::GetDWARFSectionTypeFromName(), and lldb_private::ConstString::GetStringRef().
Referenced by ObjectFileMachO::ProcessSegmentCommand().
|
static |
Definition at line 1410 of file ObjectFileMachO.cpp.
Referenced by ObjectFileMachO::ProcessSegmentCommand().
|
static |
Definition at line 2121 of file ObjectFileMachO.cpp.
References lldb::eSymbolTypeCode, lldb::eSymbolTypeData, lldb::eSymbolTypeException, lldb::eSymbolTypeInvalid, lldb::eSymbolTypeObjCClass, lldb::eSymbolTypeObjCIVar, lldb::eSymbolTypeObjCMetaClass, lldb::eSymbolTypeRuntime, and lldb::eSymbolTypeTrampoline.
Referenced by ObjectFileMachO::ParseSymtab().
| unsigned int mach_task_self | ( | ) |
Referenced by ObjectFileMachO::GetLLDBSharedCacheUUID(), and ObjectFileMachO::ParseSymtab().
|
static |
Definition at line 752 of file ObjectFileMachO.cpp.
|
static |
Definition at line 2182 of file ObjectFileMachO.cpp.
References lldb_private::DataExtractor::GetAddress_unchecked(), lldb_private::DataExtractor::GetU16_unchecked(), lldb_private::DataExtractor::GetU32_unchecked(), lldb_private::DataExtractor::GetU8_unchecked(), and lldb_private::DataExtractor::ValidOffsetForDataOfSize().
Referenced by ObjectFileMachO::ParseSymtab().
|
static |
Definition at line 1991 of file ObjectFileMachO.cpp.
References TrieEntry::address, TrieEntryWithOffset::entry, TrieEntry::flags, lldb_private::DataExtractor::GetCStr(), lldb_private::DataExtractor::GetU8(), lldb_private::DataExtractor::GetULEB128(), TrieEntry::import_name, LLDB_INVALID_ADDRESS, TrieEntry::name, TrieEntry::other, ParseTrieEntries(), lldb_private::ConstString::SetCString(), lldb_private::ConstString::SetCStringWithLength(), lldb_private::Flags::Test(), THUMB_ADDRESS_BIT_MASK, TRIE_SYMBOL_IS_THUMB, and lldb_private::DataExtractor::ValidOffset().
Referenced by ObjectFileMachO::ParseSymtab(), and ParseTrieEntries().
|
static |
Definition at line 142 of file ObjectFileMachO.cpp.
References lldb_private::RegisterInfo::byte_size, lldb_private::RegisterValue::GetBytes(), and PrintRegisterValue().
Referenced by RegisterContextDarwin_arm64_Mach::Create_LC_THREAD(), RegisterContextDarwin_arm_Mach::Create_LC_THREAD(), RegisterContextDarwin_riscv32_Mach::Create_LC_THREAD(), RegisterContextDarwin_x86_64_Mach::Create_LC_THREAD(), and PrintRegisterValue().
|
static |
Definition at line 2085 of file ObjectFileMachO.cpp.
References lldb::eSymbolTypeObjCClass, lldb::eSymbolTypeObjCIVar, and lldb::eSymbolTypeObjCMetaClass.
Referenced by ObjectFileMachO::ParseSymtab().
|
staticconstexpr |
Definition at line 138 of file ObjectFileMachO.cpp.
Referenced by ObjectFileMachO::GetDependentModules().
|
staticconstexpr |
Definition at line 137 of file ObjectFileMachO.cpp.
Referenced by ObjectFileMachO::GetDependentModules().