From: Hui Zhu <teawater@gmail.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Michael Snyder <msnyder@vmware.com>, gdb@sourceware.org
Subject: Re: [RFC] syntax change for "record save"
Date: Fri, 27 Nov 2009 15:17:00 -0000 [thread overview]
Message-ID: <daef60380911262355h79f707e2i3c0ed9ae000c05c@mail.gmail.com> (raw)
In-Reply-To: <20091127013738.GL18141@adacore.com>
Hi Joel,
I think python must can make prec work very powerful.
But let record save can do small thing can make it more flexible. It
still can be use when the gdb did't support python.
BTW, maybe we can put example about use prec together with python to wiki.
Thanks,
Hui
On Fri, Nov 27, 2009 at 09:37, Joel Brobecker <brobecker@adacore.com> wrote:
>> This proposal follows from Teawater's thread
>> "A question about gdb script", in which Teawater
>> wants to know how to use a gdb local variable
>> to append a sequence number to the file name
>> of a record log file.
>
> This is not an objection, but I am really not fond of that extension.
> It feels ad hoc that the extension, if provided, should be evaluated
> as an integer. What if the user wanted a more general scheme? Or what
> if he wanted to the suffix to be in hex?
>
> If I were Teawater, I'd probably look at writing a python script
> rather than a GDB script. In particular, it's easy to compose the
> right CLI command from python using:
>
> (gdb) python gdb.execute("rec save file.%d" % 1)
>
> You can replace the "1" above by an python variable, including
> one obtained by evaluating an expression as a long.
>
> One thing that you might want to look at, to make things even easier,
> is providing a Python interface to the record layer... Combine that
> with the work done on getting inferior "events" (I can't remember
> exactly the name of that project - I think it was a GSOC), and it
> should be possible to script really nice things...
>
> --
> Joel
>
next prev parent reply other threads:[~2009-11-27 7:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-27 2:25 Michael Snyder
2009-11-27 7:55 ` Joel Brobecker
2009-11-27 15:17 ` Hui Zhu [this message]
2009-11-30 12:37 ` Michael Snyder
2009-12-01 12:56 ` Jakob Engblom
2009-12-01 19:35 ` Tom Tromey
2009-12-02 17:46 ` Jakob Engblom
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=daef60380911262355h79f707e2i3c0ed9ae000c05c@mail.gmail.com \
--to=teawater@gmail.com \
--cc=brobecker@adacore.com \
--cc=gdb@sourceware.org \
--cc=msnyder@vmware.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