//===------------------------- UnwindCursor.hpp ---------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//
// C++ interface to lower levels of libuwind
//===----------------------------------------------------------------------===//
unw_proc_info_t fInfo;
R fRegisters;
A &fAddressSpace;
bool fUnwindInfoMissing;
bool fIsSignalFrame;
};
template <typename A, typename R>
void UnwindCursor<A, R>::setInfoBasedOnIPRegister(bool isReturnAddress) {
pint_t pc = this->getIP();
// If the last line of a function is a "throw", the compiler sometimes
// emits no instructions after the call to __cxa_throw. This means
// the return address is actually the start of the next function.
// To disambiguate this, back up the PC when we know it is a return
// address.
if (isReturnAddress)
--pc;