diff options
author | Tobias Burnus <burnus@net-b.de> | 2010-09-06 20:16:50 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2010-09-06 20:16:50 +0200 |
commit | 3c7ac37eea95be3f08fca1573116ca494158728f (patch) | |
tree | 250058453a71cb6ae52936c1503f47e673bf9022 /gcc/fortran/dump-parse-tree.c | |
parent | a7529ed6083185de406eb63a7a5e4f78da9862ab (diff) | |
download | gcc-3c7ac37eea95be3f08fca1573116ca494158728f.zip gcc-3c7ac37eea95be3f08fca1573116ca494158728f.tar.gz gcc-3c7ac37eea95be3f08fca1573116ca494158728f.tar.bz2 |
re PR fortran/45560 (debugging: Add EXPR pretty printer (gfc_debug_expr))
2010-09-06 Tobias Burnus <burnus@net-b.de>
PR fortran/45560
* dump-parse-tree.c (gfc_debug_expr): New function.
From-SVN: r163928
Diffstat (limited to 'gcc/fortran/dump-parse-tree.c')
-rw-r--r-- | gcc/fortran/dump-parse-tree.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c index 1a64910..3595518 100644 --- a/gcc/fortran/dump-parse-tree.c +++ b/gcc/fortran/dump-parse-tree.c @@ -49,6 +49,20 @@ static void show_code_node (int, gfc_code *); static void show_namespace (gfc_namespace *ns); +/* Allow dumping of an expression in the debugger. */ +void gfc_debug_expr (gfc_expr *); + +void +gfc_debug_expr (gfc_expr *e) +{ + FILE *tmp = dumpfile; + dumpfile = stdout; + show_expr (e); + fputc ('\n', dumpfile); + dumpfile = tmp; +} + + /* Do indentation for a specific level. */ static inline void |