There is the gcc -finstrument-functions option, the mechanism of which you can use to define your own callbacks for each funtion entry / exit.
Google, and you can find many good examples.
[Edit] With this call to the gcc function, you can only track the on / off of the function, not the parameters. but with some tricks you can also track parameters. (follow the current frame pointer to get the parameter on the stack).
Here is an article on implementation idea:
http://linuxgazette.net/151/melinte.html
Also, depending on your embedded system, on linux, you might try something like ltrace to show options (e.g. strace path). There are many tools that work in tracing functions in user space or in kernelspace on linux, ftrace / ust / ltrace / utrace / strace / systemtap /. In any case, if you do not add a hard debugging code, it is not possible to display the parameters correctly. If you take steps to add I / O debugging information, then this is much simpler.
There is also a similar thread dedicated to this issue.
A tool for tracking local function calls in Linux
Sam liao
source share