From nobody Mon Jun 5 08:36:08 2023 X-Original-To: dev-commits-src-branches@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 4QZRlX4dhZz4bMDY; Mon, 5 Jun 2023 08:36:08 +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 4QZRlX48nWz3xD3; Mon, 5 Jun 2023 08:36:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685954168; 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=jki3ZElsbV5Lqt4oN9GCPnWfaBov38EoaiMXCMdgRdo=; b=iicdsGtn0scbEiH2A49tWi4QOEj9wtj13JRKzfjlKApmIR6ag8CvoYPqyg5jWcn2ljgRcN to9mRN7tC6C7/drxENmisaMZhT7B+dj8GdHt+pMxy5zIPCpEyM0ENg0mwlpJAAzEWXN/ep OOK1s9/nTUD/HrbBiZcAlakc/I9tuMFMoIyu4zhBq3DqoqN0ei2KHbrlCaw5uIPBSRa+W4 g1hke3VIvlR8AVIAzRnzMCaFsBF53yHU/VJCKpqTWz/mkaR1ADXaQ5MkZ4G0p+ZOIGlMdU ssfr0n++uWlPz1okWUPjriyOBQkN/Y/33Q8E6Z5n7Y51P2cQ9U5M34DqVwBhmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685954168; 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=jki3ZElsbV5Lqt4oN9GCPnWfaBov38EoaiMXCMdgRdo=; b=qd5mJHRABPyCmuHWdVdWH9dV2Rhlj+NlS3YwuxW7cnEH/vk3vVRoyycvT+jqrSUp1TUDzw 5dK67NNCYvTVZmuo7DU9SnnhKffpVQllP3LTM1QxK4qEc7cw/vunti7G2i8eq8tzCirv1M ZvLEedeMDhRSAeO9uo7IYSA+feM36hYUmCd11piwJzrLbR8iDXS62soI/inPHbykweNj2p mFH9IE9znSy6ICjFZAWOCYZw28b+sY8RY/IgLhXy7WXiAK5ViSY6saHa0g/RFRbunnVWoh LNa+/ci6a+qDhK03rDOe1A/OY/AaA6VVaz+24cORVGRGbIReFI0I2An8e2cnXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685954168; a=rsa-sha256; cv=none; b=DxEd85OyJy89pE3SzIwFCLihK/o3AHusSz8Z4ioTz1rN4Zw1gOrG7sBk6324J11ml30d8D tGvghUdDOtJZ/3t5c9QBbJzP+tU+j44ak91pYPRfXSe83+vfCiMjytP2f50Ma692EpbULF jMJy6lPoPjaDU4Ya8XZRfC3oOPofYau9j9ZpodtA5NZgkZmFb7vo112B1MEPJEIe470Jg2 kHUWLdXoVUem+wnj7rtIB6Gys966D8qHRbj6wblV1ISffoI0cZ/PjMcxEAMA9koXcNTTgi PCowW4eZ9ESC89pFNN/bKyueN//YKgufk1J6zLqLT/WXpBcyrzuttd7kW0Ey8Q== 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 4QZRlX3GKLzgds; Mon, 5 Jun 2023 08:36:08 +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 3558a89O024474; Mon, 5 Jun 2023 08:36:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3558a89i024473; Mon, 5 Jun 2023 08:36:08 GMT (envelope-from git) Date: Mon, 5 Jun 2023 08:36:08 GMT Message-Id: <202306050836.3558a89i024473@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e7c3889a1736 - stable/13 - unr(9): add 'show unrhdr_iter' command List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e7c3889a17368ba396734019a480c0c2dfb3fd63 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e7c3889a17368ba396734019a480c0c2dfb3fd63 commit e7c3889a17368ba396734019a480c0c2dfb3fd63 Author: Konstantin Belousov AuthorDate: 2023-05-25 18:09:27 +0000 Commit: Konstantin Belousov CommitDate: 2023-06-05 08:35:01 +0000 unr(9): add 'show unrhdr_iter' command (cherry picked from commit c4cc0cab1ea619e07b52ce4c3825e7941996cb49) --- sys/kern/subr_unit.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sys/kern/subr_unit.c b/sys/kern/subr_unit.c index ee67e5db01d6..236ca9915740 100644 --- a/sys/kern/subr_unit.c +++ b/sys/kern/subr_unit.c @@ -1124,6 +1124,23 @@ DB_SHOW_COMMAND(unrhdr, unrhdr_print_unrhdr) print_unrhdr((struct unrhdr *)addr); } + +static void +print_unrhdr_iter(struct unrhdr_iter *iter) +{ + db_printf("iter %p unrhdr %p ipos %d upos %p ufi %d\n", + iter, iter->uh, iter->ipos, iter->upos, iter->upos_first_item); +} + +DB_SHOW_COMMAND(unrhdr_iter, unrhdr_print_iter) +{ + if (!have_addr) { + db_printf("show unrhdr_iter addr\n"); + return; + } + + print_unrhdr_iter((struct unrhdr_iter *)addr); +} #endif #ifndef _KERNEL /* USERLAND test driver */