LLDB mainline
Functions | Variables
SymbolLocatorDebugSymbols.cpp File Reference
#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)
 

Function Documentation

◆ FileAtPathContainsArchAndUUID()

static bool FileAtPathContainsArchAndUUID ( const FileSpec file_fspec,
const ArchSpec arch,
const lldb_private::UUID uuid 
)
static

◆ GetDbgShellCommand()

static llvm::StringRef GetDbgShellCommand ( )
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().

◆ GetDsymForUUIDExecutable()

static FileSpec 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().

◆ GetModuleSpecInfoFromUUIDDictionary()

static bool GetModuleSpecInfoFromUUIDDictionary ( CFDictionaryRef  uuid_dict,
ModuleSpec module_spec,
Status error,
const std::string &  command 
)
static

◆ LocateDSYMInVincinityOfExecutable()

static bool LocateDSYMInVincinityOfExecutable ( const ModuleSpec module_spec,
FileSpec dsym_fspec 
)
static

◆ LocateMacOSXFilesUsingDebugSymbols()

static int LocateMacOSXFilesUsingDebugSymbols ( const ModuleSpec module_spec,
ModuleSpec return_module_spec 
)
static

◆ LookForDsymNextToExecutablePath()

static bool LookForDsymNextToExecutablePath ( const ModuleSpec mod_spec,
const FileSpec exec_fspec,
FileSpec dsym_fspec 
)
static

Variable Documentation

◆ g_dlsym_DBGCopyDSYMPropertyLists

CFDictionaryRef(* g_dlsym_DBGCopyDSYMPropertyLists) (CFURLRef dsym_url) ( CFURLRef  dsym_url)
static

◆ g_dlsym_DBGCopyFullDSYMURLForUUID

CFURLRef(* g_dlsym_DBGCopyFullDSYMURLForUUID) (CFUUIDRef uuid, CFURLRef exec_url) ( CFUUIDRef  uuid,
CFURLRef  exec_url 
) = nullptr
static