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

Function parseCorePsinfo

src/pystack/_pystack/corefile.cpp:213–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213static StatusCode
214parseCorePsinfo(const NoteData& note_data, CorePsInfo* result)
215{
216 if (note_data.data->d_size != sizeof(CorePsInfo)) {
217 LOG(ERROR) << "Invalid psinfo note found";
218 return StatusCode::ERROR;
219 }
220 std::memcpy(result, note_data.data->d_buf, sizeof(CorePsInfo));
221 // Ensure that the char arrays are null terminated
222 result->fname[FNAME_SIZE - 1] = '\0';
223 result->psargs[PSARGS_SIZE - 1] = '\0';
224 return StatusCode::SUCCESS;
225}
226
227static StatusCode
228parseCorePrstatus(const NoteData& note_data, CoreCrashInfo* result)

Callers 1

extractPSInfoMethod · 0.85

Calls 1

LOGClass · 0.85

Tested by

no test coverage detected