Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* [RFC] Let "gcore" command accept a suffix argument
@ 2009-11-30 13:39 Michael Snyder
  2009-11-30 16:22 ` Hui Zhu
  2009-11-30 18:44 ` Tom Tromey
  0 siblings, 2 replies; 11+ messages in thread
From: Michael Snyder @ 2009-11-30 13:39 UTC (permalink / raw)
  To: gdb

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.




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-12-10  2:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-30 13:39 [RFC] Let "gcore" command accept a suffix argument Michael Snyder
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox