All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: "Laurent Vivier" <laurent@vivier.eu>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH 1/3] gdbstub: Refactor fork() handling
Date: Thu, 01 Feb 2024 12:05:54 +0000	[thread overview]
Message-ID: <87cytgmlst.fsf@draig.linaro.org> (raw)
In-Reply-To: <20240131205031.144607-2-iii@linux.ibm.com> (Ilya Leoshkevich's message of "Wed, 31 Jan 2024 21:43:39 +0100")

Ilya Leoshkevich <iii@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 <iii@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	other threads:[~2024-02-01 12:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 20:43 [PATCH 0/3] gdbstub: Implement follow-fork-mode child Ilya Leoshkevich
2024-01-31 20:43 ` [PATCH 1/3] gdbstub: Refactor fork() handling Ilya Leoshkevich
2024-02-01 12:05   ` Alex Bennée [this message]
2024-01-31 20:43 ` [PATCH 2/3] gdbstub: Implement follow-fork-mode child Ilya Leoshkevich
2024-02-01 12:11   ` Alex Bennée
2024-02-01 16:22     ` Ilya Leoshkevich
2024-02-01 16:48       ` Alex Bennée
2024-01-31 20:43 ` [PATCH 3/3] tests/tcg: Add two follow-fork-mode tests Ilya Leoshkevich
2024-02-01 11:59 ` [PATCH 0/3] gdbstub: Implement follow-fork-mode child Alex Bennée

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cytgmlst.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=iii@linux.ibm.com \
    --cc=laurent@vivier.eu \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.