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. cmd/
  2. internal/
  3. AUTHORS
  4. codereview.cfg
  5. CONTRIBUTING.md
  6. CONTRIBUTORS
  7. LICENSE
  8. README.md
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