[RFC PATCH v4 03/15] GDB: remote: Print total bytes received in debug message
Thiago Jung Bauermann
thiago.bauermann@linaro.org
Fri Jan 10 02:05:36 GMT 2025
Hello Baris, Hello Simon,
Thank you for your reviews!
Simon Marchi <simark@simark.ca> writes:
> On 2024-12-20 10:09, Aktemur, Tankut Baris wrote:
>> On Saturday, November 2, 2024 3:56 AM, Thiago Jung Bauermann wrote:
>>> 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 --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
>>> (),
>>
>> Please note that the line is now too long -- goes to column 90.
>> Nit: The message can also be shortened to "[%d of %d bytes omitted]".
Indeed, I hadn't noticed. I adopted your wording, which brought the line
to 80 columns.
>> Reviewed-By: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
> LGTM with that fixed.
>
> Approved-By: Simon Marchi <simon.marchi@efficios.com>
Thanks! Pushed as commit 1f493519f703 ("GDB: remote: Print total bytes
received in debug message")
--
Thiago
More information about the Gdb-patches
mailing list