Memory leaks and ineffective bounds checking in wasm_scan
[deliverable/binutils-gdb.git] / gdb / eval.c
index 6dca8be93cc9a05a6c0840298a5f7bdaa5047e2d..17af1b51df246e592d868bb5a2046a9dba84226b 100644 (file)
@@ -1,6 +1,6 @@
 /* Evaluate expressions for GDB.
 
-   Copyright (C) 1986-2019 Free Software Foundation, Inc.
+   Copyright (C) 1986-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -562,20 +562,20 @@ binop_promote (const struct language_defn *language, struct gdbarch *gdbarch,
          break;
        case language_opencl:
          if (result_len <= TYPE_LENGTH (lookup_signed_typename
-                                        (language, gdbarch, "int")))
+                                        (language, "int")))
            {
              promoted_type =
                (unsigned_operation
-                ? lookup_unsigned_typename (language, gdbarch, "int")
-                : lookup_signed_typename (language, gdbarch, "int"));
+                ? lookup_unsigned_typename (language, "int")
+                : lookup_signed_typename (language, "int"));
            }
          else if (result_len <= TYPE_LENGTH (lookup_signed_typename
-                                             (language, gdbarch, "long")))
+                                             (language, "long")))
            {
              promoted_type =
                (unsigned_operation
-                ? lookup_unsigned_typename (language, gdbarch, "long")
-                : lookup_signed_typename (language, gdbarch,"long"));
+                ? lookup_unsigned_typename (language, "long")
+                : lookup_signed_typename (language,"long"));
            }
          break;
        default:
@@ -1049,7 +1049,7 @@ evaluate_funcall (type *expect_type, expression *exp, int *pos,
          else if (op == OP_VAR_VALUE)
            {
              symbol *sym = exp->elts[*pos + 2].symbol;
-             var_func_name = SYMBOL_PRINT_NAME (sym);
+             var_func_name = sym->print_name ();
            }
 
          argvec[0] = evaluate_subexp_with_coercion (exp, pos, noside);
@@ -1300,7 +1300,7 @@ evaluate_subexp_standard (struct type *expect_type,
        (*pos) += 3;
        symbol *var = exp->elts[pc + 2].symbol;
        if (TYPE_CODE (SYMBOL_TYPE (var)) == TYPE_CODE_ERROR)
-         error_unknown_type (SYMBOL_PRINT_NAME (var));
+         error_unknown_type (var->print_name ());
        if (noside != EVAL_SKIP)
            return evaluate_var_value (noside, exp->elts[pc + 1].block, var);
        else
@@ -1342,7 +1342,7 @@ evaluate_subexp_standard (struct type *expect_type,
        if (SYMBOL_COMPUTED_OPS (sym) == NULL
            || SYMBOL_COMPUTED_OPS (sym)->read_variable_at_entry == NULL)
          error (_("Symbol \"%s\" does not have any specific entry value"),
-                SYMBOL_PRINT_NAME (sym));
+                sym->print_name ());
 
        frame = get_selected_frame (NULL);
        return SYMBOL_COMPUTED_OPS (sym)->read_variable_at_entry (sym, frame);
@@ -1547,7 +1547,7 @@ evaluate_subexp_standard (struct type *expect_type,
                {
                  int bit_index = (unsigned) range_low % TARGET_CHAR_BIT;
 
-                 if (gdbarch_bits_big_endian (exp->gdbarch))
+                 if (gdbarch_byte_order (exp->gdbarch) == BFD_ENDIAN_BIG)
                    bit_index = TARGET_CHAR_BIT - 1 - bit_index;
                  valaddr[(unsigned) range_low / TARGET_CHAR_BIT]
                    |= 1 << bit_index;
This page took 0.024571 seconds and 4 git commands to generate.