MCPcopy Create free account
hub / github.com/bloomberg/pystack / extractPSInfo

Method extractPSInfo

src/pystack/_pystack/corefile.cpp:381–396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381CorePsInfo
382CoreFileExtractor::extractPSInfo() const
383{
384 Elf* elf = d_analyzer->d_elf.get();
385 CorePsInfo result{};
386 LOG(DEBUG) << "Extracting PSInfo structure";
387
388 for (const auto& note_data : getNoteData(elf, NT_PRPSINFO, ELF_T_XWORD)) {
389 if (parseCorePsinfo(note_data, &result) != StatusCode::ERROR) {
390 LOG(DEBUG) << "PSInfo structure found";
391 return result;
392 }
393 }
394 LOG(ERROR) << "Failed to locate the NOTE data for the psinfo struct in the core file";
395 return {};
396}
397
398static StatusCode
399parseCoreExecfn(const NoteData& note_data, uintptr_t* result)

Callers

nothing calls this directly

Calls 3

LOGClass · 0.85
getNoteDataFunction · 0.85
parseCorePsinfoFunction · 0.85

Tested by

no test coverage detected