summary refs log tree commit diff stats
path: root/monitor
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2025-01-16 16:02:39 +0000
committerAlex Bennée <alex.bennee@linaro.org>2025-01-17 10:44:25 +0000
commitc0e6b8b798bee5d8772ca8db19638ec89b47c946 (patch)
tree377b31ac2186076bc2f9eeaebdc68ad9c14bb238 /monitor
parent05cdd648a846bd60e300fcfa1eabf8f20e589cba (diff)
downloadfocaccia-qemu-c0e6b8b798bee5d8772ca8db19638ec89b47c946.tar.gz
focaccia-qemu-c0e6b8b798bee5d8772ca8db19638ec89b47c946.zip
system: propagate Error to gdbserver_start (and other device setups)
This started as a clean-up to properly pass a Error handler to the
gdbserver_start so we could do the right thing for command line and
HMP invocations.

Now that we have cleaned up foreach_device_config_or_exit() in earlier
patches we can further simplify by it by passing &error_fatal instead
of checking the return value. Having a return value is still useful
for HMP though so tweak the return to use a simple bool instead.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20250116160306.1709518-11-alex.bennee@linaro.org>
Diffstat (limited to 'monitor')
-rw-r--r--monitor/hmp-cmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index 80b2e5ff9f..0aa22e1ae2 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -285,7 +285,7 @@ void hmp_gdbserver(Monitor *mon, const QDict *qdict)
         device = "tcp::" DEFAULT_GDBSTUB_PORT;
     }
 
-    if (gdbserver_start(device) < 0) {
+    if (!gdbserver_start(device, &error_warn)) {
         monitor_printf(mon, "Could not open gdbserver on device '%s'\n",
                        device);
     } else if (strcmp(device, "none") == 0) {