summaryrefslogtreecommitdiff
path: root/src/target/target.h
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-03-07 21:49:16 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-03-07 21:49:16 +0000
commitc78b4fe426c35f638e5575b59ec89d0e794263af (patch)
treea2f9b71545a8c90b2a91967f2d263238e456742a /src/target/target.h
parent29fc9b2596a4c92c5512d305b1addb4a8c224e26 (diff)
downloadopenocd+libswd-c78b4fe426c35f638e5575b59ec89d0e794263af.tar.gz
openocd+libswd-c78b4fe426c35f638e5575b59ec89d0e794263af.tar.bz2
openocd+libswd-c78b4fe426c35f638e5575b59ec89d0e794263af.tar.xz
openocd+libswd-c78b4fe426c35f638e5575b59ec89d0e794263af.zip
- 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
Diffstat (limited to 'src/target/target.h')
-rw-r--r--src/target/target.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/target/target.h b/src/target/target.h
index dae5f19e..8d70e77e 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -116,7 +116,7 @@ typedef struct target_type_s
/* target request support */
int (*target_request_data)(struct target_s *target, u32 size, u8 *buffer);
- /* target execution control */
+ /* halt will log a warning, but return ERROR_OK if the target is already halted. */
int (*halt)(struct target_s *target);
int (*resume)(struct target_s *target, int current, u32 address, int handle_breakpoints, int debug_execution);
int (*step)(struct target_s *target, int current, u32 address, int handle_breakpoints);
@@ -270,7 +270,6 @@ int target_arch_state(struct target_s *target);
#define ERROR_TARGET_INVALID (-300)
#define ERROR_TARGET_INIT_FAILED (-301)
#define ERROR_TARGET_TIMEOUT (-302)
-#define ERROR_TARGET_ALREADY_HALTED (-303)
#define ERROR_TARGET_NOT_HALTED (-304)
#define ERROR_TARGET_FAILURE (-305)
#define ERROR_TARGET_UNALIGNED_ACCESS (-306)