pid_t
fork_inferior (const char *exec_file_arg, const std::string &allargs,
- char **env, void (*traceme_fun) (),
- gdb::function_view<void (int)> init_trace_fun,
- void (*pre_trace_fun) (),
- const char *shell_file_arg,
- void (*exec_fun)(const char *file, char * const *argv,
- char * const *env))
+ char **env, traceme_ftype traceme_fun,
+ init_trace_ftype init_trace_fun, pre_trace_ftype pre_trace_fun,
+ const char *shell_file_arg, exec_ftype exec_fun)
{
pid_t pid;
/* Set debug_fork then attach to the child while it sleeps, to debug. */
happen to prepare to handle the child we're about fork, do it
now... */
if (pre_trace_fun != NULL)
- (*pre_trace_fun) ();
+ pre_trace_fun ();
/* Create the child process. Since the child process is going to
exec(3) shortly afterwards, try to reduce the overhead by
for the inferior. */
/* "Trace me, Dr. Memory!" */
- (*traceme_fun) ();
+ traceme_fun ();
/* The call above set this process (the "child") as debuggable
by the original gdb process (the "parent"). Since processes
char **argv = child_argv.argv ();
if (exec_fun != NULL)
- (*exec_fun) (argv[0], &argv[0], env);
+ exec_fun (argv[0], &argv[0], env);
else
execvp (argv[0], &argv[0]);