gdbstub: ensure we clean-up when terminated
commitb9e10c6c7503d3c8073efc9ac302b9f33619d4fc
authorAlex Bennée <alex.bennee@linaro.org>
Fri, 8 Jan 2021 22:42:45 +0000 (8 22:42 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Mon, 18 Jan 2021 10:05:06 +0000 (18 10:05 +0000)
tree7740a8a53b418a27d7ca177c705fe26ecb125ac3
parent5ef0317f58c0c88ad1146deab248b638148bd1b1
gdbstub: ensure we clean-up when terminated

If you kill the inferior from GDB we end up leaving our socket lying
around. Fix this by calling gdb_exit() first.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210108224256.2321-10-alex.bennee@linaro.org>
gdbstub.c