public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] [gdb/build] Support reference return type in make-target-delegates.py
@ 2023-08-21 10:53 Tom de Vries
  2023-08-21 10:53 ` [PATCH 2/2] [gdb/build] Return const reference in thread_info_to_thread_handle Tom de Vries
  2023-08-23 15:43 ` [PATCH 1/2] [gdb/build] Support reference return type in make-target-delegates.py Pedro Alves
  0 siblings, 2 replies; 8+ messages in thread
From: Tom de Vries @ 2023-08-21 10:53 UTC (permalink / raw)
  To: gdb-patches

When doing this in target.h:
...
-    virtual gdb::byte_vector thread_info_to_thread_handle (struct thread_info *)
+    virtual gdb::byte_vector &thread_info_to_thread_handle (struct thread_info *)
...
make-target-delegates.py drops the function.

By handling '&' in POINTER_PART we can prevent that the function is dropped,
but when recompiling target.o we get:
...
gdb/target-delegates.c: In member function ‘virtual gdb::byte_vector& \
  debug_target::thread_info_to_thread_handle(thread_info*)’:
gdb/target-delegates.c:1889:22: error: ‘result’ declared as reference but not \
  initialized
   gdb::byte_vector & result;
                      ^~~~~~
make: *** [Makefile:1923: target.o] Error 1
...

Fix this by making sure result is initialized.

Regenerate target-delegates.c using this new style.

Tested on x86_64-linux.
---
 gdb/make-target-delegates.py |  10 +-
 gdb/target-delegates.c       | 404 +++++++++++++++++------------------
 2 files changed, 207 insertions(+), 207 deletions(-)

diff --git a/gdb/make-target-delegates.py b/gdb/make-target-delegates.py
index 704d3f1cb67..5e766e35731 100755
--- a/gdb/make-target-delegates.py
+++ b/gdb/make-target-delegates.py
@@ -40,7 +40,7 @@ ARGS_PART = r"(?P<args>\(.*\))"
 # We strip the indentation so here we only need the caret.
 INTRO_PART = r"^"
 
-POINTER_PART = r"\s*(\*)?\s*"
+POINTER_PART = r"\s*(\*|\&)?\s*"
 
 # Match a C++ symbol, including scope operators and template
 # parameters.  E.g., 'std::vector<something>'.
@@ -268,8 +268,6 @@ def write_debugmethod(
     print("", file=f)
     debugname = "debug_target::" + name
     names = write_function_header(f, False, debugname, return_type, argtypes)
-    if return_type != "void":
-        print("  " + return_type + " result;", file=f)
     print(
         '  gdb_printf (gdb_stdlog, "-> %s->'
         + name
@@ -278,9 +276,11 @@ def write_debugmethod(
     )
 
     # Delegate to the beneath target.
-    print("  ", file=f, end="")
     if return_type != "void":
-        print("result = ", file=f, end="")
+        print("  " + return_type + " result", file=f)
+        print("    = ", file=f, end="")
+    else:
+      print("  ", file=f, end="")
     print("this->beneath ()->" + name + " (", file=f, end="")
     print(", ".join(names), file=f, end="")
     print(");", file=f)
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index e4e14380181..06f22d57c27 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -501,9 +501,9 @@ dummy_target::wait (ptid_t arg0, struct target_waitstatus *arg1, target_wait_fla
 ptid_t
 debug_target::wait (ptid_t arg0, struct target_waitstatus *arg1, target_wait_flags arg2)
 {
-  ptid_t result;
   gdb_printf (gdb_stdlog, "-> %s->wait (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->wait (arg0, arg1, arg2);
+  ptid_t result
+    = this->beneath ()->wait (arg0, arg1, arg2);
   gdb_printf (gdb_stdlog, "<- %s->wait (", this->beneath ()->shortname ());
   target_debug_print_ptid_t (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -620,9 +620,9 @@ dummy_target::insert_breakpoint (struct gdbarch *arg0, struct bp_target_info *ar
 int
 debug_target::insert_breakpoint (struct gdbarch *arg0, struct bp_target_info *arg1)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->insert_breakpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->insert_breakpoint (arg0, arg1);
+  int result
+    = this->beneath ()->insert_breakpoint (arg0, arg1);
   gdb_printf (gdb_stdlog, "<- %s->insert_breakpoint (", this->beneath ()->shortname ());
   target_debug_print_struct_gdbarch_p (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -648,9 +648,9 @@ dummy_target::remove_breakpoint (struct gdbarch *arg0, struct bp_target_info *ar
 int
 debug_target::remove_breakpoint (struct gdbarch *arg0, struct bp_target_info *arg1, enum remove_bp_reason arg2)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->remove_breakpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->remove_breakpoint (arg0, arg1, arg2);
+  int result
+    = this->beneath ()->remove_breakpoint (arg0, arg1, arg2);
   gdb_printf (gdb_stdlog, "<- %s->remove_breakpoint (", this->beneath ()->shortname ());
   target_debug_print_struct_gdbarch_p (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -678,9 +678,9 @@ dummy_target::stopped_by_sw_breakpoint ()
 bool
 debug_target::stopped_by_sw_breakpoint ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->stopped_by_sw_breakpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->stopped_by_sw_breakpoint ();
+  bool result
+    = this->beneath ()->stopped_by_sw_breakpoint ();
   gdb_printf (gdb_stdlog, "<- %s->stopped_by_sw_breakpoint (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -703,9 +703,9 @@ dummy_target::supports_stopped_by_sw_breakpoint ()
 bool
 debug_target::supports_stopped_by_sw_breakpoint ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->supports_stopped_by_sw_breakpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->supports_stopped_by_sw_breakpoint ();
+  bool result
+    = this->beneath ()->supports_stopped_by_sw_breakpoint ();
   gdb_printf (gdb_stdlog, "<- %s->supports_stopped_by_sw_breakpoint (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -728,9 +728,9 @@ dummy_target::stopped_by_hw_breakpoint ()
 bool
 debug_target::stopped_by_hw_breakpoint ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->stopped_by_hw_breakpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->stopped_by_hw_breakpoint ();
+  bool result
+    = this->beneath ()->stopped_by_hw_breakpoint ();
   gdb_printf (gdb_stdlog, "<- %s->stopped_by_hw_breakpoint (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -753,9 +753,9 @@ dummy_target::supports_stopped_by_hw_breakpoint ()
 bool
 debug_target::supports_stopped_by_hw_breakpoint ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->supports_stopped_by_hw_breakpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->supports_stopped_by_hw_breakpoint ();
+  bool result
+    = this->beneath ()->supports_stopped_by_hw_breakpoint ();
   gdb_printf (gdb_stdlog, "<- %s->supports_stopped_by_hw_breakpoint (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -778,9 +778,9 @@ dummy_target::can_use_hw_breakpoint (enum bptype arg0, int arg1, int arg2)
 int
 debug_target::can_use_hw_breakpoint (enum bptype arg0, int arg1, int arg2)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->can_use_hw_breakpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->can_use_hw_breakpoint (arg0, arg1, arg2);
+  int result
+    = this->beneath ()->can_use_hw_breakpoint (arg0, arg1, arg2);
   gdb_printf (gdb_stdlog, "<- %s->can_use_hw_breakpoint (", this->beneath ()->shortname ());
   target_debug_print_enum_bptype (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -808,9 +808,9 @@ dummy_target::ranged_break_num_registers ()
 int
 debug_target::ranged_break_num_registers ()
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->ranged_break_num_registers (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->ranged_break_num_registers ();
+  int result
+    = this->beneath ()->ranged_break_num_registers ();
   gdb_printf (gdb_stdlog, "<- %s->ranged_break_num_registers (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_int (result);
@@ -833,9 +833,9 @@ dummy_target::insert_hw_breakpoint (struct gdbarch *arg0, struct bp_target_info
 int
 debug_target::insert_hw_breakpoint (struct gdbarch *arg0, struct bp_target_info *arg1)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->insert_hw_breakpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->insert_hw_breakpoint (arg0, arg1);
+  int result
+    = this->beneath ()->insert_hw_breakpoint (arg0, arg1);
   gdb_printf (gdb_stdlog, "<- %s->insert_hw_breakpoint (", this->beneath ()->shortname ());
   target_debug_print_struct_gdbarch_p (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -861,9 +861,9 @@ dummy_target::remove_hw_breakpoint (struct gdbarch *arg0, struct bp_target_info
 int
 debug_target::remove_hw_breakpoint (struct gdbarch *arg0, struct bp_target_info *arg1)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->remove_hw_breakpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->remove_hw_breakpoint (arg0, arg1);
+  int result
+    = this->beneath ()->remove_hw_breakpoint (arg0, arg1);
   gdb_printf (gdb_stdlog, "<- %s->remove_hw_breakpoint (", this->beneath ()->shortname ());
   target_debug_print_struct_gdbarch_p (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -889,9 +889,9 @@ dummy_target::remove_watchpoint (CORE_ADDR arg0, int arg1, enum target_hw_bp_typ
 int
 debug_target::remove_watchpoint (CORE_ADDR arg0, int arg1, enum target_hw_bp_type arg2, struct expression *arg3)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->remove_watchpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->remove_watchpoint (arg0, arg1, arg2, arg3);
+  int result
+    = this->beneath ()->remove_watchpoint (arg0, arg1, arg2, arg3);
   gdb_printf (gdb_stdlog, "<- %s->remove_watchpoint (", this->beneath ()->shortname ());
   target_debug_print_CORE_ADDR (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -921,9 +921,9 @@ dummy_target::insert_watchpoint (CORE_ADDR arg0, int arg1, enum target_hw_bp_typ
 int
 debug_target::insert_watchpoint (CORE_ADDR arg0, int arg1, enum target_hw_bp_type arg2, struct expression *arg3)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->insert_watchpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->insert_watchpoint (arg0, arg1, arg2, arg3);
+  int result
+    = this->beneath ()->insert_watchpoint (arg0, arg1, arg2, arg3);
   gdb_printf (gdb_stdlog, "<- %s->insert_watchpoint (", this->beneath ()->shortname ());
   target_debug_print_CORE_ADDR (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -953,9 +953,9 @@ dummy_target::insert_mask_watchpoint (CORE_ADDR arg0, CORE_ADDR arg1, enum targe
 int
 debug_target::insert_mask_watchpoint (CORE_ADDR arg0, CORE_ADDR arg1, enum target_hw_bp_type arg2)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->insert_mask_watchpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->insert_mask_watchpoint (arg0, arg1, arg2);
+  int result
+    = this->beneath ()->insert_mask_watchpoint (arg0, arg1, arg2);
   gdb_printf (gdb_stdlog, "<- %s->insert_mask_watchpoint (", this->beneath ()->shortname ());
   target_debug_print_CORE_ADDR (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -983,9 +983,9 @@ dummy_target::remove_mask_watchpoint (CORE_ADDR arg0, CORE_ADDR arg1, enum targe
 int
 debug_target::remove_mask_watchpoint (CORE_ADDR arg0, CORE_ADDR arg1, enum target_hw_bp_type arg2)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->remove_mask_watchpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->remove_mask_watchpoint (arg0, arg1, arg2);
+  int result
+    = this->beneath ()->remove_mask_watchpoint (arg0, arg1, arg2);
   gdb_printf (gdb_stdlog, "<- %s->remove_mask_watchpoint (", this->beneath ()->shortname ());
   target_debug_print_CORE_ADDR (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -1013,9 +1013,9 @@ dummy_target::stopped_by_watchpoint ()
 bool
 debug_target::stopped_by_watchpoint ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->stopped_by_watchpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->stopped_by_watchpoint ();
+  bool result
+    = this->beneath ()->stopped_by_watchpoint ();
   gdb_printf (gdb_stdlog, "<- %s->stopped_by_watchpoint (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -1038,9 +1038,9 @@ dummy_target::have_steppable_watchpoint ()
 bool
 debug_target::have_steppable_watchpoint ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->have_steppable_watchpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->have_steppable_watchpoint ();
+  bool result
+    = this->beneath ()->have_steppable_watchpoint ();
   gdb_printf (gdb_stdlog, "<- %s->have_steppable_watchpoint (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -1063,9 +1063,9 @@ dummy_target::stopped_data_address (CORE_ADDR *arg0)
 bool
 debug_target::stopped_data_address (CORE_ADDR *arg0)
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->stopped_data_address (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->stopped_data_address (arg0);
+  bool result
+    = this->beneath ()->stopped_data_address (arg0);
   gdb_printf (gdb_stdlog, "<- %s->stopped_data_address (", this->beneath ()->shortname ());
   target_debug_print_CORE_ADDR_p (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -1089,9 +1089,9 @@ dummy_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int
 bool
 debug_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2)
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->watchpoint_addr_within_range (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->watchpoint_addr_within_range (arg0, arg1, arg2);
+  bool result
+    = this->beneath ()->watchpoint_addr_within_range (arg0, arg1, arg2);
   gdb_printf (gdb_stdlog, "<- %s->watchpoint_addr_within_range (", this->beneath ()->shortname ());
   target_debug_print_CORE_ADDR (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -1119,9 +1119,9 @@ dummy_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1)
 int
 debug_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->region_ok_for_hw_watchpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->region_ok_for_hw_watchpoint (arg0, arg1);
+  int result
+    = this->beneath ()->region_ok_for_hw_watchpoint (arg0, arg1);
   gdb_printf (gdb_stdlog, "<- %s->region_ok_for_hw_watchpoint (", this->beneath ()->shortname ());
   target_debug_print_CORE_ADDR (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -1147,9 +1147,9 @@ dummy_target::can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2
 bool
 debug_target::can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3)
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->can_accel_watchpoint_condition (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->can_accel_watchpoint_condition (arg0, arg1, arg2, arg3);
+  bool result
+    = this->beneath ()->can_accel_watchpoint_condition (arg0, arg1, arg2, arg3);
   gdb_printf (gdb_stdlog, "<- %s->can_accel_watchpoint_condition (", this->beneath ()->shortname ());
   target_debug_print_CORE_ADDR (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -1179,9 +1179,9 @@ dummy_target::masked_watch_num_registers (CORE_ADDR arg0, CORE_ADDR arg1)
 int
 debug_target::masked_watch_num_registers (CORE_ADDR arg0, CORE_ADDR arg1)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->masked_watch_num_registers (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->masked_watch_num_registers (arg0, arg1);
+  int result
+    = this->beneath ()->masked_watch_num_registers (arg0, arg1);
   gdb_printf (gdb_stdlog, "<- %s->masked_watch_num_registers (", this->beneath ()->shortname ());
   target_debug_print_CORE_ADDR (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -1207,9 +1207,9 @@ dummy_target::can_do_single_step ()
 int
 debug_target::can_do_single_step ()
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->can_do_single_step (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->can_do_single_step ();
+  int result
+    = this->beneath ()->can_do_single_step ();
   gdb_printf (gdb_stdlog, "<- %s->can_do_single_step (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_int (result);
@@ -1232,9 +1232,9 @@ dummy_target::supports_terminal_ours ()
 bool
 debug_target::supports_terminal_ours ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->supports_terminal_ours (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->supports_terminal_ours ();
+  bool result
+    = this->beneath ()->supports_terminal_ours ();
   gdb_printf (gdb_stdlog, "<- %s->supports_terminal_ours (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -1426,9 +1426,9 @@ dummy_target::insert_fork_catchpoint (int arg0)
 int
 debug_target::insert_fork_catchpoint (int arg0)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->insert_fork_catchpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->insert_fork_catchpoint (arg0);
+  int result
+    = this->beneath ()->insert_fork_catchpoint (arg0);
   gdb_printf (gdb_stdlog, "<- %s->insert_fork_catchpoint (", this->beneath ()->shortname ());
   target_debug_print_int (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -1452,9 +1452,9 @@ dummy_target::remove_fork_catchpoint (int arg0)
 int
 debug_target::remove_fork_catchpoint (int arg0)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->remove_fork_catchpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->remove_fork_catchpoint (arg0);
+  int result
+    = this->beneath ()->remove_fork_catchpoint (arg0);
   gdb_printf (gdb_stdlog, "<- %s->remove_fork_catchpoint (", this->beneath ()->shortname ());
   target_debug_print_int (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -1478,9 +1478,9 @@ dummy_target::insert_vfork_catchpoint (int arg0)
 int
 debug_target::insert_vfork_catchpoint (int arg0)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->insert_vfork_catchpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->insert_vfork_catchpoint (arg0);
+  int result
+    = this->beneath ()->insert_vfork_catchpoint (arg0);
   gdb_printf (gdb_stdlog, "<- %s->insert_vfork_catchpoint (", this->beneath ()->shortname ());
   target_debug_print_int (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -1504,9 +1504,9 @@ dummy_target::remove_vfork_catchpoint (int arg0)
 int
 debug_target::remove_vfork_catchpoint (int arg0)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->remove_vfork_catchpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->remove_vfork_catchpoint (arg0);
+  int result
+    = this->beneath ()->remove_vfork_catchpoint (arg0);
   gdb_printf (gdb_stdlog, "<- %s->remove_vfork_catchpoint (", this->beneath ()->shortname ());
   target_debug_print_int (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -1560,9 +1560,9 @@ dummy_target::insert_exec_catchpoint (int arg0)
 int
 debug_target::insert_exec_catchpoint (int arg0)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->insert_exec_catchpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->insert_exec_catchpoint (arg0);
+  int result
+    = this->beneath ()->insert_exec_catchpoint (arg0);
   gdb_printf (gdb_stdlog, "<- %s->insert_exec_catchpoint (", this->beneath ()->shortname ());
   target_debug_print_int (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -1586,9 +1586,9 @@ dummy_target::remove_exec_catchpoint (int arg0)
 int
 debug_target::remove_exec_catchpoint (int arg0)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->remove_exec_catchpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->remove_exec_catchpoint (arg0);
+  int result
+    = this->beneath ()->remove_exec_catchpoint (arg0);
   gdb_printf (gdb_stdlog, "<- %s->remove_exec_catchpoint (", this->beneath ()->shortname ());
   target_debug_print_int (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -1637,9 +1637,9 @@ dummy_target::set_syscall_catchpoint (int arg0, bool arg1, int arg2, gdb::array_
 int
 debug_target::set_syscall_catchpoint (int arg0, bool arg1, int arg2, gdb::array_view<const int> arg3)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->set_syscall_catchpoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->set_syscall_catchpoint (arg0, arg1, arg2, arg3);
+  int result
+    = this->beneath ()->set_syscall_catchpoint (arg0, arg1, arg2, arg3);
   gdb_printf (gdb_stdlog, "<- %s->set_syscall_catchpoint (", this->beneath ()->shortname ());
   target_debug_print_int (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -1732,9 +1732,9 @@ dummy_target::thread_alive (ptid_t arg0)
 bool
 debug_target::thread_alive (ptid_t arg0)
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->thread_alive (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->thread_alive (arg0);
+  bool result
+    = this->beneath ()->thread_alive (arg0);
   gdb_printf (gdb_stdlog, "<- %s->thread_alive (", this->beneath ()->shortname ());
   target_debug_print_ptid_t (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -1778,9 +1778,9 @@ dummy_target::pid_to_str (ptid_t arg0)
 std::string
 debug_target::pid_to_str (ptid_t arg0)
 {
-  std::string result;
   gdb_printf (gdb_stdlog, "-> %s->pid_to_str (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->pid_to_str (arg0);
+  std::string result
+    = this->beneath ()->pid_to_str (arg0);
   gdb_printf (gdb_stdlog, "<- %s->pid_to_str (", this->beneath ()->shortname ());
   target_debug_print_ptid_t (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -1804,9 +1804,9 @@ dummy_target::extra_thread_info (thread_info *arg0)
 const char *
 debug_target::extra_thread_info (thread_info *arg0)
 {
-  const char * result;
   gdb_printf (gdb_stdlog, "-> %s->extra_thread_info (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->extra_thread_info (arg0);
+  const char * result
+    = this->beneath ()->extra_thread_info (arg0);
   gdb_printf (gdb_stdlog, "<- %s->extra_thread_info (", this->beneath ()->shortname ());
   target_debug_print_thread_info_p (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -1830,9 +1830,9 @@ dummy_target::thread_name (thread_info *arg0)
 const char *
 debug_target::thread_name (thread_info *arg0)
 {
-  const char * result;
   gdb_printf (gdb_stdlog, "-> %s->thread_name (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->thread_name (arg0);
+  const char * result
+    = this->beneath ()->thread_name (arg0);
   gdb_printf (gdb_stdlog, "<- %s->thread_name (", this->beneath ()->shortname ());
   target_debug_print_thread_info_p (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -1856,9 +1856,9 @@ dummy_target::thread_handle_to_thread_info (const gdb_byte *arg0, int arg1, infe
 thread_info *
 debug_target::thread_handle_to_thread_info (const gdb_byte *arg0, int arg1, inferior *arg2)
 {
-  thread_info * result;
   gdb_printf (gdb_stdlog, "-> %s->thread_handle_to_thread_info (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->thread_handle_to_thread_info (arg0, arg1, arg2);
+  thread_info * result
+    = this->beneath ()->thread_handle_to_thread_info (arg0, arg1, arg2);
   gdb_printf (gdb_stdlog, "<- %s->thread_handle_to_thread_info (", this->beneath ()->shortname ());
   target_debug_print_const_gdb_byte_p (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -1886,9 +1886,9 @@ dummy_target::thread_info_to_thread_handle (struct thread_info *arg0)
 gdb::byte_vector
 debug_target::thread_info_to_thread_handle (struct thread_info *arg0)
 {
-  gdb::byte_vector result;
   gdb_printf (gdb_stdlog, "-> %s->thread_info_to_thread_handle (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->thread_info_to_thread_handle (arg0);
+  gdb::byte_vector result
+    = this->beneath ()->thread_info_to_thread_handle (arg0);
   gdb_printf (gdb_stdlog, "<- %s->thread_info_to_thread_handle (", this->beneath ()->shortname ());
   target_debug_print_struct_thread_info_p (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -1998,9 +1998,9 @@ dummy_target::pid_to_exec_file (int arg0)
 const char *
 debug_target::pid_to_exec_file (int arg0)
 {
-  const char * result;
   gdb_printf (gdb_stdlog, "-> %s->pid_to_exec_file (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->pid_to_exec_file (arg0);
+  const char * result
+    = this->beneath ()->pid_to_exec_file (arg0);
   gdb_printf (gdb_stdlog, "<- %s->pid_to_exec_file (", this->beneath ()->shortname ());
   target_debug_print_int (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -2045,9 +2045,9 @@ dummy_target::get_section_table ()
 const target_section_table *
 debug_target::get_section_table ()
 {
-  const target_section_table * result;
   gdb_printf (gdb_stdlog, "-> %s->get_section_table (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->get_section_table ();
+  const target_section_table * result
+    = this->beneath ()->get_section_table ();
   gdb_printf (gdb_stdlog, "<- %s->get_section_table (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_const_target_section_table_p (result);
@@ -2070,9 +2070,9 @@ dummy_target::get_thread_control_capabilities ()
 thread_control_capabilities
 debug_target::get_thread_control_capabilities ()
 {
-  thread_control_capabilities result;
   gdb_printf (gdb_stdlog, "-> %s->get_thread_control_capabilities (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->get_thread_control_capabilities ();
+  thread_control_capabilities result
+    = this->beneath ()->get_thread_control_capabilities ();
   gdb_printf (gdb_stdlog, "<- %s->get_thread_control_capabilities (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_thread_control_capabilities (result);
@@ -2095,9 +2095,9 @@ dummy_target::attach_no_wait ()
 bool
 debug_target::attach_no_wait ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->attach_no_wait (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->attach_no_wait ();
+  bool result
+    = this->beneath ()->attach_no_wait ();
   gdb_printf (gdb_stdlog, "<- %s->attach_no_wait (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -2120,9 +2120,9 @@ dummy_target::can_async_p ()
 bool
 debug_target::can_async_p ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->can_async_p (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->can_async_p ();
+  bool result
+    = this->beneath ()->can_async_p ();
   gdb_printf (gdb_stdlog, "<- %s->can_async_p (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -2145,9 +2145,9 @@ dummy_target::is_async_p ()
 bool
 debug_target::is_async_p ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->is_async_p (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->is_async_p ();
+  bool result
+    = this->beneath ()->is_async_p ();
   gdb_printf (gdb_stdlog, "<- %s->is_async_p (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -2192,9 +2192,9 @@ dummy_target::async_wait_fd ()
 int
 debug_target::async_wait_fd ()
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->async_wait_fd (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->async_wait_fd ();
+  int result
+    = this->beneath ()->async_wait_fd ();
   gdb_printf (gdb_stdlog, "<- %s->async_wait_fd (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_int (result);
@@ -2217,9 +2217,9 @@ dummy_target::has_pending_events ()
 bool
 debug_target::has_pending_events ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->has_pending_events (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->has_pending_events ();
+  bool result
+    = this->beneath ()->has_pending_events ();
   gdb_printf (gdb_stdlog, "<- %s->has_pending_events (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -2263,9 +2263,9 @@ dummy_target::supports_non_stop ()
 bool
 debug_target::supports_non_stop ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->supports_non_stop (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->supports_non_stop ();
+  bool result
+    = this->beneath ()->supports_non_stop ();
   gdb_printf (gdb_stdlog, "<- %s->supports_non_stop (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -2288,9 +2288,9 @@ dummy_target::always_non_stop_p ()
 bool
 debug_target::always_non_stop_p ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->always_non_stop_p (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->always_non_stop_p ();
+  bool result
+    = this->beneath ()->always_non_stop_p ();
   gdb_printf (gdb_stdlog, "<- %s->always_non_stop_p (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -2313,9 +2313,9 @@ dummy_target::find_memory_regions (find_memory_region_ftype arg0, void *arg1)
 int
 debug_target::find_memory_regions (find_memory_region_ftype arg0, void *arg1)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->find_memory_regions (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->find_memory_regions (arg0, arg1);
+  int result
+    = this->beneath ()->find_memory_regions (arg0, arg1);
   gdb_printf (gdb_stdlog, "<- %s->find_memory_regions (", this->beneath ()->shortname ());
   target_debug_print_find_memory_region_ftype (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -2341,9 +2341,9 @@ dummy_target::make_corefile_notes (bfd *arg0, int *arg1)
 gdb::unique_xmalloc_ptr<char>
 debug_target::make_corefile_notes (bfd *arg0, int *arg1)
 {
-  gdb::unique_xmalloc_ptr<char> result;
   gdb_printf (gdb_stdlog, "-> %s->make_corefile_notes (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->make_corefile_notes (arg0, arg1);
+  gdb::unique_xmalloc_ptr<char> result
+    = this->beneath ()->make_corefile_notes (arg0, arg1);
   gdb_printf (gdb_stdlog, "<- %s->make_corefile_notes (", this->beneath ()->shortname ());
   target_debug_print_bfd_p (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -2369,9 +2369,9 @@ dummy_target::get_bookmark (const char *arg0, int arg1)
 gdb_byte *
 debug_target::get_bookmark (const char *arg0, int arg1)
 {
-  gdb_byte * result;
   gdb_printf (gdb_stdlog, "-> %s->get_bookmark (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->get_bookmark (arg0, arg1);
+  gdb_byte * result
+    = this->beneath ()->get_bookmark (arg0, arg1);
   gdb_printf (gdb_stdlog, "<- %s->get_bookmark (", this->beneath ()->shortname ());
   target_debug_print_const_char_p (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -2421,9 +2421,9 @@ dummy_target::get_thread_local_address (ptid_t arg0, CORE_ADDR arg1, CORE_ADDR a
 CORE_ADDR
 debug_target::get_thread_local_address (ptid_t arg0, CORE_ADDR arg1, CORE_ADDR arg2)
 {
-  CORE_ADDR result;
   gdb_printf (gdb_stdlog, "-> %s->get_thread_local_address (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->get_thread_local_address (arg0, arg1, arg2);
+  CORE_ADDR result
+    = this->beneath ()->get_thread_local_address (arg0, arg1, arg2);
   gdb_printf (gdb_stdlog, "<- %s->get_thread_local_address (", this->beneath ()->shortname ());
   target_debug_print_ptid_t (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -2451,9 +2451,9 @@ dummy_target::xfer_partial (enum target_object arg0, const char *arg1, gdb_byte
 enum target_xfer_status
 debug_target::xfer_partial (enum target_object arg0, const char *arg1, gdb_byte *arg2, const gdb_byte *arg3, ULONGEST arg4, ULONGEST arg5, ULONGEST *arg6)
 {
-  enum target_xfer_status result;
   gdb_printf (gdb_stdlog, "-> %s->xfer_partial (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->xfer_partial (arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+  enum target_xfer_status result
+    = this->beneath ()->xfer_partial (arg0, arg1, arg2, arg3, arg4, arg5, arg6);
   gdb_printf (gdb_stdlog, "<- %s->xfer_partial (", this->beneath ()->shortname ());
   target_debug_print_enum_target_object (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -2489,9 +2489,9 @@ dummy_target::get_memory_xfer_limit ()
 ULONGEST
 debug_target::get_memory_xfer_limit ()
 {
-  ULONGEST result;
   gdb_printf (gdb_stdlog, "-> %s->get_memory_xfer_limit (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->get_memory_xfer_limit ();
+  ULONGEST result
+    = this->beneath ()->get_memory_xfer_limit ();
   gdb_printf (gdb_stdlog, "<- %s->get_memory_xfer_limit (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_ULONGEST (result);
@@ -2514,9 +2514,9 @@ dummy_target::memory_map ()
 std::vector<mem_region>
 debug_target::memory_map ()
 {
-  std::vector<mem_region> result;
   gdb_printf (gdb_stdlog, "-> %s->memory_map (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->memory_map ();
+  std::vector<mem_region> result
+    = this->beneath ()->memory_map ();
   gdb_printf (gdb_stdlog, "<- %s->memory_map (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_std_vector_mem_region (result);
@@ -2584,9 +2584,9 @@ dummy_target::read_description ()
 const struct target_desc *
 debug_target::read_description ()
 {
-  const struct target_desc * result;
   gdb_printf (gdb_stdlog, "-> %s->read_description (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->read_description ();
+  const struct target_desc * result
+    = this->beneath ()->read_description ();
   gdb_printf (gdb_stdlog, "<- %s->read_description (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_const_struct_target_desc_p (result);
@@ -2609,9 +2609,9 @@ dummy_target::get_ada_task_ptid (long arg0, ULONGEST arg1)
 ptid_t
 debug_target::get_ada_task_ptid (long arg0, ULONGEST arg1)
 {
-  ptid_t result;
   gdb_printf (gdb_stdlog, "-> %s->get_ada_task_ptid (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->get_ada_task_ptid (arg0, arg1);
+  ptid_t result
+    = this->beneath ()->get_ada_task_ptid (arg0, arg1);
   gdb_printf (gdb_stdlog, "<- %s->get_ada_task_ptid (", this->beneath ()->shortname ());
   target_debug_print_long (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -2637,9 +2637,9 @@ dummy_target::auxv_parse (const gdb_byte **arg0, const gdb_byte *arg1, CORE_ADDR
 int
 debug_target::auxv_parse (const gdb_byte **arg0, const gdb_byte *arg1, CORE_ADDR *arg2, CORE_ADDR *arg3)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->auxv_parse (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->auxv_parse (arg0, arg1, arg2, arg3);
+  int result
+    = this->beneath ()->auxv_parse (arg0, arg1, arg2, arg3);
   gdb_printf (gdb_stdlog, "<- %s->auxv_parse (", this->beneath ()->shortname ());
   target_debug_print_const_gdb_byte_pp (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -2669,9 +2669,9 @@ dummy_target::search_memory (CORE_ADDR arg0, ULONGEST arg1, const gdb_byte *arg2
 int
 debug_target::search_memory (CORE_ADDR arg0, ULONGEST arg1, const gdb_byte *arg2, ULONGEST arg3, CORE_ADDR *arg4)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->search_memory (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->search_memory (arg0, arg1, arg2, arg3, arg4);
+  int result
+    = this->beneath ()->search_memory (arg0, arg1, arg2, arg3, arg4);
   gdb_printf (gdb_stdlog, "<- %s->search_memory (", this->beneath ()->shortname ());
   target_debug_print_CORE_ADDR (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -2703,9 +2703,9 @@ dummy_target::can_execute_reverse ()
 bool
 debug_target::can_execute_reverse ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->can_execute_reverse (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->can_execute_reverse ();
+  bool result
+    = this->beneath ()->can_execute_reverse ();
   gdb_printf (gdb_stdlog, "<- %s->can_execute_reverse (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -2728,9 +2728,9 @@ dummy_target::execution_direction ()
 enum exec_direction_kind
 debug_target::execution_direction ()
 {
-  enum exec_direction_kind result;
   gdb_printf (gdb_stdlog, "-> %s->execution_direction (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->execution_direction ();
+  enum exec_direction_kind result
+    = this->beneath ()->execution_direction ();
   gdb_printf (gdb_stdlog, "<- %s->execution_direction (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_enum_exec_direction_kind (result);
@@ -2753,9 +2753,9 @@ dummy_target::supports_multi_process ()
 bool
 debug_target::supports_multi_process ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->supports_multi_process (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->supports_multi_process ();
+  bool result
+    = this->beneath ()->supports_multi_process ();
   gdb_printf (gdb_stdlog, "<- %s->supports_multi_process (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -2778,9 +2778,9 @@ dummy_target::supports_enable_disable_tracepoint ()
 bool
 debug_target::supports_enable_disable_tracepoint ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->supports_enable_disable_tracepoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->supports_enable_disable_tracepoint ();
+  bool result
+    = this->beneath ()->supports_enable_disable_tracepoint ();
   gdb_printf (gdb_stdlog, "<- %s->supports_enable_disable_tracepoint (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -2803,9 +2803,9 @@ dummy_target::supports_disable_randomization ()
 bool
 debug_target::supports_disable_randomization ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->supports_disable_randomization (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->supports_disable_randomization ();
+  bool result
+    = this->beneath ()->supports_disable_randomization ();
   gdb_printf (gdb_stdlog, "<- %s->supports_disable_randomization (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -2828,9 +2828,9 @@ dummy_target::supports_string_tracing ()
 bool
 debug_target::supports_string_tracing ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->supports_string_tracing (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->supports_string_tracing ();
+  bool result
+    = this->beneath ()->supports_string_tracing ();
   gdb_printf (gdb_stdlog, "<- %s->supports_string_tracing (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -2853,9 +2853,9 @@ dummy_target::supports_evaluation_of_breakpoint_conditions ()
 bool
 debug_target::supports_evaluation_of_breakpoint_conditions ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->supports_evaluation_of_breakpoint_conditions (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->supports_evaluation_of_breakpoint_conditions ();
+  bool result
+    = this->beneath ()->supports_evaluation_of_breakpoint_conditions ();
   gdb_printf (gdb_stdlog, "<- %s->supports_evaluation_of_breakpoint_conditions (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -2878,9 +2878,9 @@ dummy_target::supports_dumpcore ()
 bool
 debug_target::supports_dumpcore ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->supports_dumpcore (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->supports_dumpcore ();
+  bool result
+    = this->beneath ()->supports_dumpcore ();
   gdb_printf (gdb_stdlog, "<- %s->supports_dumpcore (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -2924,9 +2924,9 @@ dummy_target::can_run_breakpoint_commands ()
 bool
 debug_target::can_run_breakpoint_commands ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->can_run_breakpoint_commands (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->can_run_breakpoint_commands ();
+  bool result
+    = this->beneath ()->can_run_breakpoint_commands ();
   gdb_printf (gdb_stdlog, "<- %s->can_run_breakpoint_commands (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -2949,9 +2949,9 @@ dummy_target::thread_architecture (ptid_t arg0)
 struct gdbarch *
 debug_target::thread_architecture (ptid_t arg0)
 {
-  struct gdbarch * result;
   gdb_printf (gdb_stdlog, "-> %s->thread_architecture (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->thread_architecture (arg0);
+  struct gdbarch * result
+    = this->beneath ()->thread_architecture (arg0);
   gdb_printf (gdb_stdlog, "<- %s->thread_architecture (", this->beneath ()->shortname ());
   target_debug_print_ptid_t (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -2975,9 +2975,9 @@ dummy_target::thread_address_space (ptid_t arg0)
 struct address_space *
 debug_target::thread_address_space (ptid_t arg0)
 {
-  struct address_space * result;
   gdb_printf (gdb_stdlog, "-> %s->thread_address_space (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->thread_address_space (arg0);
+  struct address_space * result
+    = this->beneath ()->thread_address_space (arg0);
   gdb_printf (gdb_stdlog, "<- %s->thread_address_space (", this->beneath ()->shortname ());
   target_debug_print_ptid_t (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -3001,9 +3001,9 @@ dummy_target::filesystem_is_local ()
 bool
 debug_target::filesystem_is_local ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->filesystem_is_local (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->filesystem_is_local ();
+  bool result
+    = this->beneath ()->filesystem_is_local ();
   gdb_printf (gdb_stdlog, "<- %s->filesystem_is_local (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -3069,9 +3069,9 @@ dummy_target::can_download_tracepoint ()
 bool
 debug_target::can_download_tracepoint ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->can_download_tracepoint (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->can_download_tracepoint ();
+  bool result
+    = this->beneath ()->can_download_tracepoint ();
   gdb_printf (gdb_stdlog, "<- %s->can_download_tracepoint (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -3202,9 +3202,9 @@ dummy_target::get_trace_status (struct trace_status *arg0)
 int
 debug_target::get_trace_status (struct trace_status *arg0)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->get_trace_status (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->get_trace_status (arg0);
+  int result
+    = this->beneath ()->get_trace_status (arg0);
   gdb_printf (gdb_stdlog, "<- %s->get_trace_status (", this->beneath ()->shortname ());
   target_debug_print_struct_trace_status_p (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -3273,9 +3273,9 @@ dummy_target::trace_find (enum trace_find_type arg0, int arg1, CORE_ADDR arg2, C
 int
 debug_target::trace_find (enum trace_find_type arg0, int arg1, CORE_ADDR arg2, CORE_ADDR arg3, int *arg4)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->trace_find (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->trace_find (arg0, arg1, arg2, arg3, arg4);
+  int result
+    = this->beneath ()->trace_find (arg0, arg1, arg2, arg3, arg4);
   gdb_printf (gdb_stdlog, "<- %s->trace_find (", this->beneath ()->shortname ());
   target_debug_print_enum_trace_find_type (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -3307,9 +3307,9 @@ dummy_target::get_trace_state_variable_value (int arg0, LONGEST *arg1)
 bool
 debug_target::get_trace_state_variable_value (int arg0, LONGEST *arg1)
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->get_trace_state_variable_value (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->get_trace_state_variable_value (arg0, arg1);
+  bool result
+    = this->beneath ()->get_trace_state_variable_value (arg0, arg1);
   gdb_printf (gdb_stdlog, "<- %s->get_trace_state_variable_value (", this->beneath ()->shortname ());
   target_debug_print_int (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -3335,9 +3335,9 @@ dummy_target::save_trace_data (const char *arg0)
 int
 debug_target::save_trace_data (const char *arg0)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->save_trace_data (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->save_trace_data (arg0);
+  int result
+    = this->beneath ()->save_trace_data (arg0);
   gdb_printf (gdb_stdlog, "<- %s->save_trace_data (", this->beneath ()->shortname ());
   target_debug_print_const_char_p (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -3361,9 +3361,9 @@ dummy_target::upload_tracepoints (struct uploaded_tp **arg0)
 int
 debug_target::upload_tracepoints (struct uploaded_tp **arg0)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->upload_tracepoints (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->upload_tracepoints (arg0);
+  int result
+    = this->beneath ()->upload_tracepoints (arg0);
   gdb_printf (gdb_stdlog, "<- %s->upload_tracepoints (", this->beneath ()->shortname ());
   target_debug_print_struct_uploaded_tp_pp (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -3387,9 +3387,9 @@ dummy_target::upload_trace_state_variables (struct uploaded_tsv **arg0)
 int
 debug_target::upload_trace_state_variables (struct uploaded_tsv **arg0)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->upload_trace_state_variables (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->upload_trace_state_variables (arg0);
+  int result
+    = this->beneath ()->upload_trace_state_variables (arg0);
   gdb_printf (gdb_stdlog, "<- %s->upload_trace_state_variables (", this->beneath ()->shortname ());
   target_debug_print_struct_uploaded_tsv_pp (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -3413,9 +3413,9 @@ dummy_target::get_raw_trace_data (gdb_byte *arg0, ULONGEST arg1, LONGEST arg2)
 LONGEST
 debug_target::get_raw_trace_data (gdb_byte *arg0, ULONGEST arg1, LONGEST arg2)
 {
-  LONGEST result;
   gdb_printf (gdb_stdlog, "-> %s->get_raw_trace_data (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->get_raw_trace_data (arg0, arg1, arg2);
+  LONGEST result
+    = this->beneath ()->get_raw_trace_data (arg0, arg1, arg2);
   gdb_printf (gdb_stdlog, "<- %s->get_raw_trace_data (", this->beneath ()->shortname ());
   target_debug_print_gdb_byte_p (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -3443,9 +3443,9 @@ dummy_target::get_min_fast_tracepoint_insn_len ()
 int
 debug_target::get_min_fast_tracepoint_insn_len ()
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->get_min_fast_tracepoint_insn_len (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->get_min_fast_tracepoint_insn_len ();
+  int result
+    = this->beneath ()->get_min_fast_tracepoint_insn_len ();
   gdb_printf (gdb_stdlog, "<- %s->get_min_fast_tracepoint_insn_len (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_int (result);
@@ -3531,9 +3531,9 @@ dummy_target::set_trace_notes (const char *arg0, const char *arg1, const char *a
 bool
 debug_target::set_trace_notes (const char *arg0, const char *arg1, const char *arg2)
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->set_trace_notes (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->set_trace_notes (arg0, arg1, arg2);
+  bool result
+    = this->beneath ()->set_trace_notes (arg0, arg1, arg2);
   gdb_printf (gdb_stdlog, "<- %s->set_trace_notes (", this->beneath ()->shortname ());
   target_debug_print_const_char_p (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -3561,9 +3561,9 @@ dummy_target::core_of_thread (ptid_t arg0)
 int
 debug_target::core_of_thread (ptid_t arg0)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->core_of_thread (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->core_of_thread (arg0);
+  int result
+    = this->beneath ()->core_of_thread (arg0);
   gdb_printf (gdb_stdlog, "<- %s->core_of_thread (", this->beneath ()->shortname ());
   target_debug_print_ptid_t (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -3587,9 +3587,9 @@ dummy_target::verify_memory (const gdb_byte *arg0, CORE_ADDR arg1, ULONGEST arg2
 int
 debug_target::verify_memory (const gdb_byte *arg0, CORE_ADDR arg1, ULONGEST arg2)
 {
-  int result;
   gdb_printf (gdb_stdlog, "-> %s->verify_memory (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->verify_memory (arg0, arg1, arg2);
+  int result
+    = this->beneath ()->verify_memory (arg0, arg1, arg2);
   gdb_printf (gdb_stdlog, "<- %s->verify_memory (", this->beneath ()->shortname ());
   target_debug_print_const_gdb_byte_p (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -3617,9 +3617,9 @@ dummy_target::get_tib_address (ptid_t arg0, CORE_ADDR *arg1)
 bool
 debug_target::get_tib_address (ptid_t arg0, CORE_ADDR *arg1)
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->get_tib_address (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->get_tib_address (arg0, arg1);
+  bool result
+    = this->beneath ()->get_tib_address (arg0, arg1);
   gdb_printf (gdb_stdlog, "<- %s->get_tib_address (", this->beneath ()->shortname ());
   target_debug_print_ptid_t (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -3665,9 +3665,9 @@ dummy_target::static_tracepoint_marker_at (CORE_ADDR arg0, static_tracepoint_mar
 bool
 debug_target::static_tracepoint_marker_at (CORE_ADDR arg0, static_tracepoint_marker *arg1)
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->static_tracepoint_marker_at (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->static_tracepoint_marker_at (arg0, arg1);
+  bool result
+    = this->beneath ()->static_tracepoint_marker_at (arg0, arg1);
   gdb_printf (gdb_stdlog, "<- %s->static_tracepoint_marker_at (", this->beneath ()->shortname ());
   target_debug_print_CORE_ADDR (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -3693,9 +3693,9 @@ dummy_target::static_tracepoint_markers_by_strid (const char *arg0)
 std::vector<static_tracepoint_marker>
 debug_target::static_tracepoint_markers_by_strid (const char *arg0)
 {
-  std::vector<static_tracepoint_marker> result;
   gdb_printf (gdb_stdlog, "-> %s->static_tracepoint_markers_by_strid (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->static_tracepoint_markers_by_strid (arg0);
+  std::vector<static_tracepoint_marker> result
+    = this->beneath ()->static_tracepoint_markers_by_strid (arg0);
   gdb_printf (gdb_stdlog, "<- %s->static_tracepoint_markers_by_strid (", this->beneath ()->shortname ());
   target_debug_print_const_char_p (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -3719,9 +3719,9 @@ dummy_target::traceframe_info ()
 traceframe_info_up
 debug_target::traceframe_info ()
 {
-  traceframe_info_up result;
   gdb_printf (gdb_stdlog, "-> %s->traceframe_info (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->traceframe_info ();
+  traceframe_info_up result
+    = this->beneath ()->traceframe_info ();
   gdb_printf (gdb_stdlog, "<- %s->traceframe_info (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_traceframe_info_up (result);
@@ -3744,9 +3744,9 @@ dummy_target::use_agent (bool arg0)
 bool
 debug_target::use_agent (bool arg0)
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->use_agent (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->use_agent (arg0);
+  bool result
+    = this->beneath ()->use_agent (arg0);
   gdb_printf (gdb_stdlog, "<- %s->use_agent (", this->beneath ()->shortname ());
   target_debug_print_bool (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -3770,9 +3770,9 @@ dummy_target::can_use_agent ()
 bool
 debug_target::can_use_agent ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->can_use_agent (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->can_use_agent ();
+  bool result
+    = this->beneath ()->can_use_agent ();
   gdb_printf (gdb_stdlog, "<- %s->can_use_agent (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -3795,9 +3795,9 @@ dummy_target::enable_btrace (thread_info *arg0, const struct btrace_config *arg1
 struct btrace_target_info *
 debug_target::enable_btrace (thread_info *arg0, const struct btrace_config *arg1)
 {
-  struct btrace_target_info * result;
   gdb_printf (gdb_stdlog, "-> %s->enable_btrace (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->enable_btrace (arg0, arg1);
+  struct btrace_target_info * result
+    = this->beneath ()->enable_btrace (arg0, arg1);
   gdb_printf (gdb_stdlog, "<- %s->enable_btrace (", this->beneath ()->shortname ());
   target_debug_print_thread_info_p (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -3867,9 +3867,9 @@ dummy_target::read_btrace (struct btrace_data *arg0, struct btrace_target_info *
 enum btrace_error
 debug_target::read_btrace (struct btrace_data *arg0, struct btrace_target_info *arg1, enum btrace_read_type arg2)
 {
-  enum btrace_error result;
   gdb_printf (gdb_stdlog, "-> %s->read_btrace (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->read_btrace (arg0, arg1, arg2);
+  enum btrace_error result
+    = this->beneath ()->read_btrace (arg0, arg1, arg2);
   gdb_printf (gdb_stdlog, "<- %s->read_btrace (", this->beneath ()->shortname ());
   target_debug_print_struct_btrace_data_p (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -3897,9 +3897,9 @@ dummy_target::btrace_conf (const struct btrace_target_info *arg0)
 const struct btrace_config *
 debug_target::btrace_conf (const struct btrace_target_info *arg0)
 {
-  const struct btrace_config * result;
   gdb_printf (gdb_stdlog, "-> %s->btrace_conf (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->btrace_conf (arg0);
+  const struct btrace_config * result
+    = this->beneath ()->btrace_conf (arg0);
   gdb_printf (gdb_stdlog, "<- %s->btrace_conf (", this->beneath ()->shortname ());
   target_debug_print_const_struct_btrace_target_info_p (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -3923,9 +3923,9 @@ dummy_target::record_method (ptid_t arg0)
 enum record_method
 debug_target::record_method (ptid_t arg0)
 {
-  enum record_method result;
   gdb_printf (gdb_stdlog, "-> %s->record_method (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->record_method (arg0);
+  enum record_method result
+    = this->beneath ()->record_method (arg0);
   gdb_printf (gdb_stdlog, "<- %s->record_method (", this->beneath ()->shortname ());
   target_debug_print_ptid_t (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -4011,9 +4011,9 @@ dummy_target::supports_delete_record ()
 bool
 debug_target::supports_delete_record ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->supports_delete_record (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->supports_delete_record ();
+  bool result
+    = this->beneath ()->supports_delete_record ();
   gdb_printf (gdb_stdlog, "<- %s->supports_delete_record (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -4057,9 +4057,9 @@ dummy_target::record_is_replaying (ptid_t arg0)
 bool
 debug_target::record_is_replaying (ptid_t arg0)
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->record_is_replaying (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->record_is_replaying (arg0);
+  bool result
+    = this->beneath ()->record_is_replaying (arg0);
   gdb_printf (gdb_stdlog, "<- %s->record_is_replaying (", this->beneath ()->shortname ());
   target_debug_print_ptid_t (arg0);
   gdb_puts (") = ", gdb_stdlog);
@@ -4083,9 +4083,9 @@ dummy_target::record_will_replay (ptid_t arg0, int arg1)
 bool
 debug_target::record_will_replay (ptid_t arg0, int arg1)
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->record_will_replay (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->record_will_replay (arg0, arg1);
+  bool result
+    = this->beneath ()->record_will_replay (arg0, arg1);
   gdb_printf (gdb_stdlog, "<- %s->record_will_replay (", this->beneath ()->shortname ());
   target_debug_print_ptid_t (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -4347,9 +4347,9 @@ dummy_target::augmented_libraries_svr4_read ()
 bool
 debug_target::augmented_libraries_svr4_read ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->augmented_libraries_svr4_read (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->augmented_libraries_svr4_read ();
+  bool result
+    = this->beneath ()->augmented_libraries_svr4_read ();
   gdb_printf (gdb_stdlog, "<- %s->augmented_libraries_svr4_read (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -4372,9 +4372,9 @@ dummy_target::get_unwinder ()
 const struct frame_unwind *
 debug_target::get_unwinder ()
 {
-  const struct frame_unwind * result;
   gdb_printf (gdb_stdlog, "-> %s->get_unwinder (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->get_unwinder ();
+  const struct frame_unwind * result
+    = this->beneath ()->get_unwinder ();
   gdb_printf (gdb_stdlog, "<- %s->get_unwinder (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_const_struct_frame_unwind_p (result);
@@ -4397,9 +4397,9 @@ dummy_target::get_tailcall_unwinder ()
 const struct frame_unwind *
 debug_target::get_tailcall_unwinder ()
 {
-  const struct frame_unwind * result;
   gdb_printf (gdb_stdlog, "-> %s->get_tailcall_unwinder (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->get_tailcall_unwinder ();
+  const struct frame_unwind * result
+    = this->beneath ()->get_tailcall_unwinder ();
   gdb_printf (gdb_stdlog, "<- %s->get_tailcall_unwinder (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_const_struct_frame_unwind_p (result);
@@ -4462,9 +4462,9 @@ dummy_target::supports_memory_tagging ()
 bool
 debug_target::supports_memory_tagging ()
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->supports_memory_tagging (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->supports_memory_tagging ();
+  bool result
+    = this->beneath ()->supports_memory_tagging ();
   gdb_printf (gdb_stdlog, "<- %s->supports_memory_tagging (", this->beneath ()->shortname ());
   gdb_puts (") = ", gdb_stdlog);
   target_debug_print_bool (result);
@@ -4487,9 +4487,9 @@ dummy_target::fetch_memtags (CORE_ADDR arg0, size_t arg1, gdb::byte_vector &arg2
 bool
 debug_target::fetch_memtags (CORE_ADDR arg0, size_t arg1, gdb::byte_vector &arg2, int arg3)
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->fetch_memtags (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->fetch_memtags (arg0, arg1, arg2, arg3);
+  bool result
+    = this->beneath ()->fetch_memtags (arg0, arg1, arg2, arg3);
   gdb_printf (gdb_stdlog, "<- %s->fetch_memtags (", this->beneath ()->shortname ());
   target_debug_print_CORE_ADDR (arg0);
   gdb_puts (", ", gdb_stdlog);
@@ -4519,9 +4519,9 @@ dummy_target::store_memtags (CORE_ADDR arg0, size_t arg1, const gdb::byte_vector
 bool
 debug_target::store_memtags (CORE_ADDR arg0, size_t arg1, const gdb::byte_vector &arg2, int arg3)
 {
-  bool result;
   gdb_printf (gdb_stdlog, "-> %s->store_memtags (...)\n", this->beneath ()->shortname ());
-  result = this->beneath ()->store_memtags (arg0, arg1, arg2, arg3);
+  bool result
+    = this->beneath ()->store_memtags (arg0, arg1, arg2, arg3);
   gdb_printf (gdb_stdlog, "<- %s->store_memtags (", this->beneath ()->shortname ());
   target_debug_print_CORE_ADDR (arg0);
   gdb_puts (", ", gdb_stdlog);

base-commit: 29c0e7512493aa6cdd713024909c352964fe1b1a
-- 
2.35.3


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 2/2] [gdb/build] Return const reference in thread_info_to_thread_handle
  2023-08-21 10:53 [PATCH 1/2] [gdb/build] Support reference return type in make-target-delegates.py Tom de Vries
@ 2023-08-21 10:53 ` Tom de Vries
  2023-08-22 14:43   ` Pedro Alves
  2023-08-23 15:43 ` [PATCH 1/2] [gdb/build] Support reference return type in make-target-delegates.py Pedro Alves
  1 sibling, 1 reply; 8+ messages in thread
From: Tom de Vries @ 2023-08-21 10:53 UTC (permalink / raw)
  To: gdb-patches

In remote_target::thread_info_to_thread_handle we return a copy:
...
gdb::byte_vector
remote_target::thread_info_to_thread_handle (struct thread_info *tp)
{
  remote_thread_info *priv = get_remote_thread_info (tp);
  return priv->thread_handle;
}
...

Fix this by returning a const reference instead:
...
const gdb::optional<gdb::byte_vector> &
remote_target::thread_info_to_thread_handle (struct thread_info *tp)
...

Returning a gdb::optional allows us to return a nullptr, or std::nullopt in
std::optional terms, something that is required by
thread_db_target::thread_info_to_thread_handle.

In gdb we use gdb::optional instead std::optional, because std::optional is
availabe starting c++17 and we support c++11 and c++14, but gdb::nullopt is
currently not available, though a submission is available [1].

So we use a kludge gdb_optional_byte_vector_nullopt.

Tested on x86_64-linux.

This fixes the build when building with -std=c++20.

[1] https://sourceware.org/pipermail/gdb-patches/2020-May/168800.html
---
 gdb/linux-thread-db.c  | 12 +++++++-----
 gdb/remote.c           | 14 +++++++-------
 gdb/target-debug.h     |  8 ++++++++
 gdb/target-delegates.c | 16 ++++++++--------
 gdb/target.c           | 15 +++++++++++++--
 gdb/target.h           |  9 ++++++---
 6 files changed, 49 insertions(+), 25 deletions(-)

diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 7d9fd57da0c..f238b26445b 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -107,7 +107,8 @@ class thread_db_target final : public target_ops
   thread_info *thread_handle_to_thread_info (const gdb_byte *thread_handle,
 					     int handle_len,
 					     inferior *inf) override;
-  gdb::byte_vector thread_info_to_thread_handle (struct thread_info *) override;
+  const gdb::optional<gdb::byte_vector> &
+    thread_info_to_thread_handle (struct thread_info *) override;
 };
 
 static std::string libthread_db_search_path = LIBTHREAD_DB_SEARCH_PATH;
@@ -312,6 +313,7 @@ struct thread_db_thread_info : public private_thread_info
   /* Cached thread state.  */
   td_thrhandle_t th {};
   thread_t tid {};
+  gdb::optional<gdb::byte_vector> thread_handle;
 };
 
 static thread_db_thread_info *
@@ -1724,20 +1726,20 @@ thread_db_target::thread_handle_to_thread_info (const gdb_byte *thread_handle,
 
 /* Return the thread handle associated the thread_info pointer TP.  */
 
-gdb::byte_vector
+const gdb::optional<gdb::byte_vector> &
 thread_db_target::thread_info_to_thread_handle (struct thread_info *tp)
 {
   thread_db_thread_info *priv = get_thread_db_thread_info (tp);
 
   if (priv == NULL)
-    return gdb::byte_vector ();
+    return gdb_optional_byte_vector_nullopt ();
 
   int handle_size = sizeof (priv->tid);
   gdb::byte_vector rv (handle_size);
 
   memcpy (rv.data (), &priv->tid, handle_size);
-
-  return rv;
+  priv->thread_handle.emplace (std::move (rv));
+  return priv->thread_handle;
 }
 
 /* Get the address of the thread local variable in load module LM which
diff --git a/gdb/remote.c b/gdb/remote.c
index 7abe08439b5..a3650bc7003 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -784,8 +784,8 @@ class remote_target : public process_stratum_target
 					     int handle_len,
 					     inferior *inf) override;
 
-  gdb::byte_vector thread_info_to_thread_handle (struct thread_info *tp)
-						 override;
+  const gdb::optional<gdb::byte_vector> &
+    thread_info_to_thread_handle (struct thread_info *tp) override;
 
   void stop (ptid_t) override;
 
@@ -1452,7 +1452,7 @@ struct remote_thread_info : public private_thread_info
 
   /* Thread handle, perhaps a pthread_t or thread_t value, stored as a
      sequence of bytes.  */
-  gdb::byte_vector thread_handle;
+  gdb::optional<gdb::byte_vector> thread_handle;
 
   /* Whether the target stopped for a breakpoint/watchpoint.  */
   enum target_stop_reason stop_reason = TARGET_STOPPED_BY_NO_REASON;
@@ -14538,10 +14538,10 @@ remote_target::thread_handle_to_thread_info (const gdb_byte *thread_handle,
 
       if (tp->inf == inf && priv != NULL)
 	{
-	  if (handle_len != priv->thread_handle.size ())
+	  if (handle_len != priv->thread_handle->size ())
 	    error (_("Thread handle size mismatch: %d vs %zu (from remote)"),
-		   handle_len, priv->thread_handle.size ());
-	  if (memcmp (thread_handle, priv->thread_handle.data (),
+		   handle_len, priv->thread_handle->size ());
+	  if (memcmp (thread_handle, priv->thread_handle->data (),
 		      handle_len) == 0)
 	    return tp;
 	}
@@ -14550,7 +14550,7 @@ remote_target::thread_handle_to_thread_info (const gdb_byte *thread_handle,
   return NULL;
 }
 
-gdb::byte_vector
+const gdb::optional<gdb::byte_vector> &
 remote_target::thread_info_to_thread_handle (struct thread_info *tp)
 {
   remote_thread_info *priv = get_remote_thread_info (tp);
diff --git a/gdb/target-debug.h b/gdb/target-debug.h
index acb01d47e7c..9afef943fab 100644
--- a/gdb/target-debug.h
+++ b/gdb/target-debug.h
@@ -236,4 +236,12 @@ target_debug_print_gdb_byte_vector_r (gdb::byte_vector &vector)
 {
   target_debug_print_const_gdb_byte_vector_r (vector);
 }
+
+static void
+target_debug_print_const_gdb_optional_gdb_byte_vector_r (const gdb::optional<gdb::byte_vector> &vector)
+{
+  if (!vector.has_value ())
+    return;
+  target_debug_print_const_gdb_byte_vector_r (*vector);
+}
 #endif /* TARGET_DEBUG_H */
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index 06f22d57c27..fe293142a23 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -89,7 +89,7 @@ struct dummy_target : public target_ops
   const char *extra_thread_info (thread_info *arg0) override;
   const char *thread_name (thread_info *arg0) override;
   thread_info *thread_handle_to_thread_info (const gdb_byte *arg0, int arg1, inferior *arg2) override;
-  gdb::byte_vector thread_info_to_thread_handle (struct thread_info *arg0) override;
+  const gdb::optional<gdb::byte_vector> & thread_info_to_thread_handle (struct thread_info *arg0) override;
   void stop (ptid_t arg0) override;
   void interrupt () override;
   void pass_ctrlc () override;
@@ -263,7 +263,7 @@ struct debug_target : public target_ops
   const char *extra_thread_info (thread_info *arg0) override;
   const char *thread_name (thread_info *arg0) override;
   thread_info *thread_handle_to_thread_info (const gdb_byte *arg0, int arg1, inferior *arg2) override;
-  gdb::byte_vector thread_info_to_thread_handle (struct thread_info *arg0) override;
+  const gdb::optional<gdb::byte_vector> & thread_info_to_thread_handle (struct thread_info *arg0) override;
   void stop (ptid_t arg0) override;
   void interrupt () override;
   void pass_ctrlc () override;
@@ -1871,28 +1871,28 @@ debug_target::thread_handle_to_thread_info (const gdb_byte *arg0, int arg1, infe
   return result;
 }
 
-gdb::byte_vector
+const gdb::optional<gdb::byte_vector> &
 target_ops::thread_info_to_thread_handle (struct thread_info *arg0)
 {
   return this->beneath ()->thread_info_to_thread_handle (arg0);
 }
 
-gdb::byte_vector
+const gdb::optional<gdb::byte_vector> &
 dummy_target::thread_info_to_thread_handle (struct thread_info *arg0)
 {
-  return gdb::byte_vector ();
+  return gdb_optional_byte_vector_nullopt ();
 }
 
-gdb::byte_vector
+const gdb::optional<gdb::byte_vector> &
 debug_target::thread_info_to_thread_handle (struct thread_info *arg0)
 {
   gdb_printf (gdb_stdlog, "-> %s->thread_info_to_thread_handle (...)\n", this->beneath ()->shortname ());
-  gdb::byte_vector result
+  const gdb::optional<gdb::byte_vector> & result
     = this->beneath ()->thread_info_to_thread_handle (arg0);
   gdb_printf (gdb_stdlog, "<- %s->thread_info_to_thread_handle (", this->beneath ()->shortname ());
   target_debug_print_struct_thread_info_p (arg0);
   gdb_puts (") = ", gdb_stdlog);
-  target_debug_print_gdb_byte_vector (result);
+  target_debug_print_const_gdb_optional_gdb_byte_vector_r (result);
   gdb_puts ("\n", gdb_stdlog);
   return result;
 }
diff --git a/gdb/target.c b/gdb/target.c
index 16f43d072cd..32383ad69b0 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -55,6 +55,17 @@
 #include "valprint.h"
 #include "cli/cli-decode.h"
 
+/* See target.h.  */
+
+const gdb::optional<gdb::byte_vector> &
+gdb_optional_byte_vector_nullopt ()
+{
+  /* For a generic solution, see this submission (
+     https://sourceware.org/pipermail/gdb-patches/2020-May/168800.html ). */
+  static const gdb::optional<gdb::byte_vector> gdb_optional_byte_vector_nullopt = {};
+  return gdb_optional_byte_vector_nullopt;
+}
+
 static void generic_tls_error (void) ATTRIBUTE_NORETURN;
 
 static void default_terminal_info (struct target_ops *, const char *, int);
@@ -2640,12 +2651,12 @@ target_thread_handle_to_thread_info (const gdb_byte *thread_handle,
 
 /* See target.h.  */
 
-gdb::byte_vector
+const gdb::byte_vector &
 target_thread_info_to_thread_handle (struct thread_info *tip)
 {
   target_ops *target = current_inferior ()->top_target ();
 
-  return target->thread_info_to_thread_handle (tip);
+  return *target->thread_info_to_thread_handle (tip);
 }
 
 void
diff --git a/gdb/target.h b/gdb/target.h
index 6ae400e2cc2..82d474881d1 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -679,8 +679,8 @@ struct target_ops
 						       inferior *inf)
       TARGET_DEFAULT_RETURN (NULL);
     /* See target_thread_info_to_thread_handle.  */
-    virtual gdb::byte_vector thread_info_to_thread_handle (struct thread_info *)
-      TARGET_DEFAULT_RETURN (gdb::byte_vector ());
+    virtual const gdb::optional<gdb::byte_vector> &thread_info_to_thread_handle (struct thread_info *)
+      TARGET_DEFAULT_RETURN (gdb_optional_byte_vector_nullopt ());
     virtual void stop (ptid_t)
       TARGET_DEFAULT_IGNORE ();
     virtual void interrupt ()
@@ -1924,7 +1924,7 @@ extern struct thread_info *target_thread_handle_to_thread_info
 /* Given a thread, return the thread handle, a target-specific sequence of
    bytes which serves as a thread identifier within the program being
    debugged.  */
-extern gdb::byte_vector target_thread_info_to_thread_handle
+extern const gdb::byte_vector &target_thread_info_to_thread_handle
   (struct thread_info *);
 
 /* Attempts to find the pathname of the executable file
@@ -2558,4 +2558,7 @@ extern void target_prepare_to_generate_core (void);
 /* See to_done_generating_core.  */
 extern void target_done_generating_core (void);
 
+/* Type specific nullopt, gdb_optional.h has no support for gdb::nullopt.  */
+extern const gdb::optional<gdb::byte_vector> &gdb_optional_byte_vector_nullopt ();
+
 #endif /* !defined (TARGET_H) */
-- 
2.35.3


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] [gdb/build] Return const reference in thread_info_to_thread_handle
  2023-08-21 10:53 ` [PATCH 2/2] [gdb/build] Return const reference in thread_info_to_thread_handle Tom de Vries
@ 2023-08-22 14:43   ` Pedro Alves
  2023-08-22 17:34     ` Tom de Vries
  0 siblings, 1 reply; 8+ messages in thread
From: Pedro Alves @ 2023-08-22 14:43 UTC (permalink / raw)
  To: Tom de Vries, gdb-patches

On 2023-08-21 11:53, Tom de Vries via Gdb-patches wrote:
> In remote_target::thread_info_to_thread_handle we return a copy:
> ...
> gdb::byte_vector
> remote_target::thread_info_to_thread_handle (struct thread_info *tp)
> {
>   remote_thread_info *priv = get_remote_thread_info (tp);
>   return priv->thread_handle;
> }
> ...
> 
> Fix this by returning a const reference instead:
> ...
> const gdb::optional<gdb::byte_vector> &
> remote_target::thread_info_to_thread_handle (struct thread_info *tp)
> ...
> 
> Returning a gdb::optional allows us to return a nullptr, or std::nullopt in
> std::optional terms, something that is required by
> thread_db_target::thread_info_to_thread_handle.
> 
> In gdb we use gdb::optional instead std::optional, because std::optional is
> availabe starting c++17 and we support c++11 and c++14, but gdb::nullopt is
> currently not available, though a submission is available [1].
> 
> So we use a kludge gdb_optional_byte_vector_nullopt.
> 

IMHO making the function return gdb::array_view<const gdb_byte>
would be even better.  Then the byte_vector is completely an implementation 
detail, and, you wouldn't need to wrap with optional, as you could just
return an empty array_view, like currently we return an empty byte_vector.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] [gdb/build] Return const reference in thread_info_to_thread_handle
  2023-08-22 14:43   ` Pedro Alves
@ 2023-08-22 17:34     ` Tom de Vries
  2023-08-23 15:43       ` Pedro Alves
  0 siblings, 1 reply; 8+ messages in thread
From: Tom de Vries @ 2023-08-22 17:34 UTC (permalink / raw)
  To: Pedro Alves, gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1676 bytes --]

On 8/22/23 16:43, Pedro Alves wrote:
> On 2023-08-21 11:53, Tom de Vries via Gdb-patches wrote:
>> In remote_target::thread_info_to_thread_handle we return a copy:
>> ...
>> gdb::byte_vector
>> remote_target::thread_info_to_thread_handle (struct thread_info *tp)
>> {
>>    remote_thread_info *priv = get_remote_thread_info (tp);
>>    return priv->thread_handle;
>> }
>> ...
>>
>> Fix this by returning a const reference instead:
>> ...
>> const gdb::optional<gdb::byte_vector> &
>> remote_target::thread_info_to_thread_handle (struct thread_info *tp)
>> ...
>>
>> Returning a gdb::optional allows us to return a nullptr, or std::nullopt in
>> std::optional terms, something that is required by
>> thread_db_target::thread_info_to_thread_handle.
>>
>> In gdb we use gdb::optional instead std::optional, because std::optional is
>> availabe starting c++17 and we support c++11 and c++14, but gdb::nullopt is
>> currently not available, though a submission is available [1].
>>
>> So we use a kludge gdb_optional_byte_vector_nullopt.
>>
> 
> IMHO making the function return gdb::array_view<const gdb_byte>
> would be even better.  Then the byte_vector is completely an implementation
> detail, and, you wouldn't need to wrap with optional, as you could just
> return an empty array_view, like currently we return an empty byte_vector.
> 

Hi Pedro,

thanks for the review.

I've given the gdb::array_view<const gdb_byte> a try, and that works 
fine, and greatly simplifies the patch, so thanks for that suggestion.

The first patch is no longer necessary, but we could consider committing 
it nevertheless, since the work is done and may be needed in the future.

Thanks,
- Tom

[-- Attachment #2: 0001-gdb-build-Return-gdb-array_view-in-thread_info_to_th.patch --]
[-- Type: text/x-patch, Size: 9196 bytes --]

From 5efef08023db7f5cf63a028ddf091db591272df3 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Tue, 22 Aug 2023 17:15:48 +0200
Subject: [PATCH] [gdb/build] Return gdb::array_view in
 thread_info_to_thread_handle

In remote_target::thread_info_to_thread_handle we return a copy:
...
gdb::byte_vector
remote_target::thread_info_to_thread_handle (struct thread_info *tp)
{
  remote_thread_info *priv = get_remote_thread_info (tp);
  return priv->thread_handle;
}
...

Fix this by returning a gdb::array_view instead:
...
gdb::array_view<const gdb_byte>
remote_target::thread_info_to_thread_handle (struct thread_info *tp)
...

Tested on x86_64-linux.

This fixes the build when building with -std=c++20.
---
 gdb/linux-thread-db.c     | 13 +++++++------
 gdb/python/py-infthread.c |  4 ++--
 gdb/remote.c              |  6 +++---
 gdb/target-debug.h        | 14 ++++++++++++++
 gdb/target-delegates.c    | 16 ++++++++--------
 gdb/target.c              |  2 +-
 gdb/target.h              | 10 +++++++---
 7 files changed, 42 insertions(+), 23 deletions(-)

diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 7d9fd57da0c..16c250c104d 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -107,7 +107,7 @@ class thread_db_target final : public target_ops
   thread_info *thread_handle_to_thread_info (const gdb_byte *thread_handle,
 					     int handle_len,
 					     inferior *inf) override;
-  gdb::byte_vector thread_info_to_thread_handle (struct thread_info *) override;
+  gdb::array_view<const gdb_byte> thread_info_to_thread_handle (struct thread_info *) override;
 };
 
 static std::string libthread_db_search_path = LIBTHREAD_DB_SEARCH_PATH;
@@ -312,6 +312,7 @@ struct thread_db_thread_info : public private_thread_info
   /* Cached thread state.  */
   td_thrhandle_t th {};
   thread_t tid {};
+  gdb::optional<gdb::byte_vector> thread_handle;
 };
 
 static thread_db_thread_info *
@@ -1724,20 +1725,20 @@ thread_db_target::thread_handle_to_thread_info (const gdb_byte *thread_handle,
 
 /* Return the thread handle associated the thread_info pointer TP.  */
 
-gdb::byte_vector
+gdb::array_view<const gdb_byte>
 thread_db_target::thread_info_to_thread_handle (struct thread_info *tp)
 {
   thread_db_thread_info *priv = get_thread_db_thread_info (tp);
 
   if (priv == NULL)
-    return gdb::byte_vector ();
+    return {};
 
   int handle_size = sizeof (priv->tid);
-  gdb::byte_vector rv (handle_size);
+  priv->thread_handle.emplace (handle_size);
 
-  memcpy (rv.data (), &priv->tid, handle_size);
+  memcpy (priv->thread_handle->data (), &priv->tid, handle_size);
 
-  return rv;
+  return *priv->thread_handle;
 }
 
 /* Get the address of the thread local variable in load module LM which
diff --git a/gdb/python/py-infthread.c b/gdb/python/py-infthread.c
index 1bd25d01320..00d7171de64 100644
--- a/gdb/python/py-infthread.c
+++ b/gdb/python/py-infthread.c
@@ -291,8 +291,8 @@ thpy_thread_handle (PyObject *self, PyObject *args)
   thread_object *thread_obj = (thread_object *) self;
   THPY_REQUIRE_VALID (thread_obj);
 
-  gdb::byte_vector hv;
-  
+  gdb::array_view<const gdb_byte> hv;
+
   try
     {
       hv = target_thread_info_to_thread_handle (thread_obj->thread);
diff --git a/gdb/remote.c b/gdb/remote.c
index 7abe08439b5..5af40bd704c 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -784,8 +784,8 @@ class remote_target : public process_stratum_target
 					     int handle_len,
 					     inferior *inf) override;
 
-  gdb::byte_vector thread_info_to_thread_handle (struct thread_info *tp)
-						 override;
+  gdb::array_view<const gdb_byte> thread_info_to_thread_handle (struct thread_info *tp)
+    override;
 
   void stop (ptid_t) override;
 
@@ -14550,7 +14550,7 @@ remote_target::thread_handle_to_thread_info (const gdb_byte *thread_handle,
   return NULL;
 }
 
-gdb::byte_vector
+gdb::array_view<const gdb_byte>
 remote_target::thread_info_to_thread_handle (struct thread_info *tp)
 {
   remote_thread_info *priv = get_remote_thread_info (tp);
diff --git a/gdb/target-debug.h b/gdb/target-debug.h
index acb01d47e7c..31c25e9aefd 100644
--- a/gdb/target-debug.h
+++ b/gdb/target-debug.h
@@ -236,4 +236,18 @@ target_debug_print_gdb_byte_vector_r (gdb::byte_vector &vector)
 {
   target_debug_print_const_gdb_byte_vector_r (vector);
 }
+
+static void
+target_debug_print_gdb_array_view_const_gdb_byte (gdb::array_view<const gdb_byte> &vector)
+{
+  gdb_puts ("{", gdb_stdlog);
+
+  for (size_t i = 0; i < vector.size (); i++)
+    {
+      gdb_printf (gdb_stdlog, " %s",
+		  phex_nz (vector[i], 1));
+    }
+  gdb_puts (" }", gdb_stdlog);
+}
+
 #endif /* TARGET_DEBUG_H */
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index e4e14380181..81261b13211 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -89,7 +89,7 @@ struct dummy_target : public target_ops
   const char *extra_thread_info (thread_info *arg0) override;
   const char *thread_name (thread_info *arg0) override;
   thread_info *thread_handle_to_thread_info (const gdb_byte *arg0, int arg1, inferior *arg2) override;
-  gdb::byte_vector thread_info_to_thread_handle (struct thread_info *arg0) override;
+  gdb::array_view<const_gdb_byte> thread_info_to_thread_handle (struct thread_info *arg0) override;
   void stop (ptid_t arg0) override;
   void interrupt () override;
   void pass_ctrlc () override;
@@ -263,7 +263,7 @@ struct debug_target : public target_ops
   const char *extra_thread_info (thread_info *arg0) override;
   const char *thread_name (thread_info *arg0) override;
   thread_info *thread_handle_to_thread_info (const gdb_byte *arg0, int arg1, inferior *arg2) override;
-  gdb::byte_vector thread_info_to_thread_handle (struct thread_info *arg0) override;
+  gdb::array_view<const_gdb_byte> thread_info_to_thread_handle (struct thread_info *arg0) override;
   void stop (ptid_t arg0) override;
   void interrupt () override;
   void pass_ctrlc () override;
@@ -1871,28 +1871,28 @@ debug_target::thread_handle_to_thread_info (const gdb_byte *arg0, int arg1, infe
   return result;
 }
 
-gdb::byte_vector
+gdb::array_view<const_gdb_byte>
 target_ops::thread_info_to_thread_handle (struct thread_info *arg0)
 {
   return this->beneath ()->thread_info_to_thread_handle (arg0);
 }
 
-gdb::byte_vector
+gdb::array_view<const_gdb_byte>
 dummy_target::thread_info_to_thread_handle (struct thread_info *arg0)
 {
-  return gdb::byte_vector ();
+  return gdb::array_view<const gdb_byte> ();
 }
 
-gdb::byte_vector
+gdb::array_view<const_gdb_byte>
 debug_target::thread_info_to_thread_handle (struct thread_info *arg0)
 {
-  gdb::byte_vector result;
+  gdb::array_view<const_gdb_byte> result;
   gdb_printf (gdb_stdlog, "-> %s->thread_info_to_thread_handle (...)\n", this->beneath ()->shortname ());
   result = this->beneath ()->thread_info_to_thread_handle (arg0);
   gdb_printf (gdb_stdlog, "<- %s->thread_info_to_thread_handle (", this->beneath ()->shortname ());
   target_debug_print_struct_thread_info_p (arg0);
   gdb_puts (") = ", gdb_stdlog);
-  target_debug_print_gdb_byte_vector (result);
+  target_debug_print_gdb_array_view_const_gdb_byte (result);
   gdb_puts ("\n", gdb_stdlog);
   return result;
 }
diff --git a/gdb/target.c b/gdb/target.c
index 16f43d072cd..8b1d48d91d9 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -2640,7 +2640,7 @@ target_thread_handle_to_thread_info (const gdb_byte *thread_handle,
 
 /* See target.h.  */
 
-gdb::byte_vector
+gdb::array_view<const gdb_byte>
 target_thread_info_to_thread_handle (struct thread_info *tip)
 {
   target_ops *target = current_inferior ()->top_target ();
diff --git a/gdb/target.h b/gdb/target.h
index 6ae400e2cc2..0cea955cbd7 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -39,6 +39,10 @@ struct expression;
 struct dcache_struct;
 struct inferior;
 
+/* Define const gdb_byte using one identifier, to make it easy for
+   make-target-delegates.py to parse.  */
+typedef const gdb_byte const_gdb_byte;
+
 #include "infrun.h" /* For enum exec_direction_kind.  */
 #include "breakpoint.h" /* For enum bptype.  */
 #include "gdbsupport/scoped_restore.h"
@@ -679,8 +683,8 @@ struct target_ops
 						       inferior *inf)
       TARGET_DEFAULT_RETURN (NULL);
     /* See target_thread_info_to_thread_handle.  */
-    virtual gdb::byte_vector thread_info_to_thread_handle (struct thread_info *)
-      TARGET_DEFAULT_RETURN (gdb::byte_vector ());
+    virtual gdb::array_view<const_gdb_byte> thread_info_to_thread_handle (struct thread_info *)
+      TARGET_DEFAULT_RETURN (gdb::array_view<const gdb_byte> ());
     virtual void stop (ptid_t)
       TARGET_DEFAULT_IGNORE ();
     virtual void interrupt ()
@@ -1924,7 +1928,7 @@ extern struct thread_info *target_thread_handle_to_thread_info
 /* Given a thread, return the thread handle, a target-specific sequence of
    bytes which serves as a thread identifier within the program being
    debugged.  */
-extern gdb::byte_vector target_thread_info_to_thread_handle
+extern gdb::array_view<const gdb_byte> target_thread_info_to_thread_handle
   (struct thread_info *);
 
 /* Attempts to find the pathname of the executable file

base-commit: a4822788d7c41926941b1c6c405c82aeffb72ad7
-- 
2.35.3


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] [gdb/build] Return const reference in thread_info_to_thread_handle
  2023-08-22 17:34     ` Tom de Vries
@ 2023-08-23 15:43       ` Pedro Alves
  2023-08-24  6:21         ` Tom de Vries
  0 siblings, 1 reply; 8+ messages in thread
From: Pedro Alves @ 2023-08-23 15:43 UTC (permalink / raw)
  To: Tom de Vries, gdb-patches

On 22/08/23 18:34, Tom de Vries wrote:

> I've given the gdb::array_view<const gdb_byte> a try, and that works fine, and greatly simplifies the patch, so thanks for that suggestion.

Great!

> The first patch is no longer necessary, but we could consider committing it nevertheless, since the work is done and may be needed in the future.

I agree.

>  
> -gdb::byte_vector
> +gdb::array_view<const gdb_byte>
>  remote_target::thread_info_to_thread_handle (struct thread_info *tp)
>  {
>    remote_thread_info *priv = get_remote_thread_info (tp);
> diff --git a/gdb/target-debug.h b/gdb/target-debug.h
> index acb01d47e7c..31c25e9aefd 100644
> --- a/gdb/target-debug.h
> +++ b/gdb/target-debug.h
> @@ -236,4 +236,18 @@ target_debug_print_gdb_byte_vector_r (gdb::byte_vector &vector)
>  {
>    target_debug_print_const_gdb_byte_vector_r (vector);
>  }
> +
> +static void
> +target_debug_print_gdb_array_view_const_gdb_byte (gdb::array_view<const gdb_byte> &vector)

array_views should be passed by value normally (because they're small).  Did you run into something
that forced this to be a reference?  Or was it just copied from the vector case?  If it
works, we should just drop the &.

Also, one of the points of array_view is that you can pass a vector as array_view
argument, like you can pass std::string as string_view argument -- would it work to make
target_debug_print_const_gdb_byte_vector_r call this new
target_debug_print_gdb_array_view_const_gdb_byte instead of duplicating that code?

> +{
> +  gdb_puts ("{", gdb_stdlog);
> +
> +  for (size_t i = 0; i < vector.size (); i++)
> +    {
> +      gdb_printf (gdb_stdlog, " %s",
> +		  phex_nz (vector[i], 1));
> +    }
> +  gdb_puts (" }", gdb_stdlog);
> +}
> +
>  #endif /* TARGET_DEBUG_H */

...

> diff --git a/gdb/target.c b/gdb/target.c
> index 16f43d072cd..8b1d48d91d9 100644
> --- a/gdb/target.c
> +++ b/gdb/target.c
> @@ -2640,7 +2640,7 @@ target_thread_handle_to_thread_info (const gdb_byte *thread_handle,
>  
>  /* See target.h.  */
>  
> -gdb::byte_vector
> +gdb::array_view<const gdb_byte>
>  target_thread_info_to_thread_handle (struct thread_info *tip)
>  {
>    target_ops *target = current_inferior ()->top_target ();
> diff --git a/gdb/target.h b/gdb/target.h
> index 6ae400e2cc2..0cea955cbd7 100644
> --- a/gdb/target.h
> +++ b/gdb/target.h
> @@ -39,6 +39,10 @@ struct expression;
>  struct dcache_struct;
>  struct inferior;
>  
> +/* Define const gdb_byte using one identifier, to make it easy for
> +   make-target-delegates.py to parse.  */
> +typedef const gdb_byte const_gdb_byte;

That's unfortunate, but I can live with it.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] [gdb/build] Support reference return type in make-target-delegates.py
  2023-08-21 10:53 [PATCH 1/2] [gdb/build] Support reference return type in make-target-delegates.py Tom de Vries
  2023-08-21 10:53 ` [PATCH 2/2] [gdb/build] Return const reference in thread_info_to_thread_handle Tom de Vries
@ 2023-08-23 15:43 ` Pedro Alves
  1 sibling, 0 replies; 8+ messages in thread
From: Pedro Alves @ 2023-08-23 15:43 UTC (permalink / raw)
  To: Tom de Vries, gdb-patches

On 21/08/23 11:53, Tom de Vries via Gdb-patches wrote:
> When doing this in target.h:
> ...
> -    virtual gdb::byte_vector thread_info_to_thread_handle (struct thread_info *)
> +    virtual gdb::byte_vector &thread_info_to_thread_handle (struct thread_info *)
> ...
> make-target-delegates.py drops the function.
> 
> By handling '&' in POINTER_PART we can prevent that the function is dropped,
> but when recompiling target.o we get:
> ...
> gdb/target-delegates.c: In member function ‘virtual gdb::byte_vector& \
>   debug_target::thread_info_to_thread_handle(thread_info*)’:
> gdb/target-delegates.c:1889:22: error: ‘result’ declared as reference but not \
>   initialized
>    gdb::byte_vector & result;
>                       ^~~~~~
> make: *** [Makefile:1923: target.o] Error 1
> ...
> 
> Fix this by making sure result is initialized.
> 
> Regenerate target-delegates.c using this new style.
> 
> Tested on x86_64-linux.


Approved-By: Pedro Alves <pedro@palves.net>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] [gdb/build] Return const reference in thread_info_to_thread_handle
  2023-08-23 15:43       ` Pedro Alves
@ 2023-08-24  6:21         ` Tom de Vries
  2023-08-24 11:37           ` Pedro Alves
  0 siblings, 1 reply; 8+ messages in thread
From: Tom de Vries @ 2023-08-24  6:21 UTC (permalink / raw)
  To: Pedro Alves, gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1679 bytes --]

On 8/23/23 17:43, Pedro Alves wrote:
> On 22/08/23 18:34, Tom de Vries wrote:
> 
>> I've given the gdb::array_view<const gdb_byte> a try, and that works fine, and greatly simplifies the patch, so thanks for that suggestion.
> 
> Great!
> 
>> The first patch is no longer necessary, but we could consider committing it nevertheless, since the work is done and may be needed in the future.
> 
> I agree.
> 
>>   
>> -gdb::byte_vector
>> +gdb::array_view<const gdb_byte>
>>   remote_target::thread_info_to_thread_handle (struct thread_info *tp)
>>   {
>>     remote_thread_info *priv = get_remote_thread_info (tp);
>> diff --git a/gdb/target-debug.h b/gdb/target-debug.h
>> index acb01d47e7c..31c25e9aefd 100644
>> --- a/gdb/target-debug.h
>> +++ b/gdb/target-debug.h
>> @@ -236,4 +236,18 @@ target_debug_print_gdb_byte_vector_r (gdb::byte_vector &vector)
>>   {
>>     target_debug_print_const_gdb_byte_vector_r (vector);
>>   }
>> +
>> +static void
>> +target_debug_print_gdb_array_view_const_gdb_byte (gdb::array_view<const gdb_byte> &vector)
> 
> array_views should be passed by value normally (because they're small).  Did you run into something
> that forced this to be a reference?  Or was it just copied from the vector case?  If it
> works, we should just drop the &.
> 

Done.

> Also, one of the points of array_view is that you can pass a vector as array_view
> argument, like you can pass std::string as string_view argument -- would it work to make
> target_debug_print_const_gdb_byte_vector_r call this new
> target_debug_print_gdb_array_view_const_gdb_byte instead of duplicating that code?
> 

Done, updated version attached.

Thanks,
- Tom


[-- Attachment #2: 0001-gdb-build-Return-gdb-array_view-in-thread_info_to_th.patch --]
[-- Type: text/x-patch, Size: 9355 bytes --]

From dfc97455f7eb28bdf071b63229e68df20d95d710 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Tue, 22 Aug 2023 17:15:48 +0200
Subject: [PATCH] [gdb/build] Return gdb::array_view in
 thread_info_to_thread_handle

In remote_target::thread_info_to_thread_handle we return a copy:
...
gdb::byte_vector
remote_target::thread_info_to_thread_handle (struct thread_info *tp)
{
  remote_thread_info *priv = get_remote_thread_info (tp);
  return priv->thread_handle;
}
...

Fix this by returning a gdb::array_view instead:
...
gdb::array_view<const gdb_byte>
remote_target::thread_info_to_thread_handle (struct thread_info *tp)
...

Tested on x86_64-linux.

This fixes the build when building with -std=c++20.
---
 gdb/linux-thread-db.c     | 13 +++++++------
 gdb/python/py-infthread.c |  4 ++--
 gdb/remote.c              |  6 +++---
 gdb/target-debug.h        |  8 +++++++-
 gdb/target-delegates.c    | 16 ++++++++--------
 gdb/target.c              |  2 +-
 gdb/target.h              | 10 +++++++---
 7 files changed, 35 insertions(+), 24 deletions(-)

diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 7d9fd57da0c..16c250c104d 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -107,7 +107,7 @@ class thread_db_target final : public target_ops
   thread_info *thread_handle_to_thread_info (const gdb_byte *thread_handle,
 					     int handle_len,
 					     inferior *inf) override;
-  gdb::byte_vector thread_info_to_thread_handle (struct thread_info *) override;
+  gdb::array_view<const gdb_byte> thread_info_to_thread_handle (struct thread_info *) override;
 };
 
 static std::string libthread_db_search_path = LIBTHREAD_DB_SEARCH_PATH;
@@ -312,6 +312,7 @@ struct thread_db_thread_info : public private_thread_info
   /* Cached thread state.  */
   td_thrhandle_t th {};
   thread_t tid {};
+  gdb::optional<gdb::byte_vector> thread_handle;
 };
 
 static thread_db_thread_info *
@@ -1724,20 +1725,20 @@ thread_db_target::thread_handle_to_thread_info (const gdb_byte *thread_handle,
 
 /* Return the thread handle associated the thread_info pointer TP.  */
 
-gdb::byte_vector
+gdb::array_view<const gdb_byte>
 thread_db_target::thread_info_to_thread_handle (struct thread_info *tp)
 {
   thread_db_thread_info *priv = get_thread_db_thread_info (tp);
 
   if (priv == NULL)
-    return gdb::byte_vector ();
+    return {};
 
   int handle_size = sizeof (priv->tid);
-  gdb::byte_vector rv (handle_size);
+  priv->thread_handle.emplace (handle_size);
 
-  memcpy (rv.data (), &priv->tid, handle_size);
+  memcpy (priv->thread_handle->data (), &priv->tid, handle_size);
 
-  return rv;
+  return *priv->thread_handle;
 }
 
 /* Get the address of the thread local variable in load module LM which
diff --git a/gdb/python/py-infthread.c b/gdb/python/py-infthread.c
index 1bd25d01320..00d7171de64 100644
--- a/gdb/python/py-infthread.c
+++ b/gdb/python/py-infthread.c
@@ -291,8 +291,8 @@ thpy_thread_handle (PyObject *self, PyObject *args)
   thread_object *thread_obj = (thread_object *) self;
   THPY_REQUIRE_VALID (thread_obj);
 
-  gdb::byte_vector hv;
-  
+  gdb::array_view<const gdb_byte> hv;
+
   try
     {
       hv = target_thread_info_to_thread_handle (thread_obj->thread);
diff --git a/gdb/remote.c b/gdb/remote.c
index 7abe08439b5..5af40bd704c 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -784,8 +784,8 @@ class remote_target : public process_stratum_target
 					     int handle_len,
 					     inferior *inf) override;
 
-  gdb::byte_vector thread_info_to_thread_handle (struct thread_info *tp)
-						 override;
+  gdb::array_view<const gdb_byte> thread_info_to_thread_handle (struct thread_info *tp)
+    override;
 
   void stop (ptid_t) override;
 
@@ -14550,7 +14550,7 @@ remote_target::thread_handle_to_thread_info (const gdb_byte *thread_handle,
   return NULL;
 }
 
-gdb::byte_vector
+gdb::array_view<const gdb_byte>
 remote_target::thread_info_to_thread_handle (struct thread_info *tp)
 {
   remote_thread_info *priv = get_remote_thread_info (tp);
diff --git a/gdb/target-debug.h b/gdb/target-debug.h
index acb01d47e7c..082550df325 100644
--- a/gdb/target-debug.h
+++ b/gdb/target-debug.h
@@ -219,7 +219,7 @@ target_debug_print_size_t (size_t size)
 }
 
 static void
-target_debug_print_const_gdb_byte_vector_r (const gdb::byte_vector &vector)
+target_debug_print_gdb_array_view_const_gdb_byte (gdb::array_view<const gdb_byte> vector)
 {
   gdb_puts ("{", gdb_stdlog);
 
@@ -231,6 +231,12 @@ target_debug_print_const_gdb_byte_vector_r (const gdb::byte_vector &vector)
   gdb_puts (" }", gdb_stdlog);
 }
 
+static void
+target_debug_print_const_gdb_byte_vector_r (const gdb::byte_vector &vector)
+{
+  target_debug_print_gdb_array_view_const_gdb_byte (vector);
+}
+
 static void
 target_debug_print_gdb_byte_vector_r (gdb::byte_vector &vector)
 {
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index 06f22d57c27..715e50b8fb8 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -89,7 +89,7 @@ struct dummy_target : public target_ops
   const char *extra_thread_info (thread_info *arg0) override;
   const char *thread_name (thread_info *arg0) override;
   thread_info *thread_handle_to_thread_info (const gdb_byte *arg0, int arg1, inferior *arg2) override;
-  gdb::byte_vector thread_info_to_thread_handle (struct thread_info *arg0) override;
+  gdb::array_view<const_gdb_byte> thread_info_to_thread_handle (struct thread_info *arg0) override;
   void stop (ptid_t arg0) override;
   void interrupt () override;
   void pass_ctrlc () override;
@@ -263,7 +263,7 @@ struct debug_target : public target_ops
   const char *extra_thread_info (thread_info *arg0) override;
   const char *thread_name (thread_info *arg0) override;
   thread_info *thread_handle_to_thread_info (const gdb_byte *arg0, int arg1, inferior *arg2) override;
-  gdb::byte_vector thread_info_to_thread_handle (struct thread_info *arg0) override;
+  gdb::array_view<const_gdb_byte> thread_info_to_thread_handle (struct thread_info *arg0) override;
   void stop (ptid_t arg0) override;
   void interrupt () override;
   void pass_ctrlc () override;
@@ -1871,28 +1871,28 @@ debug_target::thread_handle_to_thread_info (const gdb_byte *arg0, int arg1, infe
   return result;
 }
 
-gdb::byte_vector
+gdb::array_view<const_gdb_byte>
 target_ops::thread_info_to_thread_handle (struct thread_info *arg0)
 {
   return this->beneath ()->thread_info_to_thread_handle (arg0);
 }
 
-gdb::byte_vector
+gdb::array_view<const_gdb_byte>
 dummy_target::thread_info_to_thread_handle (struct thread_info *arg0)
 {
-  return gdb::byte_vector ();
+  return gdb::array_view<const gdb_byte> ();
 }
 
-gdb::byte_vector
+gdb::array_view<const_gdb_byte>
 debug_target::thread_info_to_thread_handle (struct thread_info *arg0)
 {
   gdb_printf (gdb_stdlog, "-> %s->thread_info_to_thread_handle (...)\n", this->beneath ()->shortname ());
-  gdb::byte_vector result
+  gdb::array_view<const_gdb_byte> result
     = this->beneath ()->thread_info_to_thread_handle (arg0);
   gdb_printf (gdb_stdlog, "<- %s->thread_info_to_thread_handle (", this->beneath ()->shortname ());
   target_debug_print_struct_thread_info_p (arg0);
   gdb_puts (") = ", gdb_stdlog);
-  target_debug_print_gdb_byte_vector (result);
+  target_debug_print_gdb_array_view_const_gdb_byte (result);
   gdb_puts ("\n", gdb_stdlog);
   return result;
 }
diff --git a/gdb/target.c b/gdb/target.c
index 16f43d072cd..8b1d48d91d9 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -2640,7 +2640,7 @@ target_thread_handle_to_thread_info (const gdb_byte *thread_handle,
 
 /* See target.h.  */
 
-gdb::byte_vector
+gdb::array_view<const gdb_byte>
 target_thread_info_to_thread_handle (struct thread_info *tip)
 {
   target_ops *target = current_inferior ()->top_target ();
diff --git a/gdb/target.h b/gdb/target.h
index 6ae400e2cc2..0cea955cbd7 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -39,6 +39,10 @@ struct expression;
 struct dcache_struct;
 struct inferior;
 
+/* Define const gdb_byte using one identifier, to make it easy for
+   make-target-delegates.py to parse.  */
+typedef const gdb_byte const_gdb_byte;
+
 #include "infrun.h" /* For enum exec_direction_kind.  */
 #include "breakpoint.h" /* For enum bptype.  */
 #include "gdbsupport/scoped_restore.h"
@@ -679,8 +683,8 @@ struct target_ops
 						       inferior *inf)
       TARGET_DEFAULT_RETURN (NULL);
     /* See target_thread_info_to_thread_handle.  */
-    virtual gdb::byte_vector thread_info_to_thread_handle (struct thread_info *)
-      TARGET_DEFAULT_RETURN (gdb::byte_vector ());
+    virtual gdb::array_view<const_gdb_byte> thread_info_to_thread_handle (struct thread_info *)
+      TARGET_DEFAULT_RETURN (gdb::array_view<const gdb_byte> ());
     virtual void stop (ptid_t)
       TARGET_DEFAULT_IGNORE ();
     virtual void interrupt ()
@@ -1924,7 +1928,7 @@ extern struct thread_info *target_thread_handle_to_thread_info
 /* Given a thread, return the thread handle, a target-specific sequence of
    bytes which serves as a thread identifier within the program being
    debugged.  */
-extern gdb::byte_vector target_thread_info_to_thread_handle
+extern gdb::array_view<const gdb_byte> target_thread_info_to_thread_handle
   (struct thread_info *);
 
 /* Attempts to find the pathname of the executable file

base-commit: 21f8c9c1874f144bbe387874f586e61d4742e6eb
-- 
2.35.3


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] [gdb/build] Return const reference in thread_info_to_thread_handle
  2023-08-24  6:21         ` Tom de Vries
@ 2023-08-24 11:37           ` Pedro Alves
  0 siblings, 0 replies; 8+ messages in thread
From: Pedro Alves @ 2023-08-24 11:37 UTC (permalink / raw)
  To: Tom de Vries, gdb-patches

On 24/08/23 07:21, Tom de Vries wrote:

>>> +
>>> +static void
>>> +target_debug_print_gdb_array_view_const_gdb_byte (gdb::array_view<const gdb_byte> &vector)
>>
>> array_views should be passed by value normally (because they're small).  Did you run into something
>> that forced this to be a reference?  Or was it just copied from the vector case?  If it
>> works, we should just drop the &.
>>
> 
> Done.
> 
>> Also, one of the points of array_view is that you can pass a vector as array_view
>> argument, like you can pass std::string as string_view argument -- would it work to make
>> target_debug_print_const_gdb_byte_vector_r call this new
>> target_debug_print_gdb_array_view_const_gdb_byte instead of duplicating that code?
>>
> 
> Done, updated version attached.

Thanks.

Approved-By: Pedro Alves <pedro@palves.net>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-08-24 11:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-21 10:53 [PATCH 1/2] [gdb/build] Support reference return type in make-target-delegates.py Tom de Vries
2023-08-21 10:53 ` [PATCH 2/2] [gdb/build] Return const reference in thread_info_to_thread_handle Tom de Vries
2023-08-22 14:43   ` Pedro Alves
2023-08-22 17:34     ` Tom de Vries
2023-08-23 15:43       ` Pedro Alves
2023-08-24  6:21         ` Tom de Vries
2023-08-24 11:37           ` Pedro Alves
2023-08-23 15:43 ` [PATCH 1/2] [gdb/build] Support reference return type in make-target-delegates.py Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).