Page 1 of 1

Codelite call tree Cflow

Posted: Tue Oct 25, 2011 11:07 pm
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()

Re: Codelite call tree Cflow

Posted: Wed Oct 26, 2011 1:52 pm
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

Re: Codelite call tree Cflow

Posted: Thu Oct 27, 2011 9:20 pm
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

Re: Codelite call tree Cflow

Posted: Fri Oct 28, 2011 12:30 am
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...)

Re: Codelite call tree Cflow

Posted: Tue Nov 01, 2011 1:46 am
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

Re: Codelite call tree Cflow

Posted: Tue Nov 01, 2011 2:29 pm
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.