11.7. gem5 syscall emulation mode
Less robust than QEMU’s, but still usable:
There are much more unimplemented syscalls in gem5 than in QEMU. Many of those are trivial to implement however.
So let’s just play with some static ones:
./build-userland --arch aarch64 ./run \ --arch aarch64 \ --emulator gem5 \ --userland userland/c/command_line_arguments.c \ --cli-args 'asdf "qw er"' \ ;
TODO: how to escape spaces on the command line arguments?
GDB step debug also works normally on gem5:
./run \ --arch aarch64 \ --emulator gem5 \ --gdb-wait \ --userland userland/c/command_line_arguments.c \ --cli-args 'asdf "qw er"' \ ; ./run-gdb \ --arch aarch64 \ --emulator gem5 \ --userland userland/c/command_line_arguments.c \ main \ ;