src/globals/assert.h
inline void print_backtrace(void) {
  void*  array[30];
  char** strings;
  size_t size = backtrace(array, 30);
  strings     = backtrace_symbols(array, size);

  fprintf(mystderr, "Obtained %zd stack frames.\n", size);
  for(size_t i = 0; i < size; i++)
    fprintf(mystderr, "%s\n", strings[i]);

  free(strings);
}
/**************************************************************************************/
/* Prints the current call stack of Scarab. For the function names to be
 * printed, Scarab should be linked with -rdynamic flag. */
Prints the current call stack of Scarab. For the function names to be
printed, Scarab should be linked with -rdynamic flag.
Prints the current call stack of Scarab . For the function names to be printed Scarab should be linked with - rdynamic flag .
inline void print_backtrace(void) {
  void*  array[30];
  char** strings;
  size_t size = backtrace(array, 30);
  strings     = backtrace_symbols(array, size);
  fprintf(mystderr, "Obtained %zd stack frames.\n", size);
  for(size_t i = 0; i < size; i++)
    fprintf(mystderr, "%s\n", strings[i]);
  free(strings);
}
inline void print_backtrace ( void ) { void * array [ 30 ] ; char * * strings ; size_t size = backtrace ( array , 30 ) ; strings = backtrace_symbols ( array , size ) ; fprintf ( mystderr , " \n " , size ) ; for ( size_t i = 0 ; i < size ; i ++ ) fprintf ( mystderr , " \n " , strings [ i ] ) ; free ( strings ) ; }
Prints the current call stack of Scarab.
Prints the current call stack of Scarab .