FFI: Fix frame traversal for backtraces with FFI callbacks.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "lj_state.h"
|
||||
#include "lj_frame.h"
|
||||
#include "lj_bc.h"
|
||||
#include "lj_vm.h"
|
||||
#if LJ_HASJIT
|
||||
#include "lj_jit.h"
|
||||
#endif
|
||||
@@ -86,7 +87,8 @@ static BCPos debug_framepc(lua_State *L, GCfunc *fn, cTValue *nextframe)
|
||||
if (frame_islua(f)) {
|
||||
f = frame_prevl(f);
|
||||
} else {
|
||||
if (frame_isc(f))
|
||||
if (frame_isc(f) || (LJ_HASFFI && frame_iscont(f) &&
|
||||
(f-1)->u32.lo == LJ_CONT_FFI_CALLBACK))
|
||||
cf = cframe_raw(cframe_prev(cf));
|
||||
f = frame_prevd(f);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user