diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-01-02 09:23:06 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-01-02 10:27:56 -0500 |
commit | d47f5b30d8481272e9480118bdcb283690070349 (patch) | |
tree | 589f77d62110d7456496fde754036fa24c89369d /sim/lm32 | |
parent | 32273fe68f3d1288b2eef6b96beda3732d0ac25e (diff) | |
download | gdb-d47f5b30d8481272e9480118bdcb283690070349.zip gdb-d47f5b30d8481272e9480118bdcb283690070349.tar.gz gdb-d47f5b30d8481272e9480118bdcb283690070349.tar.bz2 |
sim: delete dead current_state globals
The global current_state handle to the current simulator state is a
design idea that was half implemented, but never really cleaned up.
The point was to have a global variable pointing to the state so that
funcs could more quickly & easily access the state anywhere. We've
instead moved in the direction of passing state around everywhere and
don't have any intention of moving back.
I also can't find any references to gdb using this variable, or to
cgen related "dump_regs" functions, both of which were used in the
comments related to this code.
Diffstat (limited to 'sim/lm32')
-rw-r--r-- | sim/lm32/ChangeLog | 5 | ||||
-rw-r--r-- | sim/lm32/sim-if.c | 8 |
2 files changed, 5 insertions, 8 deletions
diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog index a7596a6..eda8a23 100644 --- a/sim/lm32/ChangeLog +++ b/sim/lm32/ChangeLog @@ -1,3 +1,8 @@ +2016-01-02 Mike Frysinger <vapier@gentoo.org> + + * sim-if.c (current_state): Delete. + (sim_open): Delete current_state assignment. + 2015-12-27 Mike Frysinger <vapier@gentoo.org> * Makefile.in (SIM_OBJS): Delete sim-hload.o. diff --git a/sim/lm32/sim-if.c b/sim/lm32/sim-if.c index 364fc7d..3f65c93 100644 --- a/sim/lm32/sim-if.c +++ b/sim/lm32/sim-if.c @@ -43,10 +43,6 @@ static const OPTION lm32_options[] = { lm32_option_handler}, {{NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL} }; - -/* Records simulator descriptor so utilities like lm32_dump_regs can be - called from gdb. */ -SIM_DESC current_state; /* Cover function of sim_state_free to free the cpu buffers as well. */ @@ -240,10 +236,6 @@ sim_open (kind, callback, abfd, argv) Must be done after lm32_cgen_cpu_open. */ cgen_init (sd); - /* Store in a global so things like lm32_dump_regs can be invoked - from the gdb command line. */ - current_state = sd; - return sd; } |