761e3c1088
This fix is implemented by having the vCont handler set the value of `gdbserver_state.c_cpu` if any threads are to be resumed. The specific CPU picked is arbitrarily from the ones to be resumed, but it should be okay, as all GDB cares about is that it is a resumed thread. Signed-off-by: Matheus Branco Borella <dark.ryu.550@gmail.com> Message-Id: <20230804182633.47300-2-dark.ryu.550@gmail.com> [AJB: style and whitespace fixes] Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1725 Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230829161528.2707696-9-alex.bennee@linaro.org>
29 lines
571 B
C
29 lines
571 B
C
/*
|
|
* External interruption test. This test is structured in such a way that it
|
|
* passes the cases that require it to exit, but we can make it enter an
|
|
* infinite loop from GDB.
|
|
*
|
|
* We don't have the benefit of libc, just builtin C primitives and
|
|
* whatever is in minilib.
|
|
*/
|
|
|
|
#include <minilib.h>
|
|
|
|
void loop(void)
|
|
{
|
|
do {
|
|
/*
|
|
* Loop forever. Just make sure the condition is always a constant
|
|
* expression, so that this loop is not UB, as per the C
|
|
* standard.
|
|
*/
|
|
} while (1);
|
|
}
|
|
|
|
int main(void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
|