MCPcopy Create free account
hub / github.com/chromium/crashpad / HandleCrashDumpRequest

Method HandleCrashDumpRequest

handler/linux/exception_handler_server.cc:441–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439}
440
441bool ExceptionHandlerServer::HandleCrashDumpRequest(
442 const ucred& creds,
443 const ExceptionHandlerProtocol::ClientInformation& client_info,
444 VMAddress requesting_thread_stack_address,
445 int client_sock,
446 bool multiple_clients) {
447 pid_t client_process_id = creds.pid;
448 pid_t requesting_thread_id = -1;
449 uid_t client_uid = creds.uid;
450
451 switch (
452 strategy_decider_->ChooseStrategy(client_sock, multiple_clients, creds)) {
453 case PtraceStrategyDecider::Strategy::kError:
454 if (multiple_clients) {
455 SendSIGCONT(client_process_id, requesting_thread_id);
456 }
457 return false;
458
459 case PtraceStrategyDecider::Strategy::kNoPtrace:
460 if (multiple_clients) {
461 SendSIGCONT(client_process_id, requesting_thread_id);
462 return true;
463 }
464 return SendMessageToClient(
465 client_sock,
466 ExceptionHandlerProtocol::ServerToClientMessage::
467 kTypeCrashDumpFailed);
468
469 case PtraceStrategyDecider::Strategy::kDirectPtrace: {
470 delegate_->HandleException(client_process_id,
471 client_uid,
472 client_info,
473 requesting_thread_stack_address,
474 &requesting_thread_id);
475 if (multiple_clients) {
476 SendSIGCONT(client_process_id, requesting_thread_id);
477 return true;
478 }
479 break;
480 }
481
482 case PtraceStrategyDecider::Strategy::kUseBroker:
483 DCHECK(!multiple_clients);
484 delegate_->HandleExceptionWithBroker(
485 client_process_id, client_uid, client_info, client_sock);
486 break;
487 }
488
489 return SendMessageToClient(
490 client_sock,
491 ExceptionHandlerProtocol::ServerToClientMessage::kTypeCrashDumpComplete);
492}
493
494} // namespace crashpad

Callers

nothing calls this directly

Calls 5

SendSIGCONTFunction · 0.85
SendMessageToClientFunction · 0.85
ChooseStrategyMethod · 0.45
HandleExceptionMethod · 0.45

Tested by

no test coverage detected