diff options
Diffstat (limited to 'src/lj_debug.c')
-rw-r--r-- | src/lj_debug.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lj_debug.c b/src/lj_debug.c index effb4841..e4ab9c12 100644 --- a/src/lj_debug.c +++ b/src/lj_debug.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include "lj_state.h" | 14 | #include "lj_state.h" |
15 | #include "lj_frame.h" | 15 | #include "lj_frame.h" |
16 | #include "lj_bc.h" | 16 | #include "lj_bc.h" |
17 | #include "lj_vm.h" | ||
17 | #if LJ_HASJIT | 18 | #if LJ_HASJIT |
18 | #include "lj_jit.h" | 19 | #include "lj_jit.h" |
19 | #endif | 20 | #endif |
@@ -86,7 +87,8 @@ static BCPos debug_framepc(lua_State *L, GCfunc *fn, cTValue *nextframe) | |||
86 | if (frame_islua(f)) { | 87 | if (frame_islua(f)) { |
87 | f = frame_prevl(f); | 88 | f = frame_prevl(f); |
88 | } else { | 89 | } else { |
89 | if (frame_isc(f)) | 90 | if (frame_isc(f) || (LJ_HASFFI && frame_iscont(f) && |
91 | (f-1)->u32.lo == LJ_CONT_FFI_CALLBACK)) | ||
90 | cf = cframe_raw(cframe_prev(cf)); | 92 | cf = cframe_raw(cframe_prev(cf)); |
91 | f = frame_prevd(f); | 93 | f = frame_prevd(f); |
92 | } | 94 | } |