cmd/viewcore: fix commandPath recursion commandPath recursively called itself with the same command when the command had a parent. The recursion therefore never reached the root command and eventually caused a stack overflow. Recurse with c.Parent() so each call advances toward the root. Add table-driven tests covering root, one-level, and two-level command paths. Change-Id: I8d258a9f2d4d2c42c1cd66df0873fa99185a8aa9 Reviewed-on: https://go-review.googlesource.com/c/debug/+/811640 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Keith Randall <khr@golang.org>
This repository holds utilities and libraries for debugging Go programs.
WARNING! Please expect breaking changes and unstable APIs. Most of them are currently 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.