Commit 5d444e36 authored by Robert Griesemer's avatar Robert Griesemer
Browse files

cmd/compile/internal/gc: add alternative node dumper for debugging

dump/fdump is a reflection-based data structure dumper slightly
customized for the compiler's Node data structure. It dumps the
transitivle closure of Node (and other) data structures using a
recursive descent depth first traversal and permits filtering
options (recursion depth limitation, filtering of struct fields).

I have been using it to diagnose compiler bugs and found it more
useful than the existing node printing code in some cases because
field filtering reduces the output to the interesting parts.

No impact on rest of compiler if functions are not called (which
they only should during a debugging session).

Change-Id: I79d7227f10dd78dbd4bbcdf204db236102fc97a7
Reviewed-on: https://go-review.googlesource.com/136397


Reviewed-by: default avatarAlan Donovan <adonovan@google.com>
parent f99fc3a1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment