aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-09-02 02:25:34 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-09-02 02:25:34 +0000
commit67a64bec4e4d4dfb23069065ec8cc6e68d8feca6 (patch)
tree8a0e179c603c85834d1fee22d7170c34e475e01d /gdb/symtab.c
parent996ccb3043d9237ea8e6e79d6a7c6121b15f9e61 (diff)
downloadgdb-67a64bec4e4d4dfb23069065ec8cc6e68d8feca6.zip
gdb-67a64bec4e4d4dfb23069065ec8cc6e68d8feca6.tar.gz
gdb-67a64bec4e4d4dfb23069065ec8cc6e68d8feca6.tar.bz2
* symtab.c (COMPLETION_LIST_ADD_SYMBOL): If the symbol has a
demangling, don't put the mangled form in the completion list.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 9765e0b..d43cdf8 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<TAB>" completes to "b foo(int, int)" */ \
+ /* Disadvantage: "b foo__i<TAB>" 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