gdbstub: reject unsupported flags in handle_set_qemu_sstep
commitecd39d620b0a3938dc3a80721e8aa436075d2916
authorMaxim Levitsky <mlevitsk@redhat.com>
Thu, 11 Nov 2021 11:06:02 +0000 (11 12:06 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 10 Dec 2021 08:47:18 +0000 (10 09:47 +0100)
tree5dee9dab83c16649fa4d1bbe404f78cecab838ab
parent43709a0ca3b09e952bde3f38112f1d7fbf7c65b1
gdbstub: reject unsupported flags in handle_set_qemu_sstep

handle_query_qemu_sstepbits is reporting NOIRQ and NOTIMER bits
even if they are not supported (as is the case with record/replay).
Instead, store the supported singlestep flags and reject
any unsupported bits in handle_set_qemu_sstep.  This removes
the need for the get_sstep_flags() wrapper.

While at it, move the variables in GDBState, instead of using
global variables.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
[Extracted from Maxim's patch into a separate commit. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20211111110604.207376-4-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
gdbstub.c