This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB Trace functions calls when executing a program
- From: Jonah Graham <jonah at kichwacoders dot com>
- To: Satya Prakash Prasad <satyaprakash dot prasad at gmail dot com>
- Cc: Yubin Ruan <ablacktshirt at gmail dot com>, gdb-info at sourceware dot org, gdb-faq at sourceware dot org, gdb at sourceware dot org
- Date: Wed, 7 Mar 2018 06:46:05 +0000
- Subject: Re: GDB Trace functions calls when executing a program
- Authentication-results: sourceware.org; auth=none
- References: <CACX5wchUEWN3fB6WKSrd7bSjuPLO6Mfw=20s-yqFNUQZ-v4ojQ@mail.gmail.com> <20180308014408.GA6094@HP> <CACX5wcjrQqhAF=Ncy_CHcx4p1yxGCiUb4hiAYQq=jxPQHp2umQ@mail.gmail.com>
On 7 Mar 2018 06:17, "Satya Prakash Prasad" <satyaprakash.prasad@gmail.com>
wrote:
Also inserting printf in each function call is not possible cause it would
take long hours and effort for a code spreading thousands of lines.
You can let the compiler do the heavy lifting by using
-finstrument-functions
Here is a nice blog post about it
https://mcuoneclipse.com/2015/04/04/poor-mans-trace-free-of-charge-function-entryexit-trace-with-gnu-tools/