Re: [CODE] tracking down an infinite loop

From: Daniel Koepke (dkoepke@california.com)
Date: 02/01/97


On Fri, 31 Jan 1997, R. E. Paret wrote:

> Once again gdb comes to the rescue. :P
> start circle using autorun and then run gdb in your bin directory like 
> this: gdb circle <pid number of /bin/circle -q 4000 or whatever>
> Then use step, next, or inext to step through the program up to the crash 
> (you're going to need multiple windows for this) The idea is you log on 
> to your mud and step through it until it seg faults, then go and look at 
> gdb... It should tell you exactly where its seg faulting.

Read again.  It's not seg faulting, he is forcing it to seg fault as
he is in an infinite loop.  I normally just use the SIGSEGV signal to
make it seg fault and dump a core so that I can figure out where it's
hanging.  But if you want to attach gdb to the process, that's
permissable, too.  When the process hangs, link to it (as described
in the quoted text), stop the program, and check where you are :)


--
Daniel Koepke
dkoepke@california.com
Forgive me father, for I am sin.


+-----------------------------------------------------------+
| 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