From 399561eafa747e71202d00985206b65868142afb Mon Sep 17 00:00:00 2001 From: Hsiangkai Wang Date: Wed, 6 Mar 2013 09:39:52 +0800 Subject: gdb_server: add target_debug_reason for program exit detection Currently, there is no way to notify gdb that program has exited. Add new target_debug_reason called DBG_REASON_EXIT to notify gdb the condition has occured. If the debug reason is DBG_REASON_EXIT, gdb_server will send 'W' packet to tell gdb the process has exited. Change-Id: I7a371da292716a3e6ac4cc2c31b009a651fe047a Signed-off-by: Hsiangkai Wang Reviewed-on: http://openocd.zylin.com/1242 Tested-by: jenkins Reviewed-by: Spencer Oliver --- src/target/target.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/target/target.h') diff --git a/src/target/target.h b/src/target/target.h index ee282b19..44f382a2 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -83,7 +83,8 @@ enum target_debug_reason { DBG_REASON_WPTANDBKPT = 3, DBG_REASON_SINGLESTEP = 4, DBG_REASON_NOTHALTED = 5, - DBG_REASON_UNDEFINED = 6 + DBG_REASON_EXIT = 6, + DBG_REASON_UNDEFINED = 7, }; enum target_endianness { -- cgit v1.2.3-18-g5258