Ilya Leoshkevich <i...@linux.ibm.com> writes:

> Prepare for implementing follow-fork-mode child:
> * Introduce gdbserver_fork_start(), which for now is a no-op.
> * Rename gdbserver_fork() to gdbserver_fork_end(), call it in both
>   parent and child processes, and pass the fork()'s return value to it.
> * Factor out disable_gdbstub().
> * Update ts_tid in the forked child.
>
> Signed-off-by: Ilya Leoshkevich <i...@linux.ibm.com>
> ---
>  bsd-user/freebsd/os-proc.h  |  6 +++---
>  bsd-user/main.c             |  8 ++++++--
>  bsd-user/qemu.h             |  2 +-
>  gdbstub/user.c              | 25 +++++++++++++++++++------
>  include/gdbstub/user.h      | 11 ++++++++---
>  linux-user/main.c           |  8 ++++++--
>  linux-user/syscall.c        |  4 ++--
>  linux-user/user-internals.h |  2 +-
>  8 files changed, 46 insertions(+), 20 deletions(-)
>
<snip>
>  
>  /*
> diff --git a/include/gdbstub/user.h b/include/gdbstub/user.h
> index 68b6534130c..1694d4fd330 100644
> --- a/include/gdbstub/user.h
> +++ b/include/gdbstub/user.h
> @@ -46,10 +46,15 @@ static inline int gdb_handlesig(CPUState *cpu, int sig)
>  void gdb_signalled(CPUArchState *as, int sig);
>  
>  /**
> - * gdbserver_fork() - disable gdb stub for child processes.
> - * @cs: CPU
> + * gdbserver_fork_start() - inform gdb of the upcoming fork()
> + */
> +void gdbserver_fork_start(void);
> +
> +/**
> + * gdbserver_fork_end() - disable gdb stub for child processes.
> + * @pid: 0 if in child process, -1 if fork failed, child process pid 
> otherwise
>   */
> -void gdbserver_fork(CPUState *cs);
> +void gdbserver_fork_end(pid_t pid);
>

This had merge conflicts when I tried to apply to my tree.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

Reply via email to