debug: move some dirs from debug/ogle/ to debug/.  Fix import order.

Change-Id: I8e263c1ea416ed96571e704ff2a685c4669b8433
Reviewed-on: https://go-review.googlesource.com/1762
Reviewed-by: Rob Pike <r@golang.org>
diff --git a/ogle/debug/dwarf/buf.go b/dwarf/buf.go
similarity index 100%
rename from ogle/debug/dwarf/buf.go
rename to dwarf/buf.go
diff --git a/ogle/debug/dwarf/const.go b/dwarf/const.go
similarity index 100%
rename from ogle/debug/dwarf/const.go
rename to dwarf/const.go
diff --git a/ogle/debug/dwarf/entry.go b/dwarf/entry.go
similarity index 100%
rename from ogle/debug/dwarf/entry.go
rename to dwarf/entry.go
diff --git a/ogle/debug/dwarf/frame.go b/dwarf/frame.go
similarity index 100%
rename from ogle/debug/dwarf/frame.go
rename to dwarf/frame.go
diff --git a/ogle/debug/dwarf/frame_test.go b/dwarf/frame_test.go
similarity index 100%
rename from ogle/debug/dwarf/frame_test.go
rename to dwarf/frame_test.go
diff --git a/ogle/debug/dwarf/line.go b/dwarf/line.go
similarity index 100%
rename from ogle/debug/dwarf/line.go
rename to dwarf/line.go
diff --git a/ogle/debug/dwarf/open.go b/dwarf/open.go
similarity index 97%
rename from ogle/debug/dwarf/open.go
rename to dwarf/open.go
index 6a58372..488bbf0 100644
--- a/ogle/debug/dwarf/open.go
+++ b/dwarf/open.go
@@ -5,7 +5,7 @@
 // Package dwarf provides access to DWARF debugging information loaded from
 // executable files, as defined in the DWARF 2.0 Standard at
 // http://dwarfstd.org/doc/dwarf-2.0.0.pdf
-package dwarf // import "golang.org/x/debug/ogle/debug/dwarf"
+package dwarf // import "golang.org/x/debug/dwarf"
 
 import "encoding/binary"
 
diff --git a/ogle/debug/dwarf/pclntab_test.go b/dwarf/pclntab_test.go
similarity index 95%
rename from ogle/debug/dwarf/pclntab_test.go
rename to dwarf/pclntab_test.go
index 72f3175..d07e632 100644
--- a/ogle/debug/dwarf/pclntab_test.go
+++ b/dwarf/pclntab_test.go
@@ -16,9 +16,9 @@
 	"strings"
 	"testing"
 
-	. "golang.org/x/debug/ogle/debug/dwarf"
-	"golang.org/x/debug/ogle/debug/elf"
-	"golang.org/x/debug/ogle/debug/macho"
+	. "golang.org/x/debug/dwarf"
+	"golang.org/x/debug/elf"
+	"golang.org/x/debug/macho"
 )
 
 var (
diff --git a/ogle/debug/dwarf/symbol.go b/dwarf/symbol.go
similarity index 100%
rename from ogle/debug/dwarf/symbol.go
rename to dwarf/symbol.go
diff --git a/ogle/debug/dwarf/testdata/pcsptest.go b/dwarf/testdata/pcsptest.go
similarity index 100%
rename from ogle/debug/dwarf/testdata/pcsptest.go
rename to dwarf/testdata/pcsptest.go
diff --git a/ogle/debug/dwarf/testdata/typedef.c b/dwarf/testdata/typedef.c
similarity index 100%
rename from ogle/debug/dwarf/testdata/typedef.c
rename to dwarf/testdata/typedef.c
diff --git a/ogle/debug/dwarf/testdata/typedef.elf b/dwarf/testdata/typedef.elf
similarity index 100%
rename from ogle/debug/dwarf/testdata/typedef.elf
rename to dwarf/testdata/typedef.elf
Binary files differ
diff --git a/ogle/debug/dwarf/testdata/typedef.elf4 b/dwarf/testdata/typedef.elf4
similarity index 100%
rename from ogle/debug/dwarf/testdata/typedef.elf4
rename to dwarf/testdata/typedef.elf4
Binary files differ
diff --git a/ogle/debug/dwarf/testdata/typedef.macho b/dwarf/testdata/typedef.macho
similarity index 100%
rename from ogle/debug/dwarf/testdata/typedef.macho
rename to dwarf/testdata/typedef.macho
Binary files differ
diff --git a/ogle/debug/dwarf/type.go b/dwarf/type.go
similarity index 100%
rename from ogle/debug/dwarf/type.go
rename to dwarf/type.go
diff --git a/ogle/debug/dwarf/type_test.go b/dwarf/type_test.go
similarity index 96%
rename from ogle/debug/dwarf/type_test.go
rename to dwarf/type_test.go
index 00eb3a7..99392ce 100644
--- a/ogle/debug/dwarf/type_test.go
+++ b/dwarf/type_test.go
@@ -5,11 +5,11 @@
 package dwarf_test
 
 import (
-	. "golang.org/x/debug/ogle/debug/dwarf"
 	"testing"
 
-	"golang.org/x/debug/ogle/debug/elf"
-	"golang.org/x/debug/ogle/debug/macho"
+	. "golang.org/x/debug/dwarf"
+	"golang.org/x/debug/elf"
+	"golang.org/x/debug/macho"
 )
 
 var typedefTests = map[string]string{
diff --git a/ogle/debug/dwarf/typeunit.go b/dwarf/typeunit.go
similarity index 100%
rename from ogle/debug/dwarf/typeunit.go
rename to dwarf/typeunit.go
diff --git a/ogle/debug/dwarf/unit.go b/dwarf/unit.go
similarity index 100%
rename from ogle/debug/dwarf/unit.go
rename to dwarf/unit.go
diff --git a/ogle/debug/elf/elf.go b/elf/elf.go
similarity index 99%
rename from ogle/debug/elf/elf.go
rename to elf/elf.go
index f2a1040..4e924dc 100644
--- a/ogle/debug/elf/elf.go
+++ b/elf/elf.go
@@ -38,7 +38,7 @@
  * SUCH DAMAGE.
  */
 
-package elf // import "golang.org/x/debug/ogle/debug/elf"
+package elf // import "golang.org/x/debug/elf"
 
 import "strconv"
 
diff --git a/ogle/debug/elf/elf_test.go b/elf/elf_test.go
similarity index 100%
rename from ogle/debug/elf/elf_test.go
rename to elf/elf_test.go
diff --git a/ogle/debug/elf/file.go b/elf/file.go
similarity index 99%
rename from ogle/debug/elf/file.go
rename to elf/file.go
index 1357d4b..6946550 100644
--- a/ogle/debug/elf/file.go
+++ b/elf/file.go
@@ -13,7 +13,7 @@
 	"io"
 	"os"
 
-	"golang.org/x/debug/ogle/debug/dwarf"
+	"golang.org/x/debug/dwarf"
 )
 
 // TODO: error reporting detail
diff --git a/ogle/debug/elf/file_test.go b/elf/file_test.go
similarity index 99%
rename from ogle/debug/elf/file_test.go
rename to elf/file_test.go
index 0691e6f..596dc4e 100644
--- a/ogle/debug/elf/file_test.go
+++ b/elf/file_test.go
@@ -16,7 +16,7 @@
 	"runtime"
 	"testing"
 
-	"golang.org/x/debug/ogle/debug/dwarf"
+	"golang.org/x/debug/dwarf"
 )
 
 type fileTest struct {
diff --git a/ogle/debug/elf/testdata/gcc-386-freebsd-exec b/elf/testdata/gcc-386-freebsd-exec
similarity index 100%
rename from ogle/debug/elf/testdata/gcc-386-freebsd-exec
rename to elf/testdata/gcc-386-freebsd-exec
Binary files differ
diff --git a/ogle/debug/elf/testdata/gcc-amd64-linux-exec b/elf/testdata/gcc-amd64-linux-exec
similarity index 100%
rename from ogle/debug/elf/testdata/gcc-amd64-linux-exec
rename to elf/testdata/gcc-amd64-linux-exec
Binary files differ
diff --git a/ogle/debug/elf/testdata/gcc-amd64-openbsd-debug-with-rela.obj b/elf/testdata/gcc-amd64-openbsd-debug-with-rela.obj
similarity index 100%
rename from ogle/debug/elf/testdata/gcc-amd64-openbsd-debug-with-rela.obj
rename to elf/testdata/gcc-amd64-openbsd-debug-with-rela.obj
Binary files differ
diff --git a/ogle/debug/elf/testdata/go-relocation-test-gcc424-x86-64.obj b/elf/testdata/go-relocation-test-gcc424-x86-64.obj
similarity index 100%
rename from ogle/debug/elf/testdata/go-relocation-test-gcc424-x86-64.obj
rename to elf/testdata/go-relocation-test-gcc424-x86-64.obj
Binary files differ
diff --git a/ogle/debug/elf/testdata/go-relocation-test-gcc441-x86-64.obj b/elf/testdata/go-relocation-test-gcc441-x86-64.obj
similarity index 100%
rename from ogle/debug/elf/testdata/go-relocation-test-gcc441-x86-64.obj
rename to elf/testdata/go-relocation-test-gcc441-x86-64.obj
Binary files differ
diff --git a/ogle/debug/elf/testdata/go-relocation-test-gcc441-x86.obj b/elf/testdata/go-relocation-test-gcc441-x86.obj
similarity index 100%
rename from ogle/debug/elf/testdata/go-relocation-test-gcc441-x86.obj
rename to elf/testdata/go-relocation-test-gcc441-x86.obj
Binary files differ
diff --git a/ogle/debug/elf/testdata/hello-world-core.gz b/elf/testdata/hello-world-core.gz
similarity index 100%
rename from ogle/debug/elf/testdata/hello-world-core.gz
rename to elf/testdata/hello-world-core.gz
Binary files differ
diff --git a/ogle/debug/elf/testdata/hello.c b/elf/testdata/hello.c
similarity index 100%
rename from ogle/debug/elf/testdata/hello.c
rename to elf/testdata/hello.c
diff --git a/ogle/gosym/pclinetest.asm b/gosym/pclinetest.asm
similarity index 100%
rename from ogle/gosym/pclinetest.asm
rename to gosym/pclinetest.asm
diff --git a/ogle/gosym/pclinetest.h b/gosym/pclinetest.h
similarity index 100%
rename from ogle/gosym/pclinetest.h
rename to gosym/pclinetest.h
diff --git a/ogle/gosym/pclntab.go b/gosym/pclntab.go
similarity index 100%
rename from ogle/gosym/pclntab.go
rename to gosym/pclntab.go
diff --git a/ogle/gosym/pclntab_test.go b/gosym/pclntab_test.go
similarity index 100%
rename from ogle/gosym/pclntab_test.go
rename to gosym/pclntab_test.go
diff --git a/ogle/gosym/symtab.go b/gosym/symtab.go
similarity index 99%
rename from ogle/gosym/symtab.go
rename to gosym/symtab.go
index da1ab5d..9121c37 100644
--- a/ogle/gosym/symtab.go
+++ b/gosym/symtab.go
@@ -5,7 +5,7 @@
 // Package gosym implements access to the Go symbol
 // and line number tables embedded in Go binaries generated
 // by the gc compilers.
-package gosym // import "golang.org/x/debug/ogle/gosym"
+package gosym // import "golang.org/x/debug/gosym"
 
 // The table format is a variant of the format used in Plan 9's a.out
 // format, documented at http://plan9.bell-labs.com/magic/man2html/6/a.out.
diff --git a/ogle/debug/macho/fat.go b/macho/fat.go
similarity index 100%
rename from ogle/debug/macho/fat.go
rename to macho/fat.go
diff --git a/ogle/debug/macho/file.go b/macho/file.go
similarity index 99%
rename from ogle/debug/macho/file.go
rename to macho/file.go
index 4acb18f..7f59901 100644
--- a/ogle/debug/macho/file.go
+++ b/macho/file.go
@@ -14,7 +14,7 @@
 	"io"
 	"os"
 
-	"golang.org/x/debug/ogle/debug/dwarf"
+	"golang.org/x/debug/dwarf"
 )
 
 // A File represents an open Mach-O file.
diff --git a/ogle/debug/macho/file_test.go b/macho/file_test.go
similarity index 100%
rename from ogle/debug/macho/file_test.go
rename to macho/file_test.go
diff --git a/ogle/debug/macho/macho.go b/macho/macho.go
similarity index 98%
rename from ogle/debug/macho/macho.go
rename to macho/macho.go
index 008dc17..b35e436 100644
--- a/ogle/debug/macho/macho.go
+++ b/macho/macho.go
@@ -5,7 +5,7 @@
 // Mach-O header data structures
 // http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/MachORuntime/Reference/reference.html
 
-package macho // import "golang.org/x/debug/ogle/debug/macho"
+package macho // import "golang.org/x/debug/macho"
 
 import "strconv"
 
diff --git a/ogle/debug/macho/testdata/fat-gcc-386-amd64-darwin-exec b/macho/testdata/fat-gcc-386-amd64-darwin-exec
similarity index 100%
rename from ogle/debug/macho/testdata/fat-gcc-386-amd64-darwin-exec
rename to macho/testdata/fat-gcc-386-amd64-darwin-exec
Binary files differ
diff --git a/ogle/debug/macho/testdata/gcc-386-darwin-exec b/macho/testdata/gcc-386-darwin-exec
similarity index 100%
rename from ogle/debug/macho/testdata/gcc-386-darwin-exec
rename to macho/testdata/gcc-386-darwin-exec
Binary files differ
diff --git a/ogle/debug/macho/testdata/gcc-amd64-darwin-exec b/macho/testdata/gcc-amd64-darwin-exec
similarity index 100%
rename from ogle/debug/macho/testdata/gcc-amd64-darwin-exec
rename to macho/testdata/gcc-amd64-darwin-exec
Binary files differ
diff --git a/ogle/debug/macho/testdata/gcc-amd64-darwin-exec-debug b/macho/testdata/gcc-amd64-darwin-exec-debug
similarity index 100%
rename from ogle/debug/macho/testdata/gcc-amd64-darwin-exec-debug
rename to macho/testdata/gcc-amd64-darwin-exec-debug
Binary files differ
diff --git a/ogle/debug/macho/testdata/hello.c b/macho/testdata/hello.c
similarity index 100%
rename from ogle/debug/macho/testdata/hello.c
rename to macho/testdata/hello.c
diff --git a/ogle/demo/ptrace-linux-amd64/main.go b/ogle/demo/ptrace-linux-amd64/main.go
index bc20aab..c90c534 100644
--- a/ogle/demo/ptrace-linux-amd64/main.go
+++ b/ogle/demo/ptrace-linux-amd64/main.go
@@ -32,9 +32,9 @@
 	"syscall"
 	"time"
 
-	"golang.org/x/debug/ogle/debug/dwarf"
-	"golang.org/x/debug/ogle/debug/elf"
-	"golang.org/x/debug/ogle/debug/macho"
+	"golang.org/x/debug/dwarf"
+	"golang.org/x/debug/elf"
+	"golang.org/x/debug/macho"
 )
 
 const (
diff --git a/ogle/program/server/dwarf.go b/ogle/program/server/dwarf.go
index a26d840..06ca3fd 100644
--- a/ogle/program/server/dwarf.go
+++ b/ogle/program/server/dwarf.go
@@ -7,7 +7,7 @@
 import (
 	"regexp"
 
-	"golang.org/x/debug/ogle/debug/dwarf"
+	"golang.org/x/debug/dwarf"
 )
 
 func (s *Server) lookupRE(re *regexp.Regexp) (result []string, err error) {
diff --git a/ogle/program/server/print.go b/ogle/program/server/print.go
index 0e14d97..6658ec4 100644
--- a/ogle/program/server/print.go
+++ b/ogle/program/server/print.go
@@ -9,8 +9,8 @@
 	"fmt"
 	"math"
 
+	"golang.org/x/debug/dwarf"
 	"golang.org/x/debug/ogle/arch"
-	"golang.org/x/debug/ogle/debug/dwarf"
 )
 
 // Routines to print a value using DWARF type descriptions.
diff --git a/ogle/program/server/server.go b/ogle/program/server/server.go
index 099e97b..40da397 100644
--- a/ogle/program/server/server.go
+++ b/ogle/program/server/server.go
@@ -15,10 +15,10 @@
 	"strings"
 	"syscall"
 
+	"golang.org/x/debug/dwarf"
+	"golang.org/x/debug/elf"
+	"golang.org/x/debug/macho"
 	"golang.org/x/debug/ogle/arch"
-	"golang.org/x/debug/ogle/debug/dwarf"
-	"golang.org/x/debug/ogle/debug/elf"
-	"golang.org/x/debug/ogle/debug/macho"
 	"golang.org/x/debug/ogle/program"
 	"golang.org/x/debug/ogle/program/proxyrpc"
 )