Is there a way to define a macro?
Konstantin Karganov
kostik@ispras.ru
Thu Sep 15 12:44:00 GMT 2005
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.
More information about the Gdb
mailing list