#if 0 /* This opcode needs mending if it is to work with machine code. */ OPCODE0_JUMP(F_BREAKPOINT, "breakpoint", 0, { extern void o_breakpoint(void); o_breakpoint(); DO_JUMP_TO(PROG_COUNTER-1); }); #endif
The comment there is true. #if 0 could perhaps be replaced with #ifndef PIKE_USE_MACHINE_CODE. A problem to work out if it's adapted for machine code is how to return from the opcode to a suitable position. That's why it was disabled.
/ Martin Stjernholm, Roxen IS
Previous text:
2004-04-08 14:06: Subject: unbug and opcodes
Hubbe says:
Simple: Modify the byte code and insert an F_BREAKPOINT, then set a GDB breakpoint in o_breakpoint(). If I remember correctly, it then used a breakpoint inside the interpreter to ensure that it could put back the original opcode, execute it, and then put the F_BREAKPOINT back again...
/ Martin Nilsson (provokatör)