Actually, gcc you called when you do compilation is just a driver for real compiler cc1, assembler as and linker collect2. Use option -v you can see the exact command sequence. For direct debugging you should run gdb cc1. Refer to gdb documentation on how to set break points, print the current call stack, and examine variable values. You can modify variable values and call program functions within the debugger, making it a good test environment for trying your coding ideas.

Gcc has helper functions for examining the gimple tree. See the Q&A on examining an gimple node.


This topic: Main > TWikiUsers > ChenDing > CS255Spring08 > ProjectHome > DebugCC1
Topic revision: r2 - 2008-03-13 - ChenDing
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding URCS? Send feedback