UserspaceEmulator: Put the executable name in argv[0] :^)

The emulated program can now find its own name in argv[0]. Very cool!
This commit is contained in:
Andreas Kling 2020-07-12 20:24:10 +02:00
commit 079021a607
Notes: sideshowbarker 2024-07-19 04:53:22 +09:00
5 changed files with 23 additions and 6 deletions

View file

@ -37,7 +37,7 @@ namespace UserspaceEmulator {
class Emulator {
public:
explicit Emulator(NonnullRefPtr<ELF::Loader>);
Emulator(const String& executable_path, NonnullRefPtr<ELF::Loader>);
bool load_elf();
void dump_backtrace();
@ -63,6 +63,8 @@ private:
bool m_shutdown { false };
int m_exit_status { 0 };
String m_executable_path;
};
}