What happens are 1. V8 initializes memory for code with 0xdeadbeef. 2. When you set breakpoint in GDB, gdb saves and replaces one byte, which happens to be 0xef in 0xdeadbeef, with 0xcc. 3. V8 writes out real instructions in memory. 4. When breakpoint is hit, GDB replaces 0xcc with 0xef. 5. V8 crashes due to 0xef.
Could you elaborate on when gdb can put a breakpoint into uninitialized memory?
(In reply to comment #1) > Could you elaborate on when gdb can put a breakpoint into > uninitialized memory? We can set a watchpoint on the breakpoint and catch the new value. GDB restores the new value instead of the old saved value.