+2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
+
+ * remote.c (putpkt_binary): Fix omitted bytes reporting.
+ (getpkt_or_notif_sane_1): Likewise.
+
2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
* build-id.c (build_id_to_debug_bfd): Use std::string.
fprintf_unfiltered (gdb_stdlog, "Sending packet: %s", str.c_str ());
- if (str.length () > REMOTE_DEBUG_MAX_CHAR)
- {
- fprintf_unfiltered (gdb_stdlog, "[%zu bytes omitted]",
- str.length () - REMOTE_DEBUG_MAX_CHAR);
- }
+ if (len > REMOTE_DEBUG_MAX_CHAR)
+ fprintf_unfiltered (gdb_stdlog, "[%d bytes omitted]",
+ len - REMOTE_DEBUG_MAX_CHAR);
fprintf_unfiltered (gdb_stdlog, "...");
fprintf_unfiltered (gdb_stdlog, "Packet received: %s",
str.c_str ());
- if (str.length () > REMOTE_DEBUG_MAX_CHAR)
- {
- fprintf_unfiltered (gdb_stdlog, "[%zu bytes omitted]",
- str.length () - REMOTE_DEBUG_MAX_CHAR);
- }
+ if (val > REMOTE_DEBUG_MAX_CHAR)
+ fprintf_unfiltered (gdb_stdlog, "[%d bytes omitted]",
+ val - REMOTE_DEBUG_MAX_CHAR);
fprintf_unfiltered (gdb_stdlog, "\n");
}