diff options
author | Linus Groh <mail@linusgroh.de> | 2020-12-30 14:46:15 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-30 15:00:17 +0100 |
commit | 761169f5c0ca021e097c1ae53da8198e739b0f64 (patch) | |
tree | 2be18ed6345c8fd46e05aa9a8f530665f8eb3e8e /Applications | |
parent | bde65ba7ca21fe7762d43e97d94ba0ca94ed90e7 (diff) | |
download | serenity-761169f5c0ca021e097c1ae53da8198e739b0f64.zip |
CrashReporter: Show PID from coredump
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/CrashReporter/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Applications/CrashReporter/main.cpp b/Applications/CrashReporter/main.cpp index 815fec911d..4c73049e81 100644 --- a/Applications/CrashReporter/main.cpp +++ b/Applications/CrashReporter/main.cpp @@ -62,6 +62,7 @@ int main(int argc, char** argv) Optional<CoreDump::Backtrace> backtrace; String executable_path; + int pid { 0 }; { auto coredump = CoreDump::Reader::create(coredump_path); @@ -72,6 +73,7 @@ int main(int argc, char** argv) auto& process_info = coredump->process_info(); backtrace = coredump->backtrace(); executable_path = String(process_info.executable_path); + pid = process_info.pid; } auto app = GUI::Application::construct(argc, argv); @@ -122,7 +124,7 @@ int main(int argc, char** argv) app_name = af->name(); auto& description_label = static_cast<GUI::Label&>(*widget.find_descendant_by_name("description")); - description_label.set_text(String::formatted("\"{}\" has crashed!", app_name)); + description_label.set_text(String::formatted("\"{}\" (PID {}) has crashed!", app_name, pid)); auto& executable_link_label = static_cast<GUI::LinkLabel&>(*widget.find_descendant_by_name("executable_link")); executable_link_label.set_text(LexicalPath::canonicalized_path(executable_path)); |