func (t *Thread) Regs() []uint64 {
	return t.regs
}
Regs returns the set of register values for the thread.
What registers go where is architecture-dependent.
TODO: document for each architecture.
TODO: do this in some arch-independent way?
package core
import (
	"debug/dwarf"
	"encoding/binary"
	"os"
	"strings"
)
type Address uint64
func (a Address) Sub(b Address) int64 {
	return int64(a - b)
}
func (a Address) Add(x int64) Address {
	return a + Address(x)
}
func (a Address) Max(b Address) Address {
	if a > b {
		return a
	}
	return b
}
func (a Address) Min(b Address) Address {
	if a < b {
		return a
	}
	return b
}
func (a Address) Align(x int64) Address {
	return (a + Address(x) - 1) & ^(Address(x) - 1)
}
type Process struct {
	base         string              
	exec         []*os.File          
	maps         []*Mapping          
	threads      []*Thread           
	arch         string              
	ptrSize      int64               
	logPtrSize   uint                
	byteOrder    binary.ByteOrder    
	littleEndian bool                
	syms         map[string]Address  
	symErr       error               
	dwarf        *dwarf.Data         
	dwarfErr     error               
	pageTable    pageTable4          
}
func (p *Process) Mappings() []*Mapping {
	return p.maps
}
func (p *Process) Readable(a Address) bool {
	return p.findMapping(a) != nil
}
func (p *Process) ReadableN(a Address, n int64) bool {
	for {
		m := p.findMapping(a)
		if m == nil || m.perm&Read == 0 {
			return false
		}
		c := m.max.Sub(a)
		if n <= c {
			return true
		}
		n -= c
		a = a.Add(c)
	}
}
func (p *Process) Writeable(a Address) bool {
	m := p.findMapping(a)
	if m == nil {
		return false
	}
	return m.perm&Write != 0
}
func (p *Process) Threads() []*Thread {
	return p.threads
}
func (p *Process) Arch() string {
	return p.arch
}
func (p *Process) PtrSize() int64 {
	return p.ptrSize
}
func (p *Process) LogPtrSize() uint {
	return p.logPtrSize
}
func (p *Process) ByteOrder() binary.ByteOrder {
	return p.byteOrder
}
func (p *Process) DWARF() (*dwarf.Data, error) {
	return p.dwarf, p.dwarfErr
}
func (p *Process) Symbols() (map[string]Address, error) {
	return p.syms, p.symErr
}
type Mapping struct {
	min  Address
	max  Address
	perm Perm
	f   *os.File  
	off int64     
	origF   *os.File
	origOff int64
	contents []byte
}
func (m *Mapping) Min() Address {
	return m.min
}
func (m *Mapping) Max() Address {
	return m.max
}
func (m *Mapping) Size() int64 {
	return m.max.Sub(m.min)
}
func (m *Mapping) Perm() Perm {
	return m.perm
}
func (m *Mapping) Source() (string, int64) {
	if m.f == nil {
		return "", 0
	}
	return m.f.Name(), m.off
}
func (m *Mapping) CopyOnWrite() bool {
	return m.origF != nil
}
func (m *Mapping) OrigSource() (string, int64) {
	if m.origF == nil {
		return "", 0
	}
	return m.origF.Name(), m.origOff
}
type Thread struct {
	pid  uint64    
	regs []uint64  
	pc   Address   
	sp   Address   
}
func (t *Thread) Pid() uint64 {
	return t.pid
}