sim: sim-close: unify sim_close logic
authorMike Frysinger <vapier@gentoo.org>
Mon, 23 Mar 2015 03:10:09 +0000 (23:10 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sun, 15 Nov 2015 07:30:19 +0000 (02:30 -0500)
commit6e4f085c7f459e0777a71bcb61ed3aa8257fa386
treee2d1bc33b00d55f6765b8cc8cebb41b4cda7cb81
parent1bd1b714219e1c8324cc2fb5feb4496e80b6adfd
sim: sim-close: unify sim_close logic

Other than the nice advantage of all sims having to declare one fewer
common function, this also fixes leakage in pretty much every sim.
Many were not freeing any resources, and a few were inconsistent as
to the ones they did.  Now we have a single module that takes care of
all the logic for us.

Most of the non-cgen based ones could be deleted outright.  The cgen
ones required adding a callback to the arch-specific cleanup func.
The few that still have close callbacks are to manage their internal
state.

We do not convert erc32, m32c, ppc, rl78, or rx as they do not use
the common sim core.
50 files changed:
sim/arm/ChangeLog
sim/arm/wrapper.c
sim/avr/ChangeLog
sim/avr/interp.c
sim/bfin/ChangeLog
sim/bfin/interp.c
sim/common/ChangeLog
sim/common/Make-common.in
sim/common/sim-close.c [new file with mode: 0644]
sim/cr16/ChangeLog
sim/cr16/interp.c
sim/cris/ChangeLog
sim/cris/sim-if.c
sim/d10v/ChangeLog
sim/d10v/interp.c
sim/frv/ChangeLog
sim/frv/sim-if.c
sim/frv/sim-main.h
sim/ft32/ChangeLog
sim/ft32/interp.c
sim/h8300/ChangeLog
sim/h8300/compile.c
sim/iq2000/ChangeLog
sim/iq2000/sim-if.c
sim/lm32/ChangeLog
sim/lm32/sim-if.c
sim/m32r/ChangeLog
sim/m32r/sim-if.c
sim/m68hc11/ChangeLog
sim/m68hc11/interp.c
sim/mcore/ChangeLog
sim/mcore/interp.c
sim/microblaze/ChangeLog
sim/microblaze/interp.c
sim/mips/ChangeLog
sim/mips/interp.c
sim/mips/sim-main.h
sim/mn10300/ChangeLog
sim/mn10300/interp.c
sim/moxie/ChangeLog
sim/moxie/interp.c
sim/msp430/ChangeLog
sim/msp430/msp430-sim.c
sim/msp430/sim-main.h
sim/sh/ChangeLog
sim/sh/interp.c
sim/sh64/ChangeLog
sim/sh64/sim-if.c
sim/v850/ChangeLog
sim/v850/interp.c