Mail Archives: djgpp/2001/03/25/11:17:54
James W Sager Iii <sager+@andrew.cmu.edu> wrote:
> I'm really bad with keeping up to date with other people's code... So I
> was wondering does anyone have a utility for taking the first step of
> stripping down a large project?
> For example if you had 20.cc files, you'd pass them as arguments.
> The ripper utility would add a line of code with an index to every one
> of your functions that'd basically do the following when executed:
Code for this is already inside GCC: if you compile with profiling
enabled (any type of profiling would usually do, but on DOS, currently
only '-pg' really works in the existing GCC binaries), code is added
that keeps a count of all function invocations among other things and
writes them to a special protocol file (gmon.out).
> You then run ripper part 2, and it removes every function that wasn't
> used, and outputs new files for you to make debugging easier.
You can't just remove the functions that weren't used: you have to
remove their calls, too, otherwise the linker would complain.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -