Log gdb version and configuration in DAP

Message ID 20240726143737.926647-1-tromey@adacore.com
State New
Headers
Series Log gdb version and configuration in DAP |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Test passed

Commit Message

Tom Tromey July 26, 2024, 2:37 p.m. UTC
  I think it would be useful for gdb's DAP logs to come with the version
and configuration information.  This might make debugging some bug
reports a little simpler.
---
 gdb/python/lib/gdb/dap/__init__.py | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Tom Tromey Aug. 14, 2024, 4:11 p.m. UTC | #1
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:

Tom> I think it would be useful for gdb's DAP logs to come with the version
Tom> and configuration information.  This might make debugging some bug
Tom> reports a little simpler.

I'm checking this in.

Tom
  

Patch

diff --git a/gdb/python/lib/gdb/dap/__init__.py b/gdb/python/lib/gdb/dap/__init__.py
index 51b95468a70..145aeb611fc 100644
--- a/gdb/python/lib/gdb/dap/__init__.py
+++ b/gdb/python/lib/gdb/dap/__init__.py
@@ -92,5 +92,8 @@  def pre_command_loop():
         # session.
         session_started = True
         startup.thread_log("starting DAP server")
+        # These are handy for bug reports.
+        startup.exec_and_log("show version")
+        startup.exec_and_log("show configuration")
         global server
         startup.start_dap(server.main_loop)