From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12194 invoked by alias); 15 Sep 2005 12:44:23 -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 12179 invoked by uid 22791); 15 Sep 2005 12:44:16 -0000 Received: from pluton.ispras.ru (HELO pluton.ispras.ru) (83.149.199.253) by sourceware.org (qpsmtpd/0.30-dev) with SMTP; Thu, 15 Sep 2005 12:44:16 +0000 Received: (qmail 42711 invoked from network); 15 Sep 2005 12:39:06 -0000 Received: from unknown (HELO truba.ispras.ru) (83.149.198.41) by pluton.ispras.ru with SMTP; 15 Sep 2005 12:39:06 -0000 Received: from truba.ispras.ru (root@localhost) by truba.ispras.ru (8.13.1/8.13.1) with ESMTP id j8FCi9Ae032053 for ; Thu, 15 Sep 2005 16:44:09 +0400 Received: from ispserv.ispras.ru (ispserv [83.149.198.72]) by truba.ispras.ru (8.13.1/8.13.1) with ESMTP id j8FCi9Lx032047; Thu, 15 Sep 2005 16:44:09 +0400 Received: from ispserv.ispras.ru (localhost [127.0.0.1]) by ispserv.ispras.ru (8.12.8/8.12.8) with ESMTP id j8FCi7It013930; Thu, 15 Sep 2005 16:44:07 +0400 Received: from localhost (kostik@localhost) by ispserv.ispras.ru (8.12.8/8.12.8/Submit) with ESMTP id j8FCi74Q013926; Thu, 15 Sep 2005 16:44:07 +0400 Date: Thu, 15 Sep 2005 12:44:00 -0000 From: Konstantin Karganov To: wmaple cc: gdb Subject: Re: Is there a way to define a macro? In-Reply-To: <200509151224.j8FCOaR5030806@truba.ispras.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SpamTest-Version: SMTP-Filter Version 2.0.0 [0125], KAS/Release X-Spamtest-Info: Pass through X-Anti-Virus: Kaspersky Anti-Virus for MailServers 5.5.3/RELEASE, bases: 15092005 #140332, status: clean X-SW-Source: 2005-09/txt/msg00106.txt.bz2 On Thu, 15 Sep 2005, 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! You need to use command hooks (see section 20.2 of UsersGuide for details). I.e. putting this in your .gdbinit will print registers automatically on each "next" command: define hook-next info registers end Best regards, Konstantin.