One more reproduce. At startup point i set debug_level 3. Check PC change and 
it works. Then i set debug_level 0, for noise output reducing. Then i do some 
step-in's, And Run program to reach breakpoint. Then Run it again. Then Suspend 
and set debug_level to 3. And tried to change PC.

Full log:
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override 
use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results 
might differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : clock speed 1800 kHz
Info : STLINK v2 JTAG v28 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.907665
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
adapter speed: 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800019c msp: 0x20000440
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
adapter speed: 4000 kHz
Info : accepting 'telnet' connection on tcp/4444
Info : accepting 'gdb' connection on tcp/4242
Error: attempted 'gdb' connection rejected
Info : accepting 'gdb' connection on tcp/4242
Error: attempted 'gdb' connection rejected
Info : accepting 'gdb' connection on tcp/4242
Info : device id = 0x10016413
Info : flash size = 1024kbytes
User : 77 112712 command.c:544 command_print(): debug_level: 3
Debug: 78 116104 gdb_server.c:2812 gdb_input_inner(): received packet: 
'm80001b8,4'
Debug: 79 116108 gdb_server.c:1386 gdb_read_memory_packet(): addr: 0x080001b8, 
len: 0x00000004
Debug: 80 116112 target.c:2091 target_read_buffer(): reading buffer of 4 byte 
at 0x080001b8
Debug: 81 116116 hla_target.c:750 adapter_read_memory(): adapter_read_memory 
0x080001b8 4 1
Debug: 82 119358 gdb_server.c:2812 gdb_input_inner(): received packet: 
'Pf=9c010008'
Debug: 83 119362 gdb_server.c:1298 gdb_set_register_packet(): -
Debug: 84 162407 command.c:143 script_debug(): command - ocd_command 
ocd_command type ocd_debug_level 0
Debug: 85 162412 command.c:143 script_debug(): command - debug_level 
ocd_debug_level 0
debug_level: 0
Error: can't add breakpoint: resource not available
Error: can't add breakpoint: resource not available
Error: can't add breakpoint: resource not available
User : 95 201300 command.c:544 command_print(): debug_level: 3
Debug: 96 206759 gdb_server.c:2812 gdb_input_inner(): received packet: 
'Pf=ca0d0008'
Debug: 97 206763 gdb_server.c:1298 gdb_set_register_packet(): -
Debug: 98 206767 gdb_server.c:2812 gdb_input_inner(): received packet: 
'P19=20000021'
Debug: 99 206771 gdb_server.c:1298 gdb_set_register_packet(): -
Error: 100 206774 gdb_server.c:1320 gdb_set_register_packet(): gdb sent a 
packet with wrong register size
Debug: 101 206779 gdb_server.c:1022 gdb_connection_closed(): GDB Close, Target: 
stm32f4x.cpu, state: halted, gdb_actual_connections=0
Debug: 102 206784 target.c:1517 target_call_event_callbacks(): target event 6 
(gdb-end)
Debug: 103 206788 target.c:1517 target_call_event_callbacks(): target event 24 
(gdb-detach)
Info : 104 206792 server.c:503 server_loop(): dropped 'gdb' connection




---

** [tickets:#173] "ThreadSetCurrentIp" sometime fails.**

**Status:** new
**Milestone:** 0.9.0
**Created:** Wed Jan 24, 2018 05:01 PM UTC by Artamonov Dmitry
**Last Updated:** Wed Jan 24, 2018 06:36 PM UTC
**Owner:** nobody


OCD 0.10.0. Reproduce stable, with chinese ST-LinkV2 dongle and STMF4Discovery 
build-in ST-LinkV2.
Debugee is STM32F1 and STM32F4 respectivelly. Gdb client is IDA Pro.

When i try to change IP debug session drops:
Debug: 7908 326686 gdb_server.c:2812 gdb_input_inner(): received packet: 
'Pf=6c0d0008'
Debug: 7909 326690 gdb_server.c:1298 gdb_set_register_packet(): -
Debug: 7910 326694 gdb_server.c:2812 gdb_input_inner(): received packet: 
'P19=20000041'
Debug: 7911 326703 gdb_server.c:1298 gdb_set_register_packet(): -
Error: 7912 326706 gdb_server.c:1320 gdb_set_register_packet(): gdb sent a 
packet with wrong register size
Debug: 7913 326715 gdb_server.c:1022 gdb_connection_closed(): GDB Close, 
Target: stm32f4x.cpu, state: halted, gdb_actual_connections=0
Debug: 7914 326725 target.c:1517 target_call_event_callbacks(): target event 6 
(gdb-end)
Debug: 7915 326729 target.c:1517 target_call_event_callbacks(): target event 24 
(gdb-detach)
Info : 7916 326737 server.c:503 server_loop(): dropped 'gdb' connection

In IDA:
Debugger: failed to update register value
Command "ThreadSetCurrentIp" failed

To reproduce need debug session some length. I.e. changing IP at first 
instructions works well, but some time later it fails.


---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/openocd/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/openocd/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to