]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: mark wrapper functions with DW_AT_trampoline
authorAlessandro Arzilli <alessandro.arzilli@gmail.com>
Fri, 3 Sep 2021 13:04:52 +0000 (15:04 +0200)
committerThan McIntosh <thanm@google.com>
Wed, 15 Sep 2021 14:17:48 +0000 (14:17 +0000)
commit5b48fca1fad44d22105f64be725514020432a2c1
tree8525b664697aa51c0b4f95aeaedc4c7711eed573
parente4dfd788e66f4a44825598dd3cb6ca9626369228
cmd/compile: mark wrapper functions with DW_AT_trampoline

Change DWARF generation to tag wrapper functions with the
"DW_AT_trampoline attribute". The intent is that debuggers can pick up
on this attr so as to skip through the wrapper to the eventual target.

DWARF standard allows for a couple of different possible variants of
the trampoline attr; this is the simplest variant (all it tells the
debugger is that the function is a wrapper, doesn't include a
reference to the wrapper routine).

This implementation keys off the WRAPPER LSym attribute, which is set
for method wrappers, ABI wrappers, and a selected set of runtime
assembly routines (ex: "runtime.call32").

Change-Id: Ib53e1bc56c02b86ca3ac5e7da1a541ec262726cf
Reviewed-on: https://go-review.googlesource.com/c/go/+/347352
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Jeremy Faller <jeremy@golang.org>
src/cmd/internal/dwarf/dwarf.go
src/cmd/internal/obj/dwarf.go