aboutsummaryrefslogtreecommitdiff
path: root/gdb/eval.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-08-28 12:40:35 -0600
committerTom Tromey <tromey@adacore.com>2023-08-29 13:36:55 -0600
commitc73556cb0e6da3c2a4484975ee51e052a9be8b36 (patch)
tree2f0a60170f6424004e4ff441c7c0b798fb0a0a68 /gdb/eval.c
parent4fd1ba162ed6f197169d2af29f4230d7a89e2636 (diff)
downloadgdb-c73556cb0e6da3c2a4484975ee51e052a9be8b36.zip
gdb-c73556cb0e6da3c2a4484975ee51e052a9be8b36.tar.gz
gdb-c73556cb0e6da3c2a4484975ee51e052a9be8b36.tar.bz2
Use gdb::array_view for value_array
This changes value_array to accept an array view. I also replaced an alloca with a std::vector in array_operation::evaluate. This function can work on any size of array, so it seems bad to use alloca. Reviewed-by: John Baldwin <jhb@FreeBSD.org> Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/eval.c')
-rw-r--r--gdb/eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/eval.c b/gdb/eval.c
index 457a669..00b9231 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -2515,7 +2515,7 @@ array_operation::evaluate (struct type *expect_type,
return set;
}
- value **argvec = XALLOCAVEC (struct value *, nargs);
+ std::vector<value *> argvec (nargs);
for (tem = 0; tem < nargs; tem++)
{
/* Ensure that array expressions are coerced into pointer