public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Konstantin Karganov <kostik@ispras.ru>
To: wmaple <wmaple@126.com>
Cc: gdb <gdb@sources.redhat.com>
Subject: Re: Is there a way to define a macro?
Date: Thu, 15 Sep 2005 12:44:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.44.0509151639010.7175-100000@ispserv.ispras.ru> (raw)
In-Reply-To: <200509151224.j8FCOaR5030806@truba.ispras.ru>

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.

       reply	other threads:[~2005-09-15 12:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200509151224.j8FCOaR5030806@truba.ispras.ru>
2005-09-15 12:44 ` Konstantin Karganov [this message]
     [not found] <20050915122428.XNUA13028.eastrmgxi08.cox.net@sourceware.org>
2005-09-15 12:33 ` Bob Rossi
2005-09-15 12:41   ` Vincent Rubiolo
2005-09-15 12:24 wmaple

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0509151639010.7175-100000@ispserv.ispras.ru \
    --to=kostik@ispras.ru \
    --cc=gdb@sources.redhat.com \
    --cc=wmaple@126.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).