mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 01:27:16 +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
@ -27,12 +27,12 @@ func (gcache *goroutineCache) getRuntimeAllg(bi *BinaryInfo, mem MemoryReadWrite
|
||||
if gcache.allglenAddr == 0 || gcache.allgentryAddr == 0 {
|
||||
return 0, 0, ErrNoRuntimeAllG
|
||||
}
|
||||
allglen, err := readUintRaw(mem, uintptr(gcache.allglenAddr), int64(bi.Arch.PtrSize()))
|
||||
allglen, err := readUintRaw(mem, gcache.allglenAddr, int64(bi.Arch.PtrSize()))
|
||||
if err != nil {
|
||||
return 0, 0, err
|
||||
}
|
||||
|
||||
allgptr, err := readUintRaw(mem, uintptr(gcache.allgentryAddr), int64(bi.Arch.PtrSize()))
|
||||
|
||||
allgptr, err := readUintRaw(mem, gcache.allgentryAddr, int64(bi.Arch.PtrSize()))
|
||||
if err != nil {
|
||||
return 0, 0, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user