From nobody Fri May 26 01:49:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QS7CN2MLWz4THTx; Fri, 26 May 2023 01:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QS7CN05W0z3Lld; Fri, 26 May 2023 01:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685065792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EsBic5LthwatqcUeZ5lRto+7H9dNHUqI03uv5BwEh20=; b=yZyLGk/dbWHvIu6QQdv/PWjC0nTqq5OyyXCnyfR74gaaWin35J3zhzf66gIPzoYm9+gt9+ QFFO91VNi6YZF+tImigusEn34thp3l0YlIugSt1/HtgOvdaBGR2sXY8afQpXykxn53ENxJ mDLe22V3EZzc4IHVo0U7dd1rnrRIPfB2y6hEtW54O4VmxGaSifGSE+MA9V5lg5TVCrzAHD 9lK4tZBaYMLNBNTlWazDynX7jGFqosj+XTQjtd5YsZsYJooaOuwO/+905D1y/2/9OIP70s hM0j6x635KH0RCd10SH8Ky8D/qYx5Jeh0ervV82d1BaGrabgF0x0cJQFGzzo+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685065792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EsBic5LthwatqcUeZ5lRto+7H9dNHUqI03uv5BwEh20=; b=PZrWcsuskgcO0Vi+T/aRCFeCTTw7XpZ97iiH+iulbBsr9DD3HF0Sxqf9FEnZiYE9U1QVIa ZBBmb2O66hw7GB/b+C1iKoJTmIaaehuELh/xCOJ03RmPwN0174A16x0bWkODLRvRZhwrMB VAgUgmL2DXnKTLycT/CoMjCKkTy7Ex9XIstoI2Na87t01TZQ0vmpfjTDQAF/9pLEC5JM7A 7SvTajhEYboYT/ewGFlF3KtPdV68JAMb0h2BvMtWtYP3C6DmoyAxYeQh9kRG1SRtIfoQD0 +wN3PwMbn54GsCBh4eRcqvIxg+afpVlU+4QN6sgAP6YSXZnBm6nYCA8IoPV8+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685065792; a=rsa-sha256; cv=none; b=l18OA/qHnGuyp0b+Vd/LrgbWc0Gy5npRtG2o5/QsqVxjgrnHWNZJ3EP0t52HfM7oW/Yqcq I45vh7RJ27ATFQ5hpW2llH6XHmwOVmPJEFbqeoRwkYbdiC3UEvCEgh0D6jvWuSiBlWrI5t OTdlRzqa6OHz77T3yvXkpJ0Ql4fBv3Lk4qSgNMwLcABkKxVlV3TmNU74UcWzyVW6yaTSgj AUS0ANKHnbQfPlFbzefpHGpIX8x7Br68LxcMCKdNE8zMzULEH+6+Sj1y9rdU45bUjAVHan wGe+AEz2HvQpU5HBY4EL3y/87wLduWKf/YYV9WY87OSx101AszXyX/j1KfLeHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QS7CM6H3pzpBM; Fri, 26 May 2023 01:49:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34Q1npv7085788; Fri, 26 May 2023 01:49:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34Q1npmg085787; Fri, 26 May 2023 01:49:51 GMT (envelope-from git) Date: Fri, 26 May 2023 01:49:51 GMT Message-Id: <202305260149.34Q1npmg085787@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 0f2bb40bc7dd - main - lldb: dereference stoppcbs based on target kernel version List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0f2bb40bc7ddee7ba329d9b344623e2a186b4046 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0f2bb40bc7ddee7ba329d9b344623e2a186b4046 commit 0f2bb40bc7ddee7ba329d9b344623e2a186b4046 Author: Ed Maste AuthorDate: 2023-05-02 20:24:46 +0000 Commit: Ed Maste CommitDate: 2023-05-26 01:45:52 +0000 lldb: dereference stoppcbs based on target kernel version As of 9fb6718d1b18 / __FreeBSD_version 1400089 stoppcbs is a pointer to the pcbs array. Dereference stoppcbs on sufficiently new kernels. Reviewed by: markj (earlier) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39939 --- .../source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.cpp b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.cpp index e3707365a9c3..30eace1ba94f 100644 --- a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.cpp +++ b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.cpp @@ -178,6 +178,11 @@ bool ProcessFreeBSDKernel::DoUpdateThreadList(ThreadList &old_thread_list, int32_t pcbsize = ReadSignedIntegerFromMemory(FindSymbol("pcb_size"), 4, -1, error); lldb::addr_t stoppcbs = FindSymbol("stoppcbs"); + // In later FreeBSD versions stoppcbs is a pointer to the array. + int32_t osreldate = + ReadSignedIntegerFromMemory(FindSymbol("osreldate"), 4, -1, error); + if (stoppcbs != LLDB_INVALID_ADDRESS && osreldate >= 1400089) + stoppcbs = ReadPointerFromMemory(stoppcbs, error); // from FreeBSD sys/param.h constexpr size_t fbsd_maxcomlen = 19;