This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Examples of user-defined commands in GDB?
- To: Paul Dubuc <pdubuc at cas dot org>
- Subject: Re: Examples of user-defined commands in GDB?
- From: Fernando Nasser <fnasser at redhat dot com>
- Date: Fri, 05 Oct 2001 17:54:11 -0400
- CC: GDB Mailing List <gdb at sourceware dot cygnus dot com>
- Organization: Red Hat Canada
- References: <3BBCD288.489AC772@cas.org>
Paul Dubuc wrote:
>
> Can anybody point me to some good examples of user defined commands and
> their documentation in gdb. Chapter 17 of the manual is a little short
> on examples. I'm trying to translate some user-defined commands we have
> for dbx on Solaris to some sort of equivalent in gdb (while not knowing
> either debugger very well). It would be nice to seem some non-trivial
> examples showing the syntax of define, if, while, document commands.
> Can anyone help?
>
Paul,
I don't have any large examples. But if you run into difficulties while
converting the scripts, try posting to this list.
Maybe ideas for good examples may come from your scripts.
It will be a good chance to compare dbx and gdb scripts as well.
Regards,
Fernando
P.S.: If you start gdb with the "--dbx" option it will
include a few dbx like commands and this may help you. Have you tried
that?
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9