diff options
Diffstat (limited to 'src/lj_gdbjit.c')
-rw-r--r-- | src/lj_gdbjit.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lj_gdbjit.c b/src/lj_gdbjit.c index 951d52ec..d66ef455 100644 --- a/src/lj_gdbjit.c +++ b/src/lj_gdbjit.c | |||
@@ -378,7 +378,7 @@ static const ELFheader elfhdr_template = { | |||
378 | typedef struct GDBJITctx { | 378 | typedef struct GDBJITctx { |
379 | uint8_t *p; /* Pointer to next address in obj.space. */ | 379 | uint8_t *p; /* Pointer to next address in obj.space. */ |
380 | uint8_t *startp; /* Pointer to start address in obj.space. */ | 380 | uint8_t *startp; /* Pointer to start address in obj.space. */ |
381 | Trace *T; /* Generate symbols for this trace. */ | 381 | GCtrace *T; /* Generate symbols for this trace. */ |
382 | uintptr_t mcaddr; /* Machine code address. */ | 382 | uintptr_t mcaddr; /* Machine code address. */ |
383 | MSize szmcode; /* Size of machine code. */ | 383 | MSize szmcode; /* Size of machine code. */ |
384 | MSize spadjp; /* Stack adjustment for parent trace or interpreter. */ | 384 | MSize spadjp; /* Stack adjustment for parent trace or interpreter. */ |
@@ -698,7 +698,7 @@ static void gdbjit_newentry(lua_State *L, GDBJITctx *ctx) | |||
698 | } | 698 | } |
699 | 699 | ||
700 | /* Add debug info for newly compiled trace and notify GDB. */ | 700 | /* Add debug info for newly compiled trace and notify GDB. */ |
701 | void lj_gdbjit_addtrace(jit_State *J, Trace *T, TraceNo traceno) | 701 | void lj_gdbjit_addtrace(jit_State *J, GCtrace *T, TraceNo traceno) |
702 | { | 702 | { |
703 | GDBJITctx ctx; | 703 | GDBJITctx ctx; |
704 | lua_State *L = J->L; | 704 | lua_State *L = J->L; |
@@ -709,7 +709,8 @@ void lj_gdbjit_addtrace(jit_State *J, Trace *T, TraceNo traceno) | |||
709 | ctx.T = T; | 709 | ctx.T = T; |
710 | ctx.mcaddr = (uintptr_t)T->mcode; | 710 | ctx.mcaddr = (uintptr_t)T->mcode; |
711 | ctx.szmcode = T->szmcode; | 711 | ctx.szmcode = T->szmcode; |
712 | ctx.spadjp = CFRAME_SIZE_JIT + (MSize)(parent?J->trace[parent]->spadjust:0); | 712 | ctx.spadjp = CFRAME_SIZE_JIT + |
713 | (MSize)(parent ? traceref(J, parent)->spadjust : 0); | ||
713 | ctx.spadj = CFRAME_SIZE_JIT + T->spadjust; | 714 | ctx.spadj = CFRAME_SIZE_JIT + T->spadjust; |
714 | if (startpc >= proto_bc(pt) && startpc < proto_bc(pt) + pt->sizebc) | 715 | if (startpc >= proto_bc(pt) && startpc < proto_bc(pt) + pt->sizebc) |
715 | ctx.lineno = proto_line(pt, proto_bcpos(pt, startpc)); | 716 | ctx.lineno = proto_line(pt, proto_bcpos(pt, startpc)); |
@@ -727,7 +728,7 @@ void lj_gdbjit_addtrace(jit_State *J, Trace *T, TraceNo traceno) | |||
727 | } | 728 | } |
728 | 729 | ||
729 | /* Delete debug info for trace and notify GDB. */ | 730 | /* Delete debug info for trace and notify GDB. */ |
730 | void lj_gdbjit_deltrace(jit_State *J, Trace *T) | 731 | void lj_gdbjit_deltrace(jit_State *J, GCtrace *T) |
731 | { | 732 | { |
732 | GDBJITentryobj *eo = (GDBJITentryobj *)T->gdbjit_entry; | 733 | GDBJITentryobj *eo = (GDBJITentryobj *)T->gdbjit_entry; |
733 | if (eo) { | 734 | if (eo) { |