Skip to content

Commit f2e4cca

Browse files
jognesspmladek
authored andcommitted
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: e607683 ("scripts/gdb: update for lockless printk ringbuffer") Cc: [email protected] Signed-off-by: John Ogness <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 98d0052 commit f2e4cca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Documentation/admin-guide/kdump/gdbmacros.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,10 @@ define dmesg
312312
set var $prev_flags = $info->flags
313313
end
314314

315-
set var $id = ($id + 1) & $id_mask
316315
if ($id == $end_id)
317316
loop_break
318317
end
318+
set var $id = ($id + 1) & $id_mask
319319
end
320320
end
321321
document dmesg

0 commit comments

Comments
 (0)