摘要 |
<p>A method and device for pass-by breakpoint setting and debugging are disclosed. The pass-by breakpoint setting method comprises: receiving a breakpoint setting command; determining an instruction at a breakpoint in a source program code according to the breakpoint setting command; if one of the instruction at the breakpoint and an instruction prior to the instruction at the breakpoint is a relative jump instruction, setting an instruction duplicate, and setting the instruction at the breakpoint in the source program code as a first abnormal instruction, wherein setting an instruction duplicate comprises: storing the relative jump instruction and the instruction next to the relative jump instruction in the instruction duplicate, a jump relative offset of the relative jump instruction in the instruction duplicate being set according to a storage position of an absolute jump instruction in the instruction duplicate, a jump absolute offset of the absolute jump instruction being an original jump relative offset of the relative jump instruction, setting a second valid instruction next to the relative jump instruction in the instruction duplicate as a second abnormal instruction, and setting an instruction next to the absolute jump instruction as an invalid instruction.</p> |