This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] Add debug_varpool
- From: Diego Novillo <dnovillo at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 12 Feb 2009 08:01:13 -0500
- Subject: [lto] Add debug_varpool
Useful in those cases when 'stderr' is not known to gdb.
* varpool.c (debug_varpool): New.
* cgraph.h (debug_varpool): Declare.
Index: cgraph.h
===================================================================
--- cgraph.h (revision 144118)
+++ cgraph.h (working copy)
@@ -542,6 +542,7 @@ extern GTY(()) struct varpool_node *varp
struct varpool_node *varpool_node (tree);
struct varpool_node *varpool_node_for_asm (tree asmname);
void varpool_mark_needed_node (struct varpool_node *);
+void debug_varpool (void);
void dump_varpool (FILE *);
void dump_varpool_node (FILE *, struct varpool_node *);
Index: varpool.c
===================================================================
--- varpool.c (revision 144118)
+++ varpool.c (working copy)
@@ -164,6 +164,14 @@ dump_varpool (FILE *f)
dump_varpool_node (f, node);
}
+/* Dump the variable pool to stderr. */
+
+void
+debug_varpool (void)
+{
+ dump_varpool (stderr);
+}
+
/* Given an assembler name, lookup node. */
struct varpool_node *
varpool_node_for_asm (tree asmname)