Re: [OFF TOP] Quick course for GDB

From: Thomas Katzlberger (katzlbt@vuse.vanderbilt.edu)
Date: 10/31/96


To all the heros not beeing able to use GDB ...

You wrote:
> Can anyone give me a brief walk thru on how to use GDB
> to find this problem? Someone mentioned start circle with
> GDB and then when the mud 'locks up' hit CTRL C in the
> GDB window and it will tell you what line the debugger is
> on.. This did not work.

quick course:

> cd src
> gdb ../bin/circle
blah ...
gdb> run

[log into your mud from another terminal]

gdb> [Control-C] 
gdb> bt
...
gdb> list
...
gdb> print variable-name
...
gdb> up
gdb> l
...
gdb> down
gdb> l
...

others:

gdb> step (exec one line of sourcecode, if its a function go down there and stop)
gdb> next (exec one line of sourcecode, don't descend into function calls)
gdb> continue (resume running)
gdb> break <function_name> (stops at first call of function_name)
gdb> disable 1 (disable breakpoint 1)

Last time I forgot to mention that gdb has to be
running from the src directory.

Corefile:
> cd src
> gdb ../bin/circle ../lib/core
... same as above ...

GDB is like a mud: type 'l' if you want to look and 'print <var>' 
instead of gossip to get info. 'backtrace' (bt) is like 'who' and 
will show you who are culprits and 'up' and 'down' let you select 
them. 

Cat.
--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/_/                                                            _/_/
_/_/  Thomas Katzlberger                                        _/_/
_/_/  katzlbt@vuse.vanderbilt.edu                               _/_/
_/_/  http://www.vuse.vanderbilt.edu/~katzlbt/                  _/_/
_/_/                                                            _/_/
_/_/  "You can tune a file system, but you can't tune a fish."  _/_/
_/_/                                UNIX man page for tunefs.   _/_/
_/_/                                                            _/_/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST