Lines Matching defs:request

216         LOG("invalid crash request of size %d\n", status);
232 LOG("tid %d does not exist in pid %d. ignoring debug request\n",
243 LOG("tid %d does not exist. ignoring explicit dump request\n",
254 static bool should_attach_gdb(debugger_request_t* request) {
255 if (request->action == DEBUGGER_ACTION_CRASH) {
259 return debug_uid >= 0 && request->uid <= (uid_t)debug_uid;
267 debugger_request_t request;
268 int status = read_request(fd, &request);
271 request.pid, request.uid, request.gid, request.tid);
273 /* At this point, the thread that made the request is blocked in
284 if (ptrace(PTRACE_ATTACH, request.tid, 0, 0)) {
288 bool attach_gdb = should_attach_gdb(&request);
294 if (request.action == DEBUGGER_ACTION_CRASH) {
301 int signal = wait_for_signal(request.tid, &total_sleep_time_usec);
308 if (request.action == DEBUGGER_ACTION_DUMP_TOMBSTONE) {
310 tombstone_path = engrave_tombstone(request.pid, request.tid,
313 } else if (request.action == DEBUGGER_ACTION_DUMP_BACKTRACE) {
315 dump_backtrace(fd, request.pid, request.tid, &detach_failed,
319 status = ptrace(PTRACE_CONT, request.tid, 0, 0);
344 kill(request.pid, SIGSTOP);
347 tombstone_path = engrave_tombstone(request.pid, request.tid,
361 if (request.action == DEBUGGER_ACTION_DUMP_TOMBSTONE) {
374 kill(request.pid, SIGSTOP);
377 if (ptrace(PTRACE_DETACH, request.tid, 0, 0)) {
378 LOG("ptrace detach from %d failed: %s\n", request.tid, strerror(errno));
388 wait_for_user_action(request.pid);
391 if (ptrace(PTRACE_DETACH, request.tid, 0, 0)) {
392 LOG("ptrace detach from %d failed: %s\n", request.tid, strerror(errno));
398 kill(request.pid, SIGCONT);
476 fprintf(stdout, "Sending request to dump task %d.\n", tid);
499 "If tid specified, sends a request to debuggerd to dump that task.\n"