home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************/
- Turbo Debugger for Windows
- Manual Reference & Corrections
-
- This file contains information about Turbo Debugger utilities and
- corrections to the manual. The contents of this file are as follows:
-
- 1. Turbo Debugger Utilities
- 2. Corrections to the Manual
-
- 1. TURBO DEBUGGER UTILITIES
- ----------------------------
-
- For convenience, when searching in this file for information about a
- particular utility, use the name of the utility followed by a colon
- (i.e. TDUMP:). This search takes you directly to the header for the
- utility specified.
-
- Your Turbo Debugger package comes with several utility programs, which
- are discussed in the following sections. One utility lets you strip
- the debugging information (the "symbol table") from your programs
- without relinking. This is the symbol table stripping utility
- TDSTRIP.EXE.
-
- There is also a generic object module disassembler program called
- TDUMP.EXE.
-
- Finally, we provide a configuration program called TDWINST.EXE that
- lets you customize TDW. This utility is described in Appendix C of the
- "Turbo Debugger for Windows User's Guide."
-
- Note: For a list of all the command-line options available for TDUMP
- or TDSTRIP, just type the program name and press Enter. For example,
- to see the command-line options for TDUMP.EXE, you would enter
-
- TDUMP
-
- TDWINST.EXE uses the -? command-line switch for on-line information.
-
-
- TDSTRIP: The symbol table stripping utility
- -------------------------------------------
- TDSTRIP.EXE, the symbol table stripping utility, lets you remove the
- symbol table from an executable program generated by TLINK with the /v
- option. This is a faster way of removing the symbol table than
- relinking without the /v option. It can also remove debugging
- information from an .OBJ file. Just enter
-
- TDSTRIP PROGRAM.OBJ
-
- You can also use this utility to remove the symbol table and put it in
- a separate file. This is useful when you want to convert the .EXE
- format program to a .COM file, and still retain the debugging symbol
- table. This utility puts the symbol table in a file with the extension
- .TDS. Turbo Debugger looks for this file when it loads a program to
- debug that does not have a symbol table.
-
-
- TDSTRIP command-line options
-
- Here is the general form of the DOS command line used to start the
- Symbol Table Stripping utility, TDSTRIP:
-
- TDSTRIP [-s][-c] exename [outputname]
-
- If you don't specify the -s option, the symbol table is removed from
- the .EXE file exename. If you specify an outputname, the original .EXE
- file is left unchanged and a version with no symbol table is created
- as outputname.
-
- If you do specify the -s option, the symbol table will be put in a
- file with the same name as exename but with the extension .TDS. If you
- specify an output file, the symbol table will be put in outputname.
-
- If you specify the -c option, the input .EXE file is converted into a
- .COM file. If you use -c in conjunction with -s, you can convert an
- .EXE file with symbols into a .COM file with a separate .TDS symbol
- file. This lets you debug .COM files with Turbo Debugger while
- retaining full debugging information.
-
- You can only convert certain .EXE files into .COM files. The same
- restrictions apply to the -c option of TDSTRIP as to the /t option of
- TLINK: Your program must start at location 100 hex, and it can't
- contain any segment fixups.
-
- If you don't supply an extension with exename, .EXE is presumed. If
- you don't supply an extension with outputname, .EXE is added when you
- don't use -s, and .TDS is added when you do use -s.
-
- Here are some sample TDSTRIP command lines:
-
- TDSTRIP MYPROG
-
- removes the symbol table from MYPROG.EXE.
-
- TDSTRIP -s MYPROG.OLD
-
- removes the symbol table from MYPROG.OLD and places it in MYPROG.TDS.
-
- TDSTRIP MYPROG MYPROG.NEW
-
- leaves MYPROG.EXE unchanged but creates another copy of it named
- MYPROG.NEW without a symbol table.
-
- TDSTRIP -s MYPROG MYSYMS
-
- removes the symbol table from MYPROG.EXE and places it in MYSYMS.TDS
-
-
- TDSTRIP error messages
-
- Here is a list of the possible error messages you might encounter when
- working with TDSTRIP:
-
- Can't create file: ___
- TDSTRIP could not create the output symbol or .EXE file. Either there
- is no more room on your disk, or you specified an invalid output file
- name.
-
- Can't open file: ___
- TDSTRIP could not locate the .EXE file that you wish to remove the
- symbol table from.
-
- Error reading from input exe file
- An error occurred during reading from the input executable program
- file. Your disk may be unreadable. Try the operation again.
-
- Error writing to output file: ___; disk may be full
- TDSTRIP could not write to the output symbol or executable file. This
- usually happens when there is no more room on your disk. You will have
- to delete some files to make room for the file created by TDSTRIP.
-
- Input file is not an .exe file
- You have specified an input file name that is not a valid executable
- program. You can strip symbols only from .EXE programs, since these
- are the only ones that TLINK can put a symbol table on. Programs in
- .COM file format do not have symbol tables and cannot be processed by
- TDSTRIP.
-
- Invalid command-line option: ___
- You have given an invalid command-line option when starting TDSTRIP
- from the DOS command line.
-
- Invalid exe file format
- The input file appears to be an .EXE format program file, but
- something is wrong with it. You should relink the program with TLINK.
-
- Not enough memory
- Your system does not have enough free memory for TDSTRIP to load and
- process the .EXE file. This only happens in extreme circumstances
- (TDSTRIP has very modest memory requirements). You should probably try
- rebooting your system and trying again. You may have previously run a
- program that allocated some memory that won't be freed until you
- reboot.
-
- Program does not have a symbol table
- You have specified an input file that is a valid .EXE file, but it
- does not have a symbol table.
-
- Program does not have a valid symbol table
- The symbol table at the end of the .EXE file is not a valid TLINK
- symbol table. This can happen if you try and use TDSTRIP on a program
- created by a linker other than TLINK.
-
- Too many arguments
- You can supply a maximum of two arguments to TDSTRIP, the first being
- the name of the executable program, and the second being the name of
- the output file for symbols or the executable program.
-
- You must supply an exe file name
- You have started TDSTRIP without giving it the name of an .EXE program
- file whose symbol table you want to strip.
-
-
- TDUMP: The file dumping utility
- -------------------------------
- The TDUMP utility program is a generic module disassembler you can use
- to examine the structure of any file.
-
- TDUMP attempts to break apart a file as intelligently as possible. To
- do this, it first looks to the file's extension, and if it recognizes
- it, it displays the file's components according to the type. TDUMP
- recognizes .EXE, .OBJ, and .LIB files. Any file type other than these
- results in a straight hex dump of the file.
-
- You can use TDUMP to peek into the inner structure of any file. This
- not only shows you what's in a file, but also shows you how files are
- constructed. Moreover, because TDUMP verifies that a file's structure
- matches its extension, you can also use TDUMP to test file integrity.
-
-
- TDUMP syntax
-
- The syntax for TDUMP is
-
- TDUMP [options] inputfile [outputfile]
-
- Inputfile is the file whose structure you want to display (or "dump").
- Outputfile is an optional file name to send the display to (you can
- also use the standard DOS redirection command ">"). Options stands for
- any of the TDUMP options discussed in the next section.
-
-
- TDUMP command-line options
-
- You can use several optional "switches" with TDUMP, all of which start
- with a hyphen (or you can use a forward slash instead). The following
- two examples are equivalent:
-
- TDUMP -el -v demo.exe
-
- TDUMP /el /v demo.exe
-
-
- The -a and -a7 options
-
- TDUMP automatically adjusts its output display according to the file
- type (it shows an unrecognized file type in hex display). You can,
- however, force the display to be in ASCII by including the -a or -a7
- option.
-
- An ASCII file display shows the offset and the contents in displayable
- ASCII characters. If a character is not displayable (like any control
- character), it appears as a period.
-
- The -a7 option works just like the -a except that it converts any
- high-ASCII characters to their low-ASCII equivalents. This is handy if
- the file you're dumping sets high-ASCII characters as flags (as
- WordStar files do).
-
-
- The -e, -el, and -er options
-
- All three of these options force TDUMP to display the file as if it
- were an executable (.EXE) file.
-
- An .EXE file display consists of lists of file statistics at the top
- of the display, followed by the global symbol table and the module
- table.
-
- The -el option works just like -e option except that it suppresses
- line numbers in the display.
-
- The -er option works just like -e option except that it prevents the
- the relocation table from displaying.
-
- You can suppress both line numbers and the relocation table by using
- -elr as an option.
-
-
- The -h option
-
- The -h option forces TDUMP to display the file in hexadecimal format.
- The hex format consists of a column of offset numbers, columns of hex
- numbers, and then ASCII equivalents (with periods appearing where
- there are no displayable ASCII characters).
-
- If TDUMP does not recognize the file extension of the input file, it
- defaults to displaying the file in hex format (unless an option forces
- it to show it in another format).
-
-
- The -l option
-
- The -l option forces TDUMP to display the file as if it were a library
- (.LIB) file. A library file is a collection of object files (see the
- following section for more on object files). A library file dump shows
- first some library-specific information, then each of the object
- files, then each record in each object file.
-
-
- The -o option
-
- The -o option forces TDUMP to display the file as if it were an object
- (.OBJ) file. An object file contains descriptions of the command
- records that pass commands and data to the linker, telling it how to
- create an .EXE file. The display format shows each record and its
- associated data, on a record-by-record basis.
-
-
- The -v option
-
- The -v option affects all file formats equally by suppressing any
- descriptions TDUMP ordinarily inserts into the dump to improve
- readability. If you use the -v option, the display is a verbatim dump
- of the file's components--as terse as possible. You need to be an
- advanced programmer to interpret a verbatim display.
-
-
- 2. CORRECTIONS TO THE MANUAL
- =============================
-
- Chapter 4, Starting TDW
-
- p. 53 The TPW.INI example at the bottom of the page should read:
-
- [Startup]
- CfgPath=C:\TPW\TPW.CFG
- SizeOrg=2,44,44,596,377
-
- Chapter 11, Using Windows Debugging Features
-
- p. 152 "The items at the top of this list, marked on the right with
- an oval, are your application's .EXE and the DLLs with symbol
- tables that your application calls." This statement is not
- entirely correct. The items at the top of this list, marked on
- the right with an oval, do not necessarily have symbol tables.
- The oval indicates that TDW automatically attempts to load in
- the symbol table and source for each marked .EXE and DLL.
- Therefore, this statement should read, "The items at the top
- of this list, marked on the right with an oval, are your
- application's .EXE and the DLLs that your application calls."
-
- /************************* END OF FILE *****************************/