home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / xc212os2.zip / DOC / DEBUG.TXT < prev    next >
Text File  |  1996-03-06  |  2KB  |  52 lines

  1. DEBUG.TXT                          Copyright (c) 1996 xTech Ltd
  2. ----------------------------------------------------------------
  3.  
  4. 1. Using third-party debuggers
  5.  
  6. XDS produces machine code of high efficiency due to advanced code
  7. generation scheme but it makes very difficult to provide adequate
  8. debugging information. Now XDS compiler can output in an object file
  9. line numbers of the source file and information on program procedures
  10. and global variables. When appropriate options switched on, compiler
  11. generates object files with debugging information in well known
  12. CodeView format.
  13.  
  14. So you can use any debugger accepting this information. We have
  15. experience with Watcom's debugger WD and IBM's debugger IPMD.
  16. In the first case you have to link executable by Watcom's linker
  17. WLINK (don't fogget to include option "debug codeview") and
  18. then process EXE-file by CVPACK utility.
  19. In the second case you have to use LINK386 with option /CO.
  20.  
  21. Note that lacks in debugging information restricts some features
  22. of the debuggers.
  23.  
  24.  
  25. 2. Obtaining a call chain in the case of a program crash
  26.  
  27. XDS run-time support system includes special subroutine wich generates
  28. "errinfo.xds" file in the current directory on any abnormal program
  29. termination. This file includes name of EXE-file and a call chain at
  30. the moment of crash. HIS utility (C:\XDS\BIN\his.exe) decodes this
  31. information using program's map-file and outputs a list of procedure
  32. calls in the terms of source file names and line numbers.
  33.  
  34.  
  35. Related compiler option:
  36.  
  37. +LINENO      - to include source file line numbers in the object file
  38.  
  39. +GENDEBUG    - to include debuggin information on program procedures
  40.                and global variables
  41.  
  42. +GENHISTORY  - to include in MAIN module of a program call to RTS sub-
  43.                routine whitch generates "errinfo.xds" on any crash of
  44.                your program. This file contains a sequence of procedure
  45.                calls at the program abortation. 
  46.  
  47. BTW: Does anybody know of the structure of debugging info in EXE-file
  48.      produced by LINK386 ? This type of structure does not defined in
  49.      documents we have. The knowlege of this structure will make our
  50.      and YOUR life with XDS a bit easier. :)
  51.  
  52.                           [end of document]