From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4503 invoked by alias); 20 Jan 2015 16:28:50 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 4429 invoked by uid 48); 20 Jan 2015 16:28:46 -0000 From: "ian at airs dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug go/64595] go programs abort when debug info is stripped Date: Tue, 20 Jan 2015 16:28:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: go X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ian at airs dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ian at airs dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg02064.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64595 --- Comment #16 from Ian Lance Taylor --- Yes, gccgo ought to enable -g by default. For some reason I thought it did but clearly I was wrong. file/line info is needed for the standard library runtime.Callers function, which is used by many other packages like the log and testing packages. Basically Go code assumes that you can always find out who is calling you. It's not C. The Go library only needs whatever libbacktrace needs. Right now I think that is a minimal .debug_info, a corresponding .debug_abbrev, a full .debug_line, possibly .debug_ranges, possibly .debug_str. I think there is a Google internal patch to generate this (though Go doesn't use it internally either). I can try to dig that up but it seems like stage 1 material.