Back to index

glibc  2.9
Functions
execinfo.c File Reference
#include <execinfo.h>
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

void print_trace (void)
void dummy_function (void)
int main (void)

Function Documentation

void dummy_function ( void  )

Definition at line 27 of file execinfo.c.

{
  print_trace ();
}

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( void  )

Definition at line 33 of file execinfo.c.

{
  dummy_function ();
  return 0;
}

Here is the call graph for this function:

void print_trace ( void  )

Definition at line 7 of file execinfo.c.

{
  void *array[10];
  size_t size;
  char **strings;
  size_t i;

  size = backtrace (array, 10);
  strings = backtrace_symbols (array, size);

  printf ("Obtained %zd stack frames.\n", size);

  for (i = 0; i < size; i++)
     printf ("%s\n", strings[i]);

  free (strings);
}

Here is the call graph for this function:

Here is the caller graph for this function: