internal/gocore: remove Flags and make Process cacheable

Flags controled the amount of initialization work Core has to perform
and determined the kind of information available in the returned
Process object. This API prevented the reuse of the Process object for
different types of analysis.

This change gets rid of the Flags type, lets the Core perform only
the basic initialization work, and makes Process to gather more
information (e.g. type and reverse reference info) on demand if needed.

This allows the viewcore command to cache the output of gocore.Core,
Process, and reuse it in the interactive mode.

Change-Id: Ifd4f40f240e4a7f10286f966aafc38abe58877ee
Reviewed-on: https://go-review.googlesource.com/122481
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
7 files changed
tree: 7d07a73916869b2517d92ca6ca1f90e9bc0a508e
  1. AUTHORS
  2. CONTRIBUTING.md
  3. CONTRIBUTORS
  4. LICENSE
  5. README.md
  6. cmd/
  7. codereview.cfg
  8. internal/
README.md

Go Debug

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 Changes