Since xdumpgo is not a mainstream standard command, this report assumes it refers to a Go-oriented core dump inspection utility (similar to gdump or an extended go tool objdump). If you meant something else (e.g., a custom/internal tool), please clarify. Otherwise, this tutorial-style report will be useful for practical scenarios.
Run a crashing Go program:
// crash.go package main
func main() ch := make(chan int) close(ch) ch <- 1 // panic: send on closed channelxdumpgo tutorial
Compile and run with core dump:
go build -o crash crash.go
export GOTRACEBACK=crash
./crash
# core file will be created (e.g., core.pid)
| Task | xdumpgo command | Delve alternative |
|------|----------------|-------------------|
| Load core | xdumpgo info | dlv core |
| Goroutines list | xdumpgo goroutines | goroutines |
| Stack trace | xdumpgo stack -g N | bt |
| Heap stats | xdumpgo heap | heap |
| Variables | xdumpgo globals | vars |
Alias common commands
Add to ~/.bashrc:
alias hex='xdumpgo -c -C'
alias small='xdumpgo -n 128'
Use with grep for patterns
xdumpgo -C firmware.bin | grep -i "secret"
Pipe to clipboard for analysis
xdumpgo -x -n 512 data.bin | pbcopy # macOS
Profile memory usage
For huge files, always use StreamDumper, not NewDumper.