]> git.ipfire.org Git - thirdparty/qemu.git/commit
linux-user: Clean up nios2 main loop signal handling
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 19 Oct 2018 17:49:58 +0000 (18:49 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Mon, 12 Nov 2018 15:02:10 +0000 (16:02 +0100)
commit9f214bd390803d54f6def8956c3bd8812a96b990
tree04eaf3a3395c7de6100697e43ccc062452f9df65
parentb10089a14cad93ca5cdcd441a23f522d1e15f554
linux-user: Clean up nios2 main loop signal handling

The nios2 main loop code's code does some odd
things with gdb_handlesig() that no other target
CPU does: it has some signals that are delivered
to gdb and only to gdb. Stop doing this, and instead
behave like all the other targets:
 * a trap instruction becomes a SIGTRAP
 * an unhandled exception type returned from cpu_exec()
   causes us to abort(), not to try to hand gdb a SIGILL

This fixes in passing Coverity issue CID 1390853,
which was a complaint that the old code failed to
check the return value from gdb_handlesig().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20181019174958.26616-3-peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
[lv: removed gdbsig unused variable]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/nios2/cpu_loop.c