3 ms·
> If the int3 happens to get hit by the other thread, just have the debug exception do nothing. Doesn't that potentially crash the other thread because the res
by jacquesm 9y ago
> If the int3 happens to get hit by the other thread, just have the debug exception do nothing.
Doesn't that potentially crash the other thread because the rest of the instruction is still there?
- burfog 9y agoNo, but it might if something other than an int3 were used. The particular byte value being written actually matters on some Intel processors. You have to first put 0xCC over the first byte of the opcode you want to modify. You can then freely mess with the rest of the instruction. After that, you make the first byte be what you actually want. There is a discussion about it on the linux-kernel mailing list. Maybe you can find it.