summaryrefslogtreecommitdiff
path: root/src/helper/time_support.c
diff options
context:
space:
mode:
authorMike Dunn <mikedunn@newsguy.com>2010-03-28 15:48:32 -0400
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-03-29 20:24:02 +0200
commit33e5dd12729d995b351ece716e8c835dd8331c71 (patch)
treec74cd983f53761fcdfec1b730193fb48cb5c346d /src/helper/time_support.c
parentd60ebc0ab535e54f76e734d00d9ac1b5c9b6eb93 (diff)
downloadopenocd+libswd-33e5dd12729d995b351ece716e8c835dd8331c71.tar.gz
openocd+libswd-33e5dd12729d995b351ece716e8c835dd8331c71.tar.bz2
openocd+libswd-33e5dd12729d995b351ece716e8c835dd8331c71.tar.xz
openocd+libswd-33e5dd12729d995b351ece716e8c835dd8331c71.zip
xscale: fix trace buffer functionality when resuming from a breakpoint
Problem: halt at a breakpoint, enable trace buffer ('xscale trace_buffer enable fill'), then resume. Wait for debug exception when trace buffer fills (if not sooner due to another breakpoint, vector catch, etc). Instead, never halts. When halted explicitly from OpenOCD and trace buffer dumped, it contains only one entry; a branch to the address of the original breakpoint. If the above steps are repeated, except that the breakpoint is removed before resuming, the trace buffer fills and the debug exception is generated, as expected. Cause: related to how a breakpoint is stepped over on resume. The breakpoint is temporarily removed, and a hardware breakpoint is set on the next instruction that will execute. xscale_debug_entry() is called when that breakpoint hits. This function checks if the trace buffer is enabled, and if so reads the trace buffer from the target and then disables the trace (unless multiple trace buffers are specified by the user when trace is enabled). Thus you only trace one instruction before it is disabled. Solution: kind of a hack on top of a hack, but it's simple. Anything better would involve some refactoring. This has been tested and trace now works as intended, except that the very first instruction is not part of the trace when resuming from a breakpoint. TODO: still many issues with trace: doesn't work during single-stepping (trace buffer is flushed each step), 'xscale analyze_trace' works only marginally for a trace captured in 'fill' mode, and not at all for a trace captured in 'wrap' mode. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/helper/time_support.c')
0 files changed, 0 insertions, 0 deletions