Add completion to cobcd's function arguments
Unexpectedly my proof-of-concept for completion of the variables for cprint found its way into 4.23. I don't complain :-)
One thing to remember: GDB has no support for a language that allows hyphenated words, therefore if completion "stops" there this is no issue of cobcd.py but of GDB. I'll likely get in contact with the GDB folks about that "relative soon".
Completion should work with any words that don't contain hyphens already. The missing bits are:
- make it available to every function
- move the poc-code out of cprint to a new function
varComplete
in a static object, which is then called by cprint, passing the current variable and return the possible completions - this can then be used in cwatch directly
- for
cbreak
thecomplete()
would have to take the context into account, if the current word on the first place is "se" complete to "section", after a possible "if" trigger the variable completion
- move the poc-code out of cprint to a new function
- either directly or later: add completion of section names - this likely need adjustments in cobc to include the section (and as preparation the paragraph) names in a new string table; maybe it is possible to "query" them from the symbol list already (somewhere the generated labels should be visible)?