Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/addr2line: new TestAddr2Line fails on plan9 #7947

Closed
alexbrainman opened this issue May 7, 2014 · 8 comments
Closed

cmd/addr2line: new TestAddr2Line fails on plan9 #7947

alexbrainman opened this issue May 7, 2014 · 8 comments

Comments

@alexbrainman
Copy link
Member

--- FAIL: TestAddr2Line (1.31 seconds)
    addr2line_test.go:45: go tool addr2line /tmp/go-build198541907/cmd/addr2line/_test/addr2line.test: exit status: 'testaddr2line.exe 1299885: 1'
        addr2line: reading /tmp/go-build198541907/cmd/addr2line/_test/addr2line.test: unrecognized binary format
FAIL
FAIL    cmd/addr2line   1.401s

I have no idea what to do here. Sorry.

Alex
@alexbrainman
Copy link
Member Author

Comment 1:

This issue was updated by revision 3b3e5ea.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/100180043

@ianlancetaylor
Copy link
Contributor

Comment 2:

Labels changed: added repo-main, release-none.

@0intro
Copy link
Member

0intro commented May 11, 2014

Comment 3:

Owner changed to @0intro.

@gopherbot
Copy link

Comment 4:

CL https://golang.org/cl/91500044 mentions this issue.

@0intro
Copy link
Member

0intro commented May 20, 2014

Comment 5:

Support for Go Plan 9 binaries has been implemented in
cmd/addr2line and cmd/objdump. The tests have been
enabled again.
However, TestDisasm is failing:
=== RUN TestDisasm
--- FAIL: TestDisasm (3.95 seconds)
    objdump_test.go:187: disassembly missing 'fmthello.go:6'
    objdump_test.go:187: disassembly missing 'fmthello.go:6'
    objdump_test.go:187: disassembly missing 'JMP main.main(SB)'
    objdump_test.go:187: disassembly missing 'CALL fmt.Println(SB)'
    objdump_test.go:187: disassembly missing 'RET'
    objdump_test.go:192: full disassembly:
        TEXT main.main(SB) /usr/go/src/cmd/objdump/testdata/fmthello.go
            fmthello.go:5   0x1020  8b0df0b00f00    MOVL 0xfb0f0(IP), CX
            fmthello.go:5   0x1026  8b89f8ffffff    MOVL 0xfffffff8(CX), CX
            fmthello.go:5   0x102c  3b21        CMPL 0(CX), SP
            fmthello.go:5   0x102e  770b        JA 0x103b

@0intro
Copy link
Member

0intro commented May 20, 2014

Comment 7:

I've attached a comparison of objdump on fmthello.go between Plan 9 on Linux on 386.
It seems a part of main.main is missing on the Plan 9 binary.

Attachments:

  1. objdump-386-linux-hello.bz2 (713332 bytes)
  2. objdump-386-plan9-hello.bz2 (698599 bytes)

@gopherbot
Copy link

Comment 8:

CL https://golang.org/cl/93520045 mentions this issue.

@ality
Copy link
Member

ality commented May 21, 2014

Comment 9:

This issue was closed by revision eb34288.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018
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 golang#7947.

LGTM=rsc
R=rsc, 0intro
CC=golang-codereviews
https://golang.org/cl/93520045
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants