This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r269633 - in /trunk/gcc/go/gofrontend: MERGE as...
- From: ian at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Wed, 13 Mar 2019 04:43:34 -0000
- Subject: r269633 - in /trunk/gcc/go/gofrontend: MERGE as...
Author: ian
Date: Wed Mar 13 04:43:33 2019
New Revision: 269633
URL: https://gcc.gnu.org/viewcvs?rev=269633&root=gcc&view=rev
Log:
compiler: add new debugging helper function debug_go_type()
Add a new debugging utility routine debug_go_type(), intended to
display the contents of a Type object in a way useful to debugging
a run of the compiler. Prior to this the only useful alternative
for debugging types was invoking the mangled_name() method, which
has problems (for example, won't work on interface types prior
to finalizing of methods).
This is a "deep" dump, meaning that all types reachable from the
type passed to debug_go_type() will be printed out. Example:
(gdb) print debug_go_type(t1)
T0 0x535f300 'net/http.Header' -> T1
T1 0x535d3d0 map ['string' -> string] T4
T2 0x5304bb0 'string' -> string
T3 0x331f900 string
T4 0x535d370 array [] 'string' -> string
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/166637
Modified:
trunk/gcc/go/gofrontend/MERGE
trunk/gcc/go/gofrontend/ast-dump.cc
trunk/gcc/go/gofrontend/types.cc
trunk/gcc/go/gofrontend/types.h