]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
GDB: remote: Print total bytes received in debug message
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>
Sat, 5 Oct 2024 04:26:53 +0000 (01:26 -0300)
committerThiago Jung Bauermann <thiago.bauermann@linaro.org>
Fri, 10 Jan 2025 01:03:53 +0000 (22:03 -0300)
This is useful information I missed while debugging issues with
the g packet reply.

Reviewed-By: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/remote.c

index d9ad6974366a514bfa46349a3b0eaf9e1f1f63b1..8cb9050eaedade733890d8913a7edff8d7693563 100644 (file)
@@ -10539,8 +10539,8 @@ remote_target::getpkt (gdb::char_vector *buf, bool forever, bool *is_notif)
 
              if (val > max_chars)
                remote_debug_printf_nofunc
-                 ("Packet received: %s [%d bytes omitted]", str.c_str (),
-                  val - max_chars);
+                 ("Packet received: %s [%d of %d bytes omitted]", str.c_str (),
+                  val - max_chars, val);
              else
                remote_debug_printf_nofunc ("Packet received: %s",
                                            str.c_str ());