/* QNX Neutrino specific low level interface, for the remote server
for GDB.
- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 Free Software Foundation, Inc.
This file is part of GDB.
return len_read;
}
-/* Start inferior specified by PROGRAM passing arguments ALLARGS. */
+/* Start inferior specified by PROGRAM, using PROGRAM_ARGS as its
+ arguments. */
static int
-nto_create_inferior (char *program, char **allargs)
+nto_create_inferior (const char *program,
+ const std::vector<char *> &program_args)
{
struct inheritance inherit;
pid_t pid;
sigset_t set;
+ std::string str_program_args = stringify_argv (program_args);
TRACE ("%s %s\n", __func__, program);
/* Clear any pending SIGUSR1's but keep the behavior the same. */
memset (&inherit, 0, sizeof (inherit));
inherit.flags |= SPAWN_SETGROUP | SPAWN_HOLD;
inherit.pgroup = SPAWN_NEWPGROUP;
- pid = spawnp (program, 0, NULL, &inherit, allargs, 0);
+ pid = spawnp (program, 0, NULL, &inherit,
+ (char *) str_program_args.c_str (), 0);
sigprocmask (SIG_BLOCK, &set, NULL);
if (pid == -1)
{
int regsize;
procfs_greg greg;
- ptid_t ptid;
TRACE ("%s (regno=%d)\n", __func__, regno);
if (regno >= the_low_target.num_regs)
TRACE ("current_thread is NULL\n");
return;
}
- ptid = thread_to_gdb_id (current_thread);
+ ptid_t ptid = ptid_of (current_thread);
if (!nto_set_thread (ptid))
return;
{
procfs_greg greg;
int err;
- ptid_t ptid;
TRACE ("%s (regno:%d)\n", __func__, regno);
TRACE ("current_thread is NULL\n");
return;
}
- ptid = thread_to_gdb_id (current_thread);
+ ptid_t ptid = ptid_of (current_thread);
if (!nto_set_thread (ptid))
return;
TRACE ("%s\n", __func__);
if (nto_inferior.ctl_fd != -1 && current_thread != NULL)
{
- ptid_t ptid;
-
- ptid = thread_to_gdb_id (current_thread);
+ ptid_t ptid = ptid_of (current_thread);
if (nto_set_thread (ptid))
{
const int watchmask = _DEBUG_FLAG_TRACE_RD | _DEBUG_FLAG_TRACE_WR
TRACE ("%s\n", __func__);
if (nto_inferior.ctl_fd != -1 && current_thread != NULL)
{
- ptid_t ptid;
-
- ptid = thread_to_gdb_id (current_thread);
+ ptid_t ptid = ptid_of (current_thread);
if (nto_set_thread (ptid))
{
NULL, /* get_min_fast_tracepoint_insn_len */
NULL, /* qxfer_libraries_svr4 */
NULL, /* support_agent */
- NULL, /* support_btrace */
NULL, /* enable_btrace */
NULL, /* disable_btrace */
NULL, /* read_btrace */