Debugger: should expressionUnderCursor use the DUCain?

Niko Sams niko.sams at gmail.com
Sun Mar 21 11:41:09 UTC 2010


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.
Thow issues with this implementation:
- it's buggy (https://bugs.kde.org/show_bug.cgi?id=231466) - but that
can be fixed
- 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)

Any comments on this?

Niko




More information about the KDevelop-devel mailing list