Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: Michael Snyder <msnyder@vmware.com>
Cc: gdb@sourceware.org
Subject: Re: [RFC] Let "gcore" command accept a suffix argument
Date: Mon, 30 Nov 2009 16:22:00 -0000	[thread overview]
Message-ID: <daef60380911300437o4c616eb2v5ad7bfe99bd3c5e9@mail.gmail.com> (raw)
In-Reply-To: <4B11DA3C.3000203@vmware.com>

I think if each command can support $v directly is better.

For example:
set $a=0
gcore $a
Saved corefile 0

Thanks,
Hui

On Sun, Nov 29, 2009 at 10:19, Michael Snyder <msnyder@vmware.com> wrote:
> I can't find the reference message, but I have a recollection
> about somebody asking why some gdb command (may have been 'gcore')
> couldn't accept a gdb internal variable so that the filename could
> in effect be "computed", or disambiguated, to avoid overwriting.
>
> Having just done this for "record save", I thought I'd float the
> idea of generalizing it.
>
> 1) So -- what if 'gcore' were to accept an optional second argument
> which, if present, would be treated as an integer and suffixed to
> the gcore filename?  So for instance:
>
> (gdb) set $a = 0
> (gdb) gcore foo $a++
> (gdb) step
> (gdb) gcore foo $a++
> (gdb) step
> (gdb) gcore foo $a++
>
> would result in three files: foo.0, foo.1, and foo.2.
>
> 2) Similarly, what if we were to do the same thing with
> add_setshow_filename_cmd, which is used for commands such
> as "set logging filename".  Then a series of logging files
> could be created, each with a unique filename.
>
> Yes, I know, we could do the same thing with Python, but
> I'm not convinced that that is an argument against doing it
> stand alone (maybe for users who don't want to learn python).
>
> I'm prepared to submit a patch for 1 and 2, separately or together.
>
>
>
>


  reply	other threads:[~2009-11-30 12:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-30 13:39 Michael Snyder
2009-11-30 16:22 ` Hui Zhu [this message]
2009-11-30 17:04   ` Joel Brobecker
2009-11-30 18:53     ` Tom Tromey
2009-11-30 19:06     ` Michael Snyder
2009-11-30 20:16       ` Joel Brobecker
2009-11-30 20:25         ` Michael Snyder
2009-11-30 20:31           ` Joel Brobecker
2009-11-30 20:46             ` Michael Snyder
2009-12-10  2:28               ` Hui Zhu
2009-11-30 18:44 ` Tom Tromey

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=daef60380911300437o4c616eb2v5ad7bfe99bd3c5e9@mail.gmail.com \
    --to=teawater@gmail.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