libpayload: gdb: Factor out gdb_handle_reentrant_exception() from arm32
commit1bfda7293ac0f06681097a8cd6964d86af0b24ba
authorJulius Werner <jwerner@chromium.org>
Wed, 10 Oct 2018 22:54:10 +0000 (10 15:54 -0700)
committerJulius Werner <jwerner@chromium.org>
Fri, 12 Oct 2018 20:17:40 +0000 (12 20:17 +0000)
tree112ac84c8f55ad1bae73468c261612e0d19a9677
parent5c0e72ff9952bef2dcb62881ced0d95f8ad9cf1d
libpayload: gdb: Factor out gdb_handle_reentrant_exception() from arm32

The arm32 GDB architecture code contains a little hack that allows it to
(sort of) correctly deal with a reentrant exception triggered from
within the GDB stub. The main logic for this isn't really arm32 specific
and could be useful for other architectures as well, so factor it out
into a separate function.

Change-Id: I3c6db8cecf1e86bba23de6fd2ac9fdf0cf69d3c6
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/29019
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
payloads/libpayload/arch/arm/gdb.c
payloads/libpayload/gdb/stub.c
payloads/libpayload/include/gdb.h