public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Felix Willgerodt <felix.willgerodt@intel.com>
Cc: markus.t.metzger@intel.com, gdb-patches@sourceware.org
Subject: Re: [PATCH v2 12/12] btrace: Extend ptwrite event decoding.
Date: Tue, 15 Jun 2021 14:50:16 +0300	[thread overview]
Message-ID: <83wnqv4a9z.fsf@gnu.org> (raw)
In-Reply-To: <20210614145411.689277-8-felix.willgerodt@intel.com> (message from Felix Willgerodt via Gdb-patches on Mon, 14 Jun 2021 16:54:11 +0200)

> Date: Mon, 14 Jun 2021 16:54:11 +0200
> From: Felix Willgerodt via Gdb-patches <gdb-patches@sourceware.org>
> 
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -3,6 +3,12 @@
>  
>  *** Changes since GDB 10
>  
> +* GDB now supports printing of ptwrite payloads from the Intel Processor
> +  Trace during 'record instruction-history', 'record function-call-history',
> +  all stepping commands and in  Python.  Printing is customizable via a
> +  ptwrite listener function in  Python.  By default, the raw ptwrite
> +  payload is printed for each ptwrite that is encountered.
> +
>  * The 'set disassembler-options' command now supports specifying options
>    for the ARC target.

This part is OK.

> +This module provides additional functionality for recording programs that make
> +use of the PTWRITE instruction.  PTWRITE is a x86 instruction that allows to
> +write values into the Intel Processor Trace (@pxref{Process Record and Replay}).

Should PTWRITE be in @code or in @sc?

> +The @code{gdb.ptwrite} module allows customizing the default output of ptwrite
> +auxiliary information.  A custom Python function can be registered via
> +@code{gdb.ptwrite.register_listener()} as the ptwrite listener function.
                                      ^^
Please remove the parentheses there.  Otherwise, this looks like a
call to the function with no arguments, which is not what you want.

> +@smallexample
> +@group
> +(gdb) python-interactive
> +>>> class my_listener(object):
> +...    def __init__(self):
> +...        self.variable = 0
> +...    def __call__(self, payload, ip):
> +...        if gdb.selected_thread().global_num == 1:
> +...            self.variable += 1
> +...            return "payload: @{@}, ip: @{:#x@}".format(self.variable, ip)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This line is too long for @smallexample, it will cause overful hbox in
the printed version of the manual.

> +This GDB feature is dependent on hardware and operating system support and
        ^^^
@value{GDBN}

Thanks.

  reply	other threads:[~2021-06-15 11:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-14 14:54 [PATCH v2 05/12] python: Introduce gdb.RecordAuxiliary class Felix Willgerodt
2021-06-14 14:54 ` [PATCH v2 06/12] python: Add clear() to gdb.Record Felix Willgerodt
2021-06-14 15:52   ` Eli Zaretskii
2021-06-14 14:54 ` [PATCH v2 07/12] btrace, gdbserver: Add ptwrite to btrace_config_pt Felix Willgerodt
2021-06-14 15:53   ` Eli Zaretskii
2021-06-14 14:54 ` [PATCH v2 08/12] btrace, linux: Enable ptwrite packets Felix Willgerodt
2021-06-14 14:54 ` [PATCH v2 09/12] btrace, python: Enable ptwrite listener registration Felix Willgerodt
2021-06-15 23:41   ` Lancelot SIX
2021-06-16  7:26     ` Willgerodt, Felix
2021-06-14 14:54 ` [PATCH v2 10/12] btrace, python: Enable calling the ptwrite listener Felix Willgerodt
2021-06-14 14:54 ` [PATCH v2 11/12] gdb, testsuite, lib: Add libipt version check Felix Willgerodt
2021-06-14 14:54 ` [PATCH v2 12/12] btrace: Extend ptwrite event decoding Felix Willgerodt
2021-06-15 11:50   ` Eli Zaretskii [this message]
2021-06-15 13:40     ` Willgerodt, Felix
2021-06-15 13:52       ` Eli Zaretskii
2021-06-14 15:51 ` [PATCH v2 05/12] python: Introduce gdb.RecordAuxiliary class Eli Zaretskii

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=83wnqv4a9z.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=felix.willgerodt@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=markus.t.metzger@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).