Debugger: should expressionUnderCursor use the DUCain?

David Nolden zwabel at googlemail.com
Sun Mar 21 13:41:07 UTC 2010


Am Sonntag 21 März 2010 13:52:10 schrieb Vladimir Prus:
> Niko Sams wrote:
> > Hi,
> >
> > The current implementation of
> > VariableController::expressionUnderCursor (should return
> > the string of the variable that should be shown in the variable
> > tooltip) parses the text
> > manually.
> 
> Yes. Back then, David told me that's the right way.
No, I told you it's the most _simple_ way ;-). Although often the most simple 
way is also the right way at the same time.

> > Thow issues with this implementation:
> > - it's buggy (https://bugs.kde.org/show_bug.cgi?id=231466) - but that
> > can be fixed
> 
> I believe I saw some other bugs along the same lines.
> 
> > - it shows the popup for basically everyting (functions, macros, even
> > comments) while it should
> >   only for variables (we could simply ignore this)
> >
> > And we have the data in the DUChain - why not use it; a simple
> > findContextAt and findDeclarationAt
> > should do it.
> >
> > Issues:
> > - it only works when the file is parsed correctly (projects may not be
> > setup correctly etc)
> > - gdb supports much more than just c/c++ (but atm we don't)
> 
> I am a bit nervous about expecting full-blown parsing to be available
> for tooltips to work. You can very well step into code that is not
> built by KDevelop at all, and you won't have include paths for that,
> or the parsing might not be yet complete.

That is true, it definitely shouldn't completely depend on it.




More information about the KDevelop-devel mailing list