[mdlug] [Request] (dis)recommendations for gcc function call sequence
Aaron Kulkis
akulkis3 at hotpop.com
Tue Jan 29 04:46:31 EST 2008
Robert Meier wrote:
> C programmers,
>
> I am trying to map (i.e. determine) the history of function calls in c code.
> The compiler is gcc-2.96, with associated gdb, gprof, and most other tools.
> I can generally add any compile/link flags I need,
> but cannot practically spend the time to alter the source code.
>
> AFAIK, gprof, (gmon.out format) only collects a histogram (caller
> and duration) of calls, and discards the sequence of calls.
>
> What tools do you (dis)recommend?
> Is there a (set of) gcc options to record entry/exit of each function?
>
>
compile with the -g flag, fire up gdb and use single-step mode.
Laborious, but it works.
More information about the mdlug
mailing list