This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Patch to limit field name completion candidates


>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:

>> In that case, nothing will call mark_struct_expression, and so the
>> completion machinery will not attempt field name completion.

Daniel> Right.  But this would appear to be a bug from the user's point of
Daniel> view.  We'll just call it a hypothetical limitation of the
Daniel> implementation :-)

Ah, yeah, I see what you mean: there can definitely be losing cases.
For instance if you try to complete "nonexistingThing->", you'll just
get all the symbols again.

I'm not sure what to do here... I guess we could try to get completion
to print an error to the user.  This could affect only the situation
where we thought we could complete a field name based on the syntax,
but then failed during "semantic analysis".  (I don't know offhand if
readline can do this for us or not.)

Another thing not accounted for in this implementation is that for
some languages you may want to complete more things.  For instance,
this would have to be expanded to work properly for Java, because in
Java you can have a type name, a field name, or method name after ".".
I think this isn't a big problem; the current code is, IMO, a decent
step in that direction.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]