Loading debuggerd/crash_dump.cpp +15 −11 Original line number Diff line number Diff line Loading @@ -190,6 +190,19 @@ static bool g_tombstoned_connected = false; static unique_fd g_tombstoned_socket; static unique_fd g_output_fd; static void DefuseSignalHandlers() { // Don't try to dump ourselves. struct sigaction action = {}; action.sa_handler = SIG_DFL; debuggerd_register_handlers(&action); sigset_t mask; sigemptyset(&mask); if (sigprocmask(SIG_SETMASK, &mask, nullptr) != 0) { PLOG(FATAL) << "failed to set signal mask"; } } static void Initialize(char** argv) { android::base::InitLogging(argv); android::base::SetAborter([](const char* abort_msg) { Loading @@ -213,17 +226,6 @@ static void Initialize(char** argv) { _exit(1); }); // Don't try to dump ourselves. struct sigaction action = {}; action.sa_handler = SIG_DFL; debuggerd_register_handlers(&action); sigset_t mask; sigemptyset(&mask); if (sigprocmask(SIG_SETMASK, &mask, nullptr) != 0) { PLOG(FATAL) << "failed to set signal mask"; } } static void ParseArgs(int argc, char** argv, pid_t* pseudothread_tid, DebuggerdDumpType* dump_type) { Loading Loading @@ -321,6 +323,8 @@ static pid_t wait_for_vm_process(pid_t pseudothread_tid) { } int main(int argc, char** argv) { DefuseSignalHandlers(); atrace_begin(ATRACE_TAG, "before reparent"); pid_t target_process = getppid(); Loading debuggerd/libdebuggerd/tombstone.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -418,8 +418,10 @@ static bool dump_thread(log_t* log, BacktraceMap* map, Memory* process_memory, dump_registers(log, thread_info.registers.get()); // Unwind will mutate the registers, so make a copy first. std::unique_ptr<Regs> regs_copy(thread_info.registers->Clone()); std::vector<backtrace_frame_data_t> frames; if (!Backtrace::Unwind(thread_info.registers.get(), map, &frames, 0, nullptr)) { if (!Backtrace::Unwind(regs_copy.get(), map, &frames, 0, nullptr)) { _LOG(log, logtype::THREAD, "Failed to unwind"); return false; } Loading init/init_first_stage.cpp +1 −4 Original line number Diff line number Diff line Loading @@ -119,10 +119,7 @@ static bool inline IsRecoveryMode() { FirstStageMount::FirstStageMount() : need_dm_verity_(false), device_tree_fstab_(fs_mgr_read_fstab_dt(), fs_mgr_free_fstab) { if (!device_tree_fstab_) { // The client of FirstStageMount should check the existence of fstab in device-tree // in advance, without parsing it. Reaching here means there is a FATAL error when // parsing the fstab. So stop here to expose the failure. LOG(FATAL) << "Failed to read fstab from device tree"; LOG(INFO) << "Failed to read fstab from device tree"; return; } // Stores device_tree_fstab_->recs[] into mount_fstab_recs_ (vector<fstab_rec*>) Loading libunwindstack/RegsArm.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -197,4 +197,8 @@ bool RegsArm::StepIfSignalHandler(uint64_t rel_pc, Elf* elf, Memory* process_mem return true; } Regs* RegsArm::Clone() { return new RegsArm(*this); } } // namespace unwindstack libunwindstack/RegsArm64.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -148,4 +148,8 @@ bool RegsArm64::StepIfSignalHandler(uint64_t rel_pc, Elf* elf, Memory* process_m return true; } Regs* RegsArm64::Clone() { return new RegsArm64(*this); } } // namespace unwindstack Loading
debuggerd/crash_dump.cpp +15 −11 Original line number Diff line number Diff line Loading @@ -190,6 +190,19 @@ static bool g_tombstoned_connected = false; static unique_fd g_tombstoned_socket; static unique_fd g_output_fd; static void DefuseSignalHandlers() { // Don't try to dump ourselves. struct sigaction action = {}; action.sa_handler = SIG_DFL; debuggerd_register_handlers(&action); sigset_t mask; sigemptyset(&mask); if (sigprocmask(SIG_SETMASK, &mask, nullptr) != 0) { PLOG(FATAL) << "failed to set signal mask"; } } static void Initialize(char** argv) { android::base::InitLogging(argv); android::base::SetAborter([](const char* abort_msg) { Loading @@ -213,17 +226,6 @@ static void Initialize(char** argv) { _exit(1); }); // Don't try to dump ourselves. struct sigaction action = {}; action.sa_handler = SIG_DFL; debuggerd_register_handlers(&action); sigset_t mask; sigemptyset(&mask); if (sigprocmask(SIG_SETMASK, &mask, nullptr) != 0) { PLOG(FATAL) << "failed to set signal mask"; } } static void ParseArgs(int argc, char** argv, pid_t* pseudothread_tid, DebuggerdDumpType* dump_type) { Loading Loading @@ -321,6 +323,8 @@ static pid_t wait_for_vm_process(pid_t pseudothread_tid) { } int main(int argc, char** argv) { DefuseSignalHandlers(); atrace_begin(ATRACE_TAG, "before reparent"); pid_t target_process = getppid(); Loading
debuggerd/libdebuggerd/tombstone.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -418,8 +418,10 @@ static bool dump_thread(log_t* log, BacktraceMap* map, Memory* process_memory, dump_registers(log, thread_info.registers.get()); // Unwind will mutate the registers, so make a copy first. std::unique_ptr<Regs> regs_copy(thread_info.registers->Clone()); std::vector<backtrace_frame_data_t> frames; if (!Backtrace::Unwind(thread_info.registers.get(), map, &frames, 0, nullptr)) { if (!Backtrace::Unwind(regs_copy.get(), map, &frames, 0, nullptr)) { _LOG(log, logtype::THREAD, "Failed to unwind"); return false; } Loading
init/init_first_stage.cpp +1 −4 Original line number Diff line number Diff line Loading @@ -119,10 +119,7 @@ static bool inline IsRecoveryMode() { FirstStageMount::FirstStageMount() : need_dm_verity_(false), device_tree_fstab_(fs_mgr_read_fstab_dt(), fs_mgr_free_fstab) { if (!device_tree_fstab_) { // The client of FirstStageMount should check the existence of fstab in device-tree // in advance, without parsing it. Reaching here means there is a FATAL error when // parsing the fstab. So stop here to expose the failure. LOG(FATAL) << "Failed to read fstab from device tree"; LOG(INFO) << "Failed to read fstab from device tree"; return; } // Stores device_tree_fstab_->recs[] into mount_fstab_recs_ (vector<fstab_rec*>) Loading
libunwindstack/RegsArm.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -197,4 +197,8 @@ bool RegsArm::StepIfSignalHandler(uint64_t rel_pc, Elf* elf, Memory* process_mem return true; } Regs* RegsArm::Clone() { return new RegsArm(*this); } } // namespace unwindstack
libunwindstack/RegsArm64.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -148,4 +148,8 @@ bool RegsArm64::StepIfSignalHandler(uint64_t rel_pc, Elf* elf, Memory* process_m return true; } Regs* RegsArm64::Clone() { return new RegsArm64(*this); } } // namespace unwindstack