- remove registered device state in destructor (fixes crash on Bochs exit with
MSVC plugins)
This commit is contained in:
parent
a4ce74a158
commit
a2dd985aef
@ -117,6 +117,7 @@ bx_acpi_ctrl_c::bx_acpi_ctrl_c()
|
||||
|
||||
bx_acpi_ctrl_c::~bx_acpi_ctrl_c()
|
||||
{
|
||||
SIM->get_bochs_root()->remove("acpi");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -56,6 +56,7 @@ bx_busm_c::bx_busm_c()
|
||||
|
||||
bx_busm_c::~bx_busm_c()
|
||||
{
|
||||
SIM->get_bochs_root()->remove("busmouse");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -138,6 +138,7 @@ bx_cmos_c::~bx_cmos_c(void)
|
||||
BX_INFO(("Last time is %u (%s)", (unsigned) get_timeval(), tmptime));
|
||||
free(tmptime);
|
||||
}
|
||||
SIM->get_bochs_root()->remove("cmos");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -62,6 +62,7 @@ bx_dma_c::bx_dma_c()
|
||||
|
||||
bx_dma_c::~bx_dma_c()
|
||||
{
|
||||
SIM->get_bochs_root()->remove("dma");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -144,6 +144,7 @@ bx_floppy_ctrl_c::~bx_floppy_ctrl_c()
|
||||
SIM->get_param_bool("readonly", floppy)->set_handler(NULL);
|
||||
SIM->get_param_bool("status", floppy)->set_handler(NULL);
|
||||
}
|
||||
SIM->get_bochs_root()->remove("floppy");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -77,6 +77,7 @@ bx_gameport_c::bx_gameport_c()
|
||||
bx_gameport_c::~bx_gameport_c()
|
||||
{
|
||||
if (joyfd >= 0) close(joyfd);
|
||||
SIM->get_bochs_root()->remove("gameport");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -161,6 +161,7 @@ bx_hard_drive_c::~bx_hard_drive_c()
|
||||
SIM->get_param_bool("status", base)->set_handler(NULL);
|
||||
}
|
||||
}
|
||||
SIM->get_bochs_root()->remove("hard_drive");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -125,6 +125,12 @@ bx_ioapic_c::bx_ioapic_c(): base_addr(BX_IOAPIC_BASE_ADDR)
|
||||
put("ioapic", "IOAP");
|
||||
}
|
||||
|
||||
bx_ioapic_c::~bx_ioapic_c()
|
||||
{
|
||||
SIM->get_bochs_root()->remove("ioapic");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
void bx_ioapic_c::init(void)
|
||||
{
|
||||
BX_INFO(("initializing I/O APIC"));
|
||||
|
@ -74,7 +74,7 @@ public:
|
||||
class bx_ioapic_c : public bx_ioapic_stub_c {
|
||||
public:
|
||||
bx_ioapic_c();
|
||||
virtual ~bx_ioapic_c() {}
|
||||
virtual ~bx_ioapic_c();
|
||||
virtual void init();
|
||||
virtual void reset(unsigned type);
|
||||
virtual void register_state(void);
|
||||
|
@ -90,6 +90,7 @@ bx_keyb_c::~bx_keyb_c()
|
||||
if (pastebuf != NULL) {
|
||||
delete [] pastebuf;
|
||||
}
|
||||
SIM->get_bochs_root()->remove("keyboard");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -426,6 +426,7 @@ bx_e1000_c::~bx_e1000_c()
|
||||
if (ethdev != NULL) {
|
||||
delete ethdev;
|
||||
}
|
||||
SIM->get_bochs_root()->remove("e1000");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -194,6 +194,7 @@ bx_ne2k_c::~bx_ne2k_c()
|
||||
if (ethdev != NULL) {
|
||||
delete ethdev;
|
||||
}
|
||||
SIM->get_bochs_root()->remove("ne2k");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -128,6 +128,7 @@ bx_pcipnic_c::~bx_pcipnic_c()
|
||||
if (ethdev != NULL) {
|
||||
delete ethdev;
|
||||
}
|
||||
SIM->get_bochs_root()->remove("pcipnic");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -152,6 +152,7 @@ bx_parallel_c::~bx_parallel_c()
|
||||
if (s[i].output != NULL)
|
||||
fclose(s[i].output);
|
||||
}
|
||||
SIM->get_bochs_root()->remove("parallel");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -61,6 +61,7 @@ bx_pci_bridge_c::bx_pci_bridge_c()
|
||||
|
||||
bx_pci_bridge_c::~bx_pci_bridge_c()
|
||||
{
|
||||
SIM->get_bochs_root()->remove("pci_bridge");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -62,6 +62,7 @@ bx_piix3_c::bx_piix3_c()
|
||||
|
||||
bx_piix3_c::~bx_piix3_c()
|
||||
{
|
||||
SIM->get_bochs_root()->remove("pci2isa");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -70,6 +70,7 @@ bx_pci_ide_c::~bx_pci_ide_c()
|
||||
if (s.bmdma[1].buffer != NULL) {
|
||||
delete [] s.bmdma[1].buffer;
|
||||
}
|
||||
SIM->get_bochs_root()->remove("pci_ide");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -55,6 +55,7 @@ bx_pic_c::bx_pic_c(void)
|
||||
|
||||
bx_pic_c::~bx_pic_c(void)
|
||||
{
|
||||
SIM->get_bochs_root()->remove("pic");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -89,6 +89,12 @@ bx_pit_c::bx_pit_c()
|
||||
s.timer_handle[0] = BX_NULL_TIMER_HANDLE;
|
||||
}
|
||||
|
||||
bx_pit_c::~bx_pit_c()
|
||||
{
|
||||
SIM->get_bochs_root()->remove("pit");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
void bx_pit_c::init(void)
|
||||
{
|
||||
DEV_register_irq(0, "8254 PIT");
|
||||
|
@ -35,7 +35,7 @@
|
||||
class bx_pit_c : public bx_devmodel_c {
|
||||
public:
|
||||
bx_pit_c();
|
||||
virtual ~bx_pit_c() {}
|
||||
virtual ~bx_pit_c();
|
||||
virtual void init(void);
|
||||
virtual void reset(unsigned type);
|
||||
virtual void register_state(void);
|
||||
|
@ -237,6 +237,7 @@ bx_serial_c::~bx_serial_c(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
SIM->get_bochs_root()->remove("serial");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -185,6 +185,7 @@ bx_es1370_c::~bx_es1370_c()
|
||||
}
|
||||
delete soundmod;
|
||||
|
||||
SIM->get_bochs_root()->remove("es1370");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -271,6 +271,7 @@ bx_sb16_c::~bx_sb16_c(void)
|
||||
if ((SIM->get_param_num(BXPN_SB16_LOGLEVEL)->get() > 0) && LOGFILE)
|
||||
fclose(LOGFILE);
|
||||
|
||||
SIM->get_bochs_root()->remove("sb16");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -247,6 +247,7 @@ bx_svga_cirrus_c::bx_svga_cirrus_c() : bx_vgacore_c()
|
||||
|
||||
bx_svga_cirrus_c::~bx_svga_cirrus_c()
|
||||
{
|
||||
SIM->get_bochs_root()->remove("svga_cirrus");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -149,6 +149,7 @@ bx_usb_ohci_c::~bx_usb_ohci_c()
|
||||
remove_device(i);
|
||||
}
|
||||
|
||||
SIM->get_bochs_root()->remove("usb_ohci");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -122,6 +122,7 @@ bx_usb_uhci_c::~bx_usb_uhci_c()
|
||||
remove_device(i);
|
||||
}
|
||||
|
||||
SIM->get_bochs_root()->remove("usb_uhci");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -146,6 +146,7 @@ bx_usb_xhci_c::~bx_usb_xhci_c()
|
||||
remove_device(i);
|
||||
}
|
||||
|
||||
SIM->get_bochs_root()->remove("usb_xhci");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
@ -82,6 +82,7 @@ bx_vga_c::bx_vga_c() : bx_vgacore_c()
|
||||
|
||||
bx_vga_c::~bx_vga_c()
|
||||
{
|
||||
SIM->get_bochs_root()->remove("vga");
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user