/* GNU/Linux native-dependent code for debugging multiple forks.
- Copyright (C) 2005-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005-2017 Free Software Foundation, Inc.
This file is part of GDB.
struct fork_info *fork_list;
static int highest_fork_num;
-/* Prevent warning from -Wmissing-prototypes. */
-extern void _initialize_linux_fork (void);
-
/* Fork list data structure: */
struct fork_info
{
{
char exp[80];
- snprintf (&exp[0], sizeof (exp), "lseek (%d, %ld, %d)",
+ snprintf (&exp[0], sizeof (exp), "(long) lseek (%d, %ld, %d)",
fd, (long) offset, whence);
return (off_t) parse_and_eval_long (&exp[0]);
}
argv[2] = value_from_longest (builtin_type (gdbarch)->builtin_int, 0);
argv[3] = 0;
- retv = call_function_by_hand (waitpid_fn, 3, argv);
+ retv = call_function_by_hand (waitpid_fn, NULL, 3, argv);
if (value_as_long (retv) < 0)
goto out;
scoped_restore save_pid
= make_scoped_restore (&checkpointing_pid, ptid_get_pid (inferior_ptid));
- ret = call_function_by_hand (fork_fn, 0, &ret);
+ ret = call_function_by_hand (fork_fn, NULL, 0, &ret);
}
if (!ret) /* Probably can't happen. */