Message ID | 20230403185208.197965-1-simon.marchi@efficios.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 42F3A3858C36 for <patchwork@sourceware.org>; Mon, 3 Apr 2023 18:52:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 42F3A3858C36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680547966; bh=Rd7wOle42NoF4IgIdcQnqqgmeGi6r7rD6lJHFlY4cSM=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=TQ68OoVLHl8b1SD/T5DI7sfdo8nNZT33CSQziZSczIMfMDityCWWHYcb72LAsyId0 dfFft6eZEVzvGsQKrdJZQetUlqLDtlp66U3S8lMkLlzaZeVA8+sEEJETZCdzEfB/bJ GtpM5ve4fDR/wchmhy3Tstvec2ZUtq7CFKgoc4cQ= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id C85D13858D39 for <gdb-patches@sourceware.org>; Mon, 3 Apr 2023 18:52:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C85D13858D39 Received: from localhost.localdomain (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id C1F481E0D2; Mon, 3 Apr 2023 14:52:16 -0400 (EDT) To: gdb-patches@sourceware.org Cc: Simon Marchi <simon.marchi@efficios.com> Subject: [PATCH 0/7] amdgpu: handle fork and exec Date: Mon, 3 Apr 2023 14:52:01 -0400 Message-Id: <20230403185208.197965-1-simon.marchi@efficios.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1167.1 required=5.0 tests=BAYES_00, KAM_DMARC_NONE, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_SOFTFAIL, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> Reply-To: Simon Marchi <simon.marchi@efficios.com> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
amdgpu: handle fork and exec
|
|
Message
Simon Marchi
April 3, 2023, 6:52 p.m. UTC
This series adds support for fork and exec to the amdgpu port. This means making sure that the appropriate cleanups are done when an inferior using the GPU forks and / or execs, and the appropriates actions taken so that we can properly debug an inferior using the GPU post-fork or post-exec. Simon Marchi (7): gdb: pass execing and following inferior to inferior_execd observers gdb: add inferior_forked observable gdb: remove regcache::target gdb: add maybe_switch_inferior function gdb: make regcache::raw_update switch to right inferior gdb: switch to right inferior in fetch_inferior_event gdb/amdgpu: add follow fork and exec support gdb/amd-dbgapi-target.c | 39 ++++++++ gdb/gdbthread.h | 2 + gdb/inferior.c | 15 ++++ gdb/inferior.h | 7 ++ gdb/infrun.c | 53 ++++++----- gdb/jit.c | 20 +++-- gdb/linux-tdep.c | 10 ++- gdb/observable.c | 1 + gdb/observable.h | 17 +++- gdb/record-btrace.c | 3 +- gdb/regcache.c | 90 ++++++++++++------- gdb/regcache.h | 22 +++-- gdb/solib.c | 3 +- .../fork-exec-gpu-to-non-gpu-execee.cpp | 27 ++++++ .../fork-exec-gpu-to-non-gpu-execer.cpp | 55 ++++++++++++ .../gdb.rocm/fork-exec-gpu-to-non-gpu.exp | 89 ++++++++++++++++++ .../fork-exec-non-gpu-to-gpu-execee.cpp | 36 ++++++++ .../fork-exec-non-gpu-to-gpu-execer.cpp | 46 ++++++++++ .../gdb.rocm/fork-exec-non-gpu-to-gpu.exp | 88 ++++++++++++++++++ gdb/thread.c | 14 +++ 20 files changed, 561 insertions(+), 76 deletions(-) create mode 100644 gdb/testsuite/gdb.rocm/fork-exec-gpu-to-non-gpu-execee.cpp create mode 100644 gdb/testsuite/gdb.rocm/fork-exec-gpu-to-non-gpu-execer.cpp create mode 100644 gdb/testsuite/gdb.rocm/fork-exec-gpu-to-non-gpu.exp create mode 100644 gdb/testsuite/gdb.rocm/fork-exec-non-gpu-to-gpu-execee.cpp create mode 100644 gdb/testsuite/gdb.rocm/fork-exec-non-gpu-to-gpu-execer.cpp create mode 100644 gdb/testsuite/gdb.rocm/fork-exec-non-gpu-to-gpu.exp
Comments
On 4/3/23 14:52, Simon Marchi via Gdb-patches wrote: > This series adds support for fork and exec to the amdgpu port. This > means making sure that the appropriate cleanups are done when an > inferior using the GPU forks and / or execs, and the appropriates > actions taken so that we can properly debug an inferior using the GPU > post-fork or post-exec. If there is no feedback on this (the non-amdgpu-specific bits may be relevant to review), I intend to push this next week. Simon
On 4/13/23 11:54, Simon Marchi wrote: > On 4/3/23 14:52, Simon Marchi via Gdb-patches wrote: >> This series adds support for fork and exec to the amdgpu port. This >> means making sure that the appropriate cleanups are done when an >> inferior using the GPU forks and / or execs, and the appropriates >> actions taken so that we can properly debug an inferior using the GPU >> post-fork or post-exec. > > If there is no feedback on this (the non-amdgpu-specific bits may be > relevant to review), I intend to push this next week. > > Simon I just pushed this. Simon