| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for the -gnu option on Go objdump. When
this option is used, then output will include gnu
assembly in comments alongside the Go assembly.
The objdump test was updated to test this new option.
This option is supported for the arches found in
golang.org/x that provide the GNUsyntax function.
Updates #34372
Change-Id: I9e60e1691526607dda3c857c4564dcef408b8391
Reviewed-on: https://go-review.googlesource.com/c/go/+/225459
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
|
|
|
|
|
|
|
|
|
| |
Remove the os.Exit(0) to honor the deferred closing of the file.
Change-Id: Iaa9304d8203c8fec0ec728af669a94eadd36905c
Reviewed-on: https://go-review.googlesource.com/118915
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The last mention of those types in this package are in:
commit 6bd0d0542ee15fda0da545c16af43fcfd34d6334
Author: Russ Cox <rsc@golang.org>
Date: Thu Nov 6 19:56:55 2014 -0500
cmd/objdump, cmd/pprof: factor disassembly into cmd/internal/objfile
Found with honnef.co/go/tools/cmd/unused.
Change-Id: Iacc2902f7d0784ac0efdd92da239f3e97491469a
Reviewed-on: https://go-review.googlesource.com/41472
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added -S flag to print go source file line above corresponding disassembly:
$ go tool objdump -S -s main.main fmthello
TEXT main.main(SB) /home/rugginoso/Documents/src/go/src/cmd/objdump/testdata/fmthello.go
func main() {
0x47d450 64488b0c25f8ffffff FS MOVQ FS:0xfffffff8, CX
0x47d459 483b6110 CMPQ 0x10(CX), SP
0x47d45d 7631 JBE 0x47d490
0x47d45f 4883ec18 SUBQ $0x18, SP
0x47d463 48896c2410 MOVQ BP, 0x10(SP)
0x47d468 488d6c2410 LEAQ 0x10(SP), BP
Println("hello, world")
0x47d46d 488d0563b00200 LEAQ 0x2b063(IP), AX
0x47d474 48890424 MOVQ AX, 0(SP)
0x47d478 48c74424080c000000 MOVQ $0xc, 0x8(SP)
0x47d481 e81a000000 CALL main.Println(SB)
}
0x47d486 488b6c2410 MOVQ 0x10(SP), BP
0x47d48b 4883c418 ADDQ $0x18, SP
0x47d48f c3 RET
func main() {
0x47d490 e8ebf1fcff CALL runtime.morestack_noctxt(SB)
0x47d495 ebb9 JMP main.main(SB)
Execution time:
$ time go tool objdump testdata/fmthello > /dev/null
real 0m0.430s
user 0m0.440s
sys 0m0.000s
$ time go tool objdump -S testdata/fmthello > /dev/null
real 0m0.471s
user 0m0.476s
sys 0m0.012s
Fixes #18245
Change-Id: I9b2f8338f9ee443c1352efd270d3ba85e3dd9b78
Reviewed-on: https://go-review.googlesource.com/37953
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
|
|
|
|
|
|
| |
Change-Id: I6b1b4d3e8c039ba3198cb4b9765de75859ea8c32
Reviewed-on: https://go-review.googlesource.com/1214
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Fixes #8803.
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/169720043
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
Broken by 8b5fc7c59d05.
Update #8092
LGTM=iant, alex.brainman
R=rsc, iant, alex.brainman
CC=golang-codereviews
https://golang.org/cl/138770043
|
|
|
|
|
|
|
|
|
|
|
| |
into runtime package
Fixes #8092.
LGTM=rsc
R=iant, rsc
CC=golang-codereviews
https://golang.org/cl/126790043
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
LGTM=iant
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/112320043
|
|
|
|
|
|
|
|
|
| |
Fixes #7452.
LGTM=minux, iant
R=minux, iant
CC=golang-codereviews
https://golang.org/cl/104770046
|
|
|
|
|
|
|
|
|
| |
Update #7947.
LGTM=iant
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/91500044
|
|
|
|
|
|
|
|
|
| |
fixes windows build
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/97500043
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Fixes #7936.
LGTM=alex.brainman, bradfitz, iant
R=golang-codereviews, alex.brainman, bradfitz, iant
CC=golang-codereviews
https://golang.org/cl/100060043
|
|
|
|
|
|
|
| |
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/88050046
|
|
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
|