![]() |
libexcept 1.1.19
Stack trace along C++ exceptions
|
Implementation of the stack trace. More...
#include "libexcept/exception.h"
#include "libexcept/demangle.h"
#include <iostream>
#include <memory>
#include <vector>
#include <execinfo.h>
#include <link.h>
#include <unistd.h>
Go to the source code of this file.
Namespaces | |
namespace | libexcept |
Functions | |
stack_trace_t | libexcept::collect_stack_trace (int stack_trace_depth) |
Collect the raw stack trace in a list of strings. | |
stack_trace_t | libexcept::collect_stack_trace_with_line_numbers (int stack_trace_depth) |
Collect the stack trace in a list of strings. | |
This file includes the functions that are used to gather the stack trace from those very functions.
By default, the stack trace is turned on in our exception library. When turned on, we gather the information from the stack using the functions defined in this file. This can be very helpful when the code is able to gather the filenames and line numbers as it will tell you exactly where each function failed.
If you are running in release mode, it is likely that no line numbers will be generated since they will be removed from your executables.
Definition in file stack_trace.cpp.
This document is part of the Snap! Websites Project.
Copyright by Made to Order Software Corp.