37#include "llvm/Support/FileSystem.h"
39#include <CoreFoundation/CoreFoundation.h>
54void PlatformDarwinKernel::Initialize() {
59 PlatformDarwinKernel::GetDescriptionStatic(),
60 PlatformDarwinKernel::CreateInstance,
61 PlatformDarwinKernel::DebuggerInitialize);
65void PlatformDarwinKernel::Terminate() {
75PlatformSP PlatformDarwinKernel::CreateInstance(
bool force,
79 const char *arch_name;
80 if (arch && arch->GetArchitectureName())
81 arch_name = arch->GetArchitectureName();
85 const char *triple_cstr =
86 arch ? arch->GetTriple().getTriple().c_str() :
"<null>";
88 LLDB_LOGF(log,
"PlatformDarwinKernel::%s(force=%s, arch={%s,%s})",
89 __FUNCTION__, force ?
"true" :
"false", arch_name, triple_cstr);
98 "PlatformDarwinKernel::%s() aborting creation of platform "
99 "because force == false",
107 if (!create && arch && arch->IsValid()) {
108 const llvm::Triple &triple = arch->GetTriple();
109 switch (triple.getVendor()) {
110 case llvm::Triple::Apple:
116 case llvm::Triple::UnknownVendor:
117 create = !arch->TripleVendorWasSpecified();
124 switch (triple.getOS()) {
125 case llvm::Triple::Darwin:
126 case llvm::Triple::MacOSX:
127 case llvm::Triple::IOS:
128 case llvm::Triple::WatchOS:
129 case llvm::Triple::XROS:
130 case llvm::Triple::TvOS:
131 case llvm::Triple::BridgeOS:
132 case llvm::Triple::DriverKit:
136 case llvm::Triple::UnknownOS:
137 create = !arch->TripleOSWasSpecified();
145 if (arch && arch->IsValid()) {
146 switch (arch->GetMachine()) {
147 case llvm::Triple::x86:
148 case llvm::Triple::x86_64:
149 case llvm::Triple::ppc:
150 case llvm::Triple::ppc64:
153 case llvm::Triple::arm:
154 case llvm::Triple::aarch64:
155 case llvm::Triple::thumb:
164 LLDB_LOGF(log,
"PlatformDarwinKernel::%s() creating platform",
170 LLDB_LOGF(log,
"PlatformDarwinKernel::%s() aborting creation of platform",
176llvm::StringRef PlatformDarwinKernel::GetDescriptionStatic() {
177 return "Darwin Kernel platform plug-in.";
182#define LLDB_PROPERTIES_platformdarwinkernel
183#include "PlatformMacOSXProperties.inc"
186#define LLDB_PROPERTIES_platformdarwinkernel
187#include "PlatformMacOSXPropertiesEnum.inc"
190class PlatformDarwinKernelProperties :
public Properties {
192 static llvm::StringRef GetSettingName() {
193 static constexpr llvm::StringLiteral g_setting_name(
"darwin-kernel");
194 return g_setting_name;
197 PlatformDarwinKernelProperties() : Properties() {
198 m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
199 m_collection_sp->Initialize(g_platformdarwinkernel_properties);
202 ~PlatformDarwinKernelProperties()
override =
default;
204 FileSpecList GetKextDirectories()
const {
205 const uint32_t idx = ePropertyKextDirectories;
206 return GetPropertyAtIndexAs<FileSpecList>(idx, {});
211 static PlatformDarwinKernelProperties g_settings;
215void PlatformDarwinKernel::DebuggerInitialize(
218 debugger, PlatformDarwinKernelProperties::GetSettingName())) {
219 const bool is_global_setting =
true;
222 "Properties for the PlatformDarwinKernel plug-in.", is_global_setting);
227PlatformDarwinKernel::PlatformDarwinKernel(
230 m_name_to_kext_path_map_with_dsyms(),
231 m_name_to_kext_path_map_without_dsyms(), m_search_directories(),
232 m_search_directories_no_recursing(), m_kernel_binaries_with_dsyms(),
233 m_kernel_binaries_without_dsyms(), m_kernel_dsyms_no_binaries(),
234 m_kernel_dsyms_yaas(), m_ios_debug_session(is_ios_debug_session),
235 m_kext_scan_flag() {}
241PlatformDarwinKernel::~PlatformDarwinKernel() =
default;
243void PlatformDarwinKernel::GetStatus(
Stream &strm) {
244 UpdateKextandKernelsLocalScan();
246 strm.Printf(
" Debug session type: ");
248 strm.Printf(
"iOS kernel debugging\n");
250 strm.Printf(
"Mac OS X kernel debugging\n");
252 strm.Printf(
"unknown kernel debugging\n");
254 strm.Printf(
"Directories searched recursively:\n");
255 const uint32_t num_kext_dirs = m_search_directories.size();
256 for (uint32_t i = 0; i < num_kext_dirs; ++i) {
257 strm.Printf(
"[%d] %s\n", i, m_search_directories[i].GetPath().c_str());
260 strm.Printf(
"Directories not searched recursively:\n");
261 const uint32_t num_kext_dirs_no_recursion =
262 m_search_directories_no_recursing.size();
263 for (uint32_t i = 0; i < num_kext_dirs_no_recursion; i++) {
264 strm.Printf(
"[%d] %s\n", i,
265 m_search_directories_no_recursing[i].GetPath().c_str());
268 strm.Printf(
" Number of kexts with dSYMs indexed: %d\n",
269 (
int)m_name_to_kext_path_map_with_dsyms.size());
270 strm.Printf(
" Number of kexts without dSYMs indexed: %d\n",
271 (
int)m_name_to_kext_path_map_without_dsyms.size());
272 strm.Printf(
" Number of Kernel binaries with dSYMs indexed: %d\n",
273 (
int)m_kernel_binaries_with_dsyms.size());
274 strm.Printf(
" Number of Kernel binaries without dSYMs indexed: %d\n",
275 (
int)m_kernel_binaries_without_dsyms.size());
276 strm.Printf(
" Number of Kernel dSYMs with no binaries indexed: %d\n",
277 (
int)m_kernel_dsyms_no_binaries.size());
278 strm.Printf(
" Number of Kernel dSYM.yaa's indexed: %d\n",
279 (
int)m_kernel_dsyms_yaas.size());
284 for (
auto pos : m_name_to_kext_path_map_with_dsyms) {
285 LLDB_LOGF(log,
"%s", pos.second.GetPath().c_str());
289 for (
auto pos : m_name_to_kext_path_map_without_dsyms) {
290 LLDB_LOGF(log,
"%s", pos.second.GetPath().c_str());
292 LLDB_LOGF(log,
"\nkernel binaries with dSYMS");
293 for (
auto fs : m_kernel_binaries_with_dsyms) {
294 LLDB_LOGF(log,
"%s", fs.GetPath().c_str());
296 LLDB_LOGF(log,
"\nkernel binaries without dSYMS");
297 for (
auto fs : m_kernel_binaries_without_dsyms) {
298 LLDB_LOGF(log,
"%s", fs.GetPath().c_str());
300 LLDB_LOGF(log,
"\nkernel dSYMS with no binaries");
301 for (
auto fs : m_kernel_dsyms_no_binaries) {
302 LLDB_LOGF(log,
"%s", fs.GetPath().c_str());
305 for (
auto fs : m_kernel_dsyms_yaas) {
306 LLDB_LOGF(log,
"%s", fs.GetPath().c_str());
315void PlatformDarwinKernel::CollectKextAndKernelDirectories() {
323 std::string developer_dir = HostInfo::GetXcodeDeveloperDirectory().GetPath();
324 if (developer_dir.empty())
325 developer_dir =
"/Applications/Xcode.app/Contents/Developer";
328 AddSDKSubdirsToSearchPaths(developer_dir +
329 "/Platforms/iPhoneOS.platform/Developer/SDKs");
330 AddSDKSubdirsToSearchPaths(developer_dir +
331 "/Platforms/AppleTVOS.platform/Developer/SDKs");
332 AddSDKSubdirsToSearchPaths(developer_dir +
333 "/Platforms/WatchOS.platform/Developer/SDKs");
334 AddSDKSubdirsToSearchPaths(developer_dir +
335 "/Platforms/XROS.platform/Developer/SDKs");
336 AddSDKSubdirsToSearchPaths(developer_dir +
337 "/Platforms/BridgeOS.platform/Developer/SDKs");
340 AddSDKSubdirsToSearchPaths(developer_dir +
341 "/Platforms/MacOSX.platform/Developer/SDKs");
344 AddSDKSubdirsToSearchPaths(
"/Volumes/KernelDebugKit");
345 AddSDKSubdirsToSearchPaths(
"/AppleInternal/Developer/KDKs");
348 AddSDKSubdirsToSearchPaths(
"/Library/Developer/KDKs");
353 AddRootSubdirsToSearchPaths(
this,
"/");
356 GetUserSpecifiedDirectoriesToSearch();
359 FileSpec possible_dir(developer_dir +
"/../Symbols");
362 m_search_directories.push_back(possible_dir);
367 m_search_directories_no_recursing.push_back(cwd);
370void PlatformDarwinKernel::GetUserSpecifiedDirectoriesToSearch() {
372 std::vector<FileSpec> possible_sdk_dirs;
374 const uint32_t user_dirs_count = user_dirs.GetSize();
375 for (uint32_t i = 0; i < user_dirs_count; i++) {
376 FileSpec dir = user_dirs.GetFileSpecAtIndex(i);
379 m_search_directories.push_back(dir);
384void PlatformDarwinKernel::AddRootSubdirsToSearchPaths(
386 const char *subdirs[] = {
387 "/System/Library/Extensions",
"/Library/Extensions",
388 "/System/Library/Kernels",
389 "/System/Library/Extensions/KDK",
392 for (
int i = 0; subdirs[i] !=
nullptr; i++) {
396 thisp->m_search_directories.push_back(testdir);
400 thisp->m_search_directories_no_recursing.push_back(
FileSpec(dir +
"/"));
404void PlatformDarwinKernel::AddSDKSubdirsToSearchPaths(
const std::string &dir) {
406 const bool find_directories =
true;
407 const bool find_files =
false;
408 const bool find_other =
false;
410 dir.c_str(), find_directories, find_files, find_other,
411 FindKDKandSDKDirectoriesInDirectory,
this);
416PlatformDarwinKernel::FindKDKandSDKDirectoriesInDirectory(
417 void *baton, llvm::sys::fs::file_type ft, llvm::StringRef path) {
418 static constexpr llvm::StringLiteral g_sdk_suffix =
".sdk";
419 static constexpr llvm::StringLiteral g_kdk_suffix =
".kdk";
423 if (ft == llvm::sys::fs::file_type::directory_file &&
424 (file_spec.GetFileNameExtension() == g_sdk_suffix ||
425 file_spec.GetFileNameExtension() == g_kdk_suffix)) {
426 AddRootSubdirsToSearchPaths(thisp, file_spec.GetPath());
433void PlatformDarwinKernel::SearchForKextsAndKernelsRecursively() {
434 const uint32_t num_dirs = m_search_directories.size();
435 for (uint32_t i = 0; i < num_dirs; i++) {
436 const FileSpec &dir = m_search_directories[i];
437 const bool find_directories =
true;
438 const bool find_files =
true;
439 const bool find_other =
true;
441 dir.GetPath().c_str(), find_directories, find_files, find_other,
442 GetKernelsAndKextsInDirectoryWithRecursion,
this);
444 const uint32_t num_dirs_no_recurse = m_search_directories_no_recursing.size();
445 for (uint32_t i = 0; i < num_dirs_no_recurse; i++) {
446 const FileSpec &dir = m_search_directories_no_recursing[i];
447 const bool find_directories =
true;
448 const bool find_files =
true;
449 const bool find_other =
true;
451 dir.GetPath().c_str(), find_directories, find_files, find_other,
452 GetKernelsAndKextsInDirectoryNoRecursion,
this);
465PlatformDarwinKernel::GetKernelsAndKextsInDirectoryWithRecursion(
466 void *baton, llvm::sys::fs::file_type ft, llvm::StringRef path) {
467 return GetKernelsAndKextsInDirectoryHelper(baton, ft, path,
true);
471PlatformDarwinKernel::GetKernelsAndKextsInDirectoryNoRecursion(
472 void *baton, llvm::sys::fs::file_type ft, llvm::StringRef path) {
473 return GetKernelsAndKextsInDirectoryHelper(baton, ft, path,
false);
477PlatformDarwinKernel::GetKernelsAndKextsInDirectoryHelper(
478 void *baton, llvm::sys::fs::file_type ft, llvm::StringRef path,
480 static constexpr llvm::StringLiteral g_kext_suffix =
".kext";
481 static constexpr llvm::StringLiteral g_dsym_suffix =
".dSYM";
484 llvm::StringRef file_spec_extension = file_spec.GetFileNameExtension();
488 LLDB_LOGV(log,
"PlatformDarwinKernel examining '{0}'", file_spec);
492 llvm::StringRef filename = file_spec.GetFilename().GetStringRef();
493 bool is_kernel_filename =
494 filename.starts_with(
"kernel") || filename.starts_with(
"mach");
495 bool is_dsym_yaa = filename.ends_with(
".dSYM.yaa");
497 if (ft == llvm::sys::fs::file_type::regular_file ||
498 ft == llvm::sys::fs::file_type::symlink_file) {
499 if (is_kernel_filename) {
500 if (file_spec_extension != g_dsym_suffix && !is_dsym_yaa) {
501 if (KernelHasdSYMSibling(file_spec)) {
503 "PlatformDarwinKernel registering kernel binary '%s' with "
505 file_spec.GetPath().c_str());
506 thisp->m_kernel_binaries_with_dsyms.push_back(file_spec);
510 "PlatformDarwinKernel registering kernel binary '%s', no dSYM",
511 file_spec.GetPath().c_str());
512 thisp->m_kernel_binaries_without_dsyms.push_back(file_spec);
516 LLDB_LOGF(log,
"PlatformDarwinKernel registering kernel .dSYM.yaa '%s'",
517 file_spec.GetPath().c_str());
518 thisp->m_kernel_dsyms_yaas.push_back(file_spec);
523 if (ft == llvm::sys::fs::file_type::directory_file) {
524 if (file_spec_extension == g_kext_suffix) {
525 AddKextToMap(thisp, file_spec);
527 FileSpec contents_plugins(file_spec.GetPath() +
"/Contents/PlugIns");
528 std::string search_here_too;
530 search_here_too = contents_plugins.GetPath();
532 FileSpec plugins(file_spec.GetPath() +
"/PlugIns");
534 search_here_too = plugins.GetPath();
538 if (!search_here_too.empty()) {
539 const bool find_directories =
true;
540 const bool find_files =
false;
541 const bool find_other =
true;
543 search_here_too.c_str(), find_directories, find_files, find_other,
544 recurse ? GetKernelsAndKextsInDirectoryWithRecursion
545 : GetKernelsAndKextsInDirectoryNoRecursion,
551 if (is_kernel_filename && file_spec_extension == g_dsym_suffix) {
552 if (KerneldSYMHasNoSiblingBinary(file_spec)) {
554 "PlatformDarwinKernel registering kernel dSYM '%s' with "
556 file_spec.GetPath().c_str());
557 thisp->m_kernel_dsyms_no_binaries.push_back(file_spec);
565 if (recurse && file_spec_extension != g_dsym_suffix &&
566 file_spec_extension != g_kext_suffix) {
567 LLDB_LOGV(log,
"PlatformDarwinKernel descending into directory '{0}'",
578 CFCBundle bundle(file_spec.GetPath().c_str());
580 if (bundle_id && CFGetTypeID(bundle_id) == CFStringGetTypeID()) {
582 if (CFStringGetCString(bundle_id, bundle_id_buf,
sizeof(bundle_id_buf),
583 kCFStringEncodingUTF8)) {
585 if (KextHasdSYMSibling(file_spec))
588 "PlatformDarwinKernel registering kext binary '%s' with dSYM "
590 file_spec.GetPath().c_str());
591 thisp->m_name_to_kext_path_map_with_dsyms.insert(
592 std::pair<ConstString, FileSpec>(bundle_conststr, file_spec));
597 "PlatformDarwinKernel registering kext binary '%s', no dSYM",
598 file_spec.GetPath().c_str());
599 thisp->m_name_to_kext_path_map_without_dsyms.insert(
600 std::pair<ConstString, FileSpec>(bundle_conststr, file_spec));
611bool PlatformDarwinKernel::KextHasdSYMSibling(
612 const FileSpec &kext_bundle_filepath) {
613 FileSpec dsym_fspec = kext_bundle_filepath;
614 std::string filename = dsym_fspec.GetFilename().AsCString();
616 dsym_fspec.SetFilename(filename);
625 kext_bundle_filepath.GetFileNameStrippingExtension();
626 std::string deep_bundle_str =
627 kext_bundle_filepath.GetPath() +
"/Contents/MacOS/";
628 deep_bundle_str += executable_name.AsCString();
629 deep_bundle_str +=
".dSYM";
630 dsym_fspec.SetFile(deep_bundle_str, FileSpec::Style::native);
638 std::string shallow_bundle_str = kext_bundle_filepath.GetPath() +
"/";
639 shallow_bundle_str += executable_name.AsCString();
640 shallow_bundle_str +=
".dSYM";
641 dsym_fspec.SetFile(shallow_bundle_str, FileSpec::Style::native);
649bool PlatformDarwinKernel::KernelHasdSYMSibling(
const FileSpec &kernel_binary) {
650 FileSpec kernel_dsym = kernel_binary;
651 std::string filename = kernel_binary.GetFilename().AsCString();
653 kernel_dsym.SetFilename(filename);
662bool PlatformDarwinKernel::KerneldSYMHasNoSiblingBinary(
664 static constexpr llvm::StringLiteral g_dsym_suffix =
".dSYM";
665 std::string possible_path = kernel_dsym.GetPath();
666 if (kernel_dsym.GetFileNameExtension() != g_dsym_suffix)
669 FileSpec binary_filespec = kernel_dsym;
671 binary_filespec.SetFilename(binary_filespec.GetFileNameStrippingExtension());
680 if (GetDWARFBinaryInDSYMBundle(kernel_dsym).size() > 0)
692PlatformDarwinKernel::GetDWARFBinaryInDSYMBundle(
const FileSpec &dsym_bundle) {
693 std::vector<FileSpec> results;
694 static constexpr llvm::StringLiteral g_dsym_suffix =
".dSYM";
695 if (dsym_bundle.GetFileNameExtension() != g_dsym_suffix) {
699 std::string filename =
700 dsym_bundle.GetFileNameStrippingExtension().GetCString();
701 std::string dirname = dsym_bundle.GetDirectory().GetCString();
703 std::string binary_filepath = dsym_bundle.GetPath();
704 binary_filepath +=
"/Contents/Resources/DWARF/";
705 binary_filepath += filename;
707 FileSpec binary_fspec(binary_filepath);
709 results.push_back(binary_fspec);
713void PlatformDarwinKernel::UpdateKextandKernelsLocalScan() {
714 std::call_once(m_kext_scan_flag, [
this]() {
715 CollectKextAndKernelDirectories();
716 SearchForKextsAndKernelsRecursively();
720Status PlatformDarwinKernel::GetSharedModule(
730 std::string kext_bundle_id = platform_file.GetPath();
735 if (kext_bundle_id ==
"mach_kernel" || kext_bundle_id.empty()) {
736 error = GetSharedModuleKernel(module_spec, process, module_sp,
737 module_search_paths_ptr, old_modules,
739 if (
error.Success() && module_sp) {
743 return GetSharedModuleKext(module_spec, process, module_sp,
744 module_search_paths_ptr, old_modules,
752 module_search_paths_ptr, old_modules,
756Status PlatformDarwinKernel::GetSharedModuleKext(
766 ConstString kext_bundle(platform_file.GetPath().c_str());
768 if (m_name_to_kext_path_map_with_dsyms.count(kext_bundle) > 0) {
769 for (BundleIDToKextIterator it = m_name_to_kext_path_map_with_dsyms.begin();
770 it != m_name_to_kext_path_map_with_dsyms.end(); ++it) {
771 if (it->first == kext_bundle) {
772 error = ExamineKextForMatchingUUID(it->second, module_spec.
GetUUID(),
775 if (module_sp.get()) {
785 module_search_paths_ptr, old_modules,
787 if (
error.Success() && module_sp.get()) {
794Status PlatformDarwinKernel::GetSharedModuleKernel(
798 assert(module_sp.get() ==
nullptr);
799 UpdateKextandKernelsLocalScan();
801 *did_create_ptr =
false;
804 for (
auto possible_kernel : m_kernel_binaries_with_dsyms) {
807 kern_spec.GetUUID() = module_spec.
GetUUID();
808 module_sp = std::make_shared<Module>(kern_spec);
809 if (module_sp && module_sp->GetObjectFile() &&
810 module_sp->MatchesModuleSpec(kern_spec)) {
818 kern_spec, search_paths, module_sp->GetSymbolLocatorStatistics());
820 module_sp->SetSymbolFileFileSpec(dsym_fspec);
822 *did_create_ptr =
true;
830 for (
auto possible_kernel_dsym : m_kernel_dsyms_no_binaries) {
831 std::vector<FileSpec> objfile_names =
832 GetDWARFBinaryInDSYMBundle(possible_kernel_dsym);
833 for (
FileSpec objfile : objfile_names) {
835 kern_spec.GetUUID() = module_spec.
GetUUID();
836 kern_spec.GetSymbolFileSpec() = possible_kernel_dsym;
838 module_sp = std::make_shared<Module>(kern_spec);
839 if (module_sp && module_sp->GetObjectFile() &&
840 module_sp->MatchesModuleSpec(kern_spec)) {
842 *did_create_ptr =
true;
851 module_search_paths_ptr, old_modules,
855std::vector<lldb_private::FileSpec>
856PlatformDarwinKernel::SearchForExecutablesRecursively(
const std::string &dir) {
857 std::vector<FileSpec> executables;
859 for (llvm::sys::fs::recursive_directory_iterator it(dir.c_str(), EC),
861 it != end && !EC; it.increment(EC)) {
862 auto status = it->status();
865 if (llvm::sys::fs::is_regular_file(*status) &&
866 llvm::sys::fs::can_execute(it->path()))
867 executables.emplace_back(it->path());
872Status PlatformDarwinKernel::ExamineKextForMatchingUUID(
875 for (
const auto &exe_file :
876 SearchForExecutablesRecursively(kext_bundle_path.GetPath())) {
879 exe_spec.GetUUID() = uuid;
881 exe_spec.GetArchitecture() = arch;
888 ModuleSP module_sp(
new Module(exe_spec));
889 if (module_sp && module_sp->GetObjectFile() &&
890 module_sp->MatchesModuleSpec(exe_spec)) {
893 if (exe_module_sp && exe_module_sp->GetObjectFile()) {
897 exe_module_sp.reset();
908 if (!process->
ReadMemory(input_addr, header_data->GetBytes(),
909 header_data->GetByteSize(),
error) ||
915 module_sp, header_data, process->shared_from_this(), input_addr));
922 fileset_container->
FindEntry(
"com.apple.kernel");
928bool PlatformDarwinKernel::LoadPlatformBinaryAndSetup(
Process *process,
937 addr_t actual_address = find_kernel_in_macho_fileset(process, input_addr);
943 "PlatformDarwinKernel::%s check address 0x%" PRIx64
" for "
944 "a macho fileset, got back kernel address 0x%" PRIx64,
945 __FUNCTION__, input_addr, actual_address);
958 std::make_unique<DynamicLoaderDarwinKernel>(process, actual_address);
968std::vector<ArchSpec> PlatformDarwinKernel::GetSupportedArchitectures(
969 const ArchSpec &process_host_arch) {
970 std::vector<ArchSpec> result;
971 ARMGetSupportedArchitectures(result);
972 x86GetSupportedArchitectures(result);
976void PlatformDarwinKernel::CalculateTrapHandlerSymbolNames() {
977 m_trap_handlers.push_back(
ConstString(
"trap_from_kernel"));
978 m_trap_handlers.push_back(
ConstString(
"hndl_machine_check"));
979 m_trap_handlers.push_back(
ConstString(
"hndl_double_fault"));
980 m_trap_handlers.push_back(
ConstString(
"hndl_allintrs"));
981 m_trap_handlers.push_back(
ConstString(
"hndl_alltraps"));
982 m_trap_handlers.push_back(
ConstString(
"interrupt"));
983 m_trap_handlers.push_back(
ConstString(
"fleh_prefabt"));
984 m_trap_handlers.push_back(
ConstString(
"ExceptionVectorsBase"));
985 m_trap_handlers.push_back(
ConstString(
"ExceptionVectorsTable"));
986 m_trap_handlers.push_back(
ConstString(
"fleh_undef"));
987 m_trap_handlers.push_back(
ConstString(
"fleh_dataabt"));
988 m_trap_handlers.push_back(
ConstString(
"fleh_irq"));
989 m_trap_handlers.push_back(
ConstString(
"fleh_decirq"));
990 m_trap_handlers.push_back(
ConstString(
"fleh_fiq_generic"));
991 m_trap_handlers.push_back(
ConstString(
"fleh_dec"));
static llvm::raw_ostream & error(Stream &strm)
static DynamicLoaderDarwinKernelProperties & GetGlobalProperties()
#define LLDB_LOGF(log,...)
#define LLDB_LOGV(log,...)
A subclass of DataBuffer that stores a data buffer on the heap.
A class to manage flag bits.
PlatformList & GetPlatformList()
@ eEnumerateDirectoryResultEnter
Recurse into the current entry if it is a directory or symlink, or next if not.
@ eEnumerateDirectoryResultNext
Enumerate next entry in the current directory.
static FileSystem & Instance()
static Status GetSharedModule(const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules, bool *did_create_ptr, bool always_create=false)
ArchSpec & GetArchitecture()
static lldb_private::ObjectContainer * CreateMemoryInstance(const lldb::ModuleSP &module_sp, lldb::WritableDataBufferSP data_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr)
Entry * FindEntry(llvm::StringRef id)
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static lldb::OptionValuePropertiesSP GetSettingForPlatformPlugin(Debugger &debugger, llvm::StringRef setting_name)
static FileSpec LocateExecutableSymbolFile(const ModuleSpec &module_spec, const FileSpecList &default_search_paths, StatisticsMap &map)
static bool CreateSettingForPlatformPlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static bool UnregisterPlugin(ABICreateInstance create_callback)
A plug-in interface definition class for debugging a process.
virtual size_t ReadMemory(lldb::addr_t vm_addr, void *buf, size_t size, Status &error)
Read of memory from a process.
void SetDynamicLoader(lldb::DynamicLoaderUP dyld)
Target & GetTarget()
Get the target object pointer for this module.
FileSpecList GetDebugFileSearchPaths()
Debugger & GetDebugger() const
void SetPlatform(const lldb::PlatformSP &platform_sp)
Represents UUID's of various sizes.
#define LLDB_INVALID_ADDRESS
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
std::shared_ptr< lldb_private::ObjectContainer > ObjectContainerSP
std::shared_ptr< lldb_private::Platform > PlatformSP
std::unique_ptr< lldb_private::DynamicLoader > DynamicLoaderUP
std::shared_ptr< lldb_private::WritableDataBuffer > WritableDataBufferSP
std::shared_ptr< lldb_private::Module > ModuleSP