home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l038 / 1.img / DOC.PAK / MANUAL.TDW < prev    next >
Encoding:
Text File  |  1991-03-14  |  11.7 KB  |  315 lines

  1. /*************************************************************************/
  2.                      Turbo Debugger for Windows
  3.                    Manual Reference & Corrections
  4.  
  5. This file contains information about Turbo Debugger utilities and
  6. corrections to the manual. The contents of this file are as follows:
  7.  
  8. 1.  Turbo Debugger Utilities
  9. 2.  Corrections to the Manual
  10.  
  11. 1.  TURBO DEBUGGER UTILITIES
  12. ----------------------------
  13.  
  14. For convenience, when searching in this file for information about a
  15. particular utility, use the name of the utility followed by a colon
  16. (i.e. TDUMP:). This search takes you directly to the header for the
  17. utility specified.
  18.  
  19. Your Turbo Debugger package comes with several utility programs, which
  20. are discussed in the following sections. One utility lets you strip
  21. the debugging information (the "symbol table") from your programs
  22. without relinking. This is the symbol table stripping utility
  23. TDSTRIP.EXE.
  24.  
  25. There is also a generic object module disassembler program called
  26. TDUMP.EXE.
  27.  
  28. Finally, we provide a configuration program called TDWINST.EXE that
  29. lets you customize TDW. This utility is described in Appendix C of the
  30. "Turbo Debugger for Windows User's Guide."
  31.  
  32. Note: For a list of all the command-line options available for TDUMP
  33. or TDSTRIP, just type the program name and press Enter. For example,
  34. to see the command-line options for TDUMP.EXE, you would enter
  35.  
  36.    TDUMP
  37.  
  38. TDWINST.EXE uses the -? command-line switch for on-line information.
  39.  
  40.  
  41. TDSTRIP: The symbol table stripping utility
  42. -------------------------------------------
  43. TDSTRIP.EXE, the symbol table stripping utility, lets you remove the
  44. symbol table from an executable program generated by TLINK with the /v
  45. option. This is a faster way of removing the symbol table than
  46. relinking without the /v option. It can also remove debugging
  47. information from an .OBJ file. Just enter
  48.  
  49.    TDSTRIP PROGRAM.OBJ
  50.  
  51. You can also use this utility to remove the symbol table and put it in
  52. a separate file. This is useful when you want to convert the .EXE
  53. format program to a .COM file, and still retain the debugging symbol
  54. table. This utility puts the symbol table in a file with the extension
  55. .TDS. Turbo Debugger looks for this file when it loads a program to
  56. debug that does not have a symbol table.
  57.  
  58.  
  59. TDSTRIP command-line options
  60.  
  61. Here is the general form of the DOS command line used to start the
  62. Symbol Table Stripping utility, TDSTRIP:
  63.  
  64.    TDSTRIP [-s][-c] exename [outputname]
  65.  
  66. If you don't specify the -s option, the symbol table is removed from
  67. the .EXE file exename. If you specify an outputname, the original .EXE
  68. file is left unchanged and a version with no symbol table is created
  69. as outputname.
  70.  
  71. If you do specify the -s option, the symbol table will be put in a
  72. file with the same name as exename but with the extension .TDS. If you
  73. specify an output file, the symbol table will be put in outputname.
  74.  
  75. If you specify the -c option, the input .EXE file is converted into a
  76. .COM file. If you use -c in conjunction with -s, you can convert an
  77. .EXE file with symbols into a .COM file with a separate .TDS symbol
  78. file. This lets you debug .COM files with Turbo Debugger while
  79. retaining full debugging information.
  80.  
  81. You can only convert certain .EXE files into .COM files. The same
  82. restrictions apply to the -c option of TDSTRIP as to the /t option of
  83. TLINK: Your program must start at location 100 hex, and it can't
  84. contain any segment fixups.
  85.  
  86. If you don't supply an extension with exename, .EXE is presumed. If
  87. you don't supply an extension with outputname, .EXE is added when you
  88. don't use -s, and .TDS is added when you do use -s.
  89.  
  90. Here are some sample TDSTRIP command lines:
  91.  
  92.    TDSTRIP MYPROG
  93.  
  94. removes the symbol table from MYPROG.EXE.
  95.  
  96.    TDSTRIP -s MYPROG.OLD
  97.  
  98. removes the symbol table from MYPROG.OLD and places it in MYPROG.TDS.
  99.  
  100.    TDSTRIP MYPROG MYPROG.NEW
  101.  
  102. leaves MYPROG.EXE unchanged but creates another copy of it named
  103. MYPROG.NEW without a symbol table.
  104.  
  105.    TDSTRIP -s MYPROG MYSYMS
  106.  
  107. removes the symbol table from MYPROG.EXE and places it in MYSYMS.TDS
  108.  
  109.  
  110. TDSTRIP error messages
  111.  
  112. Here is a list of the possible error messages you might encounter when
  113. working with TDSTRIP:
  114.  
  115. Can't create file: ___
  116. TDSTRIP could not create the output symbol or .EXE file. Either there
  117. is no more room on your disk, or you specified an invalid output file
  118. name.
  119.  
  120. Can't open file: ___
  121. TDSTRIP could not locate the .EXE file that you wish to remove the
  122. symbol table from.
  123.  
  124. Error reading from input exe file
  125. An error occurred during reading from the input executable program
  126. file. Your disk may be unreadable. Try the operation again.
  127.  
  128. Error writing to output file: ___; disk may be full
  129. TDSTRIP could not write to the output symbol or executable file. This
  130. usually happens when there is no more room on your disk. You will have
  131. to delete some files to make room for the file created by TDSTRIP.
  132.  
  133. Input file is not an .exe file
  134. You have specified an input file name that is not a valid executable
  135. program. You can strip symbols only from .EXE programs, since these
  136. are the only ones that TLINK can put a symbol table on. Programs in
  137. .COM file format do not have symbol tables and cannot be processed by
  138. TDSTRIP.
  139.  
  140. Invalid command-line option: ___
  141. You have given an invalid command-line option when starting TDSTRIP
  142. from the DOS command line.
  143.  
  144. Invalid exe file format
  145. The input file appears to be an .EXE format program file, but
  146. something is wrong with it. You should relink the program with TLINK.
  147.  
  148. Not enough memory
  149. Your system does not have enough free memory for TDSTRIP to load and
  150. process the .EXE file. This only happens in extreme circumstances
  151. (TDSTRIP has very modest memory requirements). You should probably try
  152. rebooting your system and trying again. You may have previously run a
  153. program that allocated some memory that won't be freed until you
  154. reboot.
  155.  
  156. Program does not have a symbol table
  157. You have specified an input file that is a valid .EXE file, but it
  158. does not have a symbol table.
  159.  
  160. Program does not have a valid symbol table
  161. The symbol table at the end of the .EXE file is not a valid TLINK
  162. symbol table. This can happen if you try and use TDSTRIP on a program
  163. created by a linker other than TLINK.
  164.  
  165. Too many arguments
  166. You can supply a maximum of two arguments to TDSTRIP, the first being
  167. the name of the executable program, and the second being the name of
  168. the output file for symbols or the executable program.
  169.  
  170. You must supply an exe file name
  171. You have started TDSTRIP without giving it the name of an .EXE program
  172. file whose symbol table you want to strip.
  173.  
  174.  
  175. TDUMP: The file dumping utility
  176. -------------------------------
  177. The TDUMP utility program is a generic module disassembler you can use
  178. to examine the structure of any file.
  179.  
  180. TDUMP attempts to break apart a file as intelligently as possible. To
  181. do this, it first looks to the file's extension, and if it recognizes
  182. it, it displays the file's components according to the type. TDUMP
  183. recognizes .EXE, .OBJ, and .LIB files. Any file type other than these
  184. results in a straight hex dump of the file.
  185.  
  186. You can use TDUMP to peek into the inner structure of any file. This
  187. not only shows you what's in a file, but also shows you how files are
  188. constructed. Moreover, because TDUMP verifies that a file's structure
  189. matches its extension, you can also use TDUMP to test file integrity.
  190.  
  191.  
  192. TDUMP syntax
  193.  
  194. The syntax for TDUMP is
  195.  
  196.    TDUMP [options] inputfile [outputfile]
  197.  
  198. Inputfile is the file whose structure you want to display (or "dump").
  199. Outputfile is an optional file name to send the display to (you can
  200. also use the standard DOS redirection command ">"). Options stands for
  201. any of the TDUMP options discussed in the next section.
  202.  
  203.  
  204. TDUMP command-line options
  205.  
  206. You can use several optional "switches" with TDUMP, all of which start
  207. with a hyphen (or you can use a forward slash instead). The following
  208. two examples are equivalent:
  209.  
  210.    TDUMP -el -v demo.exe
  211.  
  212.    TDUMP /el /v demo.exe
  213.  
  214.  
  215. The -a and -a7 options
  216.  
  217. TDUMP automatically adjusts its output display according to the file
  218. type (it shows an unrecognized file type in hex display). You can,
  219. however, force the display to be in ASCII by including the -a or -a7
  220. option.
  221.  
  222. An ASCII file display shows the offset and the contents in displayable
  223. ASCII characters. If a character is not displayable (like any control
  224. character), it appears as a period.
  225.  
  226. The -a7 option works just like the -a except that it converts any
  227. high-ASCII characters to their low-ASCII equivalents. This is handy if
  228. the file you're dumping sets high-ASCII characters as flags (as
  229. WordStar files do).
  230.  
  231.  
  232. The -e, -el, and -er options
  233.  
  234. All three of these options force TDUMP to display the file as if it
  235. were an executable (.EXE) file.
  236.  
  237. An .EXE file display consists of lists of file statistics at the top
  238. of the display, followed by the global symbol table and the module
  239. table.
  240.  
  241. The -el option works just like -e option except that it suppresses
  242. line numbers in the display.
  243.  
  244. The -er option works just like -e option except that it prevents the
  245. the relocation table from displaying.
  246.  
  247. You can suppress both line numbers and the relocation table by using
  248. -elr as an option.
  249.  
  250.  
  251. The -h option
  252.  
  253. The -h option forces TDUMP to display the file in hexadecimal format.
  254. The hex format consists of a column of offset numbers, columns of hex
  255. numbers, and then ASCII equivalents (with periods appearing where
  256. there are no displayable ASCII characters).
  257.  
  258. If TDUMP does not recognize the file extension of the input file, it
  259. defaults to displaying the file in hex format (unless an option forces
  260. it to show it in another format).
  261.  
  262.  
  263. The -l option
  264.  
  265. The -l option forces TDUMP to display the file as if it were a library
  266. (.LIB) file. A library file is a collection of object files (see the
  267. following section for more on object files). A library file dump shows
  268. first some library-specific information, then each of the object
  269. files, then each record in each object file.
  270.  
  271.  
  272. The -o option
  273.  
  274. The -o option forces TDUMP to display the file as if it were an object
  275. (.OBJ) file. An object file contains descriptions of the command
  276. records that pass commands and data to the linker, telling it how to
  277. create an .EXE file. The display format shows each record and its
  278. associated data, on a record-by-record basis.
  279.  
  280.  
  281. The -v option
  282.  
  283. The -v option affects all file formats equally by suppressing any
  284. descriptions TDUMP ordinarily inserts into the dump to improve
  285. readability. If you use the -v option, the display is a verbatim dump
  286. of the file's components--as terse as possible. You need to be an
  287. advanced programmer to interpret a verbatim display.
  288.  
  289.  
  290. 2.  CORRECTIONS TO THE MANUAL
  291. =============================
  292.  
  293. Chapter 4, Starting TDW
  294.  
  295. p. 53 The TPW.INI example at the bottom of the page should read:
  296.  
  297.         [Startup]
  298.         CfgPath=C:\TPW\TPW.CFG
  299.         SizeOrg=2,44,44,596,377
  300.  
  301. Chapter 11, Using Windows Debugging Features
  302.  
  303. p. 152  "The items at the top of this list, marked on the right with
  304.         an oval, are your application's .EXE and the DLLs with symbol
  305.         tables that your application calls." This statement is not
  306.         entirely correct. The items at the top of this list, marked on
  307.         the right with an oval, do not necessarily have symbol tables.
  308.         The oval indicates that TDW automatically attempts to load in
  309.         the symbol table and source for each marked .EXE and DLL.
  310.         Therefore, this statement should read, "The items at the top
  311.         of this list, marked on the right with an oval, are your
  312.         application's .EXE and the DLLs that your application calls."
  313.  
  314. /************************* END OF FILE *****************************/
  315.