This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Fix 'xfered>0' assertion in target.c for remote connection
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Tue, 14 Nov 2017 17:55:57 -0500
- Subject: [binutils-gdb] Fix 'xfered>0' assertion in target.c for remote connection
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 92ffd475192030a46a6046177c732372b4dadad5 ***
Author: Paul Carroll <pcarroll@codesourcery.com>
Branch: master
Commit: 92ffd475192030a46a6046177c732372b4dadad5
Fix 'xfered>0' assertion in target.c for remote connection
We have a customer who is using a Corelis gdb server to connect to gdb.
Occasionally, the gdb server will send a 0-byte block of memory for a
read. When this happens, gdb gives an assertion from target.c:
internal-error: target_xfer_partial: Assertion `*xfered_len > 0' failed.
This problem is almost identical to that fixed in
https://sourceware.org/ml/gdb-patches/2014-02/msg00636.html
In this case, remote.c needs to be modified to return TARGET_XFER_EOF
instead of TARGET_XFER_OK or TARGET_XFER_UNAVAILABLE when 0 bytes are
transferred.
gdb/ChangeLog:
PR gdb/22388
* remote.c (remote_write_bytes_aux, remote_read_bytes_1,
remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
Return TARGET_XFER_EOF if size of returned data is 0.
- Follow-Ups:
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master
- Failures on Fedora-s390x-m64, branch master
- Failures on Fedora-x86_64-native-gdbserver-m64, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Ubuntu-AArch64-native-gdbserver-m64, branch master
- Failures on Fedora-i686, branch master
- Failures on Fedora-x86_64-m64, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, branch master