OpenFTPD DEBUG HOWTO
--------------------

If you have weird crashes and want to help us to debug, you should use 
this tutorial to get some very important information.
   
1.) Check if the whole ftpd crashed or only the session (ftps) then
    recompile openftpd in debug mode with:
    > cons . DEBUG=yes

2.) If the bug is in ftpd, restart ftpd and get its process id with
    "ps x | grep ftpd" on the shell. If the bug is in ftps you have
    either to login via ftp and get the pid of the session with "site
    swho" command or get it with ps on the shell.
    
3.) Attach the debugger to the process you want to debug:
    > gdb /path-to/openftpd/sbin/ftpd <pid>
    or
    > gdb /path-to/openftpd/sbin/ftps <pid>
    for example: gdb $HOME/openftpd/sbin/ftpd 1234
    
4.) Type "continue" or "c" in the debugger.

5.) Do the command or action on the server that causes the crash usually.

6.) On a crash, the debugger should tell you now what happened which
    should be something like a segmentation fault.

7.) Type "where" in debugger for detailled information in what 
    function the program crashed.

8.) Send us the output so we can hunt the stupid bug!
    
    
-- primemover     
