gdb_server: add target_debug_reason for program exit detection