From nobody Mon May 29 22:11:24 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 4QVV9T1wMWz4XFcD; Mon, 29 May 2023 22:11:25 +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 4QVV9T1Rxvz3KYh; Mon, 29 May 2023 22:11:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685398285; 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=FC+xdJiyBfZly7TZy0WSkDKBLwJpRQzpoC+QLl3nhzw=; b=fLm7xrP66kX6K5E9vECIJazh6reOee2XuEY7qU2MuiZX0ARTP5+xjY4fP/ilOl7HOkzjF7 reES786AcdLFs72gtHeF1hVCCdqPW61G0Md2/1N6irlHKohX7761FyQBqM0KabV7vWJL14 3tS7zk/FtvIyuWm52GaltQ//b4a7AaTvzi7vdVB8OGbfbBDO/uE4JdDyZNvY8VlDnLYCdu WCtXYGT4J7DbVyo2mOeCYM6qqdYctsDyUn41ckzpIpdjLshLzPAaq7eb1wX77QHDdmpTIH LXJL+s/MWIPmIUmUm8sV53U/8s1wYQSNCkgyia7mfhddbFxKTCKRnkdF8oMO5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685398285; 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=FC+xdJiyBfZly7TZy0WSkDKBLwJpRQzpoC+QLl3nhzw=; b=BWysZ6RcU2LCq6hK3MaZ3IYhqmWLzz0G0EbwJu7S8DrRKpt9W/VJ0OFFNjKxz9J5HhMjD9 Yr1eGd+MCdEOrEIbevMtuKZGKmCqiO/YNqCV9RzoX4k+Losk6bXSQEg47cv5l6tGEXurr9 xGtfwVmXqnGqglEZDWERNIObZTyVv2qAYasvSg7KFVcLH6yb5ZthsU6/V54Wy9+b39MLLG IDvGN5xKtJpfJiVex8k+L/JanBiRrGBt2iOApywksw1HSyBsKF1hDUKyELv+9+r18Q+r7E nYyWKKtYmg69A2fbiStd4/yBm1rU27ErwGYxkaELM46ppjpH23F8Rk2v1TgysA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685398285; a=rsa-sha256; cv=none; b=o9YftKk/Z75uBqTvERqKsKc7KNcUXDP6O9sLdIP/M92TCe+ifdu5XvBr4jOy1bAwHZtJ1W qBIIIbLOkdtvz1li4Mwf59utKEOateZRYlfOY3NdfaDZMAgX29Uk+MDBMapKjH/N0QTEOb qWeA64a7gIFEWLg9uAqiaYUbmZJJ47gL6BwlyEI0lAvrr0o1k80nLjwo8U2a8OkSX00Arm 5FCE3EJJRvY1GBW7htmjdkObcub1fR7c6849zyp7lmuMuvzU0/WEsLr4lKwso9eG0kU5/M 1mXGsIZA8QDbhuqV4mOOBP39IgXFXpCUyYJNn3IFNIECkaS9fT4cEtouDI5W6g== 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 4QVV9T0X1xzTNS; Mon, 29 May 2023 22:11:25 +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 34TMBOHL044793; Mon, 29 May 2023 22:11:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34TMBOca044792; Mon, 29 May 2023 22:11:24 GMT (envelope-from git) Date: Mon, 29 May 2023 22:11:24 GMT Message-Id: <202305292211.34TMBOca044792@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: c4cc0cab1ea6 - main - unr(9): add 'show unrhdr_iter' command 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c4cc0cab1ea619e07b52ce4c3825e7941996cb49 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c4cc0cab1ea619e07b52ce4c3825e7941996cb49 commit c4cc0cab1ea619e07b52ce4c3825e7941996cb49 Author: Konstantin Belousov AuthorDate: 2023-05-25 18:09:27 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-29 22:10:36 +0000 unr(9): add 'show unrhdr_iter' command Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D40089 --- 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 01bd23a1a2c4..61b7f86cda85 100644 --- a/sys/kern/subr_unit.c +++ b/sys/kern/subr_unit.c @@ -1111,6 +1111,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 */