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/cris | |
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/cris')
-rw-r--r-- | sim/cris/ChangeLog | 5 | ||||
-rw-r--r-- | sim/cris/sim-if.c | 8 |
2 files changed, 5 insertions, 8 deletions
diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog index 9bf94f9..df428e7 100644 --- a/sim/cris/ChangeLog +++ b/sim/cris/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-30 Mike Frysinger <vapier@gentoo.org> * sim-if.c (sim_open): Delete current_target_byte_order assignment. diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c index eba9dc9..cf680cf 100644 --- a/sim/cris/sim-if.c +++ b/sim/cris/sim-if.c @@ -81,10 +81,6 @@ static int cris_program_offset = 0; enum cris_unknown_syscall_action_type cris_unknown_syscall_action = CRIS_USYSC_MSG_STOP; -/* Records simulator descriptor so utilities like cris_dump_regs can be - called from gdb. */ -SIM_DESC current_state; - /* CRIS-specific options. */ typedef enum { OPTION_CRIS_STATS = OPTION_START, @@ -985,10 +981,6 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, Must be done after cris_cgen_cpu_open. */ cgen_init (sd); - /* Store in a global so things like cris_dump_regs can be invoked - from the gdb command line. */ - current_state = sd; - cris_set_callbacks (callback); return sd; |