From c78b4fe426c35f638e5575b59ec89d0e794263af Mon Sep 17 00:00:00 2001 From: oharboe Date: Fri, 7 Mar 2008 21:49:16 +0000 Subject: - Improves error handling upon GDB connect - switch to synchronous halt during connect. This fixes the bug where poll() was not invoked between halt() and servicing the 'g' register packet - halt() no longer returns error code when target is already halted, just logs a warning. Only the halt() implementation can say anything meaningful about why a halt() failed, so error messages are pushed up to halt() - fixed soft_reset_halt infinite loop bug in arm7_9_common.c. The rest of the implementations are still busted. - by using USER() instead of command_print() the log gets the source + line #. Nice. - no longer invoke exit() if soft_reset_halt fails. A reset can often fix the problem. git-svn-id: svn://svn.berlios.de/openocd/trunk@475 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/target/arm11.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/target/arm11.c') diff --git a/src/target/arm11.c b/src/target/arm11.c index 9c3d1f28..80189ffa 100644 --- a/src/target/arm11.c +++ b/src/target/arm11.c @@ -735,8 +735,8 @@ int arm11_halt(struct target_s *target) if (target->state == TARGET_HALTED) { - WARNING("target was already halted"); - return ERROR_TARGET_ALREADY_HALTED; + WARNING("target was already halted"); + return ERROR_OK; } if (arm11->trst_active) @@ -1044,7 +1044,8 @@ int arm11_get_gdb_reg_list(struct target_s *target, struct reg_s **reg_list[], i if (target->state != TARGET_HALTED) { - return ERROR_TARGET_NOT_HALTED; + ERROR("Target not halted"); + return ERROR_TARGET_NOT_HALTED; } *reg_list_size = ARM11_GDB_REGISTER_COUNT; -- cgit v1.2.3