1#ifndef AMREX_BL_BACKTRACE_H_
2#define AMREX_BL_BACKTRACE_H_
3#include <AMReX_Config.H>
20#define BL_PASTE2(x, y) x##y
21#define BL_PASTE(x, y) BL_PASTE2(x, y)
32#define BL_BACKTRACE_PUSH( S ) amrex::BLBTer BL_PASTE( bl_bter, __COUNTER__ )( S, __FILE__, __LINE__ )
40#define BL_BACKTRACE_POP() amrex::BLBackTrace::bt_stack.pop()
62 static std::stack<std::pair<std::string, std::string> >
bt_stack;
64#if defined(AMREX_USE_OMP) && !defined(_CRAYC) && !defined(__INTEL_COMPILER) && !defined(__PGI) && !defined(__NVCOMPILER) && !defined(__FUJITSU)
65#pragma omp threadprivate(bt_stack)
79 BLBTer(
const std::string& s,
const char* file,
int line);
86 std::string line_file;
Definition AMReX_BLBackTrace.H:70
~BLBTer()
Definition AMReX_BLBackTrace.cpp:407
BLBTer & operator=(BLBTer const &)=delete
BLBTer(BLBTer const &)=delete
Definition AMReX_Amr.cpp:50
Definition AMReX_BLBackTrace.H:45
static void handler(int s)
Signal handler that prints and aborts on fatal signals.
Definition AMReX_BLBackTrace.cpp:50
static void print_backtrace_info(FILE *f)
Print backtrace details to f for abort handling.
Definition AMReX_BLBackTrace.cpp:199
static std::stack< std::pair< std::string, std::string > > bt_stack
Definition AMReX_BLBackTrace.H:62