* vax-tdep.c (INVALID_FLOAT, MAXLEN, NOPCODES): Don't define.
[deliverable/binutils-gdb.git] / gdb / expprint.c
index ed9d50ddf54b268d5337101598619ab748330a43..d0e940b3821c25c960c56360009ef3889c7cad23 100644 (file)
@@ -1,6 +1,7 @@
 /* Print in infix form a struct expression.
+
    Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
-   1998, 1999, 2000 Free Software Foundation, Inc.
+   1998, 1999, 2000, 2003 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -29,6 +30,7 @@
 #include "frame.h"             /* For frame_map_regnum_to_name.  */
 #include "target.h"
 #include "gdb_string.h"
+#include "block.h"
 
 #ifdef HAVE_CTYPE_H
 #include <ctype.h>
@@ -106,12 +108,12 @@ print_subexp (register struct expression *exp, register int *pos,
        b = exp->elts[pc + 1].block;
        if (b != NULL
            && BLOCK_FUNCTION (b) != NULL
-           && SYMBOL_SOURCE_NAME (BLOCK_FUNCTION (b)) != NULL)
+           && SYMBOL_PRINT_NAME (BLOCK_FUNCTION (b)) != NULL)
          {
-           fputs_filtered (SYMBOL_SOURCE_NAME (BLOCK_FUNCTION (b)), stream);
+           fputs_filtered (SYMBOL_PRINT_NAME (BLOCK_FUNCTION (b)), stream);
            fputs_filtered ("::", stream);
          }
-       fputs_filtered (SYMBOL_SOURCE_NAME (exp->elts[pc + 2].symbol), stream);
+       fputs_filtered (SYMBOL_PRINT_NAME (exp->elts[pc + 2].symbol), stream);
       }
       return;
 
@@ -220,7 +222,7 @@ print_subexp (register struct expression *exp, register int *pos,
          }
        fprintf_unfiltered (stream, "]");
        /* "selector" was malloc'd by target_read_string. Free it.  */
-       free (selector);
+       xfree (selector);
        return;
       }
 
@@ -267,8 +269,6 @@ print_subexp (register struct expression *exp, register int *pos,
        }
       else
        {
-         /* OBSOLETE int is_chill = exp->language_defn->la_language == language_chill; */
-         /* OBSOLETE fputs_filtered (is_chill ? " [" : " {", stream); */
          fputs_filtered (" {", stream);
          for (tem = 0; tem < nargs; tem++)
            {
@@ -278,7 +278,6 @@ print_subexp (register struct expression *exp, register int *pos,
                }
              print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
            }
-         /* OBSOLETE fputs_filtered (is_chill ? "]" : "}", stream); */
          fputs_filtered ("}", stream);
        }
       return;
@@ -286,29 +285,15 @@ print_subexp (register struct expression *exp, register int *pos,
     case OP_LABELED:
       tem = longest_to_int (exp->elts[pc + 1].longconst);
       (*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
-
-#if 0
-      if (0 /* OBSOLETE exp->language_defn->la_language == language_chill */)
-       { /* OBSOLETE */
-         fputs_filtered (".", stream); /* OBSOLETE */
-         fputs_filtered (&exp->elts[pc + 2].string, stream); /* OBSOLETE */
-         fputs_filtered (exp->elts[*pos].opcode == OP_LABELED ? ", " /* OBSOLETE */
-                         : ": ", /* OBSOLETE */
-                         stream); /* OBSOLETE */
-       } /* OBSOLETE */
-      else /* OBSOLETE */
-#endif
-       {
-         /* Gcc support both these syntaxes.  Unsure which is preferred.  */
+      /* Gcc support both these syntaxes.  Unsure which is preferred.  */
 #if 1
-         fputs_filtered (&exp->elts[pc + 2].string, stream);
-         fputs_filtered (": ", stream);
+      fputs_filtered (&exp->elts[pc + 2].string, stream);
+      fputs_filtered (": ", stream);
 #else
-         fputs_filtered (".", stream);
-         fputs_filtered (&exp->elts[pc + 2].string, stream);
-         fputs_filtered ("=", stream);
+      fputs_filtered (".", stream);
+      fputs_filtered (&exp->elts[pc + 2].string, stream);
+      fputs_filtered ("=", stream);
 #endif
-       }
       print_subexp (exp, pos, stream, PREC_SUFFIX);
       return;
 
@@ -905,7 +890,7 @@ dump_subexp (struct expression *exp, struct ui_file *stream, int elt)
       fprintf_filtered (stream, ", symbol @");
       gdb_print_host_address (exp->elts[elt + 1].symbol, stream);
       fprintf_filtered (stream, " (%s)",
-                       SYMBOL_NAME (exp->elts[elt + 1].symbol));
+                       DEPRECATED_SYMBOL_NAME (exp->elts[elt + 1].symbol));
       elt += 3;
       break;
     case OP_LAST:
This page took 0.02486 seconds and 4 git commands to generate.