commit | 5f2bbc1069aecbc97fce688b2feafecb0eedfe86 | [log] [tgz] |
---|---|---|
author | Michael Anthony Knyszek <mknyszek@google.com> | Fri Dec 13 07:23:39 2024 +0000 |
committer | Gopher Robot <gobot@golang.org> | Mon Dec 16 13:41:12 2024 -0800 |
tree | 18e528d882bd1c801340777c222b01ca910331df | |
parent | 46b335ef7eef4cee8044985a958042a0fa53ccd5 [diff] |
gocore: use dwarf->abi.Type map and type-walk deeper for direct ifaces This change makes two major changes to typing the heap. 1. It matches up DWARF names to internal/abi.Type addresses via the DW_AT_Go_runtime_type attribute, which links the internal/abi.Type address to the DWARF entry for a type. This allows us to fully and unambiguously give every type an identity. 2. It fixes what appears to be a minor bug in the type-walk: direct interfaces that contain pointers (type is a *T and the data is also a *T or a [1]*T or a struct{ *T }) were passed on as interior pointers to the walk queue, but this could easily result in unmergable interior chunks and loss of type information. Instead, we know it's a pointer type then and there, and we can just walk it directly, queuing up the pointed-to type instead. This makes the type-walk just a little more precise. Change-Id: I8842cdef5e92596c3c0b1365c5f5297604b83113 Reviewed-on: https://go-review.googlesource.com/c/debug/+/635737 Reviewed-by: Nicolas Hillegeer <aktau@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This repository holds utilities and libraries for debugging Go programs.
WARNING! Please expect breaking changes and unstable APIs. Most of them are currently are at an early, experimental stage.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.
The git repository is https://go.googlesource.com/debug.
The main issue tracker for the debug repository is located at https://go.dev/issues. Prefix your issue with “x/debug:” in the subject line, so it is easy to find.