Skip to content
Snippets Groups Projects
Commit b1a1f08b authored by wlott's avatar wlott
Browse files

When returning from a function-end breakpoint, fix the LRA reg if it was

not a known return.
parent c9ffef81
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,8 @@ typedef unsigned short inst;
typedef unsigned long inst;
#endif
#define REAL_LRA_SLOT 0
#define KNOWN_RETURN_P_SLOT 1
static inst swap_insts(code_obj, pc_offset, new_inst)
lispobj code_obj;
......@@ -120,8 +122,13 @@ struct sigcontext *scp;
+ (unsigned long)function_end_breakpoint_guts -
((sizeof(struct code)+7)&~7) + type_OtherPointer;
struct code *codeptr = (struct code *)PTR(code);
lispobj lra;
internal_handle_breakpoint(scp, code);
scp->sc_pc = codeptr->constants[0]-type_OtherPointer+sizeof(lispobj);
lra = codeptr->constants[REAL_LRA_SLOT];
if (codeptr->constants[KNOWN_RETURN_P_SLOT] == NIL)
scp->sc_regs[LRA] = lra;
scp->sc_pc = lra - type_OtherPointer+sizeof(lispobj);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment