#include "ProcessMinidump.h"
#include "ThreadMinidump.h"
#include "lldb/Core/DumpDataExtractor.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/Section.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandObject.h"
#include "lldb/Interpreter/CommandObjectMultiword.h"
#include "lldb/Interpreter/CommandReturnObject.h"
#include "lldb/Interpreter/OptionArgParser.h"
#include "lldb/Interpreter/OptionGroupBoolean.h"
#include "lldb/Target/JITLoaderList.h"
#include "lldb/Target/MemoryRegionInfo.h"
#include "lldb/Target/SectionLoadList.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/UnixSignals.h"
#include "lldb/Utility/LLDBAssert.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/State.h"
#include "llvm/BinaryFormat/Magic.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Threading.h"
#include "Plugins/ObjectFile/Placeholder/ObjectFilePlaceholder.h"
#include "Plugins/Process/Utility/StopInfoMachException.h"
#include <memory>
#include <optional>
usingnamespacelldb;
usingnamespacelldb_private;
usingnamespaceminidump;
LLDB_PLUGIN_DEFINE(…)
namespace {
void HashElfTextSection(ModuleSP module_sp, std::vector<uint8_t> &breakpad_uuid,
std::vector<uint8_t> &facebook_uuid) { … }
}
llvm::StringRef ProcessMinidump::GetPluginDescriptionStatic() { … }
lldb::ProcessSP ProcessMinidump::CreateInstance(lldb::TargetSP target_sp,
lldb::ListenerSP listener_sp,
const FileSpec *crash_file,
bool can_connect) { … }
bool ProcessMinidump::CanDebug(lldb::TargetSP target_sp,
bool plugin_specified_by_name) { … }
ProcessMinidump::ProcessMinidump(lldb::TargetSP target_sp,
lldb::ListenerSP listener_sp,
const FileSpec &core_file,
DataBufferSP core_data)
: … { … }
ProcessMinidump::~ProcessMinidump() { … }
void ProcessMinidump::Initialize() { … }
void ProcessMinidump::Terminate() { … }
Status ProcessMinidump::DoLoadCore() { … }
Status ProcessMinidump::DoDestroy() { … }
void ProcessMinidump::RefreshStateAfterStop() { … }
bool ProcessMinidump::IsAlive() { … }
bool ProcessMinidump::WarnBeforeDetach() const { … }
size_t ProcessMinidump::ReadMemory(lldb::addr_t addr, void *buf, size_t size,
Status &error) { … }
size_t ProcessMinidump::DoReadMemory(lldb::addr_t addr, void *buf, size_t size,
Status &error) { … }
ArchSpec ProcessMinidump::GetArchitecture() { … }
void ProcessMinidump::BuildMemoryRegions() { … }
Status ProcessMinidump::DoGetMemoryRegionInfo(lldb::addr_t load_addr,
MemoryRegionInfo ®ion) { … }
Status ProcessMinidump::GetMemoryRegions(MemoryRegionInfos ®ion_list) { … }
void ProcessMinidump::Clear() { … }
bool ProcessMinidump::DoUpdateThreadList(ThreadList &old_thread_list,
ThreadList &new_thread_list) { … }
ModuleSP ProcessMinidump::GetOrCreateModule(UUID minidump_uuid,
llvm::StringRef name,
ModuleSpec module_spec) { … }
void ProcessMinidump::ReadModuleList() { … }
bool ProcessMinidump::GetProcessInfo(ProcessInstanceInfo &info) { … }
JITLoaderList &ProcessMinidump::GetJITLoaders() { … }
#define INIT_BOOL(VAR, LONG, SHORT, DESC) …
#define APPEND_OPT(VAR) …
class CommandObjectProcessMinidumpDump : public CommandObjectParsed { … };
class CommandObjectMultiwordProcessMinidump : public CommandObjectMultiword { … };
CommandObject *ProcessMinidump::GetPluginCommandObject() { … }