From 8c4b5f3d987c80a1746e3f198bb060d7d7671945 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Mon, 25 May 2020 11:38:32 -0400 Subject: gdbsupport: Let construct_inferior_arguments take gdb::array_view param Adapt the construct_inferior_arguments function to take a gdb::array_view parameter instead of a char * array and an int indicating the length and adapt the only call site. This will allow calling it more simply in a follow-up patch introducing more uses of the function. gdbsupport/ChangeLog: * common-inferior.cc, common-inferior.h (construct_inferior_arguments): Adapt to take a gdb::array_view parameter. Adapt call site. Change-Id: I1c6496c8c0b0eb3ef3fda96e9e3bd64c5e6cac3c --- gdb/infcmd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gdb/infcmd.c') diff --git a/gdb/infcmd.c b/gdb/infcmd.c index ffcc364..891da91 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -151,8 +151,9 @@ get_inferior_args (void) { if (current_inferior ()->argc != 0) { - std::string n = construct_inferior_arguments (current_inferior ()->argc, - current_inferior ()->argv); + gdb::array_view args (current_inferior ()->argv, + current_inferior ()->argc); + std::string n = construct_inferior_arguments (args); set_inferior_args (n.c_str ()); } -- cgit v1.1