diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-11-15 02:36:29 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-11-15 02:53:31 -0500 |
commit | 852016f92107581dbc9513196c9a74a91b5a5b6e (patch) | |
tree | 0e785165301066a263f61f38c94ee8b272239bc7 /sim/common/sim-utils.c | |
parent | e8f20a28b1192d746475f045d77ac84411f164df (diff) | |
download | binutils-852016f92107581dbc9513196c9a74a91b5a5b6e.zip binutils-852016f92107581dbc9513196c9a74a91b5a5b6e.tar.gz binutils-852016f92107581dbc9513196c9a74a91b5a5b6e.tar.bz2 |
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.
Diffstat (limited to 'sim/common/sim-utils.c')
-rw-r--r-- | sim/common/sim-utils.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sim/common/sim-utils.c b/sim/common/sim-utils.c index 0e8cd5a..6f147b2 100644 --- a/sim/common/sim-utils.c +++ b/sim/common/sim-utils.c @@ -98,6 +98,7 @@ sim_state_free (SIM_DESC sd) #endif free (STATE_PROG_FILE (sd)); + free (STATE_PROG_ARGV0 (sd)); free (sd); } |