* Call graph emacs tool
@ 2010-08-20 16:15 George Kadianakis
2010-08-21 1:38 ` Suvayu Ali
2010-08-21 3:13 ` Pranav Peshwe
0 siblings, 2 replies; 11+ messages in thread
From: George Kadianakis @ 2010-08-20 16:15 UTC (permalink / raw
To: help-gnu-emacs
Greetings,
I think I'm loosing faith in Emacs. It's the first time I'm looking
for a tool and I don't get countless .el scripts with a trivial Google
search.
I'm looking for a tool (preferably an Emacs tool, but _seriously_
anything will do) that will give me all possible code paths to a given
function of a C project.
For example:
Input: (magic-script function)
Output: 1) main() [main.c] -> function_1() [main.c] -> function_2() [oh.c] -> function_3() [oh.c] -> function_4() [ohlol.c] -> function() [yay.c]
2) main() [main.c] -> function_5() [yay.c] -> function_3() [oh.c] -> function_2() [oh.c] -> function() [yay.c]
3) etcetera
GNU cflow is actually doing that _but_ it doesn't support multiple
source files and it's not Emacs integrable.
Do you people know of any such tools?
Thank you :)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Call graph emacs tool
2010-08-20 16:15 George Kadianakis
@ 2010-08-21 1:38 ` Suvayu Ali
2010-08-21 1:50 ` Richard Riley
2010-08-21 3:13 ` Pranav Peshwe
1 sibling, 1 reply; 11+ messages in thread
From: Suvayu Ali @ 2010-08-21 1:38 UTC (permalink / raw
To: help-gnu-emacs
On Friday 20 August 2010 09:15 AM, George Kadianakis wrote:
> I'm looking for a tool (preferably an Emacs tool, but_seriously_
> anything will do) that will give me all possible code paths to a given
> function of a C project.
>
> For example:
> Input: (magic-script function)
> Output: 1) main() [main.c] -> function_1() [main.c] -> function_2() [oh.c] -> function_3() [oh.c] -> function_4() [ohlol.c] -> function() [yay.c]
> 2) main() [main.c] -> function_5() [yay.c] -> function_3() [oh.c] -> function_2() [oh.c] -> function() [yay.c]
> 3) etcetera
>
> GNU cflow is actually doing that_but_ it doesn't support multiple
> source files and it's not Emacs integrable.
>
> Do you people know of any such tools?
I am not sure what you mean by all possible code paths to a function,
but if you mean something like this,
<http://i288.photobucket.com/albums/ll164/jalladandtux/screenies/emacs-symbol-reference-w-cedet.png>
Then you can take a look at Semantic and the CEDET project[1].
[1]http://cedet.sourceforge.net/
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Call graph emacs tool
2010-08-21 1:38 ` Suvayu Ali
@ 2010-08-21 1:50 ` Richard Riley
2010-08-21 3:04 ` Suvayu Ali
0 siblings, 1 reply; 11+ messages in thread
From: Richard Riley @ 2010-08-21 1:50 UTC (permalink / raw
To: help-gnu-emacs
Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
> On Friday 20 August 2010 09:15 AM, George Kadianakis wrote:
>> I'm looking for a tool (preferably an Emacs tool, but_seriously_
>> anything will do) that will give me all possible code paths to a given
>> function of a C project.
>>
>> For example:
>> Input: (magic-script function)
>> Output: 1) main() [main.c] -> function_1() [main.c] -> function_2() [oh.c] -> function_3() [oh.c] -> function_4() [ohlol.c] -> function() [yay.c]
>> 2) main() [main.c] -> function_5() [yay.c] -> function_3() [oh.c] -> function_2() [oh.c] -> function() [yay.c]
>> 3) etcetera
>>
>> GNU cflow is actually doing that_but_ it doesn't support multiple
>> source files and it's not Emacs integrable.
>>
>> Do you people know of any such tools?
>
> I am not sure what you mean by all possible code paths to a function,
> but if you mean something like this,
> <http://i288.photobucket.com/albums/ll164/jalladandtux/screenies/emacs-symbol-reference-w-cedet.png>
What is that supposed to be? Is that a call stack?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Call graph emacs tool
2010-08-21 1:50 ` Richard Riley
@ 2010-08-21 3:04 ` Suvayu Ali
0 siblings, 0 replies; 11+ messages in thread
From: Suvayu Ali @ 2010-08-21 3:04 UTC (permalink / raw
To: help-gnu-emacs
On Friday 20 August 2010 06:50 PM, Richard Riley wrote:
> Suvayu Ali<fatkasuvayu+linux@gmail.com> writes:
>
>> On Friday 20 August 2010 09:15 AM, George Kadianakis wrote:
>>> I'm looking for a tool (preferably an Emacs tool, but_seriously_
>>> anything will do) that will give me all possible code paths to a given
>>> function of a C project.
>>>
>>> For example:
>>> Input: (magic-script function)
>>> Output: 1) main() [main.c] -> function_1() [main.c] -> function_2() [oh.c] -> function_3() [oh.c] -> function_4() [ohlol.c] -> function() [yay.c]
>>> 2) main() [main.c] -> function_5() [yay.c] -> function_3() [oh.c] -> function_2() [oh.c] -> function() [yay.c]
>>> 3) etcetera
>>>
>>> GNU cflow is actually doing that_but_ it doesn't support multiple
>>> source files and it's not Emacs integrable.
>>>
>>> Do you people know of any such tools?
>>
>> I am not sure what you mean by all possible code paths to a function,
>> but if you mean something like this,
>> <http://i288.photobucket.com/albums/ll164/jalladandtux/screenies/emacs-symbol-reference-w-cedet.png>
>
> What is that supposed to be? Is that a call stack?
>
>
Maybe I have misunderstood the OP's question.
Its the result of the command `semantic-symref-symbol'. It looks up your
symbol in all your project include paths and presents all references to
the symbol as links. You can jump to it with `RET' or you can view with
`<space>'. In this case the symbol was a handy method I had written.
There is a similar function for tags with a small difference, instead of
presenting it in a buffer, it cycles through all the matches in a
"completion like" buffer. All of this is of course with the CVS version
of CEDET.
Is that what the OP was looking for?
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Call graph emacs tool
2010-08-20 16:15 George Kadianakis
2010-08-21 1:38 ` Suvayu Ali
@ 2010-08-21 3:13 ` Pranav Peshwe
2010-08-21 12:36 ` George Kadianakis
[not found] ` <mailman.0.1282394304.15763.help-gnu-emacs@gnu.org>
1 sibling, 2 replies; 11+ messages in thread
From: Pranav Peshwe @ 2010-08-21 3:13 UTC (permalink / raw
To: George Kadianakis; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]
If I've understood you correctly, any tool that can build a (static) call
graph should suffice. Just that, you'll have to manually reverse trace paths
starting from function().
Do CMIIW...
On Fri, Aug 20, 2010 at 9:45 PM, George Kadianakis <desnacked@gmail.com>wrote:
> Greetings,
>
> I think I'm loosing faith in Emacs. It's the first time I'm looking
> for a tool and I don't get countless .el scripts with a trivial Google
> search.
>
> I'm looking for a tool (preferably an Emacs tool, but _seriously_
> anything will do) that will give me all possible code paths to a given
> function of a C project.
>
> For example:
> Input: (magic-script function)
> Output: 1) main() [main.c] -> function_1() [main.c] -> function_2() [oh.c]
> -> function_3() [oh.c] -> function_4() [ohlol.c] -> function() [yay.c]
> 2) main() [main.c] -> function_5() [yay.c] -> function_3() [oh.c] ->
> function_2() [oh.c] -> function() [yay.c]
> 3) etcetera
>
> GNU cflow is actually doing that _but_ it doesn't support multiple
> source files and it's not Emacs integrable.
>
> Do you people know of any such tools?
>
> Thank you :)
>
>
[-- Attachment #2: Type: text/html, Size: 1535 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Call graph emacs tool
2010-08-21 3:13 ` Pranav Peshwe
@ 2010-08-21 12:36 ` George Kadianakis
2010-08-21 16:18 ` Gary
` (2 more replies)
[not found] ` <mailman.0.1282394304.15763.help-gnu-emacs@gnu.org>
1 sibling, 3 replies; 11+ messages in thread
From: George Kadianakis @ 2010-08-21 12:36 UTC (permalink / raw
To: Pranav Peshwe; +Cc: help-gnu-emacs
Pranav Peshwe <pranavpeshwe@gmail.com> writes:
> If I've understood you correctly, any tool that can build a (static) call
> graph should suffice. Just that, you'll have to manually reverse trace paths
> starting from function().
>
> Do CMIIW...
>
Practically, yes. But the process of manually reversing the trace path
is not easy because of the multiple code paths that may lead to a
function call.
What I'm looking for, is basically what GNU cflow calls a reverse
graph [1] but I'd like it to be able to give me code paths that span
multiple files (cflow can only process a single source file).
Suvayu Ali writes:
> I am not sure what you mean by all possible code paths to a function,
> but if you mean something like this,
> <http://i288.photobucket.com/albums/ll164/jalladandtux/screenies/emacs-symbol-reference-w-cedet.png>
>
> Then you can take a look at Semantic and the CEDET project[1].
>
> [1]http://cedet.sourceforge.net/
Unfortunately, Semantic or etags don't have the functionality I look
for.
[1]: http://www.gnu.org/software/cflow/manual/cflow.html#Direct-and-Reverse
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Call graph emacs tool
[not found] ` <mailman.0.1282394304.15763.help-gnu-emacs@gnu.org>
@ 2010-08-21 15:35 ` rustom
0 siblings, 0 replies; 11+ messages in thread
From: rustom @ 2010-08-21 15:35 UTC (permalink / raw
To: help-gnu-emacs
On Aug 21, 5:36 pm, George Kadianakis <desnac...@gmail.com> wrote:
> Pranav Peshwe <pranavpes...@gmail.com> writes:
> > If I've understood you correctly, any tool that can build a (static) call
> > graph should suffice. Just that, you'll have to manually reverse trace paths
> > starting from function().
>
> > Do CMIIW...
>
> Practically, yes. But the process of manually reversing the trace path
> is not easy because of the multiple code paths that may lead to a
> function call.
>
> What I'm looking for, is basically what GNU cflow calls a reverse
> graph [1] but I'd like it to be able to give me code paths that span
> multiple files (cflow can only process a single source file).
It seems to be taking multiple files for me
And thats what the man page says http://linux.die.net/man/1/cflow
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Call graph emacs tool
2010-08-21 12:36 ` George Kadianakis
@ 2010-08-21 16:18 ` Gary
2010-08-21 18:07 ` Suvayu Ali
[not found] ` <mailman.5.1282414155.26890.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 11+ messages in thread
From: Gary @ 2010-08-21 16:18 UTC (permalink / raw
To: help-gnu-emacs
George Kadianakis wrote:
> I'd like it to be able to give me code paths that span
> multiple files (cflow can only process a single source file).
> [1]: http://www.gnu.org/software/cflow/manual/cflow.html#Direct-and-Reverse
Are you sure? "GNU cflow analyzes a *collection of* C source files and
prints a graph, charting control flow within the program." (my
emphasis).
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Call graph emacs tool
2010-08-21 12:36 ` George Kadianakis
2010-08-21 16:18 ` Gary
@ 2010-08-21 18:07 ` Suvayu Ali
[not found] ` <mailman.5.1282414155.26890.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 11+ messages in thread
From: Suvayu Ali @ 2010-08-21 18:07 UTC (permalink / raw
To: help-gnu-emacs
On Saturday 21 August 2010 05:36 AM, George Kadianakis wrote:
> Unfortunately, Semantic or etags don't have the functionality I look
> for.
>
> [1]:http://www.gnu.org/software/cflow/manual/cflow.html#Direct-and-Reverse
>
Okay thanks, sorry couldn't be of much help and sorry for the noise.
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Call graph emacs tool
[not found] ` <mailman.5.1282414155.26890.help-gnu-emacs@gnu.org>
@ 2010-08-24 15:52 ` rustom
0 siblings, 0 replies; 11+ messages in thread
From: rustom @ 2010-08-24 15:52 UTC (permalink / raw
To: help-gnu-emacs
On Aug 21, 11:07 pm, Suvayu Ali <fatkasuvayu+li...@gmail.com> wrote:
> On Saturday 21 August 2010 05:36 AM, George Kadianakis wrote:
>
> > Unfortunately, Semantic or etags don't have the functionality I look
> > for.
>
> > [1]:http://www.gnu.org/software/cflow/manual/cflow.html#Direct-and-Reverse
>
> Okay thanks, sorry couldn't be of much help and sorry for the noise.
>
> --
> Suvayu
>
> Open source is the future. It sets us free.
Take a look at this
http://www.spinellis.gr/cscout/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Call graph emacs tool
@ 2010-08-25 17:02 George Kadianakis
0 siblings, 0 replies; 11+ messages in thread
From: George Kadianakis @ 2010-08-25 17:02 UTC (permalink / raw
To: help-gnu-emacs
Gary wrote:
>George Kadianakis wrote:
>> I'd like it to be able to give me code paths that span
>> multiple files (cflow can only process a single source file).
>
>> [1]:
>> http://www.gnu.org/software/cflow/manual/cflow.html#Direct-and-Reverse
>
>Are you sure? "GNU cflow analyzes a *collection of* C source files and
>prints a graph, charting control flow within the program." (my
>emphasis).
Hey,
yeah I noticed the emphasized part in cflow's DESCRIPTION as well, but
by doing some brief checks and studying the online manual [1], I see
no sign of cflow being able to understand source file relationships.
I'm intrigued on writing this myself (most probably on top of cflow),
but I'm trying to avoid finding out in a week that this has already
been done.
Anyone else that is aware of such a tool is most welcome to post :)
PS: Sorry for fubaring the mail threading, but I'm not subscribed to
the list and I forgot to request CC:ing :)
[1]: http://www.gnu.org/software/cflow/manual/cflow.html
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-08-25 17:02 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-25 17:02 Call graph emacs tool George Kadianakis
-- strict thread matches above, loose matches on Subject: below --
2010-08-20 16:15 George Kadianakis
2010-08-21 1:38 ` Suvayu Ali
2010-08-21 1:50 ` Richard Riley
2010-08-21 3:04 ` Suvayu Ali
2010-08-21 3:13 ` Pranav Peshwe
2010-08-21 12:36 ` George Kadianakis
2010-08-21 16:18 ` Gary
2010-08-21 18:07 ` Suvayu Ali
[not found] ` <mailman.5.1282414155.26890.help-gnu-emacs@gnu.org>
2010-08-24 15:52 ` rustom
[not found] ` <mailman.0.1282394304.15763.help-gnu-emacs@gnu.org>
2010-08-21 15:35 ` rustom
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.