This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Add debug_scope_blocks


This patch adds a new entry point for dump_scope_blocks for the
benefit of gdb.  It also adds some missing documentation for
dump_scope_blocks and dump_scope_block.

Tested on x86_64.  Committed to mainline and lto.


Diego.




	* tree-ssa-live.c (dump_scope_block): Document arguments.
	(dump_scope_blocks): Document.
	(debug_scope_blocks): New.
	* tree-flow.h (debug_scope_blocks): Declare.

Index: tree-ssa-live.c
===================================================================
--- tree-ssa-live.c	(revision 147920)
+++ tree-ssa-live.c	(working copy)
@@ -552,7 +552,9 @@ mark_all_vars_used (tree *expr_p, void *
   walk_tree (expr_p, mark_all_vars_used_1, data, NULL);
 }
 
-/* Dump scope blocks.  */
+
+/* Dump scope blocks starting at SCOPE to FILE.  INDENT is the
+   indentation level and FLAGS is as in print_generic_expr.  */
 
 static void
 dump_scope_block (FILE *file, int indent, tree scope, int flags)
@@ -606,12 +608,26 @@ dump_scope_block (FILE *file, int indent
   fprintf (file, "\n%*s}\n",indent, "");
 }
 
+
+/* Dump the tree of lexical scopes of current_function_decl to FILE.
+   FLAGS is as in print_generic_expr.  */
+
 void
 dump_scope_blocks (FILE *file, int flags)
 {
   dump_scope_block (file, 0, DECL_INITIAL (current_function_decl), flags);
 }
 
+
+/* Dump the tree of lexical scopes of current_function_decl to stderr.
+   FLAGS is as in print_generic_expr.  */
+
+void
+debug_scope_blocks (int flags)
+{
+  dump_scope_blocks (stderr, flags);
+}
+
 /* Remove local variables that are not referenced in the IL.  */
 
 void
Index: tree-flow.h
===================================================================
--- tree-flow.h	(revision 147920)
+++ tree-flow.h	(working copy)
@@ -919,6 +919,7 @@ void mark_addressable (tree);
 /* In tree-ssa-live.c */
 extern void remove_unused_locals (void);
 extern void dump_scope_blocks (FILE *, int);
+extern void debug_scope_blocks (int);
 
 /* In tree-ssa-address.c  */
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]