* utils.c (fputs_demangled, fprint_symbol): Remove.
authorFred Fish <fnf@specifix.com>
Thu, 11 Mar 1993 19:27:51 +0000 (19:27 +0000)
committerFred Fish <fnf@specifix.com>
Thu, 11 Mar 1993 19:27:51 +0000 (19:27 +0000)
* utils.c (fprintf_symbol_filtered):  New function which combines
the functionality of fputs_demangled and fprint_symbol.  Uses a
caller provided language parameter to select the appropriate
demangler, and caller provided args to pass to the demangler.
* defs.h (fputs_demangled, fprint_symbol):  Remove prototypes.
* defs.h (fprintf_symbol_filtered):  Add prototype.
* c-typeprint.c (cp_type_print_method_args):  Replace calls to
fputs_demangled with call to fprintf_symbol_filtered.
* cp-valprint.c (demangle.h):  Include
* cp-valprint.c (cp_print_value_fields):  Replace calls to
fprint_symbol with calls to fprintf_symbol_filtered.
* printcmd.c (print_frame_args):  Replace call to fprint_symbol
with call to fprintf_symbol_filtered.
* stack.c (print_frame_info, frame_info):  Add language variable
to pass to fprintf_symbol_demangled and initialize it from the
symbol's language.  Replace calls to fputs_demangled with calls
to fprintf_symbol_filtered.
* symtab.c (find_methods):  Replace call to fputs_demangled with
call to fprintf_symbol_filtered.
**** start-sanitize-chill ****
* ch-valprint.c (demangle.h):  Include.
* ch-valprint.c (chill_print_value_fields):  Replace call to
fprint_symbol with call to new fprintf_symbol_filtered.
**** end-sanitize-chill ****

gdb/ChangeLog
gdb/c-typeprint.c
gdb/ch-valprint.c
gdb/cp-valprint.c
gdb/stack.c
gdb/symtab.c

index cbc0a08..ea8c8f9 100644 (file)
@@ -1,20 +1,34 @@
 Thu Mar 11 09:33:01 1993  Fred Fish  (fnf@cygnus.com)
 
-       * utils.c (fputs_demangled):  Complete rewrite to clean up and
-       add a language parameter that is used to select the demangling
-       algorithm.
+       * utils.c (fputs_demangled, fprint_symbol):  Remove.
+       * utils.c (fprintf_symbol_filtered):  New function which combines
+       the functionality of fputs_demangled and fprint_symbol.  Uses a
+       caller provided language parameter to select the appropriate 
+       demangler, and caller provided args to pass to the demangler.
        * defs.h (enum language):  Move further up in file so enum can
        be used in prototypes.
-       * defs.h (fputs_demangled):  Update prototype to add lang arg.
-       * c-typeprint.c (cp_type_print_method_args):  Add language arg
-       to fputs_demangled calls, remove DMGL_PARAMS flag.
+       * defs.h (fputs_demangled, fprint_symbol):  Remove prototypes.
+       * defs.h (fprintf_symbol_filtered):  Add prototype.
+       * c-typeprint.c (cp_type_print_method_args):  Replace calls to
+       fputs_demangled with call to fprintf_symbol_filtered.
+       * cp-valprint.c (demangle.h):  Include
+       * cp-valprint.c (cp_print_value_fields):  Replace calls to
+       fprint_symbol with calls to fprintf_symbol_filtered.
+       * printcmd.c (print_frame_args):  Replace call to fprint_symbol
+       with call to fprintf_symbol_filtered.
        * stack.c (print_frame_info):  Remove obsolete code so we don't
        have to update fputs_demangled usage in it.
        * stack.c (print_frame_info, frame_info):  Add language variable
-       to pass to fputs_demangled and initialize it from the symbol's
-       language.  Call fputs_demangled with language arg.
-       * symtab.c (find_methods):  Add language arg to fputs_demangled
-       call.
+       to pass to fprintf_symbol_demangled and initialize it from the
+       symbol's language.  Replace calls to fputs_demangled with calls
+       to fprintf_symbol_filtered.
+       * symtab.c (find_methods):  Replace call to fputs_demangled with
+       call to fprintf_symbol_filtered.
+       **** start-sanitize-chill ****
+       * ch-valprint.c (demangle.h):  Include.
+       * ch-valprint.c (chill_print_value_fields):  Replace call to
+       fprint_symbol with call to new fprintf_symbol_filtered.
+       **** end-sanitize-chill ****
 
 Wed Mar 10 17:37:11 1993  Fred Fish  (fnf@cygnus.com)
 
index 16123af..86c5234 100644 (file)
@@ -151,8 +151,8 @@ cp_type_print_method_args (args, prefix, varstring, staticp, stream)
 {
   int i;
 
-  fputs_demangled (prefix, stream, DMGL_ANSI, language_cplus);
-  fputs_demangled (varstring, stream, DMGL_ANSI, language_cplus);
+  fprintf_symbol_filtered (stream, prefix, language_cplus, DMGL_ANSI);
+  fprintf_symbol_filtered (stream, varstring, language_cplus, DMGL_ANSI);
   fputs_filtered (" (", stream);
   if (args && args[!staticp] && args[!staticp]->code != TYPE_CODE_VOID)
     {
index 40d1553..c0ec4f7 100644 (file)
@@ -25,6 +25,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "expression.h"
 #include "value.h"
 #include "language.h"
+#include "demangle.h"
 
 static void
 chill_print_value_fields PARAMS ((struct type *, char *, FILE *, int, int,
@@ -266,7 +267,8 @@ chill_print_value_fields (type, valaddr, stream, format, recurse, pretty,
            {
              wrap_here (n_spaces (2 + 2 * recurse));
            }
-         fprint_symbol (stream, TYPE_FIELD_NAME (type, i));
+         fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
+                                  language_chill, DMGL_NO_OPTS);
          fputs_filtered (" = ", stream);
          if (TYPE_FIELD_PACKED (type, i))
            {
index 071f77f..3e40685 100644 (file)
@@ -25,6 +25,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "value.h"
 #include "command.h"
 #include "gdbcmd.h"
+#include "demangle.h"
 
 int vtblprint;                 /* Controls printing of vtbl's */
 int objectprint;               /* Controls looking up an object's derived type
@@ -259,14 +260,20 @@ cp_print_value_fields (type, valaddr, stream, format, recurse, pretty,
                fputs_filtered ("\"( ptr \"", stream);
              else
                fputs_filtered ("\"( nodef \"", stream);
-             fprint_symbol (stream, TYPE_FIELD_NAME (type, i));
+             fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
+                                      language_cplus,
+                                      DMGL_PARAMS | DMGL_ANSI);
              fputs_filtered ("\" \"", stream);
-             fprint_symbol (stream, TYPE_FIELD_NAME (type, i));
+             fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
+                                      language_cplus,
+                                      DMGL_PARAMS | DMGL_ANSI);
              fputs_filtered ("\") \"", stream);
            }
          else
            {
-             fprint_symbol (stream, TYPE_FIELD_NAME (type, i));
+             fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
+                                      language_cplus,
+                                      DMGL_PARAMS | DMGL_ANSI);
              fputs_filtered (" = ", stream);
            }
          if (TYPE_FIELD_PACKED (type, i))
index e9757d0..31d7b28 100644 (file)
@@ -201,7 +201,8 @@ print_frame_info (fi, level, source, args)
       if (addressprint)
        if (fi->pc != sal.pc || !sal.symtab)
          printf_filtered ("%s in ", local_hex_string(fi->pc));
-      fputs_demangled (funname ? funname : "??", stdout, 0, funlang);
+      fprintf_symbol_filtered (stdout, funname ? funname : "??", funlang,
+                              DMGL_NO_OPTS);
       wrap_here ("   ");
       fputs_filtered (" (", stdout);
       if (args)
@@ -413,7 +414,8 @@ frame_info (addr_exp, from_tty)
   if (funname)
     {
       printf_filtered (" in ");
-      fputs_demangled (funname, stdout, DMGL_ANSI | DMGL_PARAMS, funlang);
+      fprintf_symbol_filtered (stdout, funname, funlang,
+                              DMGL_ANSI | DMGL_PARAMS);
     }
   wrap_here ("   ");
   if (sal.symtab)
index c31d7b6..c7a2178 100644 (file)
@@ -1389,8 +1389,8 @@ find_methods (t, name, sym_arr)
                else
                  {
                    fputs_filtered("(Cannot find method ", stdout);
-                   fputs_demangled(phys_name, stdout, DMGL_PARAMS,
-                                   language_cplus);
+                   fprintf_symbol_filtered (stdout, phys_name,
+                                            language_cplus, DMGL_PARAMS);
                    fputs_filtered(" - possibly inlined.)\n", stdout);
                  }
              }