public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] gdbserver, remote: introduce "id_str" in the "qXfer:threads:read" XML
Date: Tue, 02 Apr 2024 15:19:18 +0300	[thread overview]
Message-ID: <86il109cu1.fsf@gnu.org> (raw)
In-Reply-To: <20240402102020.2521082-2-tankut.baris.aktemur@intel.com> (message from Tankut Baris Aktemur on Tue, 2 Apr 2024 12:20:20 +0200)

> From: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
> Date: Tue,  2 Apr 2024 12:20:20 +0200
> 
> GDB prints the target id of a thread in various places such as the
> output of the "info threads" command in the "Target Id" column or when
> switching to a thread.  A target can define what to print for a given
> ptid by overriding the `pid_to_str` method.
> 
> The remote target is a gateway behind which one of many various
> targets could be running.  The remote target converts a given ptid to
> a string in a uniform way, without consulting the low target at the
> server-side.
> 
> In this patch we introduce a new attribute in the XML that is sent in
> response to the "qXfer:threads:read" RSP packet, so that a low target
> at the server side, if it wishes, can specify what to print as the
> target id of a thread.
> 
> Note that the existing "name" attribute or the "extra" text provided
> in the XML are not sufficient for the server-side low target to
> achieve the goal.  Those attributes, when present, are simply appended
> to the target id by GDB.
> ---
>  gdb/NEWS            |  9 +++++++++
>  gdb/doc/gdb.texinfo |  7 +++++--
>  gdb/remote.c        | 26 +++++++++++++++++++++++++-
>  gdbserver/server.cc |  4 ++++
>  gdbserver/target.cc |  6 ++++++
>  gdbserver/target.h  | 13 +++++++++++++
>  6 files changed, 62 insertions(+), 3 deletions(-)

Thanks, the documentation parts are OK, with the following minor nit:

> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -48081,7 +48081,7 @@ the following structure:
>  @smallexample
>  <?xml version="1.0"?>
>  <threads>
> -    <thread id="id" core="0" name="name" handle="XX...">
> +    <thread id="id" core="0" name="name" id_str="..." handle="XX...">
>      ... description ...
>      </thread>
>  </threads>

Please replace the ellipsis with an example of a real-life value.

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

  reply	other threads:[~2024-04-02 13:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02 10:20 [PATCH 1/2] doc: add the missing 'handle' attribute in xml Tankut Baris Aktemur
2024-04-02 10:20 ` [PATCH 2/2] gdbserver, remote: introduce "id_str" in the "qXfer:threads:read" XML Tankut Baris Aktemur
2024-04-02 12:19   ` Eli Zaretskii [this message]
2024-04-03 14:57   ` [PATCH v2] " Tankut Baris Aktemur
2024-04-02 12:14 ` [PATCH 1/2] doc: add the missing 'handle' attribute in xml Eli Zaretskii
2024-04-03 14:49   ` Aktemur, Tankut Baris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86il109cu1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=tankut.baris.aktemur@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).