diff options
| author | Markus Armbruster <armbru@redhat.com> | 2025-09-23 11:09:48 +0200 |
|---|---|---|
| committer | Markus Armbruster <armbru@redhat.com> | 2025-09-30 14:43:52 +0200 |
| commit | 548f1abacbcd53947060a8b05b74d5d1539f87b3 (patch) | |
| tree | 6a717c97664080fe8ee89250d662902f5ba425e8 /scripts/lib | |
| parent | 9b16edec6e9a483469c789475b2065d26b52db35 (diff) | |
| download | qemu-548f1abacbcd53947060a8b05b74d5d1539f87b3.zip qemu-548f1abacbcd53947060a8b05b74d5d1539f87b3.tar.gz qemu-548f1abacbcd53947060a8b05b74d5d1539f87b3.tar.bz2 | |
monitor: Clean up HMP gdbserver error reporting
HMP command gdbserver used to emit two error messages for certain
errors. For instance, with -M none:
(qemu) gdbserver
gdbstub: meaningless to attach gdb to a machine without any CPU.
Could not open gdbserver on device 'tcp::1234'
The first message is the specific error, and the second one a generic
additional message that feels superfluous to me.
Commit c0e6b8b798b (system: propagate Error to gdbserver_start (and
other device setups)) turned the first message into a warning:
warning: gdbstub: meaningless to attach gdb to a machine without any CPU.
Could not open gdbserver on device 'tcp::1234'
This is arguably worse.
hmp_gdbserver() passes &error_warn to gdbserver_start(), so that
failure gets reported as warning, and then additionally emits the
generic error on failure. This is a misuse of &error_warn.
Instead, receive the error in &err and report it, as usual. With
this, gdbserver reports just the error:
gdbstub: meaningless to attach gdb to a machine without any CPU.
Cc: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20250923091000.3180122-2-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Diffstat (limited to 'scripts/lib')
0 files changed, 0 insertions, 0 deletions
