Commit f2e4cca2 authored by John Ogness's avatar John Ogness Committed by Petr Mladek

docs: gdbmacros: print newest record

@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: e6076831 ("scripts/gdb: update for lockless printk ringbuffer")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJohn Ogness <john.ogness@linutronix.de>
Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20221229134339.197627-1-john.ogness@linutronix.de
parent 98d0052d
...@@ -312,10 +312,10 @@ define dmesg ...@@ -312,10 +312,10 @@ define dmesg
set var $prev_flags = $info->flags set var $prev_flags = $info->flags
end end
set var $id = ($id + 1) & $id_mask
if ($id == $end_id) if ($id == $end_id)
loop_break loop_break
end end
set var $id = ($id + 1) & $id_mask
end end
end end
document dmesg document dmesg
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment