Re: [patch V4 07/15] scripts/gdb: Update x86 interrupts to the array based storage
From: Thomas Gleixner
Date: Tue Mar 31 2026 - 10:48:04 EST
On Tue, Mar 31 2026 at 09:26, Thomas Gleixner wrote:
> -def show_irq_err_count(prec):
> - cnt = utils.gdb_eval_or_none("irq_err_count")
> - text = ""
> - if cnt is not None:
> - text += "%*s: %10u\n" % (prec, "ERR", cnt['counter'])
> - return text
Just noticed that this is used by mips and needs to stay.
> def x86_show_interupts(prec):
> - text = x86_show_irqstat(prec, "NMI", '__nmi_count', 'Non-maskable interrupts')
> + info_type = gdb.lookup_type('struct irq_stat_info')
> + info = gdb.parse_and_eval('irq_stat_info')
> + bitmap = gdb.parse_and_eval('irq_stat_count_show')
> + nbits = 8 * int(bitmap.type.sizeof)
and this only works for a bitmap with size <= [32|64]. The correct variant
is:
bitsperlong = 8 * int(bitmap.type.target().sizeof)