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


On Thu, Jun 05, 2008 at 01:21:02PM -0600, Tom Tromey wrote:
> Daniel> I am concerned that relying on the parser to parse incomplete
> Daniel> expressions will not work out.  The bodies won't be run until the rule
> Daniel> is reduced, and there may not be enough context in what the user has
> Daniel> typed to reduce the field completion.  I'm not sure that's a real
> Daniel> problem, but I worry that it will be fragile.  Still - clearly better
> Daniel> than nothing.
> 
> I thought about this too, but I couldn't think of a failing case.
> 
> We aren't parsing complete expressions, true, but I think by the time
> the COMPLETE token is reduced, we will have reduced the entire LHS of
> the struct op expression.  And, we throw away the rest of the
> expression -- all the malformed parts.
> 
> So, I think it ought to be safe in all cases.

Safe, yes.  That's not the failure mode I was worried about.  I'm
wondering if we will ever error out before we reduce the COMPLETE.
But it seems to work so far.

> Daniel> Oh, and at least a NEWS entry would be good - and probably a
> Daniel> manual change too.
> 
> I added a NEWS entry.  I am not sure where in the manual to add
> anything though.  FWIW I didn't do this originally since it seems more
> like a QoI thing than a feature requiring documentation.

Yes, I understand - but at the same time, the more of our QoI we crow
about, the more users will take advantage of it, and the cooler
they'll think GDB is.  If it was worth implementing, it's also worth
documenting.

Another example near the bottom of Command Completion would probably
do it.

The patch and test are OK!  Work out the NEWS and manual bits with
Eli, and you're home free.

-- 
Daniel Jacobowitz
CodeSourcery


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