From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: "Metzger, Markus T" <markus.t.metzger@intel.com>
Cc: "markus.t.metzger@gmail.com" <markus.t.metzger@gmail.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: record-btrace
Date: Fri, 01 Feb 2013 14:18:00 -0000 [thread overview]
Message-ID: <20130201141829.GA24703@host2.jankratochvil.net> (raw)
In-Reply-To: <A78C989F6D9628469189715575E55B2307B67963@IRSMSX102.ger.corp.intel.com>
On Thu, 31 Jan 2013 16:38:43 +0100, Metzger, Markus T wrote:
> The problem I have with "target record" is that the sub-commands are added in
> add_target, one per added target. Would it be OK to export targetlist so I can add
> an alias for target "record-full"? Or is it OK to just drop target "record"?
OK, let's export targetlist, with some comment it should not be normally used.
> If we dropped target record, we would break backwards compatibility.
With eclipse-cdt-8.1.0-1.fc17.x86_64 I see it uses command "record" and not
"target record".
> There's a single test in gdb.mi that would need to be adjusted, but I would
> also expect that GUIs would be broken.
OK, both "record" and "target record" can be kept compatible, I do not mind,
you are right it may cause front ends compatibility issue.
> On a similar matter, I renamed the existing "set/show record" subcommands by
> prepending "full-", i.e. "insn-number-max" becomes "full-insn-number-max".
Could it be a prefix command? "set record full insn-number-max" etc.
To match "record full" (vs. "record btrace").
> This does not break any tests but would affect scripts and MI.
There should be aliases with deprecate_cmd during such changes, deprecate_cmd
also ensures it does not get <tab>-completed anymore.
> For record-btrace and record-full, to_record_list will be quite different. For all
> other targets, it will be NULL.
>
> We could share to_disconnect, to_detach, to_kill, and to_mourn_inferior. They
> are just forwarding the request after unpushing the record target.
>
> I made the "record stop" command generic. It searches for a record target
> beneath the current and unpushes the first it finds. I could do something
> similar for the above.
It looks OK to me, it would be better to see the code.
> There's a record_changed notifier that is called in to_open and in the stop
> command. Why is it not called in to_close instead of in the stop command?
to_close is a bit dangerous that the target is no longer on stack, as
documented in unpush_target. So maybe record_changed could want to do
something with the record traget yet.
But with the currently only listener MI it should work even from to_close.
> As long as you know what you are doing, it's convenient to be able to read
> variables that you know have not changed. You need to be very careful, though,
> to consider also stack changes when you reverse-step into a different function.
> Things get worse if the compiler generates location lists.
As there should be the custom unwinder blocking unwind the current frame won't
be found there to access local variables, they should print an error.
> > > I can do the CLI warning as first step. Will this warning also be available
> > > via MI?
> >
> > It will be printed as general GDB output record but at least Eclipse CDT users
> > won't notice it. It gets displayed only after selecting Debug window -> "gdb"
> > and then it is in the displayed window "Console" as a "warning: ..." text.
>
> We should maybe make this configurable so GUIs will not show wrong data.
I believe it is up to GUI to handle it somehow specially. The GUI knows it is
currently operating in history, Eclipse already has special support for
"record".
Thanks,
Jan
next prev parent reply other threads:[~2013-02-01 14:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-28 16:14 record-btrace Metzger, Markus T
2013-01-29 9:53 ` record-btrace Jan Kratochvil
2013-01-29 11:05 ` record-btrace Metzger, Markus T
2013-01-29 15:36 ` record-btrace Jan Kratochvil
2013-01-31 15:38 ` record-btrace Metzger, Markus T
2013-02-01 14:18 ` Jan Kratochvil [this message]
2013-02-04 14:31 ` record-btrace Metzger, Markus T
2013-02-05 19:45 ` record-btrace Jan Kratochvil
2013-02-06 12:25 ` record-btrace Metzger, Markus T
2013-02-06 14:58 ` record-btrace Jan Kratochvil
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=20130201141829.GA24703@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=markus.t.metzger@gmail.com \
--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