This document describes how to use a debugger to help track down server bugs.
Feel free to update/add to it.
9/17/93 - J. Mark Noworolski
--------------
Contrary to popular belief there _IS_ a way to run an ntserv and daemon from
within a debugger. 

Here's how to do it. If you don't understand some of the below you probably
shouldn't be trying to do this.
-------------------

Make the server and install it in regular manner... 
Next, re-make the distribution with the -g flag. Then 'cd ntserv' and 
copy the ntserv there to your INLbin directory to a file called 'ntserv2'.
_Don't_ do a strip or use the make installbin target.

Now cd to the INLbin directory, run start_tourney in the regular manner
and let people log in to play. They will be able to play on an optimized
(ie. pretty fast) server. If you use gdb you now do something like:
'gdb --directory=Your_INLSrcDir/ntserv' ntserv2'

Once you have done this switch to your client window and do something like
'netrek -h server -s 4501'
Where 'server' is the machine you have the server running on and 4501 is
any number _other_ than the connect ports. At this point the client should
say something like 'waiting for connection'.

Now you can switch back to your debugger window, set breakpoints or 
whatever and do 
'run -H -s 4501 client_machine' (for home team)
'run -A -s 4501 client_machine' (for away team)
Where client_machine is the machine the client is trying to connect from, and
the -s number here matches the client one you used above. You can also add
the -O option to be an observer.

Note that if you let the ntserv2 process remain stopped because of a
breakpoint for too long you will get ghostbusted.

1. gcc version 2.4.5 running on a decstation with ultrix has _not_ really
worked with _both_ -O and -g options together. Bummer... It should.

------------------------
Ther is _also_ a way to run the daemon from within a debugger... I believe
you simply install deamonII (the -g made one) without stripping and run it
manually (no options needed) from within a debugger.... do this BEFORE you
or anybody else attempts to connect to the server. 

I'm a little more hazy on how to do this since I haven't needed to play with
it lately.

