From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19245 invoked by alias); 29 Nov 2007 00:03:58 -0000 Received: (qmail 19236 invoked by uid 22791); 29 Nov 2007 00:03:57 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 29 Nov 2007 00:03:45 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.1) with ESMTP id lAT03h62008562; Wed, 28 Nov 2007 19:03:43 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lAT03gbD018830; Wed, 28 Nov 2007 19:03:43 -0500 Received: from opsy.redhat.com (ton.yyz.redhat.com [10.15.16.15]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lAT03fdx018228; Wed, 28 Nov 2007 19:03:42 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id D4D103780E1; Wed, 28 Nov 2007 16:37:43 -0700 (MST) To: Chris Stankevitz Cc: gdb@sourceware.org Subject: Re: help me reduce typing when running gdb References: <474DC4C9.7000806@toyon.com> From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom Date: Thu, 29 Nov 2007 00:03:00 -0000 In-Reply-To: <474DC4C9.7000806@toyon.com> (Chris Stankevitz's message of "Wed\, 28 Nov 2007 11\:43\:05 -0800") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.990 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00264.txt.bz2 >>>>> "Chris" == Chris Stankevitz writes: In addition to what everybody else said... Chris> 2. gdb ./bin/debug/prog Chris> 3. r very long list of parameters that I hate typing Here I frequently use: gdb --args ./bin/debug/prog lots of parameters This works nicely unless you have to redirect input or output. Chris> 6. q Don't quit. Edit your source, rebuild, and then in gdb just 'r'. It will reuse the arguments and will re-read the updated executable. This isn't always foolproof. For instance, if your OS has address space randomization, and you have a watchpoint installed, you will have to delete the watchpoint. (If you're doing a lot of difficult debugging, find out how to disable randomization.) If you are an Emacs user, run gdb in Emacs. Tom