aboutsummaryrefslogtreecommitdiff
path: root/test/codegen
diff options
context:
space:
mode:
authorAlessandro Arzilli <alessandro.arzilli@gmail.com>2025-08-18 15:49:50 +0200
committerGopher Robot <gobot@golang.org>2025-09-03 15:13:15 -0700
commit80038586ed2814a03dcb95cd6f130766f8d803c3 (patch)
tree9d3416ebdd5ef1a0cc3f8766cf0cdcc74bbff3eb /test/codegen
parent91e76a513bdfa4159ea0aa65a01f89e006e6ead3 (diff)
downloadgo-80038586ed2814a03dcb95cd6f130766f8d803c3.tar.xz
cmd/compile: export to DWARF types only referenced through interfaces
Delve and viewcore use DWARF type DIEs to display and explore the runtime value of interface variables. This has always been slightly problematic since the runtime type of an interface variable might only be reachable through interfaces and thus be missing from debug_info (see issue #46670). Prior to commit f4de2ecf this was not a severe problem since a struct literal caused the allocation of a struct into an autotemp variable, which was then used by dwarfgen to make sure that the DIE for that type would be generated. After f4de2ecf such autotemps are no longer being generated and go1.25.0 ends up having many more instances of interfaces with unreadable runtime type (https://github.com/go-delve/delve/issues/4080). This commit fixes this problem by scanning the relocation of the function symbol and adding to the function's DIE symbol references to all types used by the function to create interfaces. Fixes go-delve/delve#4080 Updates #46670 Change-Id: I3e9db1c0d1662905373239816a72604ac533b09e Reviewed-on: https://go-review.googlesource.com/c/go/+/696955 Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Than McIntosh <thanm@golang.org> Reviewed-by: Florian Lehner <lehner.florian86@gmail.com>
Diffstat (limited to 'test/codegen')
0 files changed, 0 insertions, 0 deletions