|
From: hogthrob <hog...@us...> - 2019-04-21 21:12:37
|
Well, we both are right, sort of (you more, I less, the fix: absolutely): https://github.com/db4ple/openocd/blob/0a87bac689a271c8e6fb97a48ee23e4d019a4438/src/target/semihosting_common.c#L789 You are right, it is not directly refering to the GDB protocol. In fact my assumptions were wrong, the GDB protocol DOES return the number of written bytes (https://sourceware.org/gdb/onlinedocs/gdb/Host-I_002fO-Packets.html#Host-I_002fO-Packets). And the semihosting protocol wants the unread bytes. The good thing is, my patch converts one in the other, so it still works as intended, although I misunderstood why. --- ** [tickets:#232] semihosting_fileio read return wrong number of read bytes** **Status:** new **Milestone:** 0.9.0 **Created:** Sun Apr 21, 2019 04:18 PM UTC by hogthrob **Last Updated:** Sun Apr 21, 2019 08:46 PM UTC **Owner:** nobody The current implementation of read for semihosting_fileio read works only for reads returning exactly the requested amount OR in case of EOF/ERROR. In the case of "not full" read with respect to requested bytes, the number of requested bytes - returned bytes was returned (i.e. how many bytes have not been read), which should have been the number of read bytes. Please integrate the following fix: https://github.com/db4ple/openocd/commit/0a87bac689a271c8e6fb97a48ee23e4d019a4438 --- Sent from sourceforge.net because ope...@li... 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. |