core.internal.execinfo

This module helps to decide whether an appropriate execinfo implementation is available in the underling C runtime or in an external library. In the latter case exactly one of the following version identifiers should be set at the time of building druntime.

Possible external execinfo version IDs based on possible backtrace output formats:

Version ID, Backtrace formatExtExecinfo_BSDFmt, 0x00000000 <_D6module4funcAFZv+0x78> at moduleExtExecinfo_DarwinFmt, 1 module 0x00000000 D6module4funcAFZv + 0ExtExecinfo_GNUFmt, module(_D6module4funcAFZv) [0x00000000] or

module(_D6module4funcAFZv+0x78) [0x00000000] or module(_D6module4funcAFZv-0x78) [0x00000000]

ExtExecinfo_SolarisFmt, object'symbol+offset [pc]

The code also ensures that at most one format is selected (either by automatic C runtime detection or by ExtExecinfo_ version IDs) and stores the corresponding values in BacktraceFmt.

With getMangledSymbolName we can get the original mangled symbol name from backtrace_symbols output of any supported version.

Types 1

enumBacktraceFmt : bool

Indicates the backtrace format of the actual execinfo implementation. At most one of the values is allowed to be set to true the others should be false.

BSD = _BTFmt_BSD0x00000000 <D6module4funcAFZv+0x78> at module
Darwin = _BTFmt_Darwin1 module 0x00000000 D6module4funcAFZv + 0
GNU = _BTFmt_GNUmodule(D6module4funcAFZv) [0x00000000] or module(D6module4funcAFZv+0x78) [0x00000000] or module(D6module4funcAFZv-0x78) [0x00000000]
Solaris = _BTFmt_Solarisobject'symbol+offset [pc]

Functions 1

private fnbool atMostOneBTFmt()

Variables 1

enumvarhasExecinfo = is(_execinfo == module)

Indicates the availability of backtrace functions