All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] gdbstub: don't crash if no gdb attached and gdb syscall attempted
@ 2022-05-26 19:00 Peter Maydell
  2022-05-26 19:00 ` [PATCH 1/2] gdbstub: Don't use GDB syscalls if no GDB is attached Peter Maydell
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Peter Maydell @ 2022-05-26 19:00 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alex Bennée, Richard Henderson, Philippe Mathieu-Daudé,
	Liviu Ionescu

This patchset fixes a couple of bugs reported by
Liviu Ionescu related to semihosting syscall handling.

Firstly, if the user sets up the gdbstub but doesn't connect a gdb
(ie passes '-s' but not '-S'), and we try to use gdb for semihosting
syscalls (either because the user explicitly set target=gdb or else
via autodetection) then we currently segfault.  This patch adjusts
the behaviour so that "gdbstub initialized but no gdb attached to a
vCPU" is treated the same way we already treat "gdbstub not
initialized".

Secondly, we weren't handling commandlines where
--semihosting-config appears multiple times: these ought to be
merged together but instead we were effectively ignoring
all but the last one.

thanks
-- PMM

Peter Maydell (2):
  gdbstub: Don't use GDB syscalls if no GDB is attached
  semihosting/config: Merge --semihosting-config option groups

 gdbstub.c            | 14 +++++++++++---
 semihosting/config.c |  1 +
 2 files changed, 12 insertions(+), 3 deletions(-)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-06-10 14:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-26 19:00 [PATCH 0/2] gdbstub: don't crash if no gdb attached and gdb syscall attempted Peter Maydell
2022-05-26 19:00 ` [PATCH 1/2] gdbstub: Don't use GDB syscalls if no GDB is attached Peter Maydell
2022-05-29 11:06   ` Philippe Mathieu-Daudé via
2022-06-09 20:01   ` Luc Michel
2022-05-26 19:00 ` [PATCH 2/2] semihosting/config: Merge --semihosting-config option groups Peter Maydell
2022-06-09 20:02   ` Luc Michel
2022-06-10 13:04 ` [PATCH 0/2] gdbstub: don't crash if no gdb attached and gdb syscall attempted Peter Maydell
2022-06-10 14:40   ` Alex Bennée

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.