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.
This commit is contained in:
parent
32273fe68f
commit
d47f5b30d8
19 changed files with 42 additions and 86 deletions
|
@ -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.
|
||||
|
|
|
@ -37,10 +37,6 @@
|
|||
|
||||
static void free_state (SIM_DESC);
|
||||
static void print_m32r_misc_cpu (SIM_CPU *cpu, int verbose);
|
||||
|
||||
/* Records simulator descriptor so utilities like m32r_dump_regs can be
|
||||
called from gdb. */
|
||||
SIM_DESC current_state;
|
||||
|
||||
/* Cover function of sim_state_free to free the cpu buffers as well. */
|
||||
|
||||
|
@ -169,10 +165,6 @@ sim_open (kind, callback, abfd, argv)
|
|||
= print_m32r_misc_cpu;
|
||||
}
|
||||
|
||||
/* Store in a global so things like sparc32_dump_regs can be invoked
|
||||
from the gdb command line. */
|
||||
current_state = sd;
|
||||
|
||||
return sd;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue