home *** CD-ROM | disk | FTP | other *** search
- TDHIDE 1.0 - Shrinks TLink debug information
- Copyright (c) 1992, D.J. Murdoch
-
- Syntax:
- TDHIDE filename modulename [modulename ...]
- to delete references to named modules, or
- TDHIDE filename
- to report on all modules, but make no changes
-
- An extension of .EXE is assumed on the input file. To modify
- .TDS files, give the extension explicitly.
-
- Examples:
-
- TDHIDE myprog system
- will hide all the system unit constants and variables. Some of the
- standard System unit types appear to be built in to TD, so you'll
- still have access to those, but the displays will look funny.
-
- TDHIDE myprog
- will produce a report listing the modules, the number of symbols
- defined in each, and the amount of space that TDHIDE could recover
- by hiding each of them.
-
- Description:
-
- Borland's Turbo Pascal has two debugging modes: debugging within the
- IDE, and external debugging using the Turbo Debugger. To do allow
- external debugging, it writes debugging information at the end of the
- .EXE file. This is the same format as is produced by the TLINK
- linker.
-
- There's one problem with the way TP writes the debug information for
- units. All interfaced constants and type definitions are written out,
- whether debugging information is on or off for that unit. This means
- that the symbol table can become quite large; since TD loads it into
- memory when you're debugging, you can run out of memory when debugging
- large programs which use lots of units. It also means that TD can be
- unnecessarily slow; when a watch variable goes out of scope, TD
- searches the whole table of identifiers before it gives up and
- displays "????", and it does this *every* time you change the
- instruction pointer by executing something.
-
- TDHIDE is an effort to fix both of these problems. If you know that
- you'll never need to access the identifiers in a particular module
- (unit), you can run TDHIDE to hide the module. It will delete all
- symbols from the TLINK symbol table for that module, and will reclaim
- the space those names occupied.
-
- If you're not sure which module to hide, you can run TDHIDE with the
- second syntax:
-
- TDHIDE exename
-
- This will analyze the symbol table for the given program, and report
- on the number of symbols in each module, and the number of bytes which
- could be recovered.
-
- TDHIDE also works with separate .TDS files, such as those produced by
- "TDSTRIP -s exename". You just specify the .TDS extension when you
- give the file name, and the rest is automatic.
-
- Limitations and Warnings:
-
- TDHIDE was written without any documentation on the TLINK debug
- information. It has been tested on versions 2.08 and 2.09 of the
- debug info (which TP versions 5.5 and 6.0, and TLINK version 3.01
- produce), but may miss some special cases. Other versions of the
- information probably won't work at all, but I haven't tested them.
- I do know that BC++ uses version 3.x of the debug information, but
- haven't had a chance to experiment enough to know if TDHIDE will work
- there or not.
-
- The changes TDHIDE makes are irreversible. If something goes wrong,
- and you want to undo what TDHIDE did, the only way is to recompile or
- relink your program.
-
- Use of TDHIDE will change the behaviour of TD in certain situations.
- If one unit overrides a definition in one of TP's standard units, and
- TDHIDE is used to hide the override, then TD will use the original
- definition, and even if it doesn't get confused, you probably will.
-
- TDHIDE could do a much better job of reducing the size of the debug
- information, but it takes a pretty conservative approach. The TLINK
- symbol table is a mess of pointers. If I deleted anything from it,
- I'd have to update hundreds or thousands of pointers; I just don't
- think it would be practical to do that without documentation.
- Instead, TDHIDE recovers space by shrinking the variable length
- records containing symbol names. Effectively, every name is replaced
- by the zero-length name ''.
-
- License:
-
- TDHIDE is *not* public domain. It is copyrighted software, and I
- (D.J. Murdoch) own the copyright. It is, however, "freeware". I
- grant you a limited license to use this program for personal,
- non-commercial use at no charge. Commercial, governmental and
- institutional users may evaluate it for a period of 30 days, but
- *must* pay a site license fee of $50 to me if they continue to use it
- beyond that time. Educational exemptions are available; send me the
- details of your proposed use to apply for one.
-
- Source code to TDHIDE is available to users who pay the license fee of
- $50. This is Turbo Pascal 6.0 code, and includes generic units for
- analyzing .EXE files and TLINK debug information, and units for
- managing huge (>64K) objects on the heap, and for extending the heap
- into EMS memory. It requires Object Professional from TurboPower
- Software to recompile.
-
- Send license fees to me at the following address:
-
- D.J. Murdoch
- 79 John St. W.
- Waterloo, Ontario, Canada
- N2L 1B7
-
- Fees may be submitted in Canadian or U.S. dollars.
-
- Warranty:
-
- TDHIDE comes with no warranty of any kind. I don't what problems my
- messing about with the TD debug information will cause; I strongly
- recommend that you don't use TDHIDE unless you really need to.