Isolate linux specific memory reading in threads file

This commit is contained in:
Derek Parker
2014-12-08 17:56:02 -06:00
parent e299dfde08
commit e784e5d56d

View File

@ -294,7 +294,7 @@ func (thread *ThreadContext) ReturnAddressFromOffset(offset int64) uint64 {
retaddr := int64(regs.SP()) + offset
data := make([]byte, 8)
syscall.PtracePeekText(thread.Id, uintptr(retaddr), data)
ReadMemory(thread.Id, uintptr(retaddr), data)
return binary.LittleEndian.Uint64(data)
}