Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1392)

Issue 7744051: code review 7744051: cmd/ld: don't generate DW_AT_type attr for unsafe.Point... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 1 month ago by minux1
Modified:
11 years, 1 month ago
Reviewers:
CC:
golang-dev, rsc
Visibility:
Public.

Description

cmd/ld: don't generate DW_AT_type attr for unsafe.Pointer to match gcc behavior gcc generates only attr DW_AT_byte_size for DW_TAG_pointer_type of "void *", but we used to also generate DW_AT_type pointing to imaginary unspecified type "void", which confuses some gdb. This change makes old Apple gdb 6.x (specifically, Apple version gdb-1515) accepts our binary without issue like this: (gdb) b 'main.main' Die: DW_TAG_unspecified_type (abbrev = 10, offset = 47079) has children: FALSE attributes: DW_AT_name (DW_FORM_string) string: "void" Dwarf Error: Cannot find type of die [in module /Users/minux/go/go2.hg/bin/go] Special thanks to Russ Cox for pointing out the problem in comment #6 of CL 7891044.

Patch Set 1 #

Patch Set 2 : diff -r 61fa5c7d741f https://code.google.com/p/go/ #

Patch Set 3 : diff -r 61fa5c7d741f https://code.google.com/p/go/ #

Patch Set 4 : diff -r decec27a0134 https://code.google.com/p/go/ #

Patch Set 5 : diff -r decec27a0134 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -5 lines) Patch
M src/cmd/ld/dwarf.c View 1 2 3 5 chunks +10 lines, -5 lines 0 comments Download

Messages

Total messages: 3
minux1
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
11 years, 1 month ago (2013-03-20 21:33:25 UTC) #1
rsc
LGTM
11 years, 1 month ago (2013-03-20 21:39:29 UTC) #2
minux1
11 years, 1 month ago (2013-03-21 19:58:48 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=2cc9547000b0 ***

cmd/ld: don't generate DW_AT_type attr for unsafe.Pointer to match gcc behavior
gcc generates only attr DW_AT_byte_size for DW_TAG_pointer_type of "void *",
but we used to also generate DW_AT_type pointing to imaginary unspecified
type "void", which confuses some gdb.
This change makes old Apple gdb 6.x (specifically, Apple version gdb-1515)
accepts our binary without issue like this:
(gdb) b 'main.main'
Die: DW_TAG_unspecified_type (abbrev = 10, offset = 47079)
    has children: FALSE
    attributes:
        DW_AT_name (DW_FORM_string) string: "void"
Dwarf Error: Cannot find type of die [in module /Users/minux/go/go2.hg/bin/go]

Special thanks to Russ Cox for pointing out the problem in comment #6 of
CL 7891044.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/7744051
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b