mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
debug/goobj: move to cmd/internal/goobj
debug/goobj is not ready to be published but it is needed for the various binary-reading commands. Move to cmd/internal/goobj. (The Go 1.3 release branch deleted it, but that's not an option anymore due to the command dependencies. The API is still not vetted nor terribly well designed.) LGTM=adg, dsymonds R=adg, dsymonds CC=golang-codereviews https://golang.org/cl/174250043
This commit is contained in:
parent
f07ea227ee
commit
3e7d4f11c0
14 changed files with 13 additions and 13 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
package objfile
|
package objfile
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"debug/goobj"
|
"cmd/internal/goobj"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"debug/goobj"
|
"cmd/internal/goobj"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"debug/goobj"
|
"cmd/internal/goobj"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "debug/goobj"
|
import "cmd/internal/goobj"
|
||||||
|
|
||||||
// dead removes unreachable code and data from the program.
|
// dead removes unreachable code and data from the program.
|
||||||
// It is basically a mark-sweep garbage collection: traverse all the
|
// It is basically a mark-sweep garbage collection: traverse all the
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"debug/goobj"
|
"cmd/internal/goobj"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"debug/goobj"
|
"cmd/internal/goobj"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A layoutSection describes a single section to add to the
|
// A layoutSection describes a single section to add to the
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"debug/goobj"
|
"cmd/internal/goobj"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"debug/goobj"
|
"cmd/internal/goobj"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"os"
|
"os"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"debug/goobj"
|
"cmd/internal/goobj"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"debug/goobj"
|
"cmd/internal/goobj"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"fmt"
|
"fmt"
|
||||||
"go/build"
|
"go/build"
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "debug/goobj"
|
import "cmd/internal/goobj"
|
||||||
|
|
||||||
func (p *Prog) runtime() {
|
func (p *Prog) runtime() {
|
||||||
p.pclntab()
|
p.pclntab()
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"debug/goobj"
|
"cmd/internal/goobj"
|
||||||
"os"
|
"os"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
@ -69,7 +69,7 @@ func (p *Prog) scanFile(pkgpath string, file string) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(rsc): Change debug/goobj to record package name as gp.Name.
|
// TODO(rsc): Change cmd/internal/goobj to record package name as gp.Name.
|
||||||
// TODO(rsc): If pkgpath == "main", check that gp.Name == "main".
|
// TODO(rsc): If pkgpath == "main", check that gp.Name == "main".
|
||||||
|
|
||||||
pkg.Package = gp
|
pkg.Package = gp
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue