From patchwork Fri May 26 17:57:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Baldwin X-Patchwork-Id: 55797 Return-Path: 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 264463857348 for ; Fri, 26 May 2023 17:58:32 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail.baldwin.cx (bigwig.baldwin.cx [66.216.25.90]) by sourceware.org (Postfix) with ESMTPS id 2A2EF385771E for ; Fri, 26 May 2023 17:58:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2A2EF385771E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=FreeBSD.org Received: from ralph.baldwin.net (c-98-35-126-114.hsd1.ca.comcast.net [98.35.126.114]) by mail.baldwin.cx (Postfix) with ESMTPSA id 35E1A1A84AD2 for ; Fri, 26 May 2023 13:57:56 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org Subject: [PATCH 0/4] Handle null inferiors in target::read_description Date: Fri, 26 May 2023 10:57:38 -0700 Message-Id: <20230526175742.66885-1-jhb@FreeBSD.org> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (mail.baldwin.cx [0.0.0.0]); Fri, 26 May 2023 13:57:56 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.103.1 at mail.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, KAM_DMARC_STATUS, KHOP_HELO_FCRDNS, SPF_HELO_PASS, SPF_SOFTFAIL, TXREP, T_SCC_BODY_TEXT_LINE 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" This is a set of changes split out from my larger XSAVE review that will hopefully be easier to review as a smaller chunk. Compared to the version of these patches posted previously I have added extra details to the log messages for patches 1 and 2 and added two new patches. Namely, patch 4 now includes a test for this case (and patch 3 is some refactoring in preparation for patch 4). John Baldwin (4): *-fbsd-nat: Handle null inferior in read_description. *-linux-nat: Handle null inferior in read_description. Add a have_native_target helper function for use with require. Test that native targets can read a tdesc without a process attached. gdb/aarch64-fbsd-nat.c | 3 +++ gdb/aarch64-linux-nat.c | 3 +++ gdb/amd64-fbsd-nat.c | 3 +++ gdb/arm-fbsd-nat.c | 3 +++ gdb/arm-linux-nat.c | 3 +++ gdb/i386-fbsd-nat.c | 3 +++ gdb/mips-linux-nat.c | 3 +++ gdb/ppc-linux-nat.c | 3 +++ gdb/riscv-linux-nat.c | 3 +++ gdb/s390-linux-nat.c | 3 +++ .../gdb.base/auto-connect-native-target.exp | 18 +------------ .../gdb.base/native-target-noproc-tdesc.exp | 27 +++++++++++++++++++ gdb/testsuite/lib/gdb.exp | 17 ++++++++++++ gdb/x86-linux-nat.c | 3 +++ 14 files changed, 78 insertions(+), 17 deletions(-) create mode 100644 gdb/testsuite/gdb.base/native-target-noproc-tdesc.exp