> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Catalin Vasile
> Sent: Friday, June 24, 2016 9:10 AM
> To: dev at 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 via email to