[v2,2/8] gdb, doc: mention the 'S' option for the QTDP packet

Message ID 20250110-upstream-gdbserver-remove-ust-v2-2-1ab116ffe592@intel.com
State New
Headers
Series Remove UST (static tracepoint) support from gdbserver |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_check--master-arm fail Patch failed to apply

Commit Message

Aktemur, Tankut Baris Jan. 10, 2025, 4:01 p.m. UTC
  I noticed that gdbserver accepts an 'S' option for the QTDP packet to
create a static tracepoint, but this is not mentioned in the document.
Update the document.

I first thought about updating the argument as `[:Flen|:S]`, but then
opted for `[:Flen][:S]`.  Although it is odd that ':F' and ':S' are
allowed to co-exist, the implementation at the gdbserver side allows
this and handles the packet arguments so that the right-most
positioned ':F' or ':S' overwrites the final tracepoint type.  When
the documentation is missing, the implementation usually determines
the behavior.
---
 gdb/doc/gdb.texinfo | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Comments

Eli Zaretskii Jan. 10, 2025, 7:04 p.m. UTC | #1
> From: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
> Date: Fri, 10 Jan 2025 17:01:12 +0100
> 
> I noticed that gdbserver accepts an 'S' option for the QTDP packet to
> create a static tracepoint, but this is not mentioned in the document.
> Update the document.
> 
> I first thought about updating the argument as `[:Flen|:S]`, but then
> opted for `[:Flen][:S]`.  Although it is odd that ':F' and ':S' are
> allowed to co-exist, the implementation at the gdbserver side allows
> this and handles the packet arguments so that the right-most
> positioned ':F' or ':S' overwrites the final tracepoint type.  When
> the documentation is missing, the implementation usually determines
> the behavior.
> ---
>  gdb/doc/gdb.texinfo | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Thanks, this is okay.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
  

Patch

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 1b8dcc9335ac61ce459a8d3db75b7e53aad1c994..459458f5665953a10f5f87ce349484ab5d0f6d1a 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -45972,7 +45972,7 @@  tracepoints (@pxref{Tracepoints}).
 
 @table @samp
 
-@item QTDP:@var{n}:@var{addr}:@var{ena}:@var{step}:@var{pass}[:F@var{flen}][:X@var{len},@var{bytes}]@r{[}-@r{]}
+@item QTDP:@var{n}:@var{addr}:@var{ena}:@var{step}:@var{pass}[:F@var{flen}][:S][:X@var{len},@var{bytes}]@r{[}-@r{]}
 @cindex @samp{QTDP} packet
 Create a new tracepoint, number @var{n}, at @var{addr}.  If @var{ena}
 is @samp{E}, then the tracepoint is enabled; if it is @samp{D}, then
@@ -45980,7 +45980,8 @@  the tracepoint is disabled.  The @var{step} gives the tracepoint's step
 count, and @var{pass} gives its pass count.  If an @samp{F} is present,
 then the tracepoint is to be a fast tracepoint, and the @var{flen} is
 the number of bytes that the target should copy elsewhere to make room
-for the tracepoint.  If an @samp{X} is present, it introduces a
+for the tracepoint.  If an @samp{S} is present, the tracepoint is to be
+a static tracepoint.  If an @samp{X} is present, it introduces a
 tracepoint condition, which consists of a hexadecimal length, followed
 by a comma and hex-encoded bytes, in a manner similar to action
 encodings as described below.  If the trailing @samp{-} is present,