From: Christo <christo.crause@gmail.com>
To: gdb@sourceware.org
Cc: christo.crause@gmail.com
Subject: internal-error: target_xfer_partial: Assertion `*xfered_len > 0' failed
Date: Wed, 30 May 2018 20:09:00 -0000 [thread overview]
Message-ID: <1527710950.16578.23.camel@gmail.com> (raw)
I'm writing a gdbserver that debugs AVR microcontrollers through the debugWIRE protocol. During
debugging sessions avr-gdb sometimes generates an error. Â From the info below the error appears
to be an unexpected length for a reply, possibly caused by receiving the start for a new message
before the end of a previous message(?).
I suspect that it may have something to do with the remote serial protocol implementation on my
side, but cannot figure out what. Â Here is a sample gdb session of a simple program (with debug
info) loaded into gdb (program is already loaded in microcontroller), the program is continued
without break points, the program is interrupted by Ctrl+C. Â During the subsequent transfer of
memory content the error is triggered (often, but not always):
[I interrupt the running code in gdb with Ctrl+C}
Program received signal SIGINT, Interrupt.
Sending packet: $m80015e,2#2e...Ack
Packet received: 0030
Sending packet: $m50,10#5f...Ack
Saw new packet start in middle of old one
Timed out.
Timed out.
DELAY_MS (Ignoring packet error, continuing...
../../src/gdb/target.c:1376: internal-error: target_xfer_partial: Assertion `*xfered_len > 0'
failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit
this debugging session? (y or n)
The corresponding traffic from the gdbserver RSP log:
19:08:04.421Â Â Ctrl+C received
19:08:04.533Â Â <-
$T0200:12;01:00;02:08;03:00;04:00;05:80;06:10;07:09;08:E2;09:01;0A:00;0B:41;0C:00;0D:00;0E:00;0F
:40;10:14;11:00;12:10;13:02;14:0D;15:20;16:00;17:00;18:09;19:00;1A:2A;1B:00;1C:84;1D:00;1E:86;1F
:00;20:00;21:5D01;22:7C000000;#98
19:08:04.534Â Â -> m72,a
19:08:04.548Â Â <- $8115910531F0AFECB7E0#75
19:08:04.577Â Â -> qL1160000000000000000
19:08:04.577Â Â <- $qM0010000000000000000#4F
19:08:04.621Â Â -> m80015e,2
19:08:04.628Â Â <- $0030#C3
19:08:04.665Â Â -> m50,10
19:08:04.677Â Â <- $0ED0BC9A18BA20E126BB8AEF912D09D0#59
I don't see any response errors or overlapping replies on the server side...
I get this error both on avr-gdb 7.10.1 (Installed by Linux Mint) and gdb 8.0 (which I compiled
from source). Â I don't see this error if I don't load the file with debug info into gdb. Also no
error if I use gdb 7.0.1 or 6.6 (both also compiled by me).
Any hints or ideas of where or what the problem may be?
Regards,
Christo
next reply other threads:[~2018-05-30 20:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-30 20:09 Christo [this message]
2018-06-01 4:36 ` Christo
2018-06-02 6:23 ` Christo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1527710950.16578.23.camel@gmail.com \
--to=christo.crause@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox