This patch allows to use libunwind on bare-metal systems that do not
include malloc/free by conditionally turning off nonessential
functionality that requires these functions.
The disabled functionality includes:
* the .cfi_remember_state and .cfi_restore_state instructions;
* the DWARF FDE cache.
The .cfi_{remember,restore}_state instructions don't seem to be used
by contemporary compilers. None of the LLVM backends emit it.
The DWARF FDE cache is bypassed if _LIBUNWIND_NO_HEAP is defined.
Specifically, entries are never added to it, so the search begins
and ends at the statically allocated, empty initial cache.
Such heap-less libunwind on a bare metal system is successfully used
in the ARTIQ project[1], and it is my hope that it will be useful
elsewhere.
[1]: http://m-labs.hk/artiq
Differential Revision: http://reviews.llvm.org/D11897
llvm-svn: 252452
|
||
|---|---|---|
| .. | ||
| AddressSpace.hpp | ||
| CMakeLists.txt | ||
| CompactUnwinder.hpp | ||
| DwarfInstructions.hpp | ||
| DwarfParser.hpp | ||
| EHHeaderParser.hpp | ||
| Registers.hpp | ||
| Unwind-EHABI.cpp | ||
| Unwind-EHABI.h | ||
| Unwind-sjlj.c | ||
| UnwindCursor.hpp | ||
| UnwindLevel1-gcc-ext.c | ||
| UnwindLevel1.c | ||
| UnwindRegistersRestore.S | ||
| UnwindRegistersSave.S | ||
| Unwind_AppleExtras.cpp | ||
| assembly.h | ||
| config.h | ||
| dwarf2.h | ||
| libunwind.cpp | ||
| libunwind_ext.h | ||
| unwind_ext.h | ||