]> Git Repo - binutils.git/commitdiff
* symtab.c (COMPLETION_LIST_ADD_SYMBOL): If the symbol has a
authorJim Kingdon <[email protected]>
Thu, 2 Sep 1993 02:25:34 +0000 (02:25 +0000)
committerJim Kingdon <[email protected]>
Thu, 2 Sep 1993 02:25:34 +0000 (02:25 +0000)
demangling, don't put the mangled form in the completion list.

gdb/ChangeLog
gdb/symtab.c

index 1d6a856d6744b10574ef8cb06af8f78862214203..d5128a81184f1468a3a3bf24dc84b485585c21f7 100644 (file)
@@ -1,5 +1,8 @@
 Wed Sep  1 19:31:28 1993  Jim Kingdon  ([email protected])
 
+       * 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
index 9765e0bbae7ef6d35865f50b574528faabc50ac0..d43cdf88698c97b01d51d65d574a3121582c9e5b 100644 (file)
@@ -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
This page took 0.049074 seconds and 4 git commands to generate.