From 91743d9472b91a5ebbc808aa772357ffc5a14df3 Mon Sep 17 00:00:00 2001 From: aarzilli Date: Sun, 24 Jan 2016 17:30:23 +0100 Subject: [PATCH] go fmt --- proc/arch.go | 2 +- proc/proc.go | 1 - proc/proc_darwin.go | 1 - proc/registers_windows_amd64.go | 2 +- proc/threads.go | 12 ++++++------ proc/threads_darwin.go | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/proc/arch.go b/proc/arch.go index 97d726a9..f504b195 100644 --- a/proc/arch.go +++ b/proc/arch.go @@ -47,7 +47,7 @@ func (a *AMD64) SetGStructOffset(ver GoVersion, isextld bool) { a.gStructOffset += 8 } case "windows": - // Use ArbitraryUserPointer (0x28) as pointer to pointer + // Use ArbitraryUserPointer (0x28) as pointer to pointer // to G struct per: // https://golang.org/src/runtime/cgo/gcc_windows_amd64.c a.gStructOffset = 0x28 diff --git a/proc/proc.go b/proc/proc.go index efb7adf7..3aab8441 100644 --- a/proc/proc.go +++ b/proc/proc.go @@ -255,7 +255,6 @@ func (dbp *Process) ClearBreakpoint(addr uint64) (*Breakpoint, error) { return bp, nil } - // Status returns the status of the current main thread context. func (dbp *Process) Status() *WaitStatus { return dbp.CurrentThread.Status diff --git a/proc/proc_darwin.go b/proc/proc_darwin.go index 6d3b8868..db72d284 100644 --- a/proc/proc_darwin.go +++ b/proc/proc_darwin.go @@ -369,7 +369,6 @@ func (dbp *Process) wait(pid, options int) (int, *sys.WaitStatus, error) { return wpid, &status, err } - func killProcess(pid int) error { return sys.Kill(pid, sys.SIGINT) } diff --git a/proc/registers_windows_amd64.go b/proc/registers_windows_amd64.go index 9bed5400..7690d27d 100644 --- a/proc/registers_windows_amd64.go +++ b/proc/registers_windows_amd64.go @@ -1,4 +1,4 @@ -package proc +package proc // #include "threads_windows.h" import "C" diff --git a/proc/threads.go b/proc/threads.go index 1a55e4d5..cc878494 100644 --- a/proc/threads.go +++ b/proc/threads.go @@ -17,11 +17,11 @@ import ( // a whole, and Status represents the last result of a `wait` call // on this thread. type Thread struct { - ID int // Thread ID or mach port + ID int // Thread ID or mach port Status *WaitStatus // Status returned from last wait call - CurrentBreakpoint *Breakpoint // Breakpoint thread is currently stopped at - BreakpointConditionMet bool // Output of evaluating the breakpoint's condition - BreakpointConditionError error // Error evaluating the breakpoint's condition + CurrentBreakpoint *Breakpoint // Breakpoint thread is currently stopped at + BreakpointConditionMet bool // Output of evaluating the breakpoint's condition + BreakpointConditionError error // Error evaluating the breakpoint's condition dbp *Process singleStepping bool @@ -267,8 +267,8 @@ func (thread *Thread) getGVariable() (*Variable, error) { return nil, err } gaddr := uintptr(binary.LittleEndian.Uint64(gaddrbs)) - - // On Windows, the value at TLS()+GStructOffset() is a + + // On Windows, the value at TLS()+GStructOffset() is a // pointer to the G struct. needsDeref := runtime.GOOS == "windows" diff --git a/proc/threads_darwin.go b/proc/threads_darwin.go index 90ff9d01..126caa69 100644 --- a/proc/threads_darwin.go +++ b/proc/threads_darwin.go @@ -5,8 +5,8 @@ package proc import "C" import ( "fmt" - "unsafe" sys "golang.org/x/sys/unix" + "unsafe" ) // WaitStatus is a synonym for the platform-specific WaitStatus