aboutsummaryrefslogtreecommitdiff
path: root/src/openocd.c
diff options
context:
space:
mode:
authorTomas Vanek <vanekt@fbl.cz>2018-03-22 11:53:40 +0100
committerMatthias Welwarsky <matthias@welwarsky.de>2018-03-30 10:14:56 +0100
commit37deb37593c20c05a4bb29e1d88671a1f7ec6548 (patch)
treef323a42c14c410a8ada44e8c4adcb1ee7b34986f /src/openocd.c
parentf035b0851bbc6a9ccc2b20128ae2e4d3abd9ba38 (diff)
downloadriscv-openocd-37deb37593c20c05a4bb29e1d88671a1f7ec6548.zip
riscv-openocd-37deb37593c20c05a4bb29e1d88671a1f7ec6548.tar.gz
riscv-openocd-37deb37593c20c05a4bb29e1d88671a1f7ec6548.tar.bz2
target: fix display halt message logic
If a target is run from gdb and then stopped from OpenOCD telnet interface, halt does not show message with status and PC registers. While on it rename 'display' to 'verbose_halt_msg' and use bool type instead of int. Change-Id: Ibe6589015b302e0be97258b06938c297745436a5 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/4475 Tested-by: jenkins Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Diffstat (limited to 'src/openocd.c')
-rw-r--r--src/openocd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/openocd.c b/src/openocd.c
index 1874530..d5d7ebe 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);
}