2
0
mirror of git://git.code.sf.net/p/openocd/code synced 2025-07-24 10:57:11 +10:00
openocd/src
Mike Dunn 33e5dd1272 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>
2010-03-29 20:24:02 +02:00
..
flash NOR TCL: fix usage message 2010-03-26 09:14:56 +01:00
helper gpl: fix GPL startup message 2010-02-15 22:59:41 +01:00
jtag jtag/tcl.c cleanup -- split out "adapter.c" 2010-03-27 10:07:13 -07:00
pld jtag: move towards making out_value const 2010-03-20 11:16:49 +01:00
server telnet_server: review unused symbols 2010-03-25 07:44:59 +01:00
svf rename jtag_khz as adapter_khz 2010-03-15 08:37:43 -07:00
target xscale: fix trace buffer functionality when resuming from a breakpoint 2010-03-29 20:24:02 +02:00
xsvf jtag: cut down on usage of unintended modification of global end state 2010-03-18 08:43:19 +01:00
ecosboard.c zy1000: complete zy1000_uart to jim command switch 2010-02-05 14:38:26 +01:00
hello.c Doc/examples: clarify usage messages 2010-01-08 23:13:39 -08:00
hello.h
main.c
Makefile.am Driver for USB-JTAG, Altera USB-Blaster and compatibles 2009-12-26 15:05:06 -08:00
openocd.c SCRIPT: add add_script_search_dir cmd 2010-03-17 09:57:44 +00:00
openocd.h remove #if logic for openocd_sleep_*lude 2009-12-02 13:26:26 -08:00