From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3184 invoked by alias); 23 Jul 2005 03:35:14 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 3171 invoked by uid 22791); 23 Jul 2005 03:35:10 -0000 Received: from mta02.pge.com (HELO mta02.pge.com) (131.89.129.72) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sat, 23 Jul 2005 03:35:10 +0000 Received: from mta11.comp.pge.com (mta11.comp.pge.com [10.245.211.126]) by mta02.pge.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id j6N3YnMA001134; Fri, 22 Jul 2005 20:35:01 -0700 (PDT) Received: from mdssdev05.comp.pge.com (mdssdev05.comp.pge.com [10.244.96.61]) by mta11.comp.pge.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id j6N3Yn1u021116; Fri, 22 Jul 2005 20:34:49 -0700 (PDT) Received: (from esp5@localhost) by mdssdev05.comp.pge.com (8.11.7p1+Sun/8.11.7) id j6N3Ymm24035; Fri, 22 Jul 2005 20:34:48 -0700 (PDT) Date: Sat, 23 Jul 2005 03:35:00 -0000 From: Ed Peschko To: "Dillabaugh, Craig" Cc: gdb@sources.redhat.com Subject: Re: [Gdb] 'intelligent' history in gdb Message-ID: <20050723033448.GA23952@mdssdev05.comp.pge.com> References: <7CDD7B94357FD5119E800002A537C46E122F3BBA@s5-ccr-r1.ccrs.nrcan.gc.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7CDD7B94357FD5119E800002A537C46E122F3BBA@s5-ccr-r1.ccrs.nrcan.gc.ca> User-Agent: Mutt/1.4.2.1i X-SW-Source: 2005-07/txt/msg00225.txt.bz2 On Fri, Jul 22, 2005 at 11:30:05AM -0400, Dillabaugh, Craig wrote: > Hi Ed, > I can't help with your first request, but there is a feature that might be a > partial solution to you second problem. You can create a file that includes > a set of gdb commands and then use the 'source' command to load these > commands into your current GDB session. This wouldn't be automated, but it > would allow you to create a gdb script for a certain executable that you > load at the time you run that executable. > > Good luck, > Craig Thanks for the pointer, but I'm aware of the source command.. And you have to: a) manage multiple files, one per project and keep memory of which source file goes with which. b) type these commands longhand into a flat file c) debug these commands In short, relying on manual dot files is probably about 100 times less efficient than doing it automatically. You are essentially making a subproject for every single project that you are working on - when these are a small group of monolithic, larger projects the overhead (one gdbinit per project) is fine; it becomes more cumbersome when you have lots of small, rapidly developed projects, or are debugging one of a hundred projects provided by other, third parties. Its not as if what I'm envisioning is without precedent; all the shells pretty much have automated history management built into them, and its really kind of cool to use, say tcsh, and have it slowly grow more intelligent and responsive as you use it. Anyways, if you don't mind, I'm going to post this the gdb mailing list so it can get further discussion. Ed