Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* How to recall the commands run in previous gdb session?
@ 2006-10-29 20:35 Peng Yu
  2006-10-29 20:49 ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Peng Yu @ 2006-10-29 20:35 UTC (permalink / raw)
  To: gdb

Hi,

In the same gdb session, I can use up or down arrow to recall commands.

But once a gdb session is start over, all the history commands are
gone. I'm wondering if it is possible to recall those commands?

Thanks,
Peng


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

* Re: How to recall the commands run in previous gdb session?
  2006-10-29 20:35 How to recall the commands run in previous gdb session? Peng Yu
@ 2006-10-29 20:49 ` Daniel Jacobowitz
  2006-10-30  4:08   ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-10-29 20:49 UTC (permalink / raw)
  To: Peng Yu; +Cc: gdb

On Sun, Oct 29, 2006 at 02:35:38PM -0600, Peng Yu wrote:
> Hi,
> 
> In the same gdb session, I can use up or down arrow to recall commands.
> 
> But once a gdb session is start over, all the history commands are
> gone. I'm wondering if it is possible to recall those commands?

Take a look at the section on saving history in the GDB manual.

Someone else asked me about this last week.  I've been thinking about
adjusting it to use ~/.gdb_history instead of ./.gdb_history by default
and then enabling it by default.  After all, everyone seems to assume
their shell will save CLI history, why shouldn't we?

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: How to recall the commands run in previous gdb session?
  2006-10-29 20:49 ` Daniel Jacobowitz
@ 2006-10-30  4:08   ` Eli Zaretskii
  2006-10-30  4:11     ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2006-10-30  4:08 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

> Date: Sun, 29 Oct 2006 15:49:34 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: gdb@sourceware.org
> 
> Someone else asked me about this last week.  I've been thinking about
> adjusting it to use ~/.gdb_history instead of ./.gdb_history by default
> and then enabling it by default.  After all, everyone seems to assume
> their shell will save CLI history, why shouldn't we?

I agree with turning history saving on by default, but why change the
location of .gdb_history?  That'd be an incompatible change, and I
don't see the justification for such a change.  Do you?


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

* Re: How to recall the commands run in previous gdb session?
  2006-10-30  4:08   ` Eli Zaretskii
@ 2006-10-30  4:11     ` Daniel Jacobowitz
  2006-10-30 21:11       ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-10-30  4:11 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb

On Mon, Oct 30, 2006 at 06:08:28AM +0200, Eli Zaretskii wrote:
> I agree with turning history saving on by default, but why change the
> location of .gdb_history?  That'd be an incompatible change, and I
> don't see the justification for such a change.  Do you?

I think that making GDB start to write temporary files in $PWD by
default would be extremely annoying.  I'd end up with dozens of them
littered around my source directories and other places where they
aren't wanted (and probably get lots of bug reports from confused
Debian users about it).  By analogy with bash, I figured $HOME would
be the right default location for history.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: How to recall the commands run in previous gdb session?
  2006-10-30  4:11     ` Daniel Jacobowitz
@ 2006-10-30 21:11       ` Eli Zaretskii
  2006-10-30 21:13         ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2006-10-30 21:11 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

> Date: Sun, 29 Oct 2006 23:11:13 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: gdb@sourceware.org
> 
> I think that making GDB start to write temporary files in $PWD by
> default would be extremely annoying.

Okay, but can we at least make it read ./.gdb_history, if that exists?


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

* Re: How to recall the commands run in previous gdb session?
  2006-10-30 21:11       ` Eli Zaretskii
@ 2006-10-30 21:13         ` Daniel Jacobowitz
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-10-30 21:13 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb

On Mon, Oct 30, 2006 at 10:59:38PM +0200, Eli Zaretskii wrote:
> > Date: Sun, 29 Oct 2006 23:11:13 -0500
> > From: Daniel Jacobowitz <drow@false.org>
> > Cc: gdb@sourceware.org
> > 
> > I think that making GDB start to write temporary files in $PWD by
> > default would be extremely annoying.
> 
> Okay, but can we at least make it read ./.gdb_history, if that exists?

I can see why that would be a good idea.  Before I make any changes in
this area, I will definitely look into that and see if it's possible. 
Or a simpler possibility: we could use .gdb_history as the default if
it exists and $HOME/.gdb_history otherwise.

-- 
Daniel Jacobowitz
CodeSourcery


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

end of thread, other threads:[~2006-10-30 21:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-29 20:35 How to recall the commands run in previous gdb session? Peng Yu
2006-10-29 20:49 ` Daniel Jacobowitz
2006-10-30  4:08   ` Eli Zaretskii
2006-10-30  4:11     ` Daniel Jacobowitz
2006-10-30 21:11       ` Eli Zaretskii
2006-10-30 21:13         ` Daniel Jacobowitz

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