public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Re: intelligent history and memory for gdb
       [not found] <1121795467.3476.ezmlm@sources.redhat.com>
@ 2005-07-20 21:24 ` Ed Peschko
  2005-07-20 21:57   ` Jon Ringle
  0 siblings, 1 reply; 4+ messages in thread
From: Ed Peschko @ 2005-07-20 21:24 UTC (permalink / raw)
  To: gdb

> On Monday 18 July 2005 02:29 pm, Ed Peschko wrote:
> > in my .tcshrc, and was wondering if gdb has an equivalent. This allows me
> > to type:
> >
> > 	mak
> >
> > then up arrow, to see all the list of commands that I've typed in my
> > history that start with 'mak', instead of just forgetting that I've typed
> > 'mak' and going back to the last typed command (like gdb does by default).
> 
> ctrl-r works for me from the (gdb) prompt to do a reverse-i-search.

Just curious, but how do you map this to up arrow? What's the equivalent for 
forward-i-search?

As for the recording and importing history features, I'm assuming that they don't 
exist? Is there a roadmap for 7.0?

Ed

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

* Re: intelligent history and memory for gdb
  2005-07-20 21:24 ` intelligent history and memory for gdb Ed Peschko
@ 2005-07-20 21:57   ` Jon Ringle
  0 siblings, 0 replies; 4+ messages in thread
From: Jon Ringle @ 2005-07-20 21:57 UTC (permalink / raw)
  To: gdb

On Wednesday 20 July 2005 05:24 pm, Ed Peschko wrote:
> > On Monday 18 July 2005 02:29 pm, Ed Peschko wrote:
> > > in my .tcshrc, and was wondering if gdb has an equivalent. This allows
> > > me to type:
> > >
> > > 	mak
> > >
> > > then up arrow, to see all the list of commands that I've typed in my
> > > history that start with 'mak', instead of just forgetting that I've
> > > typed 'mak' and going back to the last typed command (like gdb does by
> > > default).
> >
> > ctrl-r works for me from the (gdb) prompt to do a reverse-i-search.
>
> Just curious, but how do you map this to up arrow? What's the equivalent
> for forward-i-search?

I believe that this functionality is coming from readline. The bash man page 
has a good description of what's available. I have no idea how you remap the 
keys though. Ctrl-S will go in the forward direction.

Jon

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

* Re: intelligent history and memory for gdb
  2005-07-18 18:30 Ed Peschko
@ 2005-07-18 18:48 ` Jon Ringle
  0 siblings, 0 replies; 4+ messages in thread
From: Jon Ringle @ 2005-07-18 18:48 UTC (permalink / raw)
  To: gdb

On Monday 18 July 2005 02:29 pm, Ed Peschko wrote:
> in my .tcshrc, and was wondering if gdb has an equivalent. This allows me
> to type:
>
> 	mak
>
> then up arrow, to see all the list of commands that I've typed in my
> history that start with 'mak', instead of just forgetting that I've typed
> 'mak' and going back to the last typed command (like gdb does by default).

ctrl-r works for me from the (gdb) prompt to do a reverse-i-search.

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

* intelligent history and memory for gdb
@ 2005-07-18 18:30 Ed Peschko
  2005-07-18 18:48 ` Jon Ringle
  0 siblings, 1 reply; 4+ messages in thread
From: Ed Peschko @ 2005-07-18 18:30 UTC (permalink / raw)
  To: gdb

hey all,

I've been playing around with gdb, noticed a couple of things that I'd
really like to have, and was wondering if they'd been implmented.

First, I have the setting:

	bindkey -k up history-search-backward
	bindkey -k down history-search-backward

in my .tcshrc, and was wondering if gdb has an equivalent. This allows me
to type:

	mak

then up arrow, to see all the list of commands that I've typed in my 
history that start with 'mak', instead of just forgetting that I've typed 'mak' 
and going back to the last typed command (like gdb does by default).


Second, I'd like the ability of gdb to 'remember' the programs that I've edited,
so the next time I run gdb with that executable, all the commands/definitions
that I've typed in previous sessions with that executable are retrieved.

I'm thinking that this could be done by md5'ing the executable and its name, and then 
storing the commands in a buffer that gets recalled when a new session with that
executable starts.

A list of these stored sessions could be gotten by a catalog command (something 
like 'ls') and an import command could be used to retrieve any prior session to 
tie it to the current session, ie:


(gdb) ls

stored sessions:

	1) mutt:<md5sum>
	2) perl:<md5sum>

(gdb) import 1

	importing history from session #1...

(gdb) <arrow keys now work on history from session 1>


Now I'm not really up on my gdb development, but how much of this has been 
implemented? And what do people think? I know that this would at least make 
me about 5 times as efficient with gdb...

Thanks much,

Ed

(ps - this may be a dup, if so please bear with me and ignore it...)

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

end of thread, other threads:[~2005-07-20 21:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1121795467.3476.ezmlm@sources.redhat.com>
2005-07-20 21:24 ` intelligent history and memory for gdb Ed Peschko
2005-07-20 21:57   ` Jon Ringle
2005-07-18 18:30 Ed Peschko
2005-07-18 18:48 ` Jon Ringle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).