I HATE DBX! I HATE DBX!

Doug Doucette doug at tolerant.UUCP
Wed Mar 12 05:58:57 AEST 1986


In article <1700 at utah-gr.UUCP> thomas at utah-gr.UUCP (Spencer W. Thomas) writes:
>In article <169 at gsg.UUCP> kathy at gsg.UUCP (Kathryn Smith) writes:
>>After running some tests then recomiling the
>>application to use SDB instead, it turned out that DBX requires somewhere
>>between 10 and 15 times the memory resources that the same program compiled
>>with SDB requires.
>
>The reason for this is that dbx knows so much more about your program.
>Basically, you are seeing the difference in the symbol table sizes
>between sdb and dbx.  Dbx also has all the type information compiled
>into the symbol table.  If you are running programs that are so big you
>can only run one dbx at a time, I would look at the sizes of your swap
>partitions and how much main memory you've got.  (You didn't say exactly
>why you could only run one at a time, but I assume it must be one of
>these.)  Usually, big symbol tables come from big programs, and big
>programs have a tendency to eventually fill memory.
>
>=Spencer   ({ihnp4,decvax}!utah-cs!thomas, thomas at utah-cs.ARPA)

The real reason dbx needs so much memory is that its type information
is encoded as strings, which it must turn into a symbol table.
It avoids copying all the information in the string table (like variable
names) by leaving the original string table lying around in memory.
Sdb, on the other hand, basically uses the symbols read in from the 
symbol table in uninterpreted form - it doesn't copy everything.

When debugging large programs the dominant factor in terms of space
becomes the repeated copies of (mostly type) information from header files.
(For "large program" think "vmunix", for example.) Swap space is
irrelevant here; dbx on anything the size of vmunix will want to run
in 6-8MB.

At Tolerant we have reimplemented all the -g stuff so that dbx's use
of the symbol table information can be disk-based (it doesn't have it
all in memory). Also, the linker removes duplicate information.

	Doug Doucette (tolerant!doug at berkeley, ...!ucbvax!tolerant!doug)



More information about the Comp.lang.c mailing list