Codelite call tree Cflow

Discussion about CodeLite development process and patches
shaunepee
CodeLite Curious
Posts: 3
Joined: Tue Oct 25, 2011 10:53 pm
Genuine User: Yes
IDE Question: c++
Contact:

Codelite call tree Cflow

Post by shaunepee »

Hi, can anyone help? I'm trying to produce the call tree for Codelite using Cflow and get the following output, not what I expected. What I expected was the first line to contain main...... which is used to start the whole process off. Can anyone point me in the right direction to correct file that should be called first for main?


1 CompareCaseInsensitive() <int CompareCaseInsensitive () at sdk/wxscintilla/src/scintilla/lexlib/CharacterSet.cxx:25>:
2 MakeUpperCase() <inline char MakeUpperCase () at sdk/wxscintilla/src/scintilla/lexlib/CharacterSet.h:135>:
3 CompareNCaseInsensitive() <int CompareNCaseInsensitive () at sdk/wxscintilla/src/scintilla/lexlib/CharacterSet.cxx:40>:
4 MakeUpperCase() <inline char MakeUpperCase () at sdk/wxscintilla/src/scintilla/lexlib/CharacterSet.h:135>:
5 CreateAsyncProcess() <IProcess *CreateAsyncProcess () at CodeLite/asyncprocess.cpp:12>:
6 Execute() <:Execute () at sdk/wxscintilla/src/scintilla/src/RESearch.cxx:753>
7 wxUnusedVar()
8 GetRealType() <wxString GetRealType () at Plugin/debuggersettings.cpp:95> (R):
9 realType()
10 wxT()
11 Trim()
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Codelite call tree Cflow

Post by DavidGH »

Hi,

I've not used cflow before, and trying a quick trial I failed to work out how to invoke it for CodeLite (which has non-trivial locations for source and .o files). What did you do to get that output?

One possible problem is that wxWidgets programs like CodeLite don't have a visible main() function; it's hidden inside the IMPLEMENT_APP macro. Maybe cflow fails to see it. Another is that CodeLite uses multiple threads; I wonder if cflow is looking at the correct one.

Regards,

David
shaunepee
CodeLite Curious
Posts: 3
Joined: Tue Oct 25, 2011 10:53 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Codelite call tree Cflow

Post by shaunepee »

Hi David thanks for your reply, I created the output by amending the make file to include a Cflow option wich included all the cpp files. I've tried looking for the IMPLEMENT_APP maco but not sure what you mean by it.

cheers Shaun
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Codelite call tree Cflow

Post by DavidGH »

In LiteEditor/app.cpp is the line:
IMPLEMENT_APP(CodeLiteApp)

IMPLEMENT_APP is a macro that does main() in a cross-platform way. See wx/include/wx/app.h in the wxWidgets source for the gory details.

Why not try skipping it, by doing:
cflow --main clMainFrame::Initialize <file-list>

(I hope that's the correct syntax for a C++ class function...)
shaunepee
CodeLite Curious
Posts: 3
Joined: Tue Oct 25, 2011 10:53 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Codelite call tree Cflow

Post by shaunepee »

Thanks David, I take it then that the LiteEditor is the main program and the following are modules that the lite editor uses or are they part of the main program?

SQLite Scintilla ShapeFramework DatabaseLayerSQLite CodeLite SDK codelite_indexer codelite_cppcheck Plugins
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Codelite call tree Cflow

Post by DavidGH »

It's complicated; but the main frame is part of LiteEditor, so that's where I'd start from.

Of course, if you are mainly interested in investigating e.g. the debugger, then start from there instead.
Post Reply