* serial.h (SERIAL_SET_TTY_STATE): Comment return value.
[deliverable/binutils-gdb.git] / gdb / m2-exp.y
index 07448b18a313c97ade6cf10110822513aab4fb5f..e566c67d290cd8b7ebef999ed2084c690e498e9f 100644 (file)
@@ -623,23 +623,13 @@ variable: NAME
                              struct minimal_symbol *msymbol;
                              register char *arg = copy_name ($1);
 
-                             msymbol = lookup_minimal_symbol (arg,
-                                         (struct objfile *) NULL);
+                             msymbol = lookup_minimal_symbol (arg, NULL);
                              if (msymbol != NULL)
                                {
-                                 write_exp_elt_opcode (OP_LONG);
-                                 write_exp_elt_type (builtin_type_long);
-                                 write_exp_elt_longcst ((LONGEST) SYMBOL_VALUE_ADDRESS (msymbol));
-                                 write_exp_elt_opcode (OP_LONG);
-                                 write_exp_elt_opcode (UNOP_MEMVAL);
-                                 if (msymbol -> type == mst_data ||
-                                     msymbol -> type == mst_bss)
-                                   write_exp_elt_type (builtin_type_int);
-                                 else if (msymbol -> type == mst_text)
-                                   write_exp_elt_type (lookup_function_type (builtin_type_int));
-                                 else
-                                   write_exp_elt_type (builtin_type_char);
-                                 write_exp_elt_opcode (UNOP_MEMVAL);
+                                 write_exp_msymbol
+                                   (msymbol,
+                                    lookup_function_type (builtin_type_int),
+                                    builtin_type_int);
                                }
                              else if (!have_full_symbols () && !have_partial_symbols ())
                                error ("No symbol table is loaded.  Use the \"symbol-file\" command.");
@@ -1163,7 +1153,7 @@ void
 yyerror(msg)
      char *msg;        /* unused */
 {
-   printf("Parsing:  %s\n",lexptr);
+   printf_unfiltered("Parsing:  %s\n",lexptr);
    if (yychar < 256)
      error("Invalid syntax in expression near character '%c'.",yychar);
    else
This page took 0.023488 seconds and 4 git commands to generate.