MCPcopy Create free account
hub / github.com/QBDI/QBDI / getProcessFPR

Method getProcessFPR

tools/validator/darwin_process.cpp:301–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301void DarwinProcess::getProcessFPR(QBDI::FPRState *fprState) {
302 kern_return_t kr;
303 THREAD_STATE_FP floatState;
304 mach_msg_type_number_t count;
305
306 count = THREAD_STATE_FP_COUNT;
307 kr = thread_get_state(this->mainThread, THREAD_STATE_FP_ID,
308 (thread_state_t)&floatState, &count);
309 if (kr != KERN_SUCCESS) {
310 QBDI_ERROR("Failed to get FPR thread state: {}", mach_error_string(kr));
311 exit(QBDIPRELOAD_ERR_STARTUP_FAILED);
312 }
313
314 floatStateToFPRState(&floatState, fprState);
315}
316
317bool hasExited(int status) { return status == Status::Exited; }
318

Callers

nothing calls this directly

Calls 2

exitFunction · 0.85
floatStateToFPRStateFunction · 0.85

Tested by

no test coverage detected