sim: run: add --argv0 option to control argv[0]

We default argv[0] to the program we run which is a standard *NIX
convention, but sometimes we want to be able to control the argv[0]
setting independently (especially for programs that inspect argv[0]
to change their behavior or output).  Add an option to control it.
This commit is contained in:
Mike Frysinger
2021-11-15 02:36:29 -05:00
parent e8f20a28b1
commit 852016f921
4 changed files with 27 additions and 4 deletions

View File

@@ -98,6 +98,7 @@ sim_state_free (SIM_DESC sd)
#endif
free (STATE_PROG_FILE (sd));
free (STATE_PROG_ARGV0 (sd));
free (sd);
}