Definition of stack trace building functions.
More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <cxxabi.h>
#include <dlfcn.h>
#include <execinfo.h>
#include <cstdio>
#include <cstdlib>
#include <sstream>
#include <string>
#include "fire/exception/Exception.h"
|
static char * | addr2line (const char *image, void *addr, bool color_output) |
| Invokes addr2line utility to determine the function name and the line information from an address in the code segment. More...
|
|
static std::string | Backtrace (int skip=1) |
| Produce a stack backtrace with demangled function and method names. More...
|
|
Definition of stack trace building functions.
◆ addr2line()
static char * addr2line |
( |
const char * |
image, |
|
|
void * |
addr, |
|
|
bool |
color_output |
|
) |
| |
|
static |
Invokes addr2line utility to determine the function name and the line information from an address in the code segment.
- Note
- This function is not fully tested or designed well.
- Parameters
-
[in] | image | |
[in] | addr | function address |
[in] | color_output | true if output should be colored |
- Returns
- string holding function name and line
◆ Backtrace()
Produce a stack backtrace with demangled function and method names.
- Note
- Some backtraces are causing segmentation violations. Not sure why...
- Parameters
-
[in] | skip | number of calls in the trace to skip from the bottom |
- Returns
- string holding backtrace information