Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Debugging code completion plugin

<< < (3/4) > >>

ollydbg:

--- Quote from: Pecan on August 27, 2013, 11:55:50 pm ---To recreate the CC root scan quirk:

Download:
https://dl.dropboxusercontent.com/u/46870262/iccv8cortexCCRootScan.7z

Unpack and place the folder iccv8cortex at the root of drive c:\

Load the examples project:
c:\iccv8cortex\examples.cortex\examples.workspace

Alt-G to load tasks.c
Alt-G to load croutine.c

close workspace, then reload it.
CC will scan all of the hard disk starting at root C:\
 


--- End quote ---
Thanks for the example projects. But I can't reproduce this bug.
What is your CC setting? One parser per project(in this case the maximal allowed parser number is?) or one parser for the whole workspace?

Besides that, how do you know "CC scan the root of C:\"?  Can you put a breakpoint in the line below (in plugins\codecompletion\systemheadersthread.cpp):


--- Code: ---        HeaderDirTraverser traverser(this, m_SystemHeadersThreadCS, m_SystemHeadersMap, dirs[i]);
        dir.Traverse(traverser, wxEmptyString, wxDIR_FILES | wxDIR_DIRS);

--- End code ---

Then you can see what is the actual dir the Traverser's working one. If it contains a C:\, then the traverser will scan all the files/sub-folders of the C:\.

Jenna:
I just tested the workspace (but I do not have icc installed, just gcc).

After opening the workspace everything is okay, symbolsbrowser shows "Everything", but switching to "Curent file" starts hdd-activity for a long time (C::B is not responsible).
Parser-settings are "One parser per project) with a maximum of 5 parsers.

The funny thing is, that I am not able to reproduce this behaviour, neither by clicking "Reparse now", by closing and reopneing the workspace or by closing and reopening C::B.

I can not debug the sources here (at work) and I use the 12.11 release.
I can try to do tests with trunk on win7, xp and win8 this evening.

Jenna:
What I find if I start C::B with debug-log is:

--- Code: ---Traversing 'C:\iccv8cortex\examples.cortex\FreeRTOS\Source' for: tasks.*
Traversing ' - C:\' for: tasks.*
Found 1 files:
- C:\iccv8cortex\examples.cortex\FreeRTOS\Source\tasks.c

--- End code ---

But even renaming the folder, so that it starts with "Z"  the file is found nearly immediately (without much hdd-activity).

Pecan:
Be sure that View: is set to "Current File's symbols" and that task.c and croutine.c is loaded in the editor.

"Use one parser per project" is set.

Yes, I've set the trap and GetTopLevelPath() hands back "C:\" to CC.


svn build  rev 9271 (2013-08-18 05:51:11)   gcc 4.6.1 Windows/unicode - 32 bit

Note below that C:\ is being traversed.
NativeParser::GetAllPathsByFilename(): Traversing ' - C:\' for: croutine.*


--- Code: ---NativeParser::DoFullParsing(): Adding three kind of files to batch-parser
NativeParser::DoFullParsing(): Added 127 header&source file(s) for project 'FreeRTOS_NXP_demo' to batch-parser...
NativeParser::CreateParser(): Finish creating a new parser for project 'FreeRTOS_NXP_demo'
NativeParser::OnParsingOneByOneTimer(): Start switch from OnParsingOneByOneTimer
NativeParser::GetAllPathsByFilename(): Traversing 'C:\iccv8cortex\examples.cortex\FreeRTOS\Source' for: croutine.*
NativeParser::GetAllPathsByFilename(): Traversing ' - C:\' for: croutine.*
NativeParser::GetAllPathsByFilename(): Found 1 files:
- C:\iccv8cortex\examples.cortex\FreeRTOS\Source\croutine.c
Switch parser to project 'FreeRTOS_NXP_demo'
ClassBrowser::OnThreadEvent(): Updating class browser...
NativeParser::OnParserStart(): Starting batch parsing for project 'FreeRTOS_NXP_demo'...
ClassBrowser::OnThreadEvent(): Class browser updated.
NativeParser::OnParserEnd(): Project 'FreeRTOS_NXP_demo' parsing stage done!
Project 'FreeRTOS_NXP_demo' parsing stage done (126 total parsed files, 3262 tokens in 0 minute(s), 1.014 seconds).
NativeParser::GetAllPathsByFilename(): Traversing 'C:\iccv8cortex\examples.cortex\FreeRTOS\Source' for: croutine.*
NativeParser::GetAllPathsByFilename(): Traversing ' - C:\' for: croutine.*
NativeParser::GetAllPathsByFilename(): Found 1 files:
- C:\iccv8cortex\examples.cortex\FreeRTOS\Source\croutine.c
ClassBrowser::OnThreadEvent(): Updating class browser...
ClassBrowser::OnThreadEvent(): Class browser updated.

--- End code ---

Jenna:
That's similar to my output, but as written it was slow the first time and then it found the file immediately.
Maybe WinXP has kept the index of the hdd in memory (3.3 GB Ram on the laptop I used for testing).
I will try it on virtual WinXP, Win7 and Win8 this evening.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version