Fix pager bugs with style output
[deliverable/binutils-gdb.git] / gdb / eval.c
index 6eb210d10968e8e2f7ec008360eac3732fdb503a..47d08a656c0229ace5f2004f73eabb30c90a96a8 100644 (file)
@@ -1,6 +1,6 @@
 /* Evaluate expressions for GDB.
 
-   Copyright (C) 1986-2018 Free Software Foundation, Inc.
+   Copyright (C) 1986-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -789,7 +789,9 @@ eval_call (expression *exp, enum noside noside,
       else if (TYPE_CODE (ftype) == TYPE_CODE_XMETHOD)
        {
          type *return_type
-           = result_type_of_xmethod (argvec[0], nargs, argvec + 1);
+           = result_type_of_xmethod (argvec[0],
+                                     gdb::make_array_view (argvec + 1,
+                                                           nargs));
 
          if (return_type == NULL)
            error (_("Xmethod is missing return type."));
@@ -827,7 +829,7 @@ eval_call (expression *exp, enum noside noside,
       return call_internal_function (exp->gdbarch, exp->language_defn,
                                     argvec[0], nargs, argvec + 1);
     case TYPE_CODE_XMETHOD:
-      return call_xmethod (argvec[0], nargs, argvec + 1);
+      return call_xmethod (argvec[0], gdb::make_array_view (argvec + 1, nargs));
     default:
       return call_function_by_hand (argvec[0], default_return_type,
                                    gdb::make_array_view (argvec + 1, nargs));
@@ -1100,7 +1102,8 @@ evaluate_funcall (type *expect_type, expression *exp, int *pos,
       func_name = (char *) alloca (name_len + 1);
       strcpy (func_name, &exp->elts[string_pc + 1].string);
 
-      find_overload_match (&argvec[1], nargs, func_name,
+      find_overload_match (gdb::make_array_view (&argvec[1], nargs),
+                          func_name,
                           NON_METHOD, /* not method */
                           NULL, NULL, /* pass NULL symbol since
                                          symbol is unknown */
@@ -1136,7 +1139,8 @@ evaluate_funcall (type *expect_type, expression *exp, int *pos,
             evaluation.  */
          struct value *valp = NULL;
 
-         (void) find_overload_match (&argvec[1], nargs, tstr,
+         (void) find_overload_match (gdb::make_array_view (&argvec[1], nargs),
+                                     tstr,
                                      METHOD, /* method */
                                      &arg2,  /* the object */
                                      NULL, &valp, NULL,
@@ -1207,7 +1211,7 @@ evaluate_funcall (type *expect_type, expression *exp, int *pos,
          if (op == OP_VAR_VALUE)
            function = exp->elts[save_pos1+2].symbol;
 
-         (void) find_overload_match (&argvec[1], nargs,
+         (void) find_overload_match (gdb::make_array_view (&argvec[1], nargs),
                                      NULL,        /* no need for name */
                                      NON_METHOD,  /* not method */
                                      NULL, function, /* the function */
This page took 0.026625 seconds and 4 git commands to generate.