Skip to content

gccgo: traceback should suppress frames with no debug info #6229

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

Closed
gopherbot opened this issue Aug 23, 2013 · 8 comments
Closed

gccgo: traceback should suppress frames with no debug info #6229

gopherbot opened this issue Aug 23, 2013 · 8 comments
Milestone

Comments

@gopherbot
Copy link
Contributor

by capnm9:

gccgo built from gcc tip:

commit f248394b138d19d68661563d4b6b5a22e3b12b18
Author: ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Fri Aug 23 01:08:25 2013 +0000

    libgo: Update libtool.m4 from upstream to recognize powerpcle.

    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201933 138bc75d-0d04-0410-961f-82ee72b054a4



E.g. divide by zero panic:

export GOTRACEBACK=2
./a.out
panic: runtime error: integer divide by zero

goroutine 1 [running]:
runtime_dopanic
    /data4/soft/go/gccgo-git/libgo/runtime/panic.c:71
__go_panic
    /data4/soft/go/gccgo-git/libgo/runtime/go-panic.c:113
runtime_panicstring
    /data4/soft/go/gccgo-git/libgo/runtime/panic.c:121
__go_runtime_error
    /data4/soft/go/gccgo-git/libgo/runtime/go-runtime-error.c:85

    :0
runtime_main
    /data4/soft/go/gccgo-git/libgo/runtime/proc.c:529
kickoff
    /data4/soft/go/gccgo-git/libgo/runtime/proc.c:229

    :0

goroutine 3 [runnable]:
kickoff
    /data4/soft/go/gccgo-git/libgo/runtime/proc.c:226

    :0
created by runtime_main
    /data4/soft/go/gccgo-git/libgo/runtime/proc.c:520

goroutine 4 [runnable]:
kickoff
    /data4/soft/go/gccgo-git/libgo/runtime/proc.c:226

    :0

goroutine 5 [runnable]:
kickoff
    /data4/soft/go/gccgo-git/libgo/runtime/proc.c:226

    :0
@gopherbot
Copy link
Contributor Author

Comment 1 by capnm9:

+ In this panic it's generally missing a back-trace from main.main

@ianlancetaylor
Copy link
Contributor

Comment 2:

It's not garbage, exactly, it's just not helpful.  The :0 indicates frames for which the
backtrace library couldn't find any debug info.  Most likely they are in libc.  The
backtrace library doesn't yet understand how to find separate debug info files.
Probably the fix should be, for a frame with no debug info, to just print the PC value.

Labels changed: added priority-later, gccgo, removed priority-triage.

@gopherbot
Copy link
Contributor Author

Comment 3 by capnm9:

> The backtrace library doesn't yet understand how to find separate debug info files.
Ah yes, that could be a challenge.
I'm parsing the error outputs from both compilers/runtimes. I would certainly prefer to
have something at least looking useful or just nothing.
Sorry for the false alarm in the comment #1 I've forgotten the -g option, without it the
(here most helpful) main.main backtrace disappears.

@robpike
Copy link
Contributor

robpike commented Aug 24, 2013

Comment 4:

Changing the description.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 6:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 7:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 8:

Labels changed: added repo-gccgo.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc added Gccgo and removed priority-later labels Apr 10, 2015
@rsc rsc modified the milestones: Gccgo, Unplanned Apr 15, 2015
@rsc rsc removed the Gccgo label Apr 15, 2015
@ianlancetaylor
Copy link
Contributor

I don't think there is anything to be done here.

@golang golang locked and limited conversation to collaborators Feb 5, 2019
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

4 participants