28#include "llvm/BinaryFormat/ELF.h" 
   29#include "llvm/Support/Threading.h" 
   38namespace ELF = llvm::ELF;
 
   43  return "ELF core dump plug-in.";
 
 
   55  if (crash_file && !can_connect) {
 
   59    const size_t header_size = 
sizeof(llvm::ELF::Elf64_Ehdr);
 
   62        crash_file->
GetPath(), header_size, 0);
 
   63    if (data_sp && data_sp->GetByteSize() == header_size &&
 
   68      if (elf_header.
Parse(data, &data_offset)) {
 
   73        if (elf_header.
e_type == llvm::ELF::ET_CORE)
 
   74          process_sp = std::make_shared<ProcessElfCore>(target_sp, listener_sp,
 
 
   83                              bool plugin_specified_by_name) {
 
   88                                             nullptr, 
nullptr, 
nullptr));
 
 
  126        last_entry->
data.GetRangeEnd() == range_entry.
data.GetRangeBase() &&
 
  129      last_entry->
data.SetRangeEnd(range_entry.
data.GetRangeEnd());
 
  136  const uint32_t permissions =
 
  137      ((header.
p_flags & llvm::ELF::PF_R) ? lldb::ePermissionsReadable : 0u) |
 
  138      ((header.
p_flags & llvm::ELF::PF_W) ? lldb::ePermissionsWritable : 0u) |
 
  139      ((header.
p_flags & llvm::ELF::PF_X) ? lldb::ePermissionsExecutable : 0u);
 
 
  168  if (core == 
nullptr) {
 
  173  llvm::ArrayRef<elf::ELFProgramHeader> segments = core->
ProgramHeaders();
 
  174  if (segments.size() == 0) {
 
  194  bool ranges_are_sorted = 
true;
 
  206    if (H.p_type == llvm::ELF::PT_NOTE) {
 
  211    if (H.p_type == llvm::ELF::PT_LOAD) {
 
  213      if (vm_addr > last_addr)
 
  214        ranges_are_sorted = 
false;
 
  216    } 
else if (H.p_type == llvm::ELF::PT_AARCH64_MEMTAG_MTE) {
 
  218      if (tag_addr > last_addr)
 
  219        ranges_are_sorted = 
false;
 
  220      tag_addr = last_addr;
 
  224  if (!ranges_are_sorted) {
 
  231  bool siginfo_signal_found = 
false;
 
  232  bool prstatus_signal_found = 
false;
 
  235    if (!thread_data.siginfo_bytes.empty() || thread_data.signo != 0)
 
  236      siginfo_signal_found = 
true;
 
  237    if (thread_data.prstatus_sig != 0)
 
  238      prstatus_signal_found = 
true;
 
  240  if (!siginfo_signal_found) {
 
  243    if (prstatus_signal_found) {
 
  245        thread_data.signo = thread_data.prstatus_sig;
 
  259  if (!exe_module_sp) {
 
  266                                            FileSpec::Style::native);
 
 
  285      assert(
m_uuids.count(entry.path) == 0 || 
m_uuids[entry.path] == uuid);
 
  288        LLDB_LOGF(log, 
"%s found UUID @ %16.16" PRIx64 
": %s \"%s\"",
 
  289                  __FUNCTION__, entry.start, uuid.
GetAsString().c_str(),
 
 
  304      executable_path = file_entry.path;
 
  307  return executable_path;
 
 
  314  auto it = 
m_uuids.find(std::string(path));
 
 
  333  for (
lldb::tid_t tid = 0; tid < num_threads; ++tid) {
 
  338  return new_thread_list.
GetSize(
false) > 0;
 
 
  353    addr = abi_sp->FixAnyAddress(addr);
 
 
  365  if (permission_entry) {
 
  366    if (permission_entry->
Contains(load_addr)) {
 
  369      const Flags permissions(permission_entry->
data);
 
  389    } 
else if (load_addr < permission_entry->GetRangeBase()) {
 
 
  415  if (core_objfile == 
nullptr)
 
  421  if (address_range == 
nullptr || address_range->
GetRangeEnd() < addr) {
 
  423        "core file does not contain 0x%" PRIx64, addr);
 
  431  size_t bytes_to_read = size; 
 
  432  size_t bytes_copied = 0;   
 
  438  if (file_start == file_end)
 
  443  if (file_end > file_start + offset)
 
  444    bytes_left = file_end - (file_start + offset);
 
  446  if (bytes_to_read > bytes_left)
 
  447    bytes_to_read = bytes_left;
 
  452        core_objfile->
CopyData(offset + file_start, bytes_to_read, buf);
 
 
  457llvm::Expected<std::vector<lldb::addr_t>>
 
  460  if (core_objfile == 
nullptr)
 
  461    return llvm::createStringError(llvm::inconvertibleErrorCode(),
 
  462                                   "No core object file.");
 
  464  llvm::Expected<const MemoryTagManager *> tag_manager_or_err =
 
  466  if (!tag_manager_or_err)
 
  467    return tag_manager_or_err.takeError();
 
  477  if (!tag_entry || (addr + len) >= tag_entry->
GetRangeEnd())
 
  478    return llvm::createStringError(llvm::inconvertibleErrorCode(),
 
  479                                   "No tag segment that covers this range.");
 
  484        return core_objfile->
CopyData(offset, length, dst);
 
 
  496  static llvm::once_flag g_once_flag;
 
  498  llvm::call_once(g_once_flag, []() {
 
 
  518  int pr_version = data.
GetU32(&offset);
 
  523      LLDB_LOGF(log, 
"FreeBSD PRSTATUS unexpected version %d", pr_version);
 
 
  546  int pr_version = data.
GetU32(&offset);
 
  551      LLDB_LOGF(log, 
"FreeBSD PRPSINFO unexpected version %d", pr_version);
 
 
  565                                       uint32_t &cpi_siglwp,
 
  569  uint32_t version = data.
GetU32(&offset);
 
  571    return llvm::make_error<llvm::StringError>(
 
  572        "Error parsing NetBSD core(5) notes: Unsupported procinfo version",
 
  573        llvm::inconvertibleErrorCode());
 
  575  uint32_t cpisize = data.
GetU32(&offset);
 
  577    return llvm::make_error<llvm::StringError>(
 
  578        "Error parsing NetBSD core(5) notes: Unsupported procinfo size",
 
  579        llvm::inconvertibleErrorCode());
 
  581  cpi_signo = data.
GetU32(&offset); 
 
  588  cpi_pid = data.
GetU32(&offset);
 
  598  cpi_nlwps = data.
GetU32(&offset); 
 
  601  cpi_siglwp = data.
GetU32(&offset); 
 
  603  return llvm::Error::success();
 
 
  610  int version = data.
GetU32(&offset);
 
 
  618llvm::Expected<std::vector<CoreNote>>
 
  621  std::vector<CoreNote> result;
 
  625    if (!
note.Parse(segment, &offset))
 
  626      return llvm::make_error<llvm::StringError>(
 
  627          "Unable to parse note segment", llvm::inconvertibleErrorCode());
 
  629    size_t note_start = offset;
 
  630    size_t note_size = llvm::alignTo(
note.n_descsz, 4);
 
  636  return std::move(result);
 
 
  641  bool lp64 = (arch.
GetMachine() == llvm::Triple::aarch64 ||
 
  645  bool have_prstatus = 
false;
 
  646  bool have_prpsinfo = 
false;
 
  648  for (
const auto &
note : notes) {
 
  649    if (
note.info.n_name != 
"FreeBSD")
 
  652    if ((
note.info.n_type == ELF::NT_PRSTATUS && have_prstatus) ||
 
  653        (
note.info.n_type == ELF::NT_PRPSINFO && have_prpsinfo)) {
 
  658      have_prstatus = 
false;
 
  659      have_prpsinfo = 
false;
 
  662    switch (
note.info.n_type) {
 
  663    case ELF::NT_PRSTATUS:
 
  664      have_prstatus = 
true;
 
  667    case ELF::NT_PRPSINFO:
 
  668      have_prpsinfo = 
true;
 
  671    case ELF::NT_FREEBSD_THRMISC: {
 
  673      thread_data.
name = 
note.data.GetCStr(&offset, 20);
 
  676    case ELF::NT_FREEBSD_PROCSTAT_AUXV:
 
  685  if (!have_prstatus) {
 
  686    return llvm::make_error<llvm::StringError>(
 
  687        "Could not find NT_PRSTATUS note in core file.",
 
  688        llvm::inconvertibleErrorCode());
 
  691  return llvm::Error::success();
 
 
  718  bool had_nt_regs = 
false;
 
  727  for (
const auto &
note : notes) {
 
  728    llvm::StringRef name = 
note.info.n_name;
 
  730    if (name == 
"NetBSD-CORE") {
 
  740    } 
else if (name.consume_front(
"NetBSD-CORE@")) {
 
  742      if (name.getAsInteger(10, tid))
 
  743        return llvm::make_error<llvm::StringError>(
 
  744            "Error parsing NetBSD core(5) notes: Cannot convert LWP ID " 
  746            llvm::inconvertibleErrorCode());
 
  749      case llvm::Triple::aarch64: {
 
  760          thread_data.
tid = tid;
 
  762            return llvm::make_error<llvm::StringError>(
 
  763                "Could not find general purpose registers note in core file.",
 
  764                llvm::inconvertibleErrorCode());
 
  767          if (!had_nt_regs || tid != thread_data.
tid)
 
  768            return llvm::make_error<llvm::StringError>(
 
  769                "Error parsing NetBSD core(5) notes: Unexpected order " 
  770                "of NOTEs PT_GETFPREG before PT_GETREG",
 
  771                llvm::inconvertibleErrorCode());
 
  775      case llvm::Triple::x86: {
 
  786          thread_data.
tid = tid;
 
  788            return llvm::make_error<llvm::StringError>(
 
  789                "Could not find general purpose registers note in core file.",
 
  790                llvm::inconvertibleErrorCode());
 
  793          if (!had_nt_regs || tid != thread_data.
tid)
 
  794            return llvm::make_error<llvm::StringError>(
 
  795                "Error parsing NetBSD core(5) notes: Unexpected order " 
  796                "of NOTEs PT_GETFPREG before PT_GETREG",
 
  797                llvm::inconvertibleErrorCode());
 
  801      case llvm::Triple::x86_64: {
 
  812          thread_data.
tid = tid;
 
  814            return llvm::make_error<llvm::StringError>(
 
  815                "Could not find general purpose registers note in core file.",
 
  816                llvm::inconvertibleErrorCode());
 
  819          if (!had_nt_regs || tid != thread_data.
tid)
 
  820            return llvm::make_error<llvm::StringError>(
 
  821                "Error parsing NetBSD core(5) notes: Unexpected order " 
  822                "of NOTEs PT_GETFPREG before PT_GETREG",
 
  823                llvm::inconvertibleErrorCode());
 
  838    return llvm::make_error<llvm::StringError>(
 
  839        "Error parsing NetBSD core(5) notes: No threads information " 
  840        "specified in notes",
 
  841        llvm::inconvertibleErrorCode());
 
  844    return llvm::make_error<llvm::StringError>(
 
  845        "Error parsing NetBSD core(5) notes: Mismatch between the number " 
  846        "of LWPs in netbsd_elfcore_procinfo and the number of LWPs specified " 
  848        llvm::inconvertibleErrorCode());
 
  860      if (data.tid == siglwp) {
 
  868      return llvm::make_error<llvm::StringError>(
 
  869          "Error parsing NetBSD core(5) notes: Signal passed to unknown LWP",
 
  870          llvm::inconvertibleErrorCode());
 
  873  return llvm::Error::success();
 
 
  878  for (
const auto &
note : notes) {
 
  881    if (!llvm::StringRef(
note.info.n_name).starts_with(
"OpenBSD"))
 
  884    switch (
note.info.n_type) {
 
  900    return llvm::make_error<llvm::StringError>(
 
  901        "Could not find general purpose registers note in core file.",
 
  902        llvm::inconvertibleErrorCode());
 
  905  return llvm::Error::success();
 
 
  922  bool have_prstatus = 
false;
 
  923  bool have_prpsinfo = 
false;
 
  925  for (
const auto &
note : notes) {
 
  926    if (
note.info.n_name != 
"CORE" && 
note.info.n_name != 
"LINUX")
 
  929    if ((
note.info.n_type == ELF::NT_PRSTATUS && have_prstatus) ||
 
  930        (
note.info.n_type == ELF::NT_PRPSINFO && have_prpsinfo)) {
 
  935      have_prstatus = 
false;
 
  936      have_prpsinfo = 
false;
 
  939    switch (
note.info.n_type) {
 
  940    case ELF::NT_PRSTATUS: {
 
  941      have_prstatus = 
true;
 
  949      size_t len = 
note.data.GetByteSize() - header_size;
 
  953    case ELF::NT_PRPSINFO: {
 
  954      have_prpsinfo = 
true;
 
  964    case ELF::NT_SIGINFO: {
 
  968          static_cast<const char *
>(
note.data.GetData(&offset, size));
 
  975      const uint64_t count = 
note.data.GetAddress(&offset);
 
  976      note.data.GetAddress(&offset); 
 
  977      for (uint64_t i = 0; i < count; ++i) {
 
  979        entry.
start = 
note.data.GetAddress(&offset);
 
  980        entry.
end = 
note.data.GetAddress(&offset);
 
  984      for (uint64_t i = 0; i < count; ++i) {
 
  985        const char *path = 
note.data.GetCStr(&offset);
 
 1002  return llvm::Error::success();
 
 
 1011  assert(segment_header.
p_type == llvm::ELF::PT_NOTE);
 
 1015    return notes_or_error.takeError();
 
 1017  case llvm::Triple::FreeBSD:
 
 1019  case llvm::Triple::Linux:
 
 1021  case llvm::Triple::NetBSD:
 
 1023  case llvm::Triple::OpenBSD:
 
 1026    return llvm::make_error<llvm::StringError>(
 
 1027        "Don't know how to parse core file. Unsupported OS.",
 
 1028        llvm::inconvertibleErrorCode());
 
 
 1035  const size_t elf_header_size = addr_size == 4 ? 
sizeof(llvm::ELF::Elf32_Ehdr)
 
 1036                                                : 
sizeof(llvm::ELF::Elf64_Ehdr);
 
 1038  std::vector<uint8_t> elf_header_bytes;
 
 1039  elf_header_bytes.resize(elf_header_size);
 
 1043  if (byte_read != elf_header_size ||
 
 1045    return invalid_uuid;
 
 1046  DataExtractor elf_header_data(elf_header_bytes.data(), elf_header_size,
 
 1051  elf_header.
Parse(elf_header_data, &offset);
 
 1055  std::vector<uint8_t> ph_bytes;
 
 1058  bool found_first_load_segment = 
false;
 
 1059  for (
unsigned int i = 0; i < elf_header.
e_phnum; ++i) {
 
 1068    program_header.
Parse(program_header_data, &offset);
 
 1069    if (program_header.
p_type == llvm::ELF::PT_LOAD &&
 
 1070        !found_first_load_segment) {
 
 1071      base_addr = program_header.
p_vaddr;
 
 1072      found_first_load_segment = 
true;
 
 1074    if (program_header.
p_type != llvm::ELF::PT_NOTE)
 
 1077    std::vector<uint8_t> note_bytes;
 
 1078    note_bytes.resize(program_header.
p_memsz);
 
 1085    if (byte_read != program_header.
p_memsz)
 
 1087    DataExtractor segment_data(note_bytes.data(), note_bytes.size(),
 
 1090    if (!notes_or_error) {
 
 1091      llvm::consumeError(notes_or_error.takeError());
 
 1092      return invalid_uuid;
 
 1095      if (
note.info.n_namesz == 4 &&
 
 1096          note.info.n_type == llvm::ELF::NT_GNU_BUILD_ID &&
 
 1097          "GNU" == 
note.info.n_name &&
 
 1098          note.data.ValidOffsetForDataOfSize(0, 
note.info.n_descsz))
 
 1099        return UUID(
note.data.GetData().take_front(
note.info.n_descsz));
 
 1102  return invalid_uuid;
 
 
 1120  if (target_arch.
IsMIPS()) {
 
 
 1128  assert(
m_auxv.GetByteSize() == 0 ||
 
 
 1140    const bool add_exe_file_as_first_arg = 
false;
 
 1142                           add_exe_file_as_first_arg);
 
 
static llvm::raw_ostream & error(Stream &strm)
static llvm::raw_ostream & note(Stream &strm)
#define LLDB_LOGF(log,...)
#define LLDB_PLUGIN_DEFINE(PluginName)
static void ParseOpenBSDProcInfo(ThreadData &thread_data, const DataExtractor &data)
static void ParseFreeBSDPrPsInfo(ProcessElfCore &process, const DataExtractor &data, bool lp64)
static void ParseFreeBSDPrStatus(ThreadData &thread_data, const DataExtractor &data, bool lp64)
static llvm::Error ParseNetBSDProcInfo(const DataExtractor &data, uint32_t &cpi_nlwps, uint32_t &cpi_signo, uint32_t &cpi_siglwp, uint32_t &cpi_pid)
static llvm::StringRef GetPluginNameStatic()
Generic COFF object file reader.
lldb_private::DataExtractor GetSegmentData(const elf::ELFProgramHeader &H)
llvm::ArrayRef< elf::ELFProgramHeader > ProgramHeaders()
std::vector< NT_FILE_Entry > m_nt_file_entries
lldb_private::UUID FindModuleUUID(const llvm::StringRef path) override
lldb::addr_t GetImageInfoAddress() override
Get the image information address for the current process.
lldb::addr_t AddAddressRangeFromMemoryTagSegment(const elf::ELFProgramHeader &header)
lldb_private::DataExtractor m_auxv
llvm::Error parseLinuxNotes(llvm::ArrayRef< lldb_private::CoreNote > notes)
A description of a linux process usually contains the following NOTE entries:
llvm::Error ParseThreadContextsFromNoteSegment(const elf::ELFProgramHeader &segment_header, const lldb_private::DataExtractor &segment_data)
Parse Thread context from PT_NOTE segment and store it in the thread list A note segment consists of ...
void UpdateBuildIdForNTFileEntries()
std::vector< ThreadData > m_thread_data
lldb_private::Range< lldb::addr_t, lldb::addr_t > FileRange
bool DoUpdateThreadList(lldb_private::ThreadList &old_thread_list, lldb_private::ThreadList &new_thread_list) override
Update the thread list following process plug-in's specific logic.
size_t ReadMemory(lldb::addr_t addr, void *buf, size_t size, lldb_private::Status &error) override
Read of memory from a process.
VMRangeToPermissions m_core_range_infos
static llvm::StringRef GetPluginDescriptionStatic()
std::unordered_map< std::string, lldb_private::UUID > m_uuids
llvm::Expected< std::vector< lldb_private::CoreNote > > parseSegment(const lldb_private::DataExtractor &segment)
lldb::addr_t AddAddressRangeFromLoadSegment(const elf::ELFProgramHeader &header)
~ProcessElfCore() override
llvm::Error parseFreeBSDNotes(llvm::ArrayRef< lldb_private::CoreNote > notes)
llvm::StringRef GetMainExecutablePath()
lldb_private::UUID FindBuidIdInCoreMemory(lldb::addr_t address)
VMRangeToFileOffset m_core_aranges
lldb_private::Status DoGetMemoryRegionInfo(lldb::addr_t load_addr, lldb_private::MemoryRegionInfo ®ion_info) override
DoGetMemoryRegionInfo is called by GetMemoryRegionInfo after it has removed non address bits from loa...
size_t DoReadMemory(lldb::addr_t addr, void *buf, size_t size, lldb_private::Status &error) override
Actually do the reading of memory from a process.
VMRangeToFileOffset m_core_tag_ranges
llvm::Error parseNetBSDNotes(llvm::ArrayRef< lldb_private::CoreNote > notes)
NetBSD specific Thread context from PT_NOTE segment.
lldb_private::Status DoLoadCore() override
ProcessElfCore(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const lldb_private::FileSpec &core_file)
lldb_private::DynamicLoader * GetDynamicLoader() override
Get the dynamic loader plug-in for this process.
llvm::Expected< std::vector< lldb::addr_t > > ReadMemoryTags(lldb::addr_t addr, size_t len) override
Read memory tags for the range addr to addr+len.
lldb_private::DataExtractor GetAuxvData() override
bool IsAlive() override
Check if a process is still alive.
uint32_t GetNumThreadContexts()
std::string m_executable_name
static lldb::ProcessSP CreateInstance(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const lldb_private::FileSpec *crash_file_path, bool can_connect)
llvm::Error parseOpenBSDNotes(llvm::ArrayRef< lldb_private::CoreNote > notes)
void RefreshStateAfterStop() override
Currently called as part of ShouldStop.
lldb_private::ArchSpec GetArchitecture()
bool CanDebug(lldb::TargetSP target_sp, bool plugin_specified_by_name) override
Check if a plug-in instance can debug the file in module.
bool GetProcessInfo(lldb_private::ProcessInstanceInfo &info) override
static llvm::StringRef GetPluginNameStatic()
lldb::ModuleSP m_core_module_sp
lldb_private::Status DoDestroy() override
A section + offset based address class.
lldb::addr_t GetLoadAddress(Target *target) const
Get the load address.
bool IsValid() const
Check if the object state is valid.
An architecture specification class.
void MergeFrom(const ArchSpec &other)
Merges fields from another ArchSpec into this ArchSpec.
bool IsMIPS() const
if MIPS architecture return true.
llvm::Triple::ArchType GetMachine() const
Returns a machine family for the current architecture.
A plug-in interface definition class for dynamic loaders.
static DynamicLoader * FindPlugin(Process *process, llvm::StringRef plugin_name)
Find a dynamic loader plugin for a given process.
void SetFile(llvm::StringRef path, Style style)
Change the file specified with a new path.
size_t GetPath(char *path, size_t max_path_length, bool denormalize=true) const
Extract the full path to the file.
static FileSystem & Instance()
std::shared_ptr< DataBuffer > CreateDataBuffer(const llvm::Twine &path, uint64_t size=0, uint64_t offset=0)
Create memory buffer from path.
bool Test(ValueType bit) const
Test a single flag bit.
void SetMapped(OptionalBool val)
void SetMemoryTagged(OptionalBool val)
void SetReadable(OptionalBool val)
void SetExecutable(OptionalBool val)
void SetWritable(OptionalBool val)
virtual llvm::Expected< std::vector< lldb::addr_t > > UnpackTagsFromCoreFileSegment(CoreReaderFn reader, lldb::addr_t tag_segment_virtual_address, lldb::addr_t tag_segment_data_address, lldb::addr_t addr, size_t len) const =0
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()
A plug-in interface definition class for object file parsers.
virtual lldb_private::Address GetImageInfoAddress(Target *target)
Similar to Process::GetImageInfoAddress().
@ eTypeCoreFile
A core file that has a checkpoint of a program's execution state.
size_t CopyData(lldb::offset_t offset, size_t length, void *dst) const
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
PostMortemProcess(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const FileSpec &core_file)
void SetExecutableFile(const FileSpec &exe_file, bool add_exe_file_as_first_arg)
void SetArchitecture(const ArchSpec &arch)
void SetProcessID(lldb::pid_t pid)
lldb::pid_t GetID() const
Returns the pid of the process or LLDB_INVALID_PROCESS_ID if there is no known pid.
void SetUnixSignals(lldb::UnixSignalsSP &&signals_sp)
void SetCanJIT(bool can_jit)
Sets whether executing JIT-compiled code in this process is possible.
lldb::DynamicLoaderUP m_dyld_up
llvm::Expected< const MemoryTagManager * > GetMemoryTagManager()
If this architecture and process supports memory tagging, return a tag manager that can be used to ma...
lldb::ByteOrder GetByteOrder() const
void SetID(lldb::pid_t new_pid)
Sets the stored pid.
uint32_t GetAddressByteSize() const
virtual void Finalize(bool destructing)
This object is about to be destroyed, do any necessary cleanup.
ThreadList m_thread_list
The threads for this process as the user will see them.
const lldb::UnixSignalsSP & GetUnixSignals()
const lldb::ABISP & GetABI()
Target & GetTarget()
Get the target object pointer for this module.
RangeData< lldb::addr_t, lldb::addr_t, FileRange > Entry
llvm::Error ToError() const
FIXME: Replace all uses with takeError() instead.
static Status FromErrorStringWithFormat(const char *format,...) __attribute__((format(printf
static Status FromErrorString(const char *str)
bool Fail() const
Test for error condition.
static Status FromError(llvm::Error error)
Avoid using this in new code. Migrate APIs to llvm::Expected instead.
lldb::ModuleSP GetOrCreateModule(const ModuleSpec &module_spec, bool notify, Status *error_ptr=nullptr)
Find a binary on the system and return its Module, or return an existing Module that is already in th...
bool SetArchitecture(const ArchSpec &arch_spec, bool set_platform=false, bool merge=true)
Set the architecture for this target.
lldb::ModuleSP GetExecutableModule()
Gets the module for the main executable.
const ArchSpec & GetArchitecture() const
void SetExecutableModule(lldb::ModuleSP &module_sp, LoadDependentFiles load_dependent_files=eLoadDependentsDefault)
Set the main executable module.
void AddThread(const lldb::ThreadSP &thread_sp)
uint32_t GetSize(bool can_update=true)
Represents UUID's of various sizes.
std::string GetAsString(llvm::StringRef separator="-") const
static lldb::UnixSignalsSP Create(const ArchSpec &arch)
#define LLDB_INVALID_ADDRESS
@ NT_PROCINFO_CPI_SIGIGNORE_SIZE
@ NT_PROCINFO_CPI_NAME_SIZE
@ NT_PROCINFO_CPI_RUID_SIZE
@ NT_PROCINFO_CPI_SVUID_SIZE
@ NT_PROCINFO_CPI_SIGCODE_SIZE
@ NT_PROCINFO_CPI_SVGID_SIZE
@ NT_PROCINFO_CPI_EUID_SIZE
@ NT_PROCINFO_CPI_PPID_SIZE
@ NT_PROCINFO_CPI_RGID_SIZE
@ NT_PROCINFO_CPI_SIGCATCH_SIZE
@ NT_PROCINFO_CPI_SIGMASK_SIZE
@ NT_PROCINFO_CPI_SID_SIZE
@ NT_PROCINFO_CPI_SIGPEND_SIZE
@ NT_PROCINFO_CPI_EGID_SIZE
@ NT_PROCINFO_CPI_PGRP_SIZE
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::ABI > ABISP
std::shared_ptr< lldb_private::Thread > ThreadSP
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::Listener > ListenerSP
std::shared_ptr< lldb_private::Target > TargetSP
std::shared_ptr< lldb_private::Module > ModuleSP
lldb_private::Status Parse(const lldb_private::DataExtractor &data, const lldb_private::ArchSpec &arch)
static size_t GetSize(const lldb_private::ArchSpec &arch)
lldb_private::Status Parse(const lldb_private::DataExtractor &data, const lldb_private::ArchSpec &arch)
llvm::StringRef siginfo_bytes
lldb_private::DataExtractor gpregset
std::vector< lldb_private::CoreNote > notes
bool Contains(BaseType r) const
BaseType GetRangeBase() const
void SetRangeEnd(BaseType end)
SizeType GetByteSize() const
void SetRangeBase(BaseType b)
Set the start value for the range, and keep the same size.
BaseType GetRangeEnd() const