<div dir="ltr">This might reduce the functionality of the class-browser, because that one is based purely on the symbol table.<div><br></div><div>In general, I think this should not be necessary.</div><div><br></div><div>I'd try to ensure these things:</div><div>* Make sure you don't add function arguments to the symbol table</div><div>* Make sure you don't add local variables and local classes within functions to the symbol table</div><div>* Make sure you don't add the same objects from headers multiply</div><div>* I think, only in-project stuff should go into the symbol table, and not stuff from the standard library (need to re-check oldcpp regarding this)</div><div><br></div><div>Also, for cases like the linux kernel, there is the "simplified parsing" mode, which collects only a minimal amount of data (only function names and classes/namespaces I think). That should probably be implemented for clang too.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-18 21:34 GMT+02:00 Milian Wolff <span dir="ltr"><<a href="mailto:mail@milianw.de" target="_blank">mail@milianw.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Saturday 18 April 2015 15:00:31 Lucas Tanure wrote:<br>
> On Apr 18, 2015 1:40 PM, "Milian Wolff" <<a href="mailto:mail@milianw.de">mail@milianw.de</a>> wrote:<br>
> > On Saturday 18 April 2015 16:27:37 Lucas Tanure wrote:<br>
> > > Hi,<br>
> > ><br>
> > > The version of Linux doesn't matter, any version that I used got the<br>
><br>
> same<br>
><br>
> > > behavior.<br>
> ><br>
> > Will a release tarball do? Do I need to run configure or anything to get<br>
> > Makefiles generated, or is every setup in such a tarball already?<br>
><br>
> Jus git clone the Linus tree over <a href="http://git.kernel.com" target="_blank">git.kernel.com</a><br>
> Clean tree, do not run make config or anything else.<br>
> Maybe a tarball from Linux source it's good too.<br>
><br>
> > > I import as a project with Makefile. When the parse gets 50% of all<br>
><br>
> files<br>
><br>
> > > parsed the crash happens, more or less 4gb used of ram. I compiled<br>
> > > kdevelop, kdev-clang on debug mode.<br>
> ><br>
> > Did you need to setup any custom include paths or similar stuff? Or<br>
><br>
> should it<br>
><br>
> > crash even without this?<br>
><br>
> Nope, just git Clone and import.<br>
> We could talk over Google Hangouts or Skype, I really want this working,<br>
> but I don't understand the kdevelop and kdev-clang source.<br>
<br>
</span>Could you, in the meantime, try the following as a workaround please:<br>
<br>
diff --git a/duchain/tuduchain.h b/duchain/tuduchain.h<br>
index c289758..af2d5aa 100644<br>
--- a/duchain/tuduchain.h<br>
+++ b/duchain/tuduchain.h<br>
@@ -246,6 +246,9 @@ private:<br>
decl->setInternalContext(context);<br>
setDeclType<CK>(decl, type);<br>
setDeclInCtxtData<CK>(cursor, decl);<br>
+ if (decl->inSymbolTable() && decl->kind() == Declaration::Instance &&<br>
!decl->isFunctionDeclaration()) {<br>
+ decl->setInSymbolTable(false);<br>
+ }<br>
return decl;<br>
}<br>
<br>
But, considering that I could not find any such code in the oldcpp codebase, I<br>
actually wonder whether it's a good idea or not. What it does is ensuring no<br>
global variables or class members (except functions) get added to the symbol<br>
table. This might break other stuff which I have no time to test right now.<br>
But at least quickopen is not affected as we only care about functions and<br>
classes there anyways.<br>
<br>
Does anyone else have a clue whether the above is good or not?<br>
<br>
Bye<br>
<span class="im HOEnZb"><br>
--<br>
Milian Wolff<br>
<a href="mailto:mail@milianw.de">mail@milianw.de</a><br>
<a href="http://milianw.de" target="_blank">http://milianw.de</a><br>
</span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
KDevelop-devel mailing list<br>
<a href="mailto:KDevelop-devel@kde.org">KDevelop-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kdevelop-devel" target="_blank">https://mail.kde.org/mailman/listinfo/kdevelop-devel</a><br>
</div></div></blockquote></div><br></div>