User forums > Using Code::Blocks

How to edit linux kernel sources with code::blocks ?

(1/5) > >>

Brane2:
I have tried to use CB for kernel sources exporation, but it seems I ahve been going about it in wrong way.

I have unpacked sources in some directory X, then made new empty project with root in that directory and then tried to recursively add kernel's files to that project.

It worked for a first few maps with sources in X, but when quantity of files reasched over 27 k files, CB have just froze. It just never finished scanning phase.

I tried also to recursively add map X to the project, with same results.

I'm not interested in using C::B for building kernel ( although that would be nice ), just for helping me navigate files and function/variable/etc search etc...

Brane2:
I am bumping OP now.

I am now at svn version 5159 and it still doesn't work . I can add recursively into the project several maps, but when number of project files get into 10.000 range Codeblcks freeezes.

Am I doing something wrong ? I just want to have kernel sources opened as a project in order to be able to quickly find function and variable declarations & definitions etc etc.

It is not as if I asked the IDE to open all the sources simulatneously, just to add them to the project.

I understand that IDE has to scan them in order to have "map of variables etc", but since I have QC machine with 4Gig of RAM and plenty of swap and since all the kernel files combined take some ~1G, I don't understand why the program is choking with that.

Any ideas  ?

thomas:
My guess would be that the code completion plugin runs out of physical memory, it uses quite a lot of memory even for significantly less than 27,000 files. Normally that doesn't matter, but Linux is a lot of stuff, obviously.
Try if you get farther after disabling the code completion plugin.

Brane2:
Now, this totally baffles me.

I never thought that something might be wrong with plugins, so after peeking inside my script for setting things for configuring and compiling, I saw that I configured it with "--with-contrib-plugins=all" and I have all plugins active.

So I tried to disable them all, but CB then crashed n exit. So I disabled most of the plugins ( but left a few I felt are essential ) and everything started to work !

I could start empty project and import whole kernel sources into it ( some 20 k files ).

Funny thing is, code completion doesn't seem to be the culprit. Even more, even as I enabled all plugins back, emptied the project and reimported everything back, everything worked ! Import is slow, but once it is finished, it works. It seems that some of the plugins keep doing something in the background as CB starts eating some 5% CPU time for maybe 30sec every two minutes or so...

When starts, CB alone eats some 30MB. With all modules active that climbs to some 1.2G after importing whole kernel .

System works fine and not in any way pressed for memory - it seems that memory is swappable, so there seems to be no problem now...

Anyway, many thanks for the advice. It worked. I have no idea how, but the effect is certainly welcome ;o)


Der Meister:
Just out of curiosity: Do you know which plugin is the problematic one? And if not, do you have any time to do some more testing? Would be quite helpfull to know the problematic plugin to remove this bottleneck, if possible.

Navigation

[0] Message Index

[#] Next page

Go to full version