[PATCH 3/9] gdb/testsuite/dap: write requests to gdb.log

Simon Marchi via Gdb-patches
2023-01-06T18:58:05Z

This helps following what happens when reading gdb.log. The downside is
that it becomes harder to tell what text is from GDB and what text is
going to GDB, but I think that seeing responses without seeing requests
is even more confusing. At least, the lines are prefix with >>>, so
when you see this, you know that until the end of the line, it's
something that was sent to GDB, and not GDB output.

Change-Id: I1ba1acd8b16f4e64686c5ad268cc41082951c874
---
gdb/testsuite/lib/dap-support.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/lib/dap-support.exp b/gdb/testsuite/lib/dap-support.exp
index a91b5533643..94a0d27c8a8 100644
--- a/gdb/testsuite/lib/dap-support.exp
+++ b/gdb/testsuite/lib/dap-support.exp
@@ -102,7 +102,7 @@ proc _dap_send_ton {obj} {
set json [namespace eval ton::2json $obj]
# FIXME this is wrong for non-ASCII characters.
set len [string length $json]
- verbose ">>> $json"
+ verbose -log ">>> $json"
send_gdb "Content-Length: $len\r\n\r\n$json"
}

--
2.38.1