From 84fcb947302a8da0d1c0c5dd0d130cc82ea10c06 Mon Sep 17 00:00:00 2001 From: jason Date: Sat, 13 Jul 2013 23:10:29 +0000 Subject: * print-tree.c (debug_vec_tree): Use debug_raw. (debug_raw (vec &)): New. (debug_raw (vec *)): New. * tree.h: Declare them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200940 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/print-tree.c | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) (limited to 'gcc/print-tree.c') diff --git a/gcc/print-tree.c b/gcc/print-tree.c index 689eeb9fe52..029c3a25e6d 100644 --- a/gcc/print-tree.c +++ b/gcc/print-tree.c @@ -1097,26 +1097,37 @@ debug_body (const tree_node *ptr) down to a depth of six. */ DEBUG_FUNCTION void -debug_vec_tree (vec *vec) +debug_raw (vec &ref) { tree elt; unsigned ix; /* Print the slot this node is in, and its code, and address. */ fprintf (stderr, "address ()); + dump_addr (stderr, " ", ref.address ()); - FOR_EACH_VEC_ELT (*vec, ix, elt) + FOR_EACH_VEC_ELT (ref, ix, elt) { fprintf (stderr, "elt %d ", ix); - debug (elt); + debug_raw (elt); } } DEBUG_FUNCTION void debug (vec &ref) { - debug_vec_tree (&ref); + tree elt; + unsigned ix; + + /* Print the slot this node is in, and its code, and address. */ + fprintf (stderr, " *ptr) else fprintf (stderr, "\n"); } + +DEBUG_FUNCTION void +debug_raw (vec *ptr) +{ + if (ptr) + debug_raw (*ptr); + else + fprintf (stderr, "\n"); +} + +DEBUG_FUNCTION void +debug_vec_tree (vec *vec) +{ + debug_raw (vec); +} -- cgit v1.2.1