Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jonah Graham <jonah@kichwacoders.com>
To: Satya Prakash Prasad <satyaprakash.prasad@gmail.com>
Cc: Yubin Ruan <ablacktshirt@gmail.com>,
	gdb-info@sourceware.org, gdb-faq@sourceware.org,
		gdb@sourceware.org
Subject: Re: GDB Trace functions calls when executing a program
Date: Wed, 07 Mar 2018 06:46:00 -0000	[thread overview]
Message-ID: <CAPmGMvgd4D_ga+xVQ0Yy6bkDpaSB5OfdcfSFMLUqzV71wD=M6w@mail.gmail.com> (raw)
In-Reply-To: <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/


      reply	other threads:[~2018-03-07  6:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28 15:19 Satya Prakash Prasad
2018-03-07  1:44 ` Yubin Ruan
2018-03-07  6:17   ` Satya Prakash Prasad
2018-03-07  6:46     ` Jonah Graham [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPmGMvgd4D_ga+xVQ0Yy6bkDpaSB5OfdcfSFMLUqzV71wD=M6w@mail.gmail.com' \
    --to=jonah@kichwacoders.com \
    --cc=ablacktshirt@gmail.com \
    --cc=gdb-faq@sourceware.org \
    --cc=gdb-info@sourceware.org \
    --cc=gdb@sourceware.org \
    --cc=satyaprakash.prasad@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox