[RFC-version3] Fix completion bug for directories

Tom Tromey tromey@redhat.com
Wed Mar 25 00:50:00 GMT 2009


>>>>> "Pierre" == Pierre Muller <muller@ics.u-strasbg.fr> writes:

Pierre> This is a new patch to fix the problem with completion on
Pierre> directories.

Oh, nice.  This has bothered me a bit.  I even dug into it once, but
it looked like a pain.

Thanks for posting URLs of the previous revisions of this patch.  That
helps a lot.

One question I have is whether this works with the "complete" command.
(I suspect it does not.)  When I looked into this I sort of concluded
that we would be better off not messing with readline's notions of
word breaks, and furthermore that we'd be better off just adding
filename completion directly to gdb.  But, that was a lot more work
than I wanted to do...

I'd really like it to work with "complete", since that is what Emacs
uses :-).  But I suppose it is not really a requirement for the patch
-- it remains an improvement even if it is not "perfect".

Pierre> I do get some random success/failure differences
Pierre> in 
Pierre> gdb.threads/schedlock.exp
Pierre> or
Pierre> gdb.threads/attach-into-signal.exp
Pierre> but I understood from other emails that these are 
Pierre> non-deterministic tests that do fail/succeed more or less
Pierre> randomly.

Yes, that's correct.

Pierre>   Apparently, there are no listings of the header
Pierre> dependencies in Makefile.in anymore, I suppose that
Pierre> these are now generated automatically somehow now, is this right?

Yes, dependency tracking is now automatic.

Pierre> I didn't find anything in the generated Makefile,
Pierre> how does that work?

The dependencies themselves are stored in a .deps subdir.
You need GNU make for this feature to be enabled.
I can provide a fuller explanation if you want...


A few nits on the patch:

+   if REASON is handle_brkchars:

Capitalize: "If".  There's a few of these.

+   depending gon the current command in line_buffer.

Typo: s/gon/on/

    When FOR_HELP is false, we will call a sub-command's completion
-   function.  */
+   function.

It seems to me that this entire sentence ought to be deleted.

This patch is ok with those changes.  Thanks!

Tom



More information about the Gdb-patches mailing list