Hi all,
I am trying to use watchpoints with the A8, but they do not appear to be
working. I have some simple test code that demonstrates this:
-------------------------------------------------------------------------------
void main()
{
while(1)
{
test_data++;
delay_count = 50000;
while(delay_count--) {};
}
}
-------------------------------------------------------------------------------
I tried to set a watchpoint on test_data (a global variable) with gdb:
-------------------------------------------------------------------------------
0x00016f64 in ?? ()
(gdb) load
Loading section .boot_header, size 0x20 lma 0x40200000
Loading section .vectors, size 0x20 lma 0x40200020
Loading section .init, size 0xf0 lma 0x40200040
Loading section .bob, size 0x374 lma 0x40200130
Loading section .data, size 0x4 lma 0x402004a4
Start address 0x40200020, load size 1192
Transfer rate: 7 KB/sec, 238 bytes/write.
(gdb) awatch test_data
Hardware access (read/write) watchpoint 1: test_data
(gdb) cont
Continuing.
^C
(gdb) info watchpoints
Num Type Disp Enb Address What
1 acc watchpoint keep y test_data
-------------------------------------------------------------------------------
but the processor never stops.
I double checked the objdump of the code:
-------------------------------------------------------------------------------
402004a4 <test_data>:
402004a4: 00000002 andeq r0, r0, r2
-------------------------------------------------------------------------------
I then tried to set a watchpoint direct in OpenOCD and it appears to work:
-------------------------------------------------------------------------------
> wp 0x402004a4 4
> resume
target state: halted
target halted in ARM state due to watchpoint, current mode: Supervisor
cpsr: 0x600001d3 pc: 0x4020043c
MMU: disabled, D-Cache: disabled, I-Cache: disabled
Watchpoint triggered at PC 0x4020043c
-------------------------------------------------------------------------------
Is this a known issue with watchpoints within GDB or am I doing
something wrong?
-Karl
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development