Re: [PATCH] Add debug_function_graph_to_file

2016-02-18 Thread Martin Jambor
On Wed, Feb 17, 2016 at 03:00:00PM +0100, Richard Biener wrote: > On Wed, Feb 17, 2016 at 2:51 PM, Marek Polacek wrote: > > On Wed, Feb 17, 2016 at 02:45:36PM +0100, Richard Biener wrote: > >> OTOH I have in my local trees a more convenient form (attached). > >> > >> (gdb) call debug_dot_cfg (cfun

Re: [PATCH] Add debug_function_graph_to_file

2016-02-17 Thread Tom Tromey
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 functi

Re: [PATCH] Add debug_function_graph_to_file

2016-02-17 Thread Richard Biener
On Wed, Feb 17, 2016 at 2:51 PM, Marek Polacek wrote: > On Wed, Feb 17, 2016 at 02:45:36PM +0100, Richard Biener wrote: >> OTOH I have in my local trees a more convenient form (attached). >> >> (gdb) call debug_dot_cfg (cfun, 1<<6) >> >> and a X window with the dotted graph opens. > > Is there any

Re: [PATCH] Add debug_function_graph_to_file

2016-02-17 Thread Marek Polacek
On Wed, Feb 17, 2016 at 02:45:36PM +0100, Richard Biener wrote: > OTOH I have in my local trees a more convenient form (attached). > > (gdb) call debug_dot_cfg (cfun, 1<<6) > > and a X window with the dotted graph opens. Is there any chance we could get this into the mainline? I'd love to use t

Re: [PATCH] Add debug_function_graph_to_file

2016-02-17 Thread Richard Biener
On Wed, Feb 17, 2016 at 2:04 PM, Tom de Vries wrote: > Hi, > > once in a while I'm in a gdb debug session debugging cc1, and want to print > the current function graph to file (see also > https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01160.html for the non-graph > variant). > > That is currently p

[PATCH] Add debug_function_graph_to_file

2016-02-17 Thread Tom de Vries
Hi, once in a while I'm in a gdb debug session debugging cc1, and want to print the current function graph to file (see also https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01160.html for the non-graph variant). That is currently possible by doing: ... (gdb) call clean_graph_dump_file ("foo.1"