gdbstub: Check if gdb_regs is NULL
commitdbd6623ce726878f4cbbad4a1af160fcd1d2fe7b
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Sun, 29 Oct 2023 14:50:30 +0000 (29 14:50 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Tue, 31 Oct 2023 14:10:21 +0000 (31 14:10 +0000)
tree556ac1a901f3accceed1e506c9ee5bf19e81f163
parentaba77ac5dba609ccf17d2214a0f17b9a79cefad6
gdbstub: Check if gdb_regs is NULL

cpu->gdb_regs may be NULL if no coprocessor is registered.

Fixes: 73c392c26b ("gdbstub: Replace gdb_regs with an array")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20231029145033.592566-17-alex.bennee@linaro.org>
Message-Id: <20231019101030.128431-2-akihiko.odaki@daynix.com>
Tested-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
gdbstub/gdbstub.c