diff mbox

Strange qdev related crash (m48t59 ISA qdev conversion)

Message ID 4AAE1074.3070203@redhat.com
State Superseded
Headers show

Commit Message

Gerd Hoffmann Sept. 14, 2009, 9:44 a.m. UTC
Hi,

> (gdb) p dev->parent_bus
> $1 = (BusState *) 0xffffffff00000000
> (gdb) p bus
> $2 = (BusState *) 0x26da770

Property definitions are wrong.

cheers,
   Gerd
From 87c75662fb5b07c9384662a360a4bc394f9da42d Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Mon, 14 Sep 2009 11:26:40 +0200
Subject: [PATCH] fix

---
 hw/m48t59.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

Comments

Blue Swirl Sept. 14, 2009, 4:24 p.m. UTC | #1
2009/9/14 Gerd Hoffmann <kraxel@redhat.com>:
>  Hi,
>
>> (gdb) p dev->parent_bus
>> $1 = (BusState *) 0xffffffff00000000
>> (gdb) p bus
>> $2 = (BusState *) 0x26da770
>
> Property definitions are wrong.

Thanks a lot, this fixes the crash!
diff mbox

Patch

diff --git a/hw/m48t59.c b/hw/m48t59.c
index a7cfb2f..b9892cc 100644
--- a/hw/m48t59.c
+++ b/hw/m48t59.c
@@ -719,9 +719,9 @@  static ISADeviceInfo m48t59_isa_info = {
     .qdev.size = sizeof(M48t59ISAState),
     .qdev.no_user = 1,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("size",    m48t59_t, size,    -1),
-        DEFINE_PROP_UINT32("type",    m48t59_t, type,    -1),
-        DEFINE_PROP_HEX32( "io_base", m48t59_t, io_base,  0),
+        DEFINE_PROP_UINT32("size",    M48t59ISAState, state.size,    -1),
+        DEFINE_PROP_UINT32("type",    M48t59ISAState, state.type,    -1),
+        DEFINE_PROP_HEX32( "io_base", M48t59ISAState, state.io_base,  0),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
@@ -731,9 +731,9 @@  static SysBusDeviceInfo m48t59_info = {
     .qdev.name  = "m48t59",
     .qdev.size = sizeof(M48t59SysBusState),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("size",    m48t59_t, size,    -1),
-        DEFINE_PROP_UINT32("type",    m48t59_t, type,    -1),
-        DEFINE_PROP_HEX32( "io_base", m48t59_t, io_base,  0),
+        DEFINE_PROP_UINT32("size",    M48t59SysBusState, state.size,    -1),
+        DEFINE_PROP_UINT32("type",    M48t59SysBusState, state.type,    -1),
+        DEFINE_PROP_HEX32( "io_base", M48t59SysBusState, state.io_base,  0),
         DEFINE_PROP_END_OF_LIST(),
     }
 };