diff options
Diffstat (limited to 'sim/ft32')
-rw-r--r-- | sim/ft32/ChangeLog | 4 | ||||
-rw-r--r-- | sim/ft32/interp.c | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog index a306ffe..b246467 100644 --- a/sim/ft32/ChangeLog +++ b/sim/ft32/ChangeLog @@ -1,3 +1,7 @@ +2015-12-26 Mike Frysinger <vapier@gentoo.org> + + * interp.c (sim_create_inferior): Update comment and argv check. + 2015-11-15 Mike Frysinger <vapier@gentoo.org> * Makefile.in (SIM_OBJS): Delete sim-reason.o, sim-reg.o, and diff --git a/sim/ft32/interp.c b/sim/ft32/interp.c index e2762b8..63ce77b 100644 --- a/sim/ft32/interp.c +++ b/sim/ft32/interp.c @@ -877,7 +877,11 @@ sim_create_inferior (SIM_DESC sd, else addr = 0; - if (STATE_OPEN_KIND (sd) == SIM_OPEN_DEBUG) + /* Standalone mode (i.e. `run`) will take care of the argv for us in + sim_open() -> sim_parse_args(). But in debug mode (i.e. 'target sim' + with `gdb`), we need to handle it because the user can change the + argv on the fly via gdb's 'run'. */ + if (STATE_PROG_ARGV (sd) != argv) { freeargv (STATE_PROG_ARGV (sd)); STATE_PROG_ARGV (sd) = dupargv (argv); |