提交 109e5ab1 编写于 作者: D Derek Parker

Copy instructions for FDE

上级 b86f227a
...@@ -140,7 +140,9 @@ func executeDwarfProgramUntilPC(fde *FrameDescriptionEntry, pc uint64) *FrameCon ...@@ -140,7 +140,9 @@ func executeDwarfProgramUntilPC(fde *FrameDescriptionEntry, pc uint64) *FrameCon
frame := executeCIEInstructions(fde.CIE) frame := executeCIEInstructions(fde.CIE)
frame.loc = fde.Begin() frame.loc = fde.Begin()
frame.address = pc frame.address = pc
frame.ExecuteUntilPC(fde.Instructions) fdeInstructions := make([]byte, len(fde.Instructions))
copy(fdeInstructions, fde.Instructions)
frame.ExecuteUntilPC(fdeInstructions)
return frame return frame
} }
...@@ -153,7 +155,7 @@ func (frame *FrameContext) ExecuteDwarfProgram() { ...@@ -153,7 +155,7 @@ func (frame *FrameContext) ExecuteDwarfProgram() {
// Execute dwarf instructions. // Execute dwarf instructions.
func (frame *FrameContext) ExecuteUntilPC(instructions []byte) { func (frame *FrameContext) ExecuteUntilPC(instructions []byte) {
frame.buf.Reset() frame.buf.Truncate(0)
frame.buf.Write(instructions) frame.buf.Write(instructions)
// We only need to execute the instructions until // We only need to execute the instructions until
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册