Trying to build my own non-GNU cross-platform C++ environment, I have faced the fact that I don't really understand the basics of the stack unwinding. The environment I build is as follows:
libc++
← libc++abi
← libunwind
(or some other unwinder).
I've found that libc++abi
already contains some kind of libunwind, but doesn't use it on Linux. From the comments I understood, that it's special libunwind: LLVM Stack Unwinder that supports only Darwin and ARM but not x86_64 - and it's confusing. How does it come that the CPU architecture affects the stack unwinding process?
Also I know about following stack unwinders:
- glibc built-in.
- libc++abi LLVM libunwind.
- GNU libunwind (from savanna).
Questions:
- How does the platform or CPU architecture affects the stack unwinding process?
- Why to have many stack unwinders - and not just a single one?
- What kind of unwinders do exist and what is a difference between them?
Expectations from an answer:
I expect to get the answer that covers this topic as whole, not just separate points on each question.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource
- then I don't see how this applies to my question. By the way,#3-type questions
- do you mean questions with 3 another subquestions or something else? – Rizzi