delve/proc/syscall_windows.go
Alex Brainman c61de7b0c1 [proc] use syscall package to call NtQueryInformationThread
I was hoping this will fix the issue below.
But there is more code that break new cgo rules.

Fixes #409 (partial)
2016-02-09 17:24:14 +11:00

34 lines
715 B
Go

//go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go syscall_windows.go
package proc
import (
"syscall"
)
type _NTSTATUS int32
type _CLIENT_ID struct {
UniqueProcess syscall.Handle
UniqueThread syscall.Handle
}
type _THREAD_BASIC_INFORMATION struct {
ExitStatus _NTSTATUS
TebBaseAddress uintptr
ClientId _CLIENT_ID
AffinityMask uintptr
Priority int32
BasePriority int32
}
const (
ThreadBasicInformation = 0
)
func _NT_SUCCESS(x _NTSTATUS) bool {
return x >= 0
}
//sys _NtQueryInformationThread(threadHandle syscall.Handle, infoclass int32, info uintptr, infolen uint32, retlen *uint32) (status _NTSTATUS) = ntdll.NtQueryInformationThread