internal/gocore: refactor heapArena reading

There are a lot of different historical changes to the heap arena
structure, making Process.readHeap difficult to follow. Refactor to
split out version-specific logic to individual methods.

Reading allocation headers is not yet supported by this CL.

For golang/go#64049.

Change-Id: Ia4198bd8492d8426c7a2cc8671b78c49ab6b7161
Reviewed-on: https://go-review.googlesource.com/c/debug/+/541131
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
1 file changed
tree: a1646cbe4c26fe0ad7116e465802ec49d8e2c9e0
  1. cmd/
  2. dwtest/
  3. internal/
  4. codereview.cfg
  5. CONTRIBUTING.md
  6. go.mod
  7. go.sum
  8. LICENSE
  9. README.md
README.md

Go Debug

Go Reference

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.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.

The main issue tracker for the debug repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/debug:” in the subject line, so it is easy to find.