LLDB mainline
|
#include "SymbolLocatorDebugSymbols.h"
#include "Plugins/ObjectFile/wasm/ObjectFileWasm.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleList.h"
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/Progress.h"
#include "lldb/Core/Section.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/ArchSpec.h"
#include "lldb/Utility/DataBuffer.h"
#include "lldb/Utility/DataExtractor.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/StreamString.h"
#include "lldb/Utility/Timer.h"
#include "lldb/Utility/UUID.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/ThreadPool.h"
#include "Host/macosx/cfcpp/CFCBundle.h"
#include "Host/macosx/cfcpp/CFCData.h"
#include "Host/macosx/cfcpp/CFCReleaser.h"
#include "Host/macosx/cfcpp/CFCString.h"
#include "mach/machine.h"
#include <CoreFoundation/CoreFoundation.h>
#include <cstring>
#include <dirent.h>
#include <dlfcn.h>
#include <optional>
#include <pwd.h>
Go to the source code of this file.
Functions | |
static bool | FileAtPathContainsArchAndUUID (const FileSpec &file_fspec, const ArchSpec *arch, const lldb_private::UUID *uuid) |
static bool | LookForDsymNextToExecutablePath (const ModuleSpec &mod_spec, const FileSpec &exec_fspec, FileSpec &dsym_fspec) |
static bool | LocateDSYMInVincinityOfExecutable (const ModuleSpec &module_spec, FileSpec &dsym_fspec) |
static int | LocateMacOSXFilesUsingDebugSymbols (const ModuleSpec &module_spec, ModuleSpec &return_module_spec) |
static bool | GetModuleSpecInfoFromUUIDDictionary (CFDictionaryRef uuid_dict, ModuleSpec &module_spec, Status &error, const std::string &command) |
static llvm::StringRef | GetDbgShellCommand () |
It's expensive to check for the DBGShellCommands defaults setting. | |
static FileSpec | GetDsymForUUIDExecutable () |
Get the dsymForUUID executable and cache the result so we don't end up stat'ing the binary over and over. | |
Variables | |
static CFURLRef(* | g_dlsym_DBGCopyFullDSYMURLForUUID )(CFUUIDRef uuid, CFURLRef exec_url) = nullptr |
static CFDictionaryRef(* | g_dlsym_DBGCopyDSYMPropertyLists )(CFURLRef dsym_url) |
|
static |
Definition at line 367 of file SymbolLocatorDebugSymbols.cpp.
References lldb_private::ModuleSpec::GetArchitecture(), lldb_private::ModuleSpec::GetArchitecturePtr(), lldb_private::ModuleSpecList::GetModuleSpecAtIndex(), lldb_private::ObjectFile::GetModuleSpecifications(), lldb_private::ModuleSpecList::GetSize(), lldb_private::ModuleSpec::GetUUID(), lldb_private::ModuleSpec::GetUUIDPtr(), lldb_private::ArchSpec::IsCompatibleMatch(), and UNUSED_IF_ASSERT_DISABLED.
Referenced by LookForDsymNextToExecutablePath().
|
static |
It's expensive to check for the DBGShellCommands defaults setting.
Only do it once per lldb run and cache the result.
Definition at line 966 of file SymbolLocatorDebugSymbols.cpp.
References PATH_MAX.
Referenced by lldb_private::SymbolLocatorDebugSymbols::DownloadObjectAndSymbolFile(), and GetDsymForUUIDExecutable().
|
static |
Get the dsymForUUID executable and cache the result so we don't end up stat'ing the binary over and over.
Definition at line 989 of file SymbolLocatorDebugSymbols.cpp.
References GetDbgShellCommand(), lldb_private::FileSystem::Instance(), and lldb_private::FileSystem::Resolve().
Referenced by lldb_private::SymbolLocatorDebugSymbols::DownloadObjectAndSymbolFile().
|
static |
Definition at line 797 of file SymbolLocatorDebugSymbols.cpp.
References lldb_private::PathMappingList::Append(), error(), CFCString::FileSystemRepresentation(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::GetLog(), lldb_private::FileSpec::GetPath(), lldb_private::ModuleSpec::GetSourceMappingList(), lldb_private::ModuleSpec::GetSymbolFileSpec(), lldb_private::Host, lldb_private::FileSystem::Instance(), LLDB_LOGF, lldb_private::FileSpec::RemoveLastPathComponent(), lldb_private::FileSystem::Resolve(), and lldb_private::FileSpec::SetFile().
Referenced by lldb_private::SymbolLocatorDebugSymbols::DownloadObjectAndSymbolFile().
|
static |
Definition at line 471 of file SymbolLocatorDebugSymbols.cpp.
References lldb_private::ConstString::AsCString(), lldb_private::FileSpec::Clear(), lldb_private::FileSpec::GetFilename(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::GetLog(), lldb_private::FileSpec::GetPath(), lldb_private::Host, LLDB_LOGF, LookForDsymNextToExecutablePath(), and lldb_private::FileSpec::RemoveLastPathComponent().
Referenced by lldb_private::SymbolLocatorDebugSymbols::LocateExecutableSymbolFile().
|
static |
Definition at line 525 of file SymbolLocatorDebugSymbols.cpp.
References lldb_private::FileSpec::Clear(), CFCBundle::CopyExecutableURL(), lldb_private::FileSystem::Exists(), lldb_private::ModuleSpecList::FindMatchingModuleSpec(), lldb_private::PluginManager::FindSymbolFileInBundle(), g_dlsym_DBGCopyDSYMPropertyLists, g_dlsym_DBGCopyFullDSYMURLForUUID, CFCReleaser< T >::get(), lldb_private::ModuleSpec::GetArchitecturePtr(), lldb_private::UUID::GetAsString(), lldb_private::UUID::GetBytes(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::ModuleSpec::GetFileSpecPtr(), lldb_private::ModuleList::GetGlobalModuleListProperties(), lldb_private::GetLog(), lldb_private::ObjectFile::GetModuleSpecifications(), lldb_private::FileSpec::GetPath(), lldb_private::ModuleSpec::GetSymbolFileSpec(), lldb_private::ModuleSpec::GetUUID(), lldb_private::ModuleSpec::GetUUIDPtr(), lldb_private::Host, lldb_private::FileSystem::Instance(), lldb_private::UUID::IsValid(), LLDB_LOGF, PATH_MAX, CFCReleaser< T >::reset(), lldb_private::FileSystem::Resolve(), and lldb_private::SharedCacheImageInfo::uuid.
Referenced by lldb_private::SymbolLocatorDebugSymbols::LocateExecutableSymbolFile().
|
static |
Definition at line 394 of file SymbolLocatorDebugSymbols.cpp.
References lldb_private::FileSpec::AppendPathComponent(), lldb_private::ConstString::AsCString(), lldb_private::PluginManager::DownloadObjectAndSymbolFile(), error(), FileAtPathContainsArchAndUUID(), lldb_private::ModuleSpec::GetArchitecturePtr(), lldb_private::FileSpec::GetFilename(), lldb_private::ModuleSpec::GetSymbolFileSpec(), lldb_private::ModuleSpec::GetUUIDPtr(), lldb_private::FileSystem::Instance(), and lldb_private::FileSpec::RemoveLastPathComponent().
Referenced by LocateDSYMInVincinityOfExecutable().
|
static |
Definition at line 57 of file SymbolLocatorDebugSymbols.cpp.
Referenced by lldb_private::SymbolLocatorDebugSymbols::LocateExecutableObjectFile(), and LocateMacOSXFilesUsingDebugSymbols().
|
static |
Definition at line 55 of file SymbolLocatorDebugSymbols.cpp.
Referenced by lldb_private::SymbolLocatorDebugSymbols::LocateExecutableObjectFile(), and LocateMacOSXFilesUsingDebugSymbols().