Wolfgang Thallergcc 15.1.0ada185d1 year agoHistory
41 lines · 1.9 KB · Text
RawDownload
The libbacktrace libraryInitially written by Ian Lance Taylor <iant@golang.org> The libbacktrace library may be linked into a program or library andused to produce symbolic backtraces.Sample uses would be to print a detailed backtrace when an erroroccurs or to gather detailed profiling information. In general the functions provided by this library are async-signal-safe,meaning that they may be safely called from a signal handler.That said, on systems that use dl_iterate_phdr, such as GNU/Linux,the first call to a libbacktrace function will call dl_iterate_phdr,which is not in general async-signal-safe.  Therefore, programsthat call libbacktrace from a signal handler should ensure that theymake an initial call from outside of a signal handler.Similar considerations apply when arranging to call libbacktracefrom within malloc; dl_iterate_phdr can also call malloc,so make an initial call to a libbacktrace function outside ofmalloc before trying to call libbacktrace functions within malloc. The libbacktrace library is provided under a BSD license.See the source files for the exact license text. The public functions are declared and documented in the header filebacktrace.h, which should be #include'd by a user of the library. Building libbacktrace will generate a file backtrace-supported.h,which a user of the library may use to determine whether backtraceswill work.See the source file backtrace-supported.h.in for the macros that itdefines. As of July 2024, libbacktrace supports ELF, PE/COFF, Mach-O, andXCOFF executables with DWARF debugging information.In other words, it supports GNU/Linux, *BSD, macOS, Windows, and AIX.The library is written to make it straightforward to add support forother object file and debugging formats. The library relies on the C++ unwind API defined athttps://itanium-cxx-abi.github.io/cxx-abi/abi-eh.htmlThis API is provided by GCC and clang.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t