Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6012427rwl; Thu, 29 Dec 2022 06:21:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXud2s40x/86VYUnZWX5V7SpRbK+kAlawWst9O93GuFR9jVZ4fq/xlSdIk6Zp01+Kx2CXX1I X-Received: by 2002:a17:902:f24c:b0:189:7d30:7623 with SMTP id j12-20020a170902f24c00b001897d307623mr27531278plc.30.1672323666363; Thu, 29 Dec 2022 06:21:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672323666; cv=none; d=google.com; s=arc-20160816; b=ZlPwriwag5FddkJdv0+cbgY9SqlYpI4+ILITYULqF5v6N2L+U5A4iVm0aAyWWJLPLJ KlBnYeogPZsuJl8U1Mfff+RAOYQm9N8wWz2d9Cf6dRexk68p+HZrgIcCfNzxetcGVbue h3FA5DLrfe99R4kC/H9DoMyz3iFF0NNZXtB0iuitlDFfZr4ZaMA4Ih6SZCanJGC1WL+v 8jTUxZNfb4TMdHBpFtRkGzPw61J4pQbhoHSff/suj8qxcYYkZFyrmSkc9Znlc1AL+TD2 EuHbaZcIJgm0EjQ1TNeCZBPcvma0XFDIL3PeF8unWUBptXk+RRbIkeAnHtLn6nGpFDzM 7ygw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:dkim-signature:dkim-signature:from; bh=ONVoAOSV4R74Fcc+S7klnQwitE7KOgWX9DTWXdoRQo0=; b=Rv6P/GuqNnG/oFiVKbH+fNta/ZvUQ0RvVbdnV3wyZaEAe+9RvB5rEfVkHNkV50mWAr 2h8RnbjQZ0h9Q0uf7CklKknlu6IMzMvmpfe/okFRsOnuhoV9QBtzJXtR8ZvpSH69NaNE fnSpGeh+pSf6Nj6hDYXLMT2x4GP9ZCamK77V3inuNj+kMRPH8CbDj06UZFDr+8bkKcSH UnJeql+S+Ont4v0/6ZwLc/Z+ajj0xncw2bA7U71Eog1k+AZRYfnYWNl/Gb+oErfL8LAh JQ1VXL8mg7rNbtaUxQFHyg/oivO3Utm0XK/G6S/ZmJ1dKcK43PkXhVGmAOWuherwXk6N JxiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=TXVDMhPJ; dkim=neutral (no key) header.i=@linutronix.de header.b=DB3b0cWA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f6-20020a170902ce8600b00189f1431481si21121430plg.370.2022.12.29.06.20.58; Thu, 29 Dec 2022 06:21:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=TXVDMhPJ; dkim=neutral (no key) header.i=@linutronix.de header.b=DB3b0cWA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233403AbiL2Not (ORCPT + 61 others); Thu, 29 Dec 2022 08:44:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233380AbiL2NoS (ORCPT ); Thu, 29 Dec 2022 08:44:18 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83EC5280; Thu, 29 Dec 2022 05:44:16 -0800 (PST) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1672321453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ONVoAOSV4R74Fcc+S7klnQwitE7KOgWX9DTWXdoRQo0=; b=TXVDMhPJGL1QCQYUmQxrJxkU/cypzAG1uj6UUvbwCzsXTADl0sr21wzpVAog+QM9x2iJo4 P+4oDQub8fT4ZCwg74hqVrTA1HXclyuPqL+Qhrz9vXHJ1N0m+Zz31b9t8e382J+34Oy7Ct saOOgoK8aqg4YdOYU7lbfG4MUTmC+tJZ/khpoRJuvQwsU4GPbu8J8vn8eZfzuJJ5x7oGMl 02RHJ23JJ6x/sfVcX2dlYTiWVFTp6J71bOtOoVKgkGMYQbtzEJMJkP6gQUoh0lDy6rVm8l 2vShLjYpSiVzioTj9ycGy7eoFmN8DGyF7OEb+GcuJ2cDfO+jc0lNE8qbm3GQ7g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1672321453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ONVoAOSV4R74Fcc+S7klnQwitE7KOgWX9DTWXdoRQo0=; b=DB3b0cWA02D46fic+goYCvu+45MlQLaUlbBt0nfXLXaSAlWlRPKVkCxgo3+sXPj+TLlwCI gAz9sAAlYmgnGsAg== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , linux-kernel@vger.kernel.org, Baoquan He , Vivek Goyal , Dave Young , Jonathan Corbet , kexec@lists.infradead.org, linux-doc@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH] docs: gdbmacros: print newest record Date: Thu, 29 Dec 2022 14:49:39 +0106 Message-Id: <20221229134339.197627-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org @head_id points to the newest record, but the printing loop exits when it increments to this value (before printing). Exit the printing loop after the newest record has been printed. The python-based function in scripts/gdb/linux/dmesg.py already does this correctly. Fixes: e60768311af8 ("scripts/gdb: update for lockless printk ringbuffer") Cc: stable@vger.kernel.org Signed-off-by: John Ogness --- Documentation/admin-guide/kdump/gdbmacros.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/admin-guide/kdump/gdbmacros.txt b/Documentation/admin-guide/kdump/gdbmacros.txt index 82aecdcae8a6..030de95e3e6b 100644 --- a/Documentation/admin-guide/kdump/gdbmacros.txt +++ b/Documentation/admin-guide/kdump/gdbmacros.txt @@ -312,10 +312,10 @@ define dmesg set var $prev_flags = $info->flags end - set var $id = ($id + 1) & $id_mask if ($id == $end_id) loop_break end + set var $id = ($id + 1) & $id_mask end end document dmesg base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2 -- 2.30.2