From: Øyvind H. <go...@us...> - 2010-01-21 16:22:37
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 98f7c2127b8800e2597493eea2c7ba5c88940b86 (commit) from dfba7fa949ae12089aa02dab557a46520c816d28 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 98f7c2127b8800e2597493eea2c7ba5c88940b86 Author: Ãyvind Harboe <oyv...@zy...> Date: Thu Jan 21 10:16:42 2010 +0100 target: print reason why GDB halts If GDB halts unexpectedly, print reason: srst assert or power out detected. If polling fails, then things are a bit trickier. We do not want to spam telnet or the log with polling failed messages. Leave that case be w/a comment in a code for now. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/target/target.c b/src/target/target.c index ff5aef3..1eb65a6 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -1767,6 +1767,7 @@ static int handle_target(void *priv) int did_something = 0; if (runSrstAsserted) { + LOG_INFO("Waking up GDB, srst asserted detected."); target_call_event_callbacks_all(TARGET_EVENT_GDB_HALT); Jim_Eval(interp, "srst_asserted"); did_something = 1; @@ -1778,6 +1779,7 @@ static int handle_target(void *priv) } if (runPowerDropout) { + LOG_INFO("Waking up GDB, power dropout detected."); target_call_event_callbacks_all(TARGET_EVENT_GDB_HALT); Jim_Eval(interp, "power_dropout"); did_something = 1; @@ -1820,6 +1822,14 @@ static int handle_target(void *priv) /* polling may fail silently until the target has been examined */ if ((retval = target_poll(target)) != ERROR_OK) { + /* FIX!!!!! If we add a LOG_INFO() here to output a line in GDB + * *why* we are aborting GDB, then we'll spam telnet when the + * poll is failing persistently. + * + * If we could implement an event that detected the + * target going from non-pollable to pollable, we could issue + * an error only upon the transition. + */ target_call_event_callbacks(target, TARGET_EVENT_GDB_HALT); return retval; } ----------------------------------------------------------------------- Summary of changes: src/target/target.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) hooks/post-receive -- Main OpenOCD repository |