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 18074874..889ac017 100644 --- a/src/lj_debug.c +++ b/src/lj_debug.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include "lj_frame.h" | 15 | #include "lj_frame.h" |
16 | #include "lj_bc.h" | 16 | #include "lj_bc.h" |
17 | #include "lj_strfmt.h" | 17 | #include "lj_strfmt.h" |
18 | #include "lj_vm.h" | ||
18 | #if LJ_HASJIT | 19 | #if LJ_HASJIT |
19 | #include "lj_jit.h" | 20 | #include "lj_jit.h" |
20 | #endif | 21 | #endif |
@@ -87,7 +88,8 @@ static BCPos debug_framepc(lua_State *L, GCfunc *fn, cTValue *nextframe) | |||
87 | if (frame_islua(f)) { | 88 | if (frame_islua(f)) { |
88 | f = frame_prevl(f); | 89 | f = frame_prevl(f); |
89 | } else { | 90 | } else { |
90 | if (frame_isc(f)) | 91 | if (frame_isc(f) || (LJ_HASFFI && frame_iscont(f) && |
92 | (f-1)->u32.lo == LJ_CONT_FFI_CALLBACK)) | ||
91 | cf = cframe_raw(cframe_prev(cf)); | 93 | cf = cframe_raw(cframe_prev(cf)); |
92 | f = frame_prevd(f); | 94 | f = frame_prevd(f); |
93 | } | 95 | } |