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>
{
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);
}
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;
target->next = NULL;
target->arch_info = NULL;
- target->display = 1;
+ target->verbose_halt_msg = true;
target->halt_issued = false;
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 */