Home | History | Annotate | Download | only in debuggerd

Lines Matching refs:request

56 static void wait_for_user_action(const debugger_request_t &request) {
59 snprintf(path, sizeof(path), "/proc/%d/exe", request.pid);
81 request.pid, exe, request.tid);
96 ALOGI("debuggerd resuming process %d", request.pid);
157 ALOGE("invalid crash request of size %d (from pid=%d uid=%d)\n", status, cr.pid, cr.uid);
175 ALOGE("tid %d does not exist in pid %d. ignoring debug request\n",
186 ALOGE("tid %d does not exist. ignoring explicit dump request\n", out_request->tid);
196 static bool should_attach_gdb(debugger_request_t* request) {
197 if (request->action == DEBUGGER_ACTION_CRASH) {
201 return debug_uid >= 0 && request->uid <= (uid_t)debug_uid;
209 debugger_request_t request;
210 memset(&request, 0, sizeof(request));
211 int status = read_request(fd, &request);
214 request.pid, request.uid, request.gid, request.tid);
216 // At this point, the thread that made the request is blocked in
226 if (ptrace(PTRACE_ATTACH, request.tid, 0, 0)) {
230 bool attach_gdb = should_attach_gdb(&request);
236 if (request.action == DEBUGGER_ACTION_CRASH) {
243 int signal = wait_for_signal(request.tid, &total_sleep_time_usec);
250 if (request.action == DEBUGGER_ACTION_DUMP_TOMBSTONE) {
252 tombstone_path = engrave_tombstone(request.pid, request.tid,
253 signal, request.original_si_code,
254 request.abort_msg_address, true,
256 } else if (request.action == DEBUGGER_ACTION_DUMP_BACKTRACE) {
258 dump_backtrace(fd, -1, request.pid, request.tid, &detach_failed,
262 status = ptrace(PTRACE_CONT, request.tid, 0, 0);
285 kill(request.pid, SIGSTOP);
288 tombstone_path = engrave_tombstone(request.pid, request.tid,
289 signal, request.original_si_code,
290 request.abort_msg_address, !attach_gdb,
301 if (request.action == DEBUGGER_ACTION_DUMP_TOMBSTONE) {
314 kill(request.pid, SIGSTOP);
317 if (ptrace(PTRACE_DETACH, request.tid, 0, 0)) {
318 ALOGE("ptrace detach from %d failed: %s\n", request.tid, strerror(errno));
326 wait_for_user_action(request);
329 if (ptrace(PTRACE_DETACH, request.tid, 0, 0)) {
330 ALOGE("ptrace detach from %d failed: %s\n", request.tid, strerror(errno));
336 kill(request.pid, SIGCONT);
409 fprintf(stdout, "Sending request to dump task %d.\n", tid);
432 "If tid specified, sends a request to debuggerd to dump that task.\n"