summaryrefslogtreecommitdiff
path: root/src/cmd/objdump
Commit message (Collapse)AuthorAgeFilesLines
* all: call flag.Parse from TestMain only if usedDaniel Martí2016-11-161-1/+0
| | | | | | | | | | | These don't use any flags in TestMain itself, so the call is redundant as M.Run will do it. Change-Id: I00f2ac7f846dc2c3ad3535eb8177616b2d900149 Reviewed-on: https://go-review.googlesource.com/33275 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* cmd/objdump: speed up testsJosh Bleecher Snyder2016-11-041-10/+30
| | | | | | | | | | | | | | Rebuild cmd/objdump once instead of twice. Speeds up standalone 'go test cmd/objdump' on my machine from ~1.4s to ~1s. Updates #17751 Change-Id: I15fd79cf18c310f892bc28a9e9ca47ee010c989a Reviewed-on: https://go-review.googlesource.com/32673 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* cmd/objdump: skip tests for GOARCH=mips{,le}Vladimir Stefanovic2016-10-271-1/+1
| | | | | | Change-Id: I8111ceb6960364166aa8a445f4d6d8b0581d371e Reviewed-on: https://go-review.googlesource.com/31513 Reviewed-by: Cherry Zhang <cherryyz@google.com>
* cmd/objdump: updates from golang.org/x/arch/ppc64/ppc64asmLynn Boger2016-10-251-2/+2
| | | | | | | | | | | | | | | Update the ppc64x disassembly code for use by objdump from golang.org/x/arch/ppc64/ppc64asm commit fcea5ea. Enable the objdump testcase for external linking on ppc64le make a minor fix to the expected output. Fixes #17447 Change-Id: I769cc7f8bfade594690a476dfe77ab33677ac03b Reviewed-on: https://go-review.googlesource.com/32015 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* cmd/objdump: enable tests on ppc64/ppc64leShenghou Ma2016-10-131-3/+27
| | | | | | | | | | Fixes #9039. Change-Id: I7d213b4f8e4cda73ea7687fb97dbd22e58163949 Reviewed-on: https://go-review.googlesource.com/9683 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
* all: use testing.GoToolPath instead of "go"Keith Randall2016-08-301-2/+2
| | | | | | | | | | | | | | This change makes sure that tests are run with the correct version of the go tool. The correct version is the one that we invoked with "go test", not the one that is first in our path. Fixes #16577 Change-Id: If22c8f8c3ec9e7c35d094362873819f2fbb8559b Reviewed-on: https://go-review.googlesource.com/28089 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* cmd/objdump: skip TestDisasm* on s390xMichael Munday2016-04-121-0/+4
| | | | | | | | | | The disassembler is not yet implemented on s390x. Updates #15255. Change-Id: Ibab319c8c087b1a619baa1529398305c1e721877 Reviewed-on: https://go-review.googlesource.com/21894 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* cmd/objdump: skip TestDisasm* for mips64{,le}Yao Zhang2015-09-101-0/+4
| | | | | | | | Disassembler for mips64 is not supported yet. Change-Id: Ie923dd1e37fed47fc395b9d1cd9194e55020bee5 Reviewed-on: https://go-review.googlesource.com/14459 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* cmd/objdump: don't run TestDisasmExtld if cgo is not enabledIan Lance Taylor2015-07-311-0/+4
| | | | | | | | | | | The test uses external linking mode, which is probably not available if cgo does not work. Fixes #11969. Change-Id: Id1c2828cd2540391e16b422bf51674ba6ff084b0 Reviewed-on: https://go-review.googlesource.com/13005 Reviewed-by: Russ Cox <rsc@golang.org>
* all: extract "can I exec?" check from tests into internal/testenvRuss Cox2015-06-161-9/+2
| | | | | | | | Change-Id: I7b54be9d8b50b39e01c6be21f310ae9a10404e9d Reviewed-on: https://go-review.googlesource.com/10753 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* all: fix misprints in commentsAinar Garipov2015-06-111-1/+1
| | | | | | | | | | These were found by grepping the comments from the go code and feeding the output to aspell. Change-Id: Id734d6c8d1938ec3c36bd94a4dbbad577e3ad395 Reviewed-on: https://go-review.googlesource.com/10941 Reviewed-by: Aamir Khan <syst3m.w0rm@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* cmd/objdump: disable external linking test on openbsd/armJoel Sing2015-04-291-0/+4
| | | | | | | | | Disable disassembly with external linking test on openbsd/arm, since this platform does not currently support cgo/external linking. Change-Id: I6eab6fcaac21407ce05075a4a1407fbfe0e6142b Reviewed-on: https://go-review.googlesource.com/9481 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* cmd/objdump: skip fork test on darwin/arm64David Crawshaw2015-04-131-2/+3
| | | | | | | | Just like darwin/arm. Change-Id: Ibaba67980db6e05aa71568199b2dac2fcaa86fd6 Reviewed-on: https://go-review.googlesource.com/8824 Reviewed-by: Minux Ma <minux@golang.org>
* cmd/objdump: disable TestDisasm.* on arm64Aram Hăvărneanu2015-03-161-0/+4
| | | | | | | | | ARM64 doesn't have disassembler yet. Change-Id: I016fa013b5ff50dc49d38ade42351b79be023d80 Reviewed-on: https://go-review.googlesource.com/7149 Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
* cmd/objdump: skip fork test on darwin/armDavid Crawshaw2015-02-271-0/+4
| | | | | | Change-Id: I1d1eb71014381452d1ef368431cb2556245a35ab Reviewed-on: https://go-review.googlesource.com/6250 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
* cmd/objdump: Fix error loggingKeith Randall2014-12-091-1/+1
| | | | | | Change-Id: I6b1b4d3e8c039ba3198cb4b9765de75859ea8c32 Reviewed-on: https://go-review.googlesource.com/1214 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* all: power64 is now ppc64Russ Cox2014-12-051-2/+2
| | | | | | | | | Fixes #8654. LGTM=austin R=austin CC=golang-codereviews https://golang.org/cl/180600043
* [dev.cc] all: merge dev.power64 (7667e41f3ced) into dev.ccRuss Cox2014-11-141-0/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is to reduce the delta between dev.cc and dev.garbage to just garbage collector changes. These are the files that had merge conflicts and have been edited by hand: malloc.go mem_linux.go mgc.go os1_linux.go proc1.go panic1.go runtime1.go LGTM=austin R=austin CC=golang-codereviews https://golang.org/cl/174180043
| * [dev.power64] all: merge default into dev.power64Austin Clements2014-11-037-569/+31
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Trivial merge except for src/runtime/asm_power64x.s and src/runtime/signal_power64x.c LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/168950044
| * | [dev.power64] cmd/objdump: disable tests on power64/power64leDave Cheney2014-11-021-0/+12
| | | | | | | | | | | | | | | | | | | | | LGTM=rsc, austin R=austin, rsc, bradfitz CC=golang-codereviews https://golang.org/cl/164300043
* | | cmd/objdump, cmd/pprof: factor disassembly into cmd/internal/objfileRuss Cox2014-11-062-322/+18
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moving so that new Go 1.4 pprof can use it. The old 'GNU objdump workalike' mode for 'go tool objdump' is now gone, as are the tests for that mode. It was used only by pre-Go 1.4 pprof. You can still specify an address range on the command line; you just get the same output format as you do when dumping the entire binary (without an address limitation). LGTM=r R=r CC=golang-codereviews, iant https://golang.org/cl/167320043
* | cmd/objdump: disable test failing on arm5go1.4beta1Russ Cox2014-10-291-1/+1
| | | | | | | | | | | | TBR=adg CC=golang-codereviews https://golang.org/cl/167890043
* | cmd/objdump: use cmd/internal/objfileRuss Cox2014-10-296-568/+30
|/ | | | | | | | | | | | This removes a bunch of ugly duplicate code. The end goal is to factor the disassembly code into cmd/internal/objfile too, so that pprof can use it, but one step at a time. LGTM=r, iant R=r, alex.brainman, iant CC=golang-codereviews https://golang.org/cl/149400043
* cmd/objdump: skip extld test on plan9Russ Cox2014-10-291-1/+1
| | | | | | TBR=iant CC=golang-codereviews https://golang.org/cl/164180043
* cmd/objdump: disassemble local text symbolsIan Lance Taylor2014-10-282-3/+18
| | | | | | | | | Fixes #8803. LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/169720043
* cmd/objdump: move armasm, x86asm into internal packagesRuss Cox2014-09-303-24625/+7
| | | | | | | | | | | | | | | | | | | | | For Go 1.3 these external packages were collapsed into large single-file implementations stored in the cmd/objdump directory. For Go 1.4 we want pprof to be able to link against them too, so move them into cmd/internal, where they can be shared. The new files are copied from the repo in the file path (rsc.io/...). Those repos were code reviewed during development (mainly by crawshaw and minux), because we knew the main repo would use them. Update #8798 LGTM=bradfitz R=crawshaw, bradfitz CC=golang-codereviews https://golang.org/cl/153750044
* cmd/{addr2line,objdump}: fix finding pclntab and symtab for pe and plan9objMatthew Dempsky2014-08-271-8/+26
| | | | | | | | | | | Broken by 8b5fc7c59d05. Update #8092 LGTM=iant, alex.brainman R=rsc, iant, alex.brainman CC=golang-codereviews https://golang.org/cl/138770043
* cmd/{ld,link,objdump}, runtime, debug/gosym: move linker-defined symbols ↵Matthew Dempsky2014-08-271-2/+2
| | | | | | | | | | | into runtime package Fixes #8092. LGTM=rsc R=iant, rsc CC=golang-codereviews https://golang.org/cl/126790043
* cmd/addr2line, cmd/objdump: fix on amd64 Plan 9David du Colombier2014-07-191-10/+3
| | | | | | | | | | | | | | | | | Fix virtual address of the start of the text segment on amd64 Plan 9. This issue has been partially fixed in cmd/add2line, as part of CL 106460044, but we forgot to report the change to cmd/objdump. In the meantime, we also fixed the textStart address in both cmd/add2line and cmd/objdump. LGTM=aram, ality, mischief R=rsc, mischief, aram, ality CC=golang-codereviews, jas https://golang.org/cl/117920043
* objdump: remove out-of-date commentMatthew Dempsky2014-07-151-3/+0
| | | | | | | LGTM=iant R=rsc, iant CC=golang-codereviews https://golang.org/cl/112320043
* cmd/objdump: set goarch properly on non-386 Plan 9 systemsAram Hăvărneanu2014-07-091-1/+8
| | | | | | | LGTM=0intro, r R=0intro, r CC=ality, golang-codereviews, jas, mischief https://golang.org/cl/108420043
* cmd/objdump: skip test on android (no Go tool)David Crawshaw2014-07-081-6/+9
| | | | | | | LGTM=minux, iant R=golang-codereviews, minux, iant CC=golang-codereviews https://golang.org/cl/109570043
* cmd/objdump: add arm disassemblerRuss Cox2014-06-014-17/+10868
| | | | | | | | | Fixes #7452. LGTM=minux, iant R=minux, iant CC=golang-codereviews https://golang.org/cl/104770046
* cmd/objdump: fix dissasembly of Plan 9 object filesAnthony Martin2014-05-212-4/+15
| | | | | | | | | | | | | | | | | | | Ignore symbols that aren't text, data, or bss since they cause problems when dissassembling instructions with small immediate values. Before: build.go:142 0x10ee 83ec50 SUBL $text/template/parse.autotmp_1293(SB), SP After: build.go:142 0x10ee 83ec50 SUBL $0x50, SP Fixes #7947. LGTM=rsc R=rsc, 0intro CC=golang-codereviews https://golang.org/cl/93520045
* build: make nacl passRuss Cox2014-05-201-6/+18
| | | | | | | | | | | | | | | | Add nacl.bash, the NaCl version of all.bash. It's a separate script because it builds a variant of package syscall with a large zip file embedded in it, containing all the input files needed for tests. Disable various tests new since the last round, mostly the ones using os/exec. Fixes #7945. LGTM=dave R=golang-codereviews, remyoudompheng, dave, bradfitz CC=golang-codereviews https://golang.org/cl/100590044
* cmd/addr2line, cmd/objdump: handle Plan 9 a.out object filesDavid du Colombier2014-05-162-3/+57
| | | | | | | | | Update #7947. LGTM=iant R=rsc, iant CC=golang-codereviews https://golang.org/cl/91500044
* cmd/addr2line,cmd/objdump: test that commands accept addresses with 0x ↵Alex Brainman2014-05-151-20/+26
| | | | | | | | | prefix and without LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://golang.org/cl/100440045
* cmd/addr2line, cmd/objdump: fix pe text section starting addressAlex Brainman2014-05-151-1/+10
| | | | | | | | | fixes windows build LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/97500043
* cmd/nm, cmd/objdump: fix elf symbol typesRuss Cox2014-05-142-2/+11
| | | | | | | | | | | | | | | | | Turns out elf.File.Sections is indexed by the actual section number, not the number minus one. I don't know why I thought the -1 was necessary. Fixes objdump test (and therefore build) on ELF systems. While we're here, fix bounds on gnuDump so that we don't crash when asked to disassemble outside the text segment. May fix Windows build or at least make the failure more interesting. TBR=iant CC=golang-codereviews https://golang.org/cl/92390043
* objdump: implement disassemblyRuss Cox2014-05-148-38/+607
| | | | | | | | | | | | | | | | | There is some duplication here with cmd/nm. There is a TODO to address that after 1.3 is out. Update #7452 x86 disassembly works and is tested. The arm disassembler does not exist yet and is therefore not yet hooked up. LGTM=crawshaw, iant R=crawshaw, iant CC=golang-codereviews https://golang.org/cl/91360046
* cmd/objdump: import x86 disassemblerRuss Cox2014-05-142-0/+13805
| | | | | | | | | | | | | | | | | | | The x86 disassembler lives in rsc.io/x86/x86asm for now. We need to figure out what should live where in the long term, but not before the 1.3 release. The completed code reviews for the disassembler are at: https://golang.org/cl/95350044 https://golang.org/cl/95300044 https://golang.org/cl/97100047 https://golang.org/cl/93110044 https://golang.org/cl/99000043 https://golang.org/cl/98990043 LGTM=crawshaw R=crawshaw, jacek.masiulaniec CC=golang-codereviews https://golang.org/cl/92360043
* cmd/objdump: works with windows pe executables nowAlex Brainman2014-05-122-8/+149
| | | | | | | | | | | | Most code is copy from addr2line change 01dd67e5827f Update #7406 Fixes #7937 LGTM=iant R=golang-codereviews, iant, 0intro CC=golang-codereviews https://golang.org/cl/95090044
* cmd/objdump: actually accept hex address without "0x" prefix.Shenghou Ma2014-05-081-4/+5
| | | | | | | | | Fixes #7936. LGTM=alex.brainman, bradfitz, iant R=golang-codereviews, alex.brainman, bradfitz, iant CC=golang-codereviews https://golang.org/cl/100060043
* addr2line, objdump: write doc commentsRuss Cox2014-04-151-2/+26
| | | | | | | LGTM=r R=r CC=golang-codereviews https://golang.org/cl/88050046
* cmd/objdump: rewrite in GoRuss Cox2014-04-142-68/+162
| | | | | | | | | | | | | | | | | | | | Update cmd/dist not to build the C version. Update cmd/go to install the Go version to the tool directory. Update #7452 This is the basic logic needed for objdump, and it works well enough to support the pprof list and weblist commands. A real disassembler needs to be added in order to support the pprof disasm command and the per-line assembly displays in weblist. That's still to come. Probably objdump will move to go.tools when the disassembler is added, but it can stay here for now. LGTM=minux.ma R=golang-codereviews, minux.ma CC=golang-codereviews, iant, r https://golang.org/cl/87580043
* runtime/pprof: support OS X CPU profilingRuss Cox2012-02-281-0/+68
Work around profiling kernel bug with signal masks. Still broken on 64-bit Snow Leopard kernel, but I think we can ignore that one and let people upgrade to Lion. Add new trivial tools addr2line and objdump to take the place of the GNU tools of the same name, since those are not installed on OS X. Adapt pprof to invoke 'go tool addr2line' and 'go tool objdump' if the system tools do not exist. Clean up disassembly of base register on amd64. Fixes #2008. R=golang-dev, bradfitz, mikioh.mikioh, r, iant CC=golang-dev https://golang.org/cl/5697066