From ceaa7741a2f5831d351d94f68b5cf388be9e5ab2 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Wed, 12 Aug 2009 17:22:47 -0700 Subject: [PATCH] Convert ptrace to whole-package compilation. R=rsc APPROVED=rsc DELTA=15 (9 added, 6 deleted, 0 changed) OCL=33136 CL=33136 --- usr/austin/ptrace/Makefile | 13 +++++++++++++ usr/austin/ptrace/ptrace_linux.go | 5 ----- usr/austin/ptrace/regs_linux_amd64.go | 1 - 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 usr/austin/ptrace/Makefile diff --git a/usr/austin/ptrace/Makefile b/usr/austin/ptrace/Makefile new file mode 100644 index 00000000000..2158abc93c8 --- /dev/null +++ b/usr/austin/ptrace/Makefile @@ -0,0 +1,13 @@ +# Copyright 2009 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +include $(GOROOT)/src/Make.$(GOARCH) + +TARG=ptrace +GOFILES=\ + process.go\ + ptrace_linux.go\ + regs_$(GOOS)_$(GOARCH).go\ + +include $(GOROOT)/src/Make.pkg diff --git a/usr/austin/ptrace/ptrace_linux.go b/usr/austin/ptrace/ptrace_linux.go index 489c8d43c09..5bf7072e279 100644 --- a/usr/austin/ptrace/ptrace_linux.go +++ b/usr/austin/ptrace/ptrace_linux.go @@ -9,7 +9,6 @@ import ( "fmt"; "io"; "os"; - "ptrace"; "runtime"; "strconv"; "strings"; @@ -98,8 +97,6 @@ func (ts threadState) String() string { * Basic types */ -type thread struct - // A breakpoint stores information about a single breakpoint, // including its program counter, the overwritten text if the // breakpoint is installed. @@ -176,8 +173,6 @@ type thread struct { exitStatus int; } -func (p *process) newThread(tid int, signal int, cloned bool) (*thread, os.Error) - /* * Errors */ diff --git a/usr/austin/ptrace/regs_linux_amd64.go b/usr/austin/ptrace/regs_linux_amd64.go index c843bb134f8..3b2a058d176 100644 --- a/usr/austin/ptrace/regs_linux_amd64.go +++ b/usr/austin/ptrace/regs_linux_amd64.go @@ -6,7 +6,6 @@ package ptrace import ( "os"; - "ptrace"; "strconv"; "syscall"; )