Re: [PATCH] DOT a function directly from a gdb session

2012-12-13 Thread Pedro Alves
On 12/12/2012 06:04 PM, Andi Kleen wrote: > Richard Biener writes: >> >> Probably not suitable for trunk because I use popen/pclose/fileno >> which I don't know whether they are available on all host platforms. > > Just add a ifdef HAVE_popen or somesuch around it? Better yet, use the pex routin

Re: [PATCH] DOT a function directly from a gdb session

2012-12-12 Thread Steven Bosscher
On Wed, Dec 12, 2012 at 1:53 PM, Richard Biener wrote: > + fputs ("digraph \"\" { overlap=false;\n", fp); This is "start_graph_dump (fp);" > + fputs ("}\n", fp); And this is "end_graph_dump (fp);" I think it'd be good to call those functions instead of the fputs calls. Keeps things consist

Re: [PATCH] DOT a function directly from a gdb session

2012-12-12 Thread Andi Kleen
Richard Biener writes: > > Probably not suitable for trunk because I use popen/pclose/fileno > which I don't know whether they are available on all host platforms. Just add a ifdef HAVE_popen or somesuch around it? -Andi -- a...@linux.intel.com -- Speaking for myself only

Re: [PATCH] DOT a function directly from a gdb session

2012-12-12 Thread Marek Polacek
On Wed, Dec 12, 2012 at 03:11:26PM +0100, Steven Bosscher wrote: > There are several warts that need addressing for GCC 4.9. I'm aware of > the following bugs. There may be others, if you find any please let me > know. Ok, in case I find something, I'll let you know. > 1. dumping for debug_dot_c

Re: [PATCH] DOT a function directly from a gdb session

2012-12-12 Thread Richard Biener
On Wed, 12 Dec 2012, Steven Bosscher wrote: > On Wed, Dec 12, 2012 at 3:08 PM, Richard Biener wrote: > > Well, it now uses dominators - so steven, I suppose "fancy" dumping > > should be disabled whenever they are not already computed? > > Uh, it does? I tried to avoid that (I used get_loop_body_

Re: [PATCH] DOT a function directly from a gdb session

2012-12-12 Thread Steven Bosscher
On Wed, Dec 12, 2012 at 3:08 PM, Richard Biener wrote: > Well, it now uses dominators - so steven, I suppose "fancy" dumping > should be disabled whenever they are not already computed? Uh, it does? I tried to avoid that (I used get_loop_body_in_bfs_order for this reason). Do you have a test case

Re: [PATCH] DOT a function directly from a gdb session

2012-12-12 Thread Steven Bosscher
On Wed, Dec 12, 2012 at 2:53 PM, Marek Polacek wrote: > On Wed, Dec 12, 2012 at 01:53:53PM +0100, Richard Biener wrote: >> >> This adds the function print_graph_cfg that you can call from a >> gdb session and directly pipes a dot representation of the >> function to 'dot -Tx11'. The only change ne

Re: [PATCH] DOT a function directly from a gdb session

2012-12-12 Thread Richard Biener
On Wed, 12 Dec 2012, Marek Polacek wrote: > On Wed, Dec 12, 2012 at 01:53:53PM +0100, Richard Biener wrote: > > > > This adds the function print_graph_cfg that you can call from a > > gdb session and directly pipes a dot representation of the > > function to 'dot -Tx11'. The only change needed t

Re: [PATCH] DOT a function directly from a gdb session

2012-12-12 Thread Marek Polacek
On Wed, Dec 12, 2012 at 01:53:53PM +0100, Richard Biener wrote: > > This adds the function print_graph_cfg that you can call from a > gdb session and directly pipes a dot representation of the > function to 'dot -Tx11'. The only change needed to the now very > good dumping code is splitting out t

Re: [PATCH] DOT a function directly from a gdb session

2012-12-12 Thread Steven Bosscher
On Wed, Dec 12, 2012 at 1:53 PM, Richard Biener wrote: > > This adds the function print_graph_cfg that you can call from a > gdb session and directly pipes a dot representation of the > function to 'dot -Tx11'. The only change needed to the now very > good dumping code is splitting out the actual