Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Peng Yu <pengyu.ut@gmail.com>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: How to print info of each function by running an executable (compiled with -g) in gdb?
Date: Sat, 01 Oct 2016 05:12:00 -0000	[thread overview]
Message-ID: <CABrM6w=eLY+eoeQZLtSfPAB2q7Rxc20aHvTwv1gurNeSs+S+Tg@mail.gmail.com> (raw)

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


             reply	other threads:[~2016-10-01  5:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-01  5:12 Peng Yu [this message]
2016-10-21 22:22 ` doark

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='CABrM6w=eLY+eoeQZLtSfPAB2q7Rxc20aHvTwv1gurNeSs+S+Tg@mail.gmail.com' \
    --to=pengyu.ut@gmail.com \
    --cc=gdb@sourceware.org \
    /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