Debugger: should expressionUnderCursor use the DUCain?
ghost at cs.msu.su
Sun Mar 21 12:52:10 UTC 2010
Niko Sams wrote:
> The current implementation of
> VariableController::expressionUnderCursor (should return
> the string of the variable that should be shown in the variable
> tooltip) parses the text
Yes. Back then, David told me that's the right way.
> 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.
> - 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.
More information about the KDevelop-devel