File: backtrace.h

package info (click to toggle)
storm-lang 0.7.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 52,028 kB
  • sloc: ansic: 261,471; cpp: 140,432; sh: 14,891; perl: 9,846; python: 2,525; lisp: 2,504; asm: 860; makefile: 678; pascal: 70; java: 52; xml: 37; awk: 12
file content (33 lines) | stat: -rw-r--r-- 852 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include "Platform.h"

#if defined(POSIX) && !defined(NO_LIBBACKTRACE)

// Note: On POSIX, there is a function named 'backtrace_symbols', which seems promising. However, it
// just uses 'dladdr' to find function names, which is not sufficient since it does not get names
// for functions inside the current binary.

// Defines from 'config.h'
#if defined(X86)
#define BACKTRACE_ELF_SIZE 32
#elif defined(X64)
#define BACKTRACE_ELF_SIZE 64
#elif defined(ARM64)
#define BACKTRACE_ELF_SIZE 64
#else
#error "Backtrace elf size not known."
#endif

#define HAVE_ATOMIC_FUNCTIONS 1
#define HAVE_DECL_STRNLEN 1
#define HAVE_DL_ITERATE_PHDR 1
#define HAVE_FCNTL 1
#define HAVE_SYNC_FUNCTIONS 1

/* Enable GNU extensions on systems that have them.  */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif

#include "Linux/backtrace/backtrace.h"
#endif