mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 09:46:56 +08:00
proc/*,service: replace uses of uintptr with uint64 (#2163)
Since proc is supposed to work independently from the target architecture it shouldn't use architecture-dependent types, like uintptr. For example when reading a 64bit core file on a 32bit architecture, uintptr will be 32bit but the addresses proc needs to represent will be 64bit.
This commit is contained in:
committed by
GitHub
parent
e07bfd3180
commit
12009e9833
@ -64,7 +64,7 @@ func newFakeMemory(base uint64, contents ...interface{}) *fakeMemory {
|
||||
return mem
|
||||
}
|
||||
|
||||
func (mem *fakeMemory) ReadMemory(data []byte, addr uintptr) (int, error) {
|
||||
func (mem *fakeMemory) ReadMemory(data []byte, addr uint64) (int, error) {
|
||||
if uint64(addr) < mem.base {
|
||||
return 0, fmt.Errorf("read out of bounds %d %#x", len(data), addr)
|
||||
}
|
||||
@ -77,7 +77,7 @@ func (mem *fakeMemory) ReadMemory(data []byte, addr uintptr) (int, error) {
|
||||
return len(data), nil
|
||||
}
|
||||
|
||||
func (mem *fakeMemory) WriteMemory(uintptr, []byte) (int, error) {
|
||||
func (mem *fakeMemory) WriteMemory(uint64, []byte) (int, error) {
|
||||
return 0, fmt.Errorf("not implemented")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user