qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 02/11] hw//sh4: Use qemu_log instead of fprintf to stderr


From: BALATON Zoltan
Subject: Re: [PATCH v2 02/11] hw//sh4: Use qemu_log instead of fprintf to stderr
Date: Wed, 27 Oct 2021 18:13:47 +0200 (CEST)

On Wed, 27 Oct 2021, Philippe Mathieu-Daudé wrote:
On 10/27/21 15:46, BALATON Zoltan wrote:
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
 hw/char/sh_serial.c |  7 ++++---
 hw/sh4/sh7750.c     | 13 ++++++-------
 2 files changed, 10 insertions(+), 10 deletions(-)

     case SH7750_GPIOIC_A7:
         s->gpioic = mem_value;
         if (mem_value != 0) {
-            fprintf(stderr, "I/O interrupts not implemented\n");
+            qemu_log_mask(LOG_UNIMP, "I/O interrupts not implemented\n");
             abort();

This change is annoying. Before you'd get an error message and the abort
signal. Now if you don't use "-d unimp" you get an abort without
explanation. Can we use error_report() instead?

I plan to remove the aborts later. What's annoying is that the guest can crash QEMU by doing something invalid. Other devices don't do this just report the error with LOG_UNIMP and continue even if it will not work so I follow that convention but did not yet cleaned up the aborts.

Regards,
BALATON Zoltan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]