From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11256 invoked by alias); 15 Sep 2005 12:41:27 -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 11242 invoked by uid 22791); 15 Sep 2005 12:41:22 -0000 Received: from unknown-1-11.windriver.com (HELO mail.wrs.com) (147.11.1.11) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 15 Sep 2005 12:41:22 +0000 Received: from ala-mail04.corp.ad.wrs.com (ala-mail04 [147.11.57.145]) by mail.wrs.com (8.13.3/8.13.3) with ESMTP id j8FCf8xY029447; Thu, 15 Sep 2005 05:41:08 -0700 (PDT) Received: from lul-mail03.corp.ad.wrs.com ([147.11.74.23]) by ala-mail04.corp.ad.wrs.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 15 Sep 2005 05:41:08 -0700 Received: from [147.11.80.21] ([147.11.80.21]) by lul-mail03.corp.ad.wrs.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 15 Sep 2005 14:41:06 +0200 Message-ID: <43296BE1.1080001@windriver.com> Date: Thu, 15 Sep 2005 12:41:00 -0000 From: Vincent Rubiolo User-Agent: Mozilla Thunderbird 1.0.5 (X11/20050711) MIME-Version: 1.0 To: Bob Rossi CC: wmaple , gdb Subject: Re: Is there a way to define a macro? References: <20050915122428.XNUA13028.eastrmgxi08.cox.net@sourceware.org> <20050915123338.GA2777@white> In-Reply-To: <20050915123338.GA2777@white> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-09/txt/msg00105.txt.bz2 Hello, You may also want to take a look at automatic display, which can also and save you lots of keystrokes. See http://sources.redhat.com/gdb/current/onlinedocs/gdb_9.html#SEC62 for more details, Cheers, Vincent Bob Rossi wrote: > On Thu, Sep 15, 2005 at 08:22:44PM +0800, wmaple wrote: > >>Hi. >> >>When I debug a program on disassambly level, for inspecting registers or memory units, I have to enter same commands again and again. For example, after execution of each instruction, I want to inspecting all common registers. So, every time, I have to enter command 'info register' several times. Is there a way to define a macro, by which I can enter these commands conveniently. >> >>Thanks! > > > Yes, try something like this, > > define macro1 > b main > r > next > next > next > end > > Put that in your .gdbinit file and then start up GDB and type 'macro1' > to get it to execute the commands. > > Bob Rossi -- Using Firefox and Thunderbird at Wind River: http://twiki.wrs.com/do/view/ENGtools/MozillaAtWindriver