LLDB mainline
|
#include <ThreadElfCore.h>
Public Member Functions | |
ELFLinuxPrPsInfo () | |
lldb_private::Status | Parse (const lldb_private::DataExtractor &data, const lldb_private::ArchSpec &arch) |
Static Public Member Functions | |
static std::optional< ELFLinuxPrPsInfo > | Populate (const lldb::ProcessSP &process_sp) |
static std::optional< ELFLinuxPrPsInfo > | Populate (const lldb_private::ProcessInstanceInfo &info, lldb::StateType state) |
static size_t | GetSize (const lldb_private::ArchSpec &arch) |
Public Attributes | |
char | pr_state |
char | pr_sname |
char | pr_zomb |
char | pr_nice |
uint64_t | pr_flag |
uint32_t | pr_uid |
uint32_t | pr_gid |
int32_t | pr_pid |
int32_t | pr_ppid |
int32_t | pr_pgrp |
int32_t | pr_sid |
char | pr_fname [16] |
char | pr_psargs [80] |
Definition at line 128 of file ThreadElfCore.h.
ELFLinuxPrPsInfo::ELFLinuxPrPsInfo | ( | ) |
Definition at line 369 of file ThreadElfCore.cpp.
Referenced by GetSize().
|
static |
Definition at line 373 of file ThreadElfCore.cpp.
References lldb_private::ArchSpec::eCore_s390x_generic, lldb_private::ArchSpec::eCore_x86_32_i386, lldb_private::ArchSpec::eCore_x86_32_i486, lldb_private::ArchSpec::eCore_x86_64_x86_64, ELFLinuxPrPsInfo(), lldb_private::ArchSpec::GetAddressByteSize(), lldb_private::ArchSpec::GetCore(), and lldb_private::ArchSpec::IsMIPS().
Referenced by Parse().
Status ELFLinuxPrPsInfo::Parse | ( | const lldb_private::DataExtractor & | data, |
const lldb_private::ArchSpec & | arch | ||
) |
Definition at line 394 of file ThreadElfCore.cpp.
References error(), lldb_private::DataExtractor::ExtractBytes(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::DataExtractor::GetAddress(), lldb_private::DataExtractor::GetAddressByteSize(), lldb_private::DataExtractor::GetByteOrder(), lldb_private::DataExtractor::GetByteSize(), lldb_private::DataExtractor::GetMaxU64(), GetSize(), lldb_private::DataExtractor::GetU32(), lldb_private::DataExtractor::GetU8(), lldb_private::ArchSpec::IsMIPS(), pr_flag, pr_fname, pr_gid, pr_nice, pr_pgrp, pr_pid, pr_ppid, pr_psargs, pr_sid, pr_sname, pr_state, pr_uid, and pr_zomb.
Referenced by ProcessElfCore::parseLinuxNotes().
|
static |
|
static |
In the linux kernel this comes from: state = READ_ONCE(p->__state); i = state ? ffz(~state) + 1 : 0; psinfo->pr_sname = (i > 5) ? '.' : "RSDTZW"[i];
So we replicate that here. From proc_pid_stats(5) R = Running S = Sleeping on uninterrutible wait D = Waiting on uninterruptable disk sleep T = Tracing stop Z = Zombie W = Paging
pr_flags is left as 0. The values (in linux) are specific to the kernel. We recover them from the proc filesystem but don't put them in ProcessInfo because it would really become very linux specific and the utility here seems pretty dubious
Definition at line 454 of file ThreadElfCore.cpp.
References lldb_private::ProcessInstanceInfo::EffectiveGroupIDIsValid(), lldb_private::ProcessInstanceInfo::EffectiveUserIDIsValid(), lldb::eStateRunning, lldb::eStateStepping, lldb::eStateStopped, lldb::eStateSuspended, lldb::eStateUnloaded, lldb_private::ProcessInfo::GetArguments(), lldb_private::ProcessInfo::GetGroupID(), lldb_private::ProcessInfo::GetNameAsStringRef(), lldb_private::ProcessInstanceInfo::GetParentProcessID(), lldb_private::ProcessInstanceInfo::GetPriorityValue(), lldb_private::ProcessInstanceInfo::GetProcessGroupID(), lldb_private::ProcessInfo::GetProcessID(), lldb_private::ProcessInstanceInfo::GetProcessSessionID(), lldb_private::ProcessInfo::GetUserID(), lldb_private::ProcessInstanceInfo::IsZombie(), lldb_private::ProcessInstanceInfo::ParentProcessIDIsValid(), pr_pid, lldb_private::ProcessInstanceInfo::ProcessGroupIDIsValid(), and lldb_private::ProcessInstanceInfo::ProcessSessionIDIsValid().
uint64_t ELFLinuxPrPsInfo::pr_flag |
Definition at line 133 of file ThreadElfCore.h.
Referenced by Parse().
char ELFLinuxPrPsInfo::pr_fname[16] |
Definition at line 140 of file ThreadElfCore.h.
Referenced by Parse(), and ProcessElfCore::parseLinuxNotes().
uint32_t ELFLinuxPrPsInfo::pr_gid |
Definition at line 135 of file ThreadElfCore.h.
Referenced by Parse().
char ELFLinuxPrPsInfo::pr_nice |
Definition at line 132 of file ThreadElfCore.h.
Referenced by Parse().
int32_t ELFLinuxPrPsInfo::pr_pgrp |
Definition at line 138 of file ThreadElfCore.h.
Referenced by Parse().
int32_t ELFLinuxPrPsInfo::pr_pid |
Definition at line 136 of file ThreadElfCore.h.
Referenced by Parse(), ProcessElfCore::parseLinuxNotes(), and Populate().
int32_t ELFLinuxPrPsInfo::pr_ppid |
Definition at line 137 of file ThreadElfCore.h.
Referenced by Parse().
char ELFLinuxPrPsInfo::pr_psargs[80] |
Definition at line 141 of file ThreadElfCore.h.
Referenced by Parse().
int32_t ELFLinuxPrPsInfo::pr_sid |
Definition at line 139 of file ThreadElfCore.h.
Referenced by Parse().
char ELFLinuxPrPsInfo::pr_sname |
Definition at line 130 of file ThreadElfCore.h.
Referenced by Parse().
char ELFLinuxPrPsInfo::pr_state |
Definition at line 129 of file ThreadElfCore.h.
Referenced by Parse().
uint32_t ELFLinuxPrPsInfo::pr_uid |
Definition at line 134 of file ThreadElfCore.h.
Referenced by Parse().
char ELFLinuxPrPsInfo::pr_zomb |
Definition at line 131 of file ThreadElfCore.h.
Referenced by Parse().