From 67a64bec4e4d4dfb23069065ec8cc6e68d8feca6 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Thu, 2 Sep 1993 02:25:34 +0000 Subject: [PATCH] * symtab.c (COMPLETION_LIST_ADD_SYMBOL): If the symbol has a demangling, don't put the mangled form in the completion list. --- gdb/ChangeLog | 3 +++ gdb/symtab.c | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1d6a856d67..d5128a8118 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ Wed Sep 1 19:31:28 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + * symtab.c (COMPLETION_LIST_ADD_SYMBOL): If the symbol has a + demangling, don't put the mangled form in the completion list. + * symtab.c, symfile.c, c-exp.y, ch-exp.y, m2-exp.y, buildsym.c, symfile.h, stabsread.c, minsyms.c, solib.c, nlmread.c, dwarfread.c partial-stab.h, symmisc.c, gdbtypes.c: Lint. Remove (or put diff --git a/gdb/symtab.c b/gdb/symtab.c index 9765e0bbae..d43cdf8869 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -2666,11 +2666,15 @@ static char **return_val; #define COMPLETION_LIST_ADD_SYMBOL(symbol, sym_text, len, text, word) \ do { \ - completion_list_add_name (SYMBOL_NAME (symbol), (sym_text), (len), \ - (text), (word)); \ if (SYMBOL_DEMANGLED_NAME (symbol) != NULL) \ + /* Put only the mangled name on the list. */ \ + /* Advantage: "b foo" completes to "b foo(int, int)" */ \ + /* Disadvantage: "b foo__i" doesn't complete. */ \ completion_list_add_name \ (SYMBOL_DEMANGLED_NAME (symbol), (sym_text), (len), (text), (word)); \ + else \ + completion_list_add_name \ + (SYMBOL_NAME (symbol), (sym_text), (len), (text), (word)); \ } while (0) /* Test to see if the symbol specified by SYMNAME (which is already -- 2.34.1