DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: Catalin Vasile <cata.vasile@nxp.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] backtracing from within the code
Date: Fri, 24 Jun 2016 09:25:18 +0000	[thread overview]
Message-ID: <3EB4FA525960D640B5BDFFD6A3D8912647A0C78F@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <DB5PR04MB130251530D5D0F4BDE3B0545EE2E0@DB5PR04MB1302.eurprd04.prod.outlook.com>


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Catalin Vasile
> Sent: Friday, June 24, 2016 9:10 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] backtracing from within the code
> 
> Hi,
> 
> I'm trying to add a feature to DPDK and I'm having a hard time printing a
> backtrace.
> I tried using this[1] functions for printing, but it does not print more than one
> function. Maybe it lacks the symbols it needs.
> I tried compiling with "-rdynamic", but it breaks the compilation with an error
> of "bad -rpath option".
> Can some help me out?
> 
> Catalin Vasile
> 
> [1] https://www.gnu.org/software/libc/manual/html_node/Backtraces.html

Hi Catalin,

You can look at the implementation of function rte_panic(), which is used to dump the call stack and exit.

It eventually calls rte_dump_stack() in file lib/lirte_eal/linuxapp/eal/eal_debug.c, which calls backtrace(), which is probably what you are looking for. 

Regards,
Cristian

  reply	other threads:[~2016-06-24  9:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-24  8:10 Catalin Vasile
2016-06-24  9:25 ` Dumitrescu, Cristian [this message]
2016-06-24 10:05   ` Thomas Monjalon
2016-06-24 17:46     ` Stephen Hemminger
2016-06-25 14:07       ` Rosen, Rami
2016-06-27 15:42         ` Matt Laswell

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=3EB4FA525960D640B5BDFFD6A3D8912647A0C78F@IRSMSX108.ger.corp.intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=cata.vasile@nxp.com \
    --cc=dev@dpdk.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;
as well as URLs for NNTP newsgroup(s).