This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add debug_function_graph_to_file
- From: Tom Tromey <tom at tromey dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Marek Polacek <polacek at redhat dot com>, Tom de Vries <Tom_deVries at mentor dot com>, "gcc-patches\ at gnu dot org" <gcc-patches at gnu dot org>
- Date: Wed, 17 Feb 2016 08:31:44 -0700
- Subject: Re: [PATCH] Add debug_function_graph_to_file
- Authentication-results: sourceware.org; auth=none
- References: <56C46FE1 dot 4040000 at mentor dot com> <CAFiYyc15LuWDHcGHGjv1z6AVtVoPXrfHBnfWAK=p9K=wzquE9g at mail dot gmail dot com> <20160217135114 dot GV3163 at redhat dot com> <CAFiYyc0CB4k7a9Fp9Yzg1Y959OyKB4KwPH89spSTJFNo1JpA4A at mail dot gmail dot com>
Richard> What does it take to write it in python instead?
IIUC you're asking for it to display the function graph at a given point
in time. This is easy - you can just dump it to a file and then run the
appropriate visualization tool.
Once upon a time I also wrote Python code to display a function's CFG
from Python, and then update it as you stepped through gcc. This is on
the "demo" branch here https://github.com/tromey/gdb-gui. It's probably
bit-rotted by now but it shows the general idea. This was for a talk at
FOSDEM, the video is online if you want to see what it looks like.
Tom