]> Cypherpunks repositories - gostls13.git/commit
dwarf: add marker for embedded fields in dwarf
authorHana Kim <hakim@google.com>
Wed, 26 Apr 2017 21:58:31 +0000 (17:58 -0400)
committerHyang-Ah Hana Kim <hyangah@gmail.com>
Thu, 27 Apr 2017 19:57:02 +0000 (19:57 +0000)
commitb1868cf10770eed86688631ac46d2d510e0621a6
tree3b34fbce3b132c3935231828c18fce011b852c99
parentf5c878e0300829bf47b9be5cae711339c29e522a
dwarf: add marker for embedded fields in dwarf

Currently, the following two codes generate the identical dwarf info
for type Foo.

prog 1)
type Foo struct {
   Bar
}

prog 2)
type Foo struct {
   Bar Bar
}

This change adds a go-specific attribute DW_AT_go_embedded_field
to annotate each member entry. Its absence or false value indicates
the corresponding member is not an embedded field.

Update #20037

Change-Id: Ibcbd2714f3e4d97c7b523d7398f29ab2301cc897
Reviewed-on: https://go-review.googlesource.com/41873
Reviewed-by: David Chase <drchase@google.com>
src/cmd/internal/dwarf/dwarf.go
src/cmd/link/internal/ld/decodesym.go
src/cmd/link/internal/ld/dwarf.go
src/cmd/link/internal/ld/dwarf_test.go