duane> Slowly target resources are consumed/leaked - specifically hardware
duane> compare registers.

duane> Suggestions?

BTW - this can also be caused by GDB croaking.. while leaving the target 
running.

Examples - SVN 2408 - adds some useful debug information to help see 
this problem
    The general idea is a "unique id" for each breakpoint/watchpoint - 
ie: BPID.. below.

Here, a breakpoint was added, the target went off a clif - and now GDB 
cannot *remove* the breakpoint because the target is in a bad state.

Leak example.

 >> Debug: 1164 124671 gdb_server.c:2050 gdb_input_inner(): received 
packet: 'Z1,800c0,2'
 >> Debug: 1165 124671 gdb_server.c:1385 
gdb_breakpoint_watchpoint_packet(): -
 >> Debug: 1166 124671 target.c:1408 target_write_u32(): address: 
0xe000201c, value: 0x400800c1
 >> Debug: 1167 124671 cortex_m3.c:926 cortex_m3_set_breakpoint(): 
fpc_num 5 fpcr_value 0x400800c1
 >> Debug: 1168 124671 cortex_m3.c:953 cortex_m3_set_breakpoint(): BPID: 
6, Type: 0, Address: 0x000800c0 Length: 2 (set=6)
 >> Debug: 1169 124671 breakpoints.c:104 breakpoint_add(): added 
hardware breakpoint at 0x000800c0 of length 0x00000002, (BPID: 6)
 >> Debug: 1170 124671 gdb_server.c:2050 gdb_input_inner(): received 
packet: 's'
 >> Debug: 1171 124671 gdb_server.c:2050 gdb_input_inner(): received 
packet: 'g'
 >> Debug: 1172 124671 gdb_server.c:2050 gdb_input_inner(): received 
packet: 'z1,800c0,2'
 >> Debug: 1173 124671 gdb_server.c:1385 
gdb_breakpoint_watchpoint_packet(): -
 >> Warn : 1174 124671 cortex_m3.c:1072 cortex_m3_remove_breakpoint(): 
target not halted
 >> Debug: 1175 124671 breakpoints.c:128 breakpoint_free(): BPID: 6

Example of final failure:

 >> Debug: 1911 139921 gdb_server.c:2050 gdb_input_inner(): received 
packet: 'Z1,800c0,2'
 >> Debug: 1912 139921 gdb_server.c:1385 
gdb_breakpoint_watchpoint_packet(): -
 >> Info : 1913 139937 cortex_m3.c:1047 cortex_m3_add_breakpoint(): no 
flash patch comparator unit available for hardware breakpoint
 >> Info : 1914 139937 breakpoints.c:81 breakpoint_add(): can't add 
hardware breakpoint, resource not available (BPID=7)

-Duane.

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to