This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

intelligent history and memory for 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...)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]