cmd/viewcore: interactive mode support

This change implements an interactive mode and restructures the command
line so that the corefile argument is the first argument.

The following command starts an interactive shell for analysis of the
specified core.

  viewcore <corefile>

Providing a command in the following form, the viewcore invokes the
command directly rather than starting the interactive mode.

  viewcore <corefile> <command>

This change uses to provide shell-like
functionality. (TODO: vendor the package for reproducible build)

Change-Id: I644566a16e1f5442e668d712187d9841f242f78a
Reviewed-by: Heschi Kreinick <>
Reviewed-by: Keith Randall <>
1 file changed