mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:17:34 +00:00
Kernel+LibELF+LibCoreDump+CrashReporter: Use JSON for ProcessInfo
This is in preparation of adding (much) more process information to coredumps. As we can only have one null-terminated char[] of arbitrary length in each struct it's now a single JSON blob, which is a great fit: easily extensible in the future and allows for key/value pairs and even nested objects, which will be used e.g. for the process environment, for example.
This commit is contained in:
parent
7ad9b116f7
commit
568cde5e23
5 changed files with 72 additions and 21 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Linus Groh <mail@linusgroh.de>
|
||||
* Copyright (c) 2020-2021, Linus Groh <mail@linusgroh.de>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -96,11 +96,10 @@ int main(int argc, char** argv)
|
|||
warnln("Could not open coredump '{}'", coredump_path);
|
||||
return 1;
|
||||
}
|
||||
auto& process_info = coredump->process_info();
|
||||
backtrace = build_backtrace(*coredump);
|
||||
executable_path = String(process_info.executable_path);
|
||||
pid = process_info.pid;
|
||||
termination_signal = process_info.termination_signal;
|
||||
executable_path = coredump->process_executable_path();
|
||||
pid = coredump->process_pid();
|
||||
termination_signal = coredump->process_termination_signal();
|
||||
}
|
||||
|
||||
auto app = GUI::Application::construct(argc, argv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue