From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1659 invoked by alias); 28 Nov 2007 19:57:16 -0000 Received: (qmail 1649 invoked by uid 22791); 28 Nov 2007 19:57:16 -0000 X-Spam-Check-By: sourceware.org Received: from iceblock01.celunite.com (HELO iceblock01.celunite.com) (66.220.2.179) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 28 Nov 2007 19:57:07 +0000 Received: from localhost (iceblock01.celunite.com [127.0.0.1]) by iceblock01.celunite.com (Postfix) with ESMTP id 4ACC6EDC4F5; Wed, 28 Nov 2007 11:57:06 -0800 (PST) Received: from iceblock01.celunite.com ([127.0.0.1]) by localhost (iceblock01.celunite.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mEgTmLu0A-zA; Wed, 28 Nov 2007 11:57:00 -0800 (PST) Received: from webmailindia.celunite.com (unknown [196.12.63.195]) by iceblock01.celunite.com (Postfix) with ESMTP id 23781EDC4D6; Wed, 28 Nov 2007 11:57:00 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by webmailindia.celunite.com (Postfix) with ESMTP id B56BC485AF; Thu, 29 Nov 2007 01:15:06 +0530 (IST) Received: from webmailindia.celunite.com ([127.0.0.1]) by localhost (celunite.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d+0CuIjNzVrr; Thu, 29 Nov 2007 01:15:06 +0530 (IST) Received: from webmailindia.celunite.com (localhost.localdomain [127.0.0.1]) by webmailindia.celunite.com (Postfix) with ESMTP; Thu, 29 Nov 2007 01:15:06 +0530 (IST) Received: from 219.91.250.58 (SquirrelMail authenticated user ramana.radhakrishnan) by webmailindia.celunite.com with HTTP; Thu, 29 Nov 2007 01:15:06 +0530 (IST) Message-ID: <1724.219.91.250.58.1196279106.squirrel@webmailindia.celunite.com> In-Reply-To: <474DC4C9.7000806@toyon.com> References: <474DC4C9.7000806@toyon.com> Date: Wed, 28 Nov 2007 19:57:00 -0000 Subject: Re: help me reduce typing when running gdb From: ramana.radhakrishnan@celunite.com To: "Chris Stankevitz" Cc: gdb@sourceware.org User-Agent: SquirrelMail/1.4.10a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00259.txt.bz2 > Hi, I often perform these steps: > > 1. bjam > 2. gdb ./bin/debug/prog > 3. r very long list of parameters that I hate typing > 4. [lots of debugger commands like c, n, s, break, etc] > 5. up arrow many times to get back to the run command w/parms > 6. q > 7. vi source.cpp > 8. goto 1 > > Can anyone recommend a way to streamline this process? Particularly > Step 3 and Step 5. In MSVC, steps 1-3 is one keystroke (F5) and step 5 > is two (SHIFT-F5, F5). Well in gdb you could put this in a command file and then source it . Look at the source command . Or you could put it all of them in .gdbinit file in your home directory. You can also define your own custom commands - so run with params can be a command that you define using define command. Also after the first run with params , the second run always by default takes the params you specified in the first call to run . So r < huge list of params> ... .... ... ( do lots of debug) r has the same effect as replacing the r with r HTH cheers Ramana cheers Ramana > > Thanks for your help in switching over to gdb! > > Chris >