The recent change introducing gdb_argv introduced some build failures in
remote-sim.c.
/home/emaisin/src/binutils-gdb/gdb/remote-sim.c: In function 'void gdbsim_load(target_ops*, const char*, int)':
/home/emaisin/src/binutils-gdb/gdb/remote-sim.c:573:22: error: conflicting declaration 'gdb_argv argv'
gdb_argv argv (args);
^
/home/emaisin/src/binutils-gdb/gdb/remote-sim.c:565:10: note: previous declaration as 'char** argv'
char **argv;
^~~~
/home/emaisin/src/binutils-gdb/gdb/remote-sim.c: In function 'void gdbsim_open(const char*, int)':
/home/emaisin/src/binutils-gdb/gdb/remote-sim.c:730:25: error: declaration of 'gdb_argv args' shadows a parameter
gdb_argv args (arg_buf);
In gdbsim_load, the new gdb_argv object conflicts with old char **argv
variable. I think the old variable should be removed.
In gdbsim_open, the new gdb_argv object conflicts with the args
parameter. This patch renames it to argv.
Built-tested for a mips host.
gdb/ChangeLog:
* remote-sim.c (gdbsim_load): Remove char **argv local variable.
(gdbsim_open): Rename gdb_argv args object to argv.
+2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
+
+ * remote-sim.c (gdbsim_load): Remove char **argv local variable.
+ (gdbsim_open): Rename gdb_argv args object to argv.
+
2017-08-05 Tom Tromey <tom@tromey.com>
* compile/compile-object-load.c (compile_object_load): Use
static void
gdbsim_load (struct target_ops *self, const char *args, int fromtty)
{
- char **argv;
const char *prog;
struct sim_inferior_data *sim_data
= get_sim_inferior_data (current_inferior (), SIM_INSTANCE_NEEDED);
strcat (arg_buf, args);
}
- gdb_argv args (arg_buf);
- sim_argv = args.get ();
+ gdb_argv argv (arg_buf);
+ sim_argv = argv.get ();
init_callbacks ();
gdbsim_desc = sim_open (SIM_OPEN_DEBUG, &gdb_callback, exec_bfd, sim_argv);
error (_("unable to create simulator instance"));
}
- args.release ();
+ argv.release ();
/* Reset the pid numberings for this batch of sim instances. */
next_pid = INITIAL_PID;