Пример #1
0
func readMemory(thread *Thread, addr uintptr, data []byte) (read int, err error) {
	if len(data) == 0 {
		return
	}
	thread.dbp.execPtraceFunc(func() { read, err = sys.PtracePeekData(thread.Id, addr, data) })
	return
}
Пример #2
0
func (thread *Thread) readMemory(addr uintptr, size int) (data []byte, err error) {
	if size == 0 {
		return
	}
	data = make([]byte, size)
	thread.dbp.execPtraceFunc(func() { _, err = sys.PtracePeekData(thread.Id, addr, data) })
	return
}