With this new completion limiting feature that was introduced by ef0b411a, an internal error was introduced: (gdb) break gdb.c:ma<TAB> ./../src/gdb/completer.c:837: internal-error: maybe_add_completion: Assertion `tracker != NULL' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) y This happens because location_completer (completer.c) calls make_file_symbol_completion_list without ever calling default_make_symbol_completion_list_break_on_1. It is only this last function which initializes this (file-)global variable. Why the use of a global? Shouldn't this have been something passed around the completion API? It seems the test suite does not have a test for FILE:FUNCTION anywhere. I only noticed this because my breakpoint location API patchset uses make_file_symbol_completion_list and *tests it*.
I don't mind the tracker being global state given that we were already using global state to record results. A good next step would be to remove the global state though. Working on a fix ...
On 02/13/2015 07:58 AM, gbenson at redhat dot com wrote: > https://sourceware.org/bugzilla/show_bug.cgi?id=17960 > > Gary Benson <gbenson at redhat dot com> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| |gbenson at redhat dot com > PS. I am working on a patch for this. Just have some cleanups and testing to finish up. Keith
*** Bug 18045 has been marked as a duplicate of this bug. ***
Temp fix until Keith's more complete patch is ready posted here: https://sourceware.org/ml/gdb-patches/2015-02/msg00830.html
The master branch has been updated by Doug Evans <devans@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e27852be65403306da198b3c1d7b222acd6bdfe9 commit e27852be65403306da198b3c1d7b222acd6bdfe9 Author: Doug Evans <dje@google.com> Date: Mon Aug 10 12:23:09 2015 -0700 PR gdb/17960 Internal error: tracker != NULL when completing on file:function gdb/ChangeLog: * symtab.c (make_file_symbol_completion_list_1): Renamed from make_file_symbol_completion_list and made static. (make_file_symbol_completion_list): New function. gdb/testsuite/ChangeLog: * gdb.base/completion.exp: Add location completer tests.
The gdb-7.10-branch branch has been updated by Doug Evans <devans@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3649abf39ee70a6237a06df85cf027dcc0d03c56 commit 3649abf39ee70a6237a06df85cf027dcc0d03c56 Author: Doug Evans <dje@google.com> Date: Mon Aug 10 13:37:46 2015 -0700 PR gdb/17960 Internal error: tracker != NULL when completing on file:function gdb/ChangeLog: * symtab.c (make_file_symbol_completion_list_1): Renamed from make_file_symbol_completion_list and made static. (make_file_symbol_completion_list): New function. gdb/testsuite/ChangeLog: * gdb.base/completion.exp: Add location completer tests.
Keith, is this still relevant, or can we close this PR?
(In reply to Tom Tromey from comment #7) > Keith, is this still relevant, or can we close this PR? Looks like this is no longer an issue (and hasn't been for some time), so I'll close this. Thank you for pointing this out.