1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

Kernel: Store process arguments and environment in coredumps

Currently they're only pushed onto the stack but not easily accessible
from the Process class, so this adds a Vector<String> for both.
This commit is contained in:
Linus Groh 2021-01-15 20:21:03 +01:00 committed by Andreas Kling
parent 7668e968af
commit 1ccc2e6482
4 changed files with 14 additions and 0 deletions

View file

@ -400,6 +400,9 @@ public:
Custody* executable() { return m_executable.ptr(); }
const Custody* executable() const { return m_executable.ptr(); }
const Vector<String>& arguments() const { return m_arguments; };
const Vector<String>& environment() const { return m_environment; };
int number_of_open_file_descriptors() const;
int max_open_file_descriptors() const
{
@ -614,6 +617,9 @@ private:
RefPtr<Custody> m_root_directory;
RefPtr<Custody> m_root_directory_relative_to_global_root;
Vector<String> m_arguments;
Vector<String> m_environment;
RefPtr<TTY> m_tty;
Region* find_region_from_range(const Range&);