[PATCH v3 01/10] gdbserver: add back lost comments in fast_tracepoint_ctx

Tankut Baris Aktemur tankut.baris.aktemur@intel.com
Tue Jan 28 08:16:42 GMT 2025


Before the removal of the UST/static-tracepoint support, the
`static_tracepoint_ctx` struct contained comments for its fields,
whereas `fast_tracepoint_ctx` did not.  Nevertheless, those comments
also applied to `fast_tracepoint_ctx`.  With the removal of
`static_tracepoint_ctx`, the comments were lost, making
`fast_tracepoint_ctx` data members completely commentless.  Add back
those comments.
---
 gdbserver/tracepoint.cc | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gdbserver/tracepoint.cc b/gdbserver/tracepoint.cc
index 1395c70ad39d2ac1b260fc6a0ed507966ac5aa42..559d34dc3e2ee831d311a1dd53077654cab5bb58 100644
--- a/gdbserver/tracepoint.cc
+++ b/gdbserver/tracepoint.cc
@@ -1184,11 +1184,20 @@ struct fast_tracepoint_ctx
 {
   struct tracepoint_hit_ctx base;
 
+  /* The regcache corresponding to the registers state at the time of
+     the tracepoint hit.  Initialized lazily, from REGS.  */
   struct regcache regcache;
   int regcache_initted;
+
+  /* The buffer space REGCACHE above uses.  We use a separate buffer
+     instead of letting the regcache malloc for both signal safety and
+     performance reasons; this is allocated on the stack instead.  */
   unsigned char *regspace;
 
+  /* The register buffer passed by the client.  */
   unsigned char *regs;
+
+  /* The GDB tracepoint matching the probed marker that was "hit".  */
   struct tracepoint *tpoint;
 };
 

-- 
2.34.1

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


More information about the Gdb-patches mailing list