The next-cube code contains some assert() and abort() statements that
can be triggered from the guest side. Of course LLMs love to complain
about those and people are filing bugs about this. Thus replace those
spots with logging functions to not get bothered about this again in
the future.

Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4303
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4304
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4305
Signed-off-by: Thomas Huth <[email protected]>
---
 hw/m68k/next-cube.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
index 9a0a57c0cc..c541e6d00c 100644
--- a/hw/m68k/next-cube.c
+++ b/hw/m68k/next-cube.c
@@ -30,6 +30,7 @@
 #include "hw/core/qdev-properties.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
+#include "qemu/log.h"
 #include "ui/console.h"
 #include "target/m68k/cpu.h"
 #include "migration/vmstate.h"
@@ -620,8 +621,7 @@ static void nextdma_write(void *opaque, uint8_t *buf, int 
size, int type)
 
 static void nextscsi_read(void *opaque, uint8_t *buf, int len)
 {
-    DPRINTF("SCSI READ: %x\n", len);
-    abort();
+    qemu_log_mask(LOG_UNIMP, "nextscsi_read with len = %d\n", len);
 }
 
 static void nextscsi_write(void *opaque, uint8_t *buf, int size)
@@ -825,7 +825,8 @@ static void next_floppy_write(void *opaque, hwaddr addr, 
uint64_t val,
         break;
 
     default:
-        g_assert_not_reached();
+        qemu_log_mask(LOG_UNIMP, "next_floppy_write at addr 
0x%"HWADDR_PRIx"\n",
+                      addr);
     }
 }
 
@@ -840,7 +841,8 @@ static uint64_t next_floppy_read(void *opaque, hwaddr addr, 
unsigned size)
         break;
 
     default:
-        g_assert_not_reached();
+        qemu_log_mask(LOG_UNIMP, "next_floppy_read at addr 0x%"HWADDR_PRIx"\n",
+                      addr);
     }
 
     return val;
-- 
2.55.0


Reply via email to