raisch@Control.COM (Robert Raisch) (03/01/91)
Is there a PD source for generating a tree diagram of the calls used in a application written in 'C'? What I'm thinking of is a program that, when given a group of source files, produces a tree of who calls who, starting at main(). I have a rather large system, running under MSDOS (Gack.) that I need to extract only the bits that do the work, and Microsoft C seems to want to *always* link in ALL the modules I tell it to, regardless of whether or not the code is actually used. <heavy sigh> Makes for an enormous executable, even when I *know* I'm only using a small portion of the code. The program that you recommend should run under SUNOS 4.1. Thanks ever so much. -RR -- "I ate his liver with some fava beans and a nice chianti." -Lector
karln@uunet.uu.net (03/02/91)
In article <1148@cthulhuControl.COM> raisch@Control.COM (Robert Raisch) writes: > >I have a rather large system, running under MSDOS (Gack.) that I need to >extract only the bits that do the work, and Microsoft C seems to want to >*always* link in ALL the modules I tell it to, regardless of whether or >not the code is actually used. <heavy sigh> Makes for an enormous >executable, even when I *know* I'm only using a small portion of the code. > Just a point of order here, I am pretty sure, after 8 years of using MSC, that you can link only the modules you want ONLY IF you put them into your own library. This would be done with lib mylib+mod1+mod2+mod3 then compile main and link in this library. Fair warning though, you are going to have a b*tch of a time figuring out how to get the make 'proceedure' to update the library in a convient fashion. Clue: I had to echo the compiled module names to a temp file and then include them all at once to the library .. like they say "Mess-Dos" Karl Nicholas karln!karln@uunet.uu.net
jw@crystal1.UUCP (John S. Wainscott) (03/03/91)
If you want to generate a tree structure of function calls for a C program there's a command that comes with most C development systems called, 'cflow', that does pretty much that. We have that command on our 386 running AT&T V.3. Check the Programmers Reference Manual. John Wainscott Software Clearing House, Inc.