From: Michael Snyder <msnyder@vmware.com>
To: gdb@sourceware.org
Subject: [RFC] Let "gcore" command accept a suffix argument
Date: Mon, 30 Nov 2009 13:39:00 -0000 [thread overview]
Message-ID: <4B11DA3C.3000203@vmware.com> (raw)
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.
next reply other threads:[~2009-11-29 2:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-30 13:39 Michael Snyder [this message]
2009-11-30 16:22 ` Hui Zhu
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=4B11DA3C.3000203@vmware.com \
--to=msnyder@vmware.com \
--cc=gdb@sourceware.org \
/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