shirou / gopsutil

psutil for golang
Other
10.56k stars 1.58k forks source link

gopsutil/cpu cause debug(go-delve) exception on apple silicon #1021

Closed Cluas closed 3 years ago

Cluas commented 3 years ago

Describe the bug gopsutil/cpu cause debug(go-delve) exception

see screenshot

To Reproduce

package main

import (
    "fmt"

    "github.com/shirou/gopsutil/cpu"
)

func main() {
    a:=1
    fmt.Println(a)
    v, _ = cpu.Info()
    // convert to JSON. String() is also implemented
    fmt.Println(v)
}

Expected behavior

see screenshot

Environment (please complete the following information): Mac OS arm64

Additional context image image

shirou commented 3 years ago

duplicate #1000