diff mbox series

[RFC,v4,03/15] GDB: remote: Print total bytes received in debug message

Message ID 20241102025635.586759-4-thiago.bauermann@linaro.org
State New
Headers show
Series gdbserver improvements for AArch64 SVE support | expand

Commit Message

Thiago Jung Bauermann Nov. 2, 2024, 2:56 a.m. UTC
This is useful information I missed while debugging issues with
the g packet reply.
---
 gdb/remote.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/gdb/remote.c b/gdb/remote.c
index b65a1c3094ae..6ffc51e4e2f5 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -10484,8 +10484,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 bytes omitted, %d bytes total]", str.c_str (),
+		   val - max_chars, val);
 	      else
 		remote_debug_printf_nofunc ("Packet received: %s",
 					    str.c_str ());