How to print info of each function by running an executable (compiled with -g) in gdb?

Peng Yu pengyu.ut@gmail.com
Sat Oct 1 05:12:00 GMT 2016


Hi, I am currently inserting the following line into functions for
which I want to print the function info. However, this can be tedious
if the source code is large.

fprintf(stderr, "%s:%d:%s\n", __FILE__, __LINE__, __PRETTY_FUNCTION__);

Is there a way to automatically print the information of each function
being called using gdb?

-- 
Regards,
Peng



More information about the Gdb mailing list