I implemented a simple pretty-printer for the
AST used in GCJX over this weekend. It works just like the
debug_tree() function in GCC and is accessed by using the
dump_tree() function in GCJX. For convenience, I just change "
-fdump-methods" to call
dump_tree() instead of
dump_method(). That way I can easily see the ASTs created for various Java source files. For someone like me who is new to GCJX in particular and compiler construction in general, this can be quite enlightening.
While debugging the GCJ front-end, I have found
debug_tree() to be an immensely useful tool. I hope
dump_tree() proves similarly useful for GCJX.
By the way, I added a small page to the
GCC Wiki describing how to go about
debugging GCJX.
(
Originally posted on Advogato.)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.