This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Examples of user-defined commands in GDB?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]