[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Call Tree Generator
- Subject: Re: Call Tree Generator
- From: m218003(at)modell3-d.dkrz.de (Martin Schultz)
- Date: 16 Aug 1999 11:39:20 GMT
- Newsgroups: comp.lang.idl-pvwave
- Organization: Deutsches Klimarechenzentrum, Hamburg
- References: <37B1CD85.DAC0AED4@sandia.gov> <MPG.email@example.com>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:16122
In article <MPG.firstname.lastname@example.org>,
email@example.com (David Fanning) writes:
> Calvin King (firstname.lastname@example.org) writes:
>> Is there a program that looks at an IDL procedure/function and generates
>> the call tree? I inherited a large number of IDL programs for a project.
>> I am going through the programs one at a time starting at the
>> top-on-down to make sure I have all of the necessary programs before
>> compilation and use. Just to make sure I am explaining myself clearly,
>> the top level program A calls programs B and C; B calls D, E, and F; and
>> C calls G, H, I, and J, and so on... Is there an automated way to make
>> sure I have all of the programs: A, B, C, D, E, F, G, H, I and so on?
>> Thanks, in advance, for any pointers!
> Start a fresh IDL session. Compile your top-level program.
> Now type Resolve_All. If you get error messages, you don't
> have all the programs. :-)
> You will know which ones you need: the ones Resolve_All
> can't find.
A good method, but not perfect. It doesn't find any routine called with
EXECUTE, CALL_PROCEDURE, or CALL_FUNCTION. But it should be possible to
write a program that does the following:
* get all compiled routines with -- was it HELP,... ?
there is also some output of the filenames for these routines
* loop through all files and look for EXECUTE, CALL_... statements
and analyze their argument. If the argument is a simple
string, you can assume there should be a file named <string>.pro
if the argument is some sort of variable, it's harder. Maybe
it's enough to simply print out a list of all EXECUTE and
CALL_... statements. Of course you can do that with grep
(one of the many many reasons why I will never switch from Unix
to Windows - although I am told it exists for Windows which is
to say for DOS)
just $0.02, or 0.0212 Euro ;-)