From: "Metzger, Markus T" <markus.t.metzger@intel.com>
To: Pedro Alves <palves@redhat.com>, Eli Zaretskii <eliz@gnu.org>
Cc: "jan.kratochvil@redhat.com" <jan.kratochvil@redhat.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [rfc] btrace: control memory access during replay
Date: Tue, 20 May 2014 07:01:00 -0000 [thread overview]
Message-ID: <A78C989F6D9628469189715575E55B230C16EEBF@IRSMSX104.ger.corp.intel.com> (raw)
In-Reply-To: <537A42D9.6060006@redhat.com>
> -----Original Message-----
> From: Pedro Alves [mailto:palves@redhat.com]
> Sent: Monday, May 19, 2014 7:44 PM
> To: Metzger, Markus T; Eli Zaretskii
> >> What's the likelihood of another variant appearing? That is,
> >> I'm mildly wondering if it should be an enum from the get go:
> >>
> >> set record btrace replay-memory-access read-only|read-write|...|...
> >
> > I don't see another variant right now but I also don't see why it
> > shouldn't be an enum.
>
> The kind of variant I was considering was disabling the fallback
> of reading read only regions as tagged in the binary from live/core
> memory. But maybe btrace gets completely useless that way.
> If we can't think of another useful variant, then I'm fine with
> a boolean, if it sounds more natural. Your choice.
We must be able to read code sections. Without that, btrace
will not work.
One more option that I can think of is reading from object
files.
I'll use an enum for the sake of flexibility.
> Hmm. I didn't think btrace could work with core files,
> unlike record full? Are you adding support for dumping/restoring
> the btrace like "record save" does?
At the moment it can't. I plan to add core file support, though.
Regards,
Markus.
> >> On 04/04/2014 10:48 AM, Eli Zaretskii wrote:
> >
> >>>>> Other than that, the documentation parts are approved. However, I
> >>>>> wonder whether "allow-memory-access" is a good name for a setting
> >>>>> which actually allows access to writable portion of the memory. IOW,
> >>>>> even when the value is OFF, we do allow access to memory, just not
> the
> >>>>> writable portion of it.
> >>>>
> >>>> Agreed; allow-access-to-writable-memory-while-replaying is a bit long,
> >> though.
> >>>
> >>> How about access-writable-memory?
> >>
> >> Sounds fine to me.
> >>
> >> What's the likelihood of another variant appearing? That is,
> >> I'm mildly wondering if it should be an enum from the get go:
> >>
> >> set record btrace replay-memory-access read-only|read-write|...|...
> >
> > I don't see another variant right now but I also don't see why it
> > shouldn't be an enum.
>
> The kind of variant I was considering was disabling the fallback
> of reading read only regions as tagged in the binary from live/core
> memory. But maybe btrace gets completely useless that way.
> If we can't think of another useful variant, then I'm fine with
> a boolean, if it sounds more natural. Your choice.
>
> >> I also got a little confused with:
> >>
> >> "The accessed memory corresponds to the end of the recorded
> >> execution trace."
> >>
> >> Maybe we should say "live program" instead ?
> >
> > Would "live program" still be OK for core files?
>
> Hmm. I didn't think btrace could work with core files,
> unlike record full? Are you adding support for dumping/restoring
> the btrace like "record save" does?
>
> >> I actually didn't see anything in the patch that actually makes the
> >> setting work.
> >
> > The patch is using an existing variable to guard writable memory
> > access. We already allow write-access for breakpoints during
> > replay. This patch is now adding a CLI for the guard variable.
>
> Ah. Thanks.
>
> >> Also, please install a show hook in the command, so that i18n
> >> can work.
> >
> > I'm using the default set/show functions with _("") descriptions
> > for both set and show. Isn't that enough for i18n?
>
> Nope. See deprecated_show_value_hack:
>
> /* Print doc minus "show" at start. */
> print_doc_line (gdb_stdout, c->doc + 5);
>
> That can only work in English.
>
> >
> > In case it isn't, would I need a set function, as well?
>
> Nope, just the show function is enough.
>
> --
> Pedro Alves
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
prev parent reply other threads:[~2014-05-20 7:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-04 8:56 Markus Metzger
2014-04-04 9:16 ` Eli Zaretskii
2014-04-04 9:44 ` Metzger, Markus T
2014-04-04 9:48 ` Eli Zaretskii
2014-05-14 15:35 ` Pedro Alves
2014-05-19 7:51 ` Metzger, Markus T
2014-05-19 17:44 ` Pedro Alves
2014-05-20 7:01 ` Metzger, Markus T [this message]
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=A78C989F6D9628469189715575E55B230C16EEBF@IRSMSX104.ger.corp.intel.com \
--to=markus.t.metzger@intel.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=palves@redhat.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