- fixes to avoid crash after unloading plugins before simulation

- small cleanups
This commit is contained in:
Volker Ruppert 2011-12-26 20:32:56 +00:00
parent 6ae86a059b
commit 0de2516d05
7 changed files with 6 additions and 2 deletions

View File

@ -8,7 +8,7 @@
# only available when the plugin device is loaded. The value "1" means to load
# the plugin and "0" will unload it (if loaded before).
# These plugins are currently supported: 'acpi', 'biosdev', 'e1000', 'es1370',
# 'extfpuirq', 'gameport', 'iodebug', 'speaker' and 'unmapped'.
# 'extfpuirq', 'gameport', 'ioapic', 'iodebug', 'speaker' and 'unmapped'.
#=======================================================================
#plugin_ctrl: unmapped=1, biosdev=1, speaker=1, e1000=1

View File

@ -77,6 +77,7 @@ int libacpi_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char
void libacpi_LTX_plugin_fini(void)
{
bx_devices.pluginACPIController = &bx_devices.stubACPIController;
delete theACPIController;
}

View File

@ -64,6 +64,7 @@ int libgameport_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, c
void libgameport_LTX_plugin_fini(void)
{
bx_devices.pluginGameport = &bx_devices.stubGameport;
delete theGameport;
}

View File

@ -44,6 +44,7 @@ int libioapic_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, cha
void libioapic_LTX_plugin_fini(void)
{
bx_devices.pluginIOAPIC = &bx_devices.stubIOAPIC;
delete theIOAPIC;
}

View File

@ -45,6 +45,7 @@ int libiodebug_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, ch
void libiodebug_LTX_plugin_fini(void)
{
bx_devices.pluginIODebug = &bx_devices.stubIODebug;
delete theIODebugDevice;
}

View File

@ -48,6 +48,7 @@ int libspeaker_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, ch
void libspeaker_LTX_plugin_fini(void)
{
bx_devices.pluginSpeaker = &bx_devices.stubSpeaker;
delete theSpeaker;
}

View File

@ -831,7 +831,6 @@ static builtin_plugin_t builtin_opt_plugins[] = {
BUILTIN_PLUGIN_ENTRY(iodebug),
#endif
#if BX_SUPPORT_PCI
BUILTIN_PLUGIN_ENTRY(pci_ide),
BUILTIN_PLUGIN_ENTRY(acpi),
#endif
#if BX_SUPPORT_APIC