Poster of Linux kernelThe best gift for a Linux geek
print_trace.h

print_trace.h

Section: C Library Functions (3) Updated: Thu Apr 7 2011
Local index Up
 

NAME

print_trace.h -  

SYNOPSIS


 

Functions


void print_trace (std::ostream &out=std::cerr)
 

Function Documentation

 

void print_trace (std::ostream &out = std::cerr)

Definition at line 70 of file print_trace.C.

References abi_demangle().

{
  void *addresses[10];
  char **strings;

  int size = backtrace(addresses, 10);
  strings = backtrace_symbols(addresses, size);
  out << 'Stack frames: ' << size << std::endl;
  for(int i = 0; i < size; i++)
    {
//      out << i << ': ' << (int)addresses[i] << std::endl;
//      out << abi_demangle(strings[i]) << std::endl;
      out << i << ': ' << abi_demangle(strings[i]) << std::endl;
    }
  std::free(strings);
}
 

Author

Generated automatically by Doxygen for libMesh from the source code.


 

Index

NAME
SYNOPSIS
Functions
Function Documentation
void print_trace (std::ostream &out = std::cerr)
Author

This document was created by man2html, using the manual pages.
Time: 21:53:02 GMT, April 16, 2011