aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/openocd.c6
-rw-r--r--src/target/target.c5
-rw-r--r--src/target/target.h2
3 files changed, 8 insertions, 5 deletions
diff --git a/src/openocd.c b/src/openocd.c
index 1874530c..d5d7ebe8 100644
--- a/src/openocd.c
+++ b/src/openocd.c
@@ -87,13 +87,13 @@ static int log_target_callback_event_handler(struct target *target,
{
switch (event) {
case TARGET_EVENT_GDB_START:
- target->display = 0;
+ target->verbose_halt_msg = false;
break;
case TARGET_EVENT_GDB_END:
- target->display = 1;
+ target->verbose_halt_msg = true;
break;
case TARGET_EVENT_HALTED:
- if (target->display) {
+ if (target->verbose_halt_msg) {
/* do not display information when debugger caused the halt */
target_arch_state(target);
}
diff --git a/src/target/target.c b/src/target/target.c
index 4552034e..10426023 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -2959,6 +2959,9 @@ COMMAND_HANDLER(handle_halt_command)
LOG_DEBUG("-");
struct target *target = get_current_target(CMD_CTX);
+
+ target->verbose_halt_msg = true;
+
int retval = target_halt(target);
if (ERROR_OK != retval)
return retval;
@@ -5579,7 +5582,7 @@ static int target_create(Jim_GetOptInfo *goi)
target->next = NULL;
target->arch_info = NULL;
- target->display = 1;
+ target->verbose_halt_msg = true;
target->halt_issued = false;
diff --git a/src/target/target.h b/src/target/target.h
index 0ce4a137..7a8a80f3 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -176,7 +176,7 @@ struct target {
void *private_config; /* pointer to target specific config data (for jim_configure hook) */
struct target *next; /* next target in list */
- int display; /* display async info in telnet session. Do not display
+ bool verbose_halt_msg; /* display async info in telnet session. Do not display
* lots of halted/resumed info when stepping in debugger. */
bool halt_issued; /* did we transition to halted state? */
int64_t halt_issued_time; /* Note time when halt was issued */