ATLAS Offline Software
Loading...
Searching...
No Matches
CxxUtils/CxxUtils/UnwindBacktrace.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2/*
3 * Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
4 */
88
89
90#ifndef CXXUTILS_UNWINDBACKTRACE_H
91#define CXXUTILS_UNWINDBACKTRACE_H
92
93
94// Enable this only for gcc + linux + x86_64
95#if defined(__GNUC__) && !defined(__clang__) && defined(__linux__) && defined(__x86_64__)
96# define HAVE_LINUX_UNWIND_BACKTRACE 1
97#endif
98
99
100#ifdef HAVE_LINUX_UNWIND_BACKTRACE
101
102
103#include "CxxUtils/SealCommon.h" // For IOFD
104
105
106namespace CxxUtils {
107
108
111typedef void backtraceLineFn (IOFD fd, unsigned long addr);
112
113
120void backtraceByUnwind (backtraceLineFn* lineFn, IOFD fd);
121
122
123} // namespace CxxUtils
124
125
126#endif
127
128
129#endif // not CXXUTILS_UNWINDBACKTRACE_H
Collecting a few shared bits and pieces from SEAL headers.
int IOFD
Type the system uses for channel descriptors.
Definition SealCommon.h:27