home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / os / sim.lha / simbug.doc < prev   
Text File  |  1989-06-21  |  6KB  |  162 lines

  1.  
  2.  
  3.  
  4.  
  5.                        =============================
  6.  
  7.                                  SIM - BUG
  8.  
  9.                        =============================
  10.  
  11.                         Short description, 25.06.90
  12.                          refering to version 0.42
  13.  
  14.  
  15.  
  16.    SIM-BUG provides an easy way to use S.I.M. as debugger for different
  17.   kinds of programs. With SIM-BUG you can debug load modules, bootblocks
  18.   and programs that are allready in memory.
  19.  
  20.    SIM-BUG can only be started from CLI, not from Workbench. When started,
  21.   a titlepage is printed in the actual CLI-window. Then SIM-BUG looks if a
  22.   copy of S.I.M. is in memory. This is done with the debugdata vector, which
  23.   is actually not used by the Amigas system (at least by v1.2). If it
  24.   points on a S.I.M. then everything's okay.
  25.  
  26.    If no S.I.M. is found, SIM-BUG automatically enters the S.I.M.-loadmenu.
  27.  
  28.    After that, the helppage is printed in the window.
  29.  
  30.  
  31.   You have now the choice between:
  32.  
  33.  -  (X) : Quit SIM-BUG    
  34.  
  35.    Simply quit SIM-BUG       
  36.  
  37.  
  38.  -  (H) : This help page
  39.  
  40.    Prints the helppage again
  41.  
  42.  
  43.  -  (S) : Load S.I.M.
  44.  
  45.    Loads S.I.M.. First SIM-BUG searches a file named 'SIM' in the actual
  46.   directory and directories 'SYS:' and 'C:'. If none is found, SIM-BUG
  47.   tells you so. Then SIM-BUG wants to know the addresses for the S.I.M.
  48.   code, the display and the backup for the display. Default values are
  49.   provided and are used by entering no number when one is asked.
  50.  
  51.    SIM-BUG looks now if the file 'SIM' is 'S.I.M.'. If not, SIM-BUG tells
  52.   you so. Then finally 'S.I.M.' is loaded at that address. Version 0.42 of
  53.   SIM-BUG does not yet allocate that memory or report if it is occupied.
  54.  
  55.    When you have loaded 'S.I.M.',SIM-BUG will remember it in the debugdata
  56.   vector so it can be found there even after quitting SIM-BUG. For reasons
  57.   of security, SIM-BUG looks if the debugdata vector is neither zero nor
  58.   pointing to another S.I.M.. If that's the case, SIM-BUG will ask if you
  59.   want to remember S.I.M. there or not. 
  60.  
  61.  
  62.  -  (E) : Enter S.I.M. 
  63.  
  64.    This simply enters S.I.M. by the Debug server entrance. The PC points to
  65.   somewhere in SIM-BUG.
  66.  
  67.  
  68.    (L) : Debug load module
  69.  
  70.    First SIM-BUG asks for the name of the program you want to debug, which
  71.   is loaded then. If this file does not exist, SIM-BUG simply returns an
  72.   error. Then it asks for the commandline. This becomes a problem with
  73.   CLI-commands like 'dir' or 'list'. Normally the commandline is transmitted
  74.   in the register a0 with the length in d0. But these commands ignore them
  75.   and find out where the commandline is by use of the internal doslibrary.
  76.   But there it finds the commandline of SIM-BUGs start. So if you are planning
  77.   to debug 'dir', please write i.e. 'simbug df0:' when starting SIM-BUG and
  78.   the 'dir' command will take 'df0:' as command line.
  79.  
  80.   The PC points to the start of the program. A0/D0 contain the information
  81.   about the commandline. The other register contain what SIM-BUG found in
  82.   them when it was started. That way, i.e. a2 contains the pointer to the 
  83.   internal dosliblary.
  84.  
  85.    SIM-BUG changes the pointer to the FinalPC routine that is at the upper
  86.   end of the stack to an entry in SIM-BUG and the pointer to the
  87.   segmentlist of SIM-BUGs task to the one of the program. Both values are
  88.   reset when you finish debugging the program.    
  89.  
  90.  
  91.  -  (B) : Debug boot block 
  92.    
  93.    With that command you can debug a bootblock. SIM-BUG asks for the number
  94.   of the drive in which the disk with the bootblock is. An illegal
  95.   drivenumber will cause an error. Else, SIM-BUG loads the bootblock.
  96.   The routine which does this is basically a copy of the one in the rom.
  97.   Errors are reported at failure of allocmem, opendevice, doio and if the
  98.   blocks 0 and 1 are not a bootblock. Then S.I.M. is entered. The PC points
  99.   at the start of the bootblock and the other registers contain what they
  100.   should, trackdisk address and so on. When you have finished to debug the
  101.   bootblock, all resources will be freed.
  102.  
  103.  
  104.  -  (M) : Debug memory
  105.  
  106.    Is used to simply debug a program that is in ram. SIM-BUG asks only for
  107.   the startaddress that will be pushed into the PC. All other registers
  108.   contain 0.
  109.  
  110.  
  111.  -  (A) : Switch to ------
  112.  
  113.    I have allways a bad feeling when I start a program that freezes the system
  114.   and the drives have not stoped yet. Therefore SIM-BUG will wait before
  115.   entering S.I.M.. This is done by two ways: either automatically or manual.
  116.   The command 'A' is used to switch between these two ways.
  117.  
  118.    When manual entry is used, SIM-BUG waits until the user presses the left mouse
  119.   button.
  120.  
  121.    When SIM-BUG uses automatical entry, it looks in the four trackdiskports
  122.   if the motors have stoped. When this is so, it enters S.I.M.. In case of
  123.   one drive not stopping because the trackdisk crashed, you can press the left
  124.   mousebutton to enter anyway.
  125.  
  126.    However, some kickstarts do not like it when SIM-BUG uses automatical entry
  127.   (They crash...). When you use such a kickstart please switch to manual entry.
  128.  
  129.  
  130.      -----------------------------------------------------------------
  131.  
  132.    Special NOTE:
  133.  
  134.    When SIM-BUG enters S.I.M., it uses the debug server entry. This enables you
  135.   to use quit anytime when you are in S.I.M. to end the program you debug and
  136.   return to SIM-BUG. This version of SIM-BUG does not yet restore the system
  137.   to an acceptable state (enable interrupts, reset copperlist etc.), you may get
  138.   into trouble when quitting in the middle of a program that shuts multitasking.
  139.   
  140.    Another problem occures when two SIM-BUGs use the same S.I.M. or S.I.M. is
  141.   entered by another task then the one of SIM-BUG and you do quit. Since S.I.M.
  142.   was specially designed to work without multitasking, you must be carefull there.
  143.   I hope I can fix that in the next release of SIM-BUG.
  144.   
  145.  
  146.                                 Enjoy !!!!
  147.  
  148.                                                Stefan Walter
  149.  
  150.  
  151.  
  152.   P.S.: If you want to contact me for any reason, here's my address:
  153.  
  154.                                Stefan Walter
  155.                             Finsterruetistr. 57
  156.                               CH-8135 Langnau
  157.  
  158.                   Tel. 0041/(0)1/713 01 46  (18.oo-20.oo)
  159.  
  160.  
  161.  
  162.