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] |
This is a new patch to fix the problem with completion on directories. Please see http://sourceware.org/ml/gdb-patches/2008-07/msg00072.html and http://sourceware.org/ml/gdb-patches/2008-07/msg00120.html as these contain previous versions of my patch. To summarize, when you try to complete (gdb) dir /usr/inclu by pressing TAB key, readline completion uses a default set of characters to find out the last 'word' of a command line, and, as '/' is in this set, only 'inclu' is sent as text argument to complete_line. The rl_completion_word_break_hook allows to adapt the set of word_break characters to the current command, and thus suppress '/' from the list if a directory completion is expected. I ran the patch on two computer from the compile farm, to which I now have access and besides the new test that I added that succeeds with my patch and fails without, I do get some random success/failure differences in gdb.threads/schedlock.exp or gdb.threads/attach-into-signal.exp but I understood from other emails that these are non-deterministic tests that do fail/succeed more or less randomly. Pierre Muller Pascal language support maintainer for GDB PS: Apparently, there are no listings of the header dependencies in Makefile.in anymore, I suppose that these are now generated automatically somehow now, is this right? I didn't find anything in the generated Makefile, how does that work? gdb/ChangeLog entry: 2009-03-11 Pierre Muller <muller@ics.u-strasbg.fr> Fix completer problem for filename completion on the first try. * gdb/completer.h (gdb_completion_word_break_characters): New function. * gdb/completer.c: Include gdb_assert.h. (complete_line_internal_reason): New enum. (complete_line_internal): Change last argument type to complete_line_internal_reason. Modify function to handle the different complete_line_internal_reason argument values. (complete_line): Adapt to change in complete_line_internal. (command_completer): Ditto. (gdb_completion_word_break_characters): Implement new function. * top.c (init_main): Set rl_completion_word_break_hook to gdb_completion_word_break_characters. gdb/testsuite/ChangeLog entry: 2009-03-11 Pierre Muller <muller@ics.u-strasbg.fr> * gdb.base/completion.exp: Add a test for directory completion.
Attachment:
completer-v3.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |