One more reproduce and i captured all gdb packets.

Gdb console:
Debug: 851 1921840 gdb_server.c:2812 gdb_input_inner(): received packet: 
'Pf=e20d0008'
Debug: 852 1921845 gdb_server.c:1298 gdb_set_register_packet(): -
Debug: 853 1921850 gdb_server.c:2812 gdb_input_inner(): received packet: 
'P19=20000021'
Debug: 854 1921855 gdb_server.c:1298 gdb_set_register_packet(): -
Error: 855 1921858 gdb_server.c:1320 gdb_set_register_packet(): gdb sent a 
packet with wrong register size
Debug: 856 1921865 gdb_server.c:1022 gdb_connection_closed(): GDB Close, 
Target: stm32f4x.cpu, state: halted, gdb_actual_connections=0
Debug: 857 1921874 target.c:1517 target_call_event_callbacks(): target event 6 
(gdb-end)
Debug: 858 1921879 target.c:1517 target_call_event_callbacks(): target event 24 
(gdb-detach)
Info : 859 1921886 server.c:503 server_loop(): dropped 'gdb' connection

">" means packet TO gdbserver
"<" means packet FROM gdbserver
I tried to change PC from 08000DF0  to 08000DE2

Packet #0>
0000   02 00 00 00 45 02 00 37 20 74 40 00 80 06 00 00  ....E..7 t@.....
0010   7f 00 00 01 7f 00 00 01 cb d5 10 92 46 80 20 5f  ............F. _
0020   7b 8a 51 95 50 18 08 03 bf 5f 00 00 24 50 66 3d  {.Q.P...._..$Pf=
0030   65 32 30 64 30 30 30 38 23 65 36                 e20d0008#e6

Packet #1<
0000   02 00 00 00 45 00 00 28 20 75 40 00 80 06 00 00  ....E..( u@.....
0010   7f 00 00 01 7f 00 00 01 10 92 cb d5 7b 8a 51 95  ............{.Q.
0020   46 80 20 6e 50 10 7f 1d 22 3f 00 00              F. nP..."?..

Packet #2<
0000   02 00 00 00 45 02 00 2e 20 76 40 00 80 06 00 00  ....E... v@.....
0010   7f 00 00 01 7f 00 00 01 10 92 cb d5 7b 8a 51 95  ............{.Q.
0020   46 80 20 6e 50 18 7f 1d 79 5d 00 00 24 4f 4b 23  F. nP...y]..$OK#
0030   39 61                                            9a

Packet #3>
0000   02 00 00 00 45 00 00 28 20 77 40 00 80 06 00 00  ....E..( w@.....
0010   7f 00 00 01 7f 00 00 01 cb d5 10 92 46 80 20 6e  ............F. n
0020   7b 8a 51 9b 50 10 08 03 99 53 00 00              {.Q.P....S..

Packet #4>
0000   02 00 00 00 45 02 00 38 20 78 40 00 80 06 00 00  ....E..8 x@.....
0010   7f 00 00 01 7f 00 00 01 cb d5 10 92 46 80 20 6e  ............F. n
0020   7b 8a 51 9b 50 18 08 03 0d 67 00 00 24 50 31 39  {.Q.P....g..$P19
0030   3d 32 30 30 30 30 30 32 31 23 37 63              =20000021#7c

Packet #5<
0000   02 00 00 00 45 00 00 28 20 79 40 00 80 06 00 00  ....E..( y@.....
0010   7f 00 00 01 7f 00 00 01 10 92 cb d5 7b 8a 51 9b  ............{.Q.
0020   46 80 20 7e 50 10 7f 19 22 2d 00 00              F. ~P..."-..

Packet #6<
0000   02 00 00 00 45 00 00 28 20 86 40 00 80 06 00 00  ....E..( .@.....
0010   7f 00 00 01 7f 00 00 01 10 92 cb d5 7b 8a 51 9b  ............{.Q.
0020   46 80 20 7e 50 11 7f 19 22 2c 00 00              F. ~P...",..

Packet #7>
0000   02 00 00 00 45 00 00 28 20 87 40 00 80 06 00 00  ....E..( .@.....
0010   7f 00 00 01 7f 00 00 01 cb d5 10 92 46 80 20 7e  ............F. ~
0020   7b 8a 51 9c 50 10 08 03 99 42 00 00              {.Q.P....B..

Packet #8>
0000   02 00 00 00 45 02 00 2d 20 88 40 00 80 06 00 00  ....E..- .@.....
0010   7f 00 00 01 7f 00 00 01 cb d5 10 92 46 80 20 7e  ............F. ~
0020   7b 8a 51 9c 50 18 08 03 1a 98 00 00 24 67 23 36  {.Q.P.......$g#6
0030   37                                               7

Packet #9< (RST)
0000   02 00 00 00 45 00 00 28 20 89 40 00 80 06 00 00  ....E..( .@.....
0010   7f 00 00 01 7f 00 00 01 10 92 cb d5 7b 8a 51 9c  ............{.Q.
0020   46 80 20 83 50 14 00 00 a1 3c 00 00              F. .P....<..



---

** [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:49 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