• Kevin Modzelewski's avatar
    Refactor and rewrite a bunch of the unwinding code · a81ec92d
    Kevin Modzelewski authored
    The first change is to move to a PIMPL strategy so that
    we can provide a more extensive unwinding API to other modules.
    In particular, you can get access to a python frame iterator
    and make repeated calls on it.  This is in preparation of the
    sys._getframe implementation.
    
    This also exposed an issue with our usage of libunwind -- basically
    you have to do all of your unwinding in one function, but we were
    doing it in several different functions and happening to get away
    with it.  So, switch from a C++11 range-for loop which is nicer, to
    a callback approach which is less nice in my opinion, but safer.
    a81ec92d
unwinding.cpp 31 KB