public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Ed Peschko <esp5@mdssdev05.comp.pge.com>
To: gdb@sources.redhat.com
Subject: intelligent history and memory for gdb
Date: Mon, 18 Jul 2005 18:30:00 -0000	[thread overview]
Message-ID: <20050718182958.GA17100@mdssdev05.comp.pge.com> (raw)

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...)

             reply	other threads:[~2005-07-18 18:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-18 18:30 Ed Peschko [this message]
2005-07-18 18:48 ` Jon Ringle
     [not found] <1121795467.3476.ezmlm@sources.redhat.com>
2005-07-20 21:24 ` Ed Peschko
2005-07-20 21:57   ` Jon Ringle

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=20050718182958.GA17100@mdssdev05.comp.pge.com \
    --to=esp5@mdssdev05.comp.pge.com \
    --cc=gdb@sources.redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).