From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sLHhII1S/2AcZwAAWB0awg (envelope-from ) for ; Mon, 26 Jul 2021 20:25:49 -0400 Received: by simark.ca (Postfix, from userid 112) id 84A871EDFB; Mon, 26 Jul 2021 20:25:49 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (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 ESMTPS id E21A51E813 for ; Mon, 26 Jul 2021 20:25:48 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A06D93950C9D for ; Tue, 27 Jul 2021 00:25:48 +0000 (GMT) Received: from mail.baldwin.cx (bigwig.baldwin.cx [66.216.25.90]) by sourceware.org (Postfix) with ESMTPS id EFA5B393A418 for ; Tue, 27 Jul 2021 00:24:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EFA5B393A418 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 gimli.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 17FAB1A84BF2 for ; Mon, 26 Jul 2021 20:24:25 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org Subject: [PATCH 0/3] A few fixes to OpenBSD's native target Date: Mon, 26 Jul 2021 17:24:18 -0700 Message-Id: <20210727002421.18947-1-jhb@FreeBSD.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (mail.baldwin.cx [0.0.0.0]); Mon, 26 Jul 2021 20:24:26 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.103.1 at mail.baldwin.cx X-Virus-Status: Clean 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+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" The first patch is an alternative fix for the issue Simon ran into with OpenBSD trying to use the x86 debug registers when it doesn't support their use by a debugger. The second patch pacifies a compiler warning due to the lack of debug register support. The third patch fixes an issue where an existing process tripped an assertion where find_inferior_pid was called with a pid of 0 (unfortunately stack traces don't work for OpenBSD core dumps, so I couldn't easily tell where hte failure was). However, the use of inferior_ptid is not correct anymore in ::wait methods and fixing that alone allows a process to exit cleanly without error. This is enough to get a single threaded program to run and exit cleanly (which is all I tested). There are likely other issues in the OpenBSD target, but this at least gets it working for the simple case again. John Baldwin (3): Don't compile x86 debug register support on OpenBSD. x86-bsd-nat: Only define gdb_ptrace when using debug registers. obsd-nat: Various fixes to obsd_nat_target::wait. gdb/configure.nat | 5 ++-- gdb/obsd-nat.c | 61 ++++++++++------------------------------------- gdb/x86-bsd-nat.c | 16 ++++++------- gdb/x86-bsd-nat.h | 9 +++++-- 4 files changed, 30 insertions(+), 61 deletions(-) -- 2.31.1