Sysprogs forums › Forums › VisualGDB › FastSemihosting issue?
- This topic has 7 replies, 2 voices, and was last updated 6 years, 5 months ago by support.
-
AuthorPosts
-
April 19, 2018 at 13:52 #20724YuriyParticipant
Hi!
Sometimes VisualGDB crashes during debugging process. VisualStudio continues working after error message, or completely hangs.
It happens not very often, and I can’t understand causes of this problem.
VisualGDB log:
... Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Reading register (MSP = Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) 0x1000FFE0) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Reading register (PSP = 0x1Read0 0062 b04Cy)tes @ address 0x10001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Reading register (ReaPdR 2I MbyAtSeKs @ =a 0xdd0r0e0s0s 0x100000001F)6 0 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Reading register (BASEPRI = 0x00000000) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Reading register (FAULTReaMASK = 0x00000000) d 2 bytes @ address 0x10001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Reading register (CONRTROL = e0ad 2 bytes @ address 0x10001F60 (Data = 0xx00000002) 5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F6Reading register (FPSC0 (Data = 0x5F18) R = 0x00000000) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Reading register (s0 = 0x6DF0FEA3) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5ReFa18d)i ng register (s1 = 0x4063DFEE) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Reading register (s2 = 0x6F798A2F) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) ReadReaingd 2reg ibystetesr ( @s3 = ad 0xdr9CeFss85 00Dx41)0 001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Read 2 bytesRea d@ adidnress g0 xr10001Fe6g0i s(tDeatra =(s4 = 00xx5F1D8A)6 8691D) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Reading register (s5 = 0xEB353CDF) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Reading register (s6 = 0xB15CFEC1) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Reading register (s7 = 0Readx 22 4b7yBte7Es @6F a)d dress 0x10001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Reading register (s8 = 0xF73F2CC2) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Reading register (s9 = 0ReaxEd 72F b0FytAe3s C)@ address 0x10001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Reading register (s10 = 0x586A74B6) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Reading register (s11 = 0x727F97BB) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Reading register (s12 = 0x9668EF1B) Read 2 bytes @ address 0x10001F60 (Data = 0x5F18) Read 2 bytes @ address 0x10001F60 (Data = 0x5Reading register (s13 = 0x98EF284F186))
Where can I find more VisualGDB logs to help locate problem?
Attachments:
You must be logged in to view attached files.April 20, 2018 at 18:29 #20745supportKeymasterHi,
The InitializeFastSemihosting() function is normally invoked at the start of your debug session so that VisualGDB will start reading the output from the fast semihosting mechanism. Normally VisualGDB should handle this breakpoint internally and not show the “Sigtrap” message.
If you get this breakpoint in the middle of the debugging session, most likely your program corrupts the memory and/or restarts unexpectedly. If it only happens during session initialization, please try comparing the full gdb logs for the normal session and the crashed session and check for any obvious differences (e.g. gdb errors). If you are not sure, feel free to post both logs here and we can take a look.
April 25, 2018 at 12:55 #20775YuriyParticipantHi,
VisualGDB fails again, when I try to debug firmware. I collect and analyse logs, but I can’t undersand cause of fails.
What actually fails? VisualGDB plugin, or VisualStudio itself, or new GCC toolchain from arm.com, or Segger drivers, or GDB server… I don’t know.
Sequence always the same:
1) JLinkGDBServerCL.exe fails first (as shown on attached fault_3_stop.PNG),
2) then in “GDB Session” window appears progressbar,
3) then I press button Stop debugging.These fails always unexpected, I can’t predict and reproduce it. Firmware always works fine without breakpoints, but when I set breakpoints and hit them, VisualGDB may crash (somtimes immediately after hit breakpoint, but usually after continue execution). What component most probably fails? Should I try another version of VisualStudio, toolchain or VisualGDB?
New logs for crashed VisualGDB session also attached to this message.
- This reply was modified 6 years, 6 months ago by Yuriy.
- This reply was modified 6 years, 6 months ago by Yuriy. Reason: Attach "fault_3_gdb_session.txt" file
- This reply was modified 6 years, 6 months ago by Yuriy. Reason: Attach logs from previous faults
Attachments:
You must be logged in to view attached files.April 25, 2018 at 13:14 #20783YuriyParticipantAlso you mentioned that VisualGDB may stops on “hidden” breakpoints if my program corrupts the memory and/or restarts unexpectedly.
What part of memory is used for GDB own purposes? What cause of restart will be unexpected for VisualGDB? (i.e. restart by watchdog, after hardfault, etc.)
April 26, 2018 at 06:20 #20802supportKeymasterHi,
This looks like an error in the J-Link gdb server (JLinkGDBServerCL.exe). Please contact Segger support regarding this as we don’t have access to the Segger GDB stub internals and are not able to troubleshoot its crashes.
The memory we mentioned is used by the Semihosting Framework – it uses a part of the on-chip RAM to store the semihosting output (the debugger will read it in the background without stopping the target). This should not crash the J-Link gdb server, as all Fast Semihosting-related logic is handled by VisualGDB directly.
April 27, 2018 at 13:35 #20827YuriyParticipantHi,
Thank you! Your suggestion about problems in Segger software was right. After updating to Segger J-Link V6.32 everything works fine.
June 4, 2018 at 17:02 #21048YuriyParticipantHi! Output from GDB has strange lines again:
Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061
What does it means? Is it problem of GDB, or Segger drivers, or our MCU firmware (wrong memory access or something like this)?
This message appears sometimes when I add new brekpoints, sometimes during debugging, sometimes after pause and step-by-step execution.
Full GDB log:
^running *running,thread-id="all" &"Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061\n" -break-delete 6 &"Quit (expect signal SIGINT when the program is resumed)\n" ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -data-evaluate-expression "uxCurrentNumberOfTasks" ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" 1006-interpreter-exec console flushregs ~"Register cache flushed.\n" &"Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061\n" 1006^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-select-frame 0 ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" 1007-interpreter-exec console flushregs ~"Register cache flushed.\n" &"Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061\n" 1007^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -data-evaluate-expression "pxCurrentTCB->uxTCBNumber" ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -data-evaluate-expression "uxCurrentNumberOfTasks" ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" 1008-interpreter-exec console flushregs ~"Register cache flushed.\n" &"Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061\n" 1008^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames 0 0 ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -data-evaluate-expression "\$pc" ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames 0 0 ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -data-evaluate-expression "\$pc" ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames 0 0 ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -data-evaluate-expression "\$pc" ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames 0 0 ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -data-evaluate-expression "\$pc" ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames 0 0 ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -data-evaluate-expression "\$pc" ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames 0 0 ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -data-evaluate-expression "\$pc" ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames 0 0 ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -data-evaluate-expression "\$pc" ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames 0 0 ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -data-evaluate-expression "\$pc" ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames 0 0 ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -data-evaluate-expression "\$pc" ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -stack-list-frames 0 0 ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061" -data-evaluate-expression "\$pc" ^error,msg="Remote failure reply: E8DE072010270000D0470010F0260010010000000D0000002D240010A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5C8EE0720457003004E9B010000000061"
June 4, 2018 at 20:11 #21054supportKeymasterHi,
This message means that gdb is unable to parse some data it receives from the gdb server (i.e. the Segger gdb stub). Please try running “set debug remote 1” via the GDB Session window to force gdb to dump all interaction between itself and the segger gdb stub, and then try submiting that log to the Segger support. They might be able to tell what is going on.
-
AuthorPosts
- You must be logged in to reply to this topic.