Re: [PATCH] BUG preserve registers

Andrew Morton
2002-02-09T08:33:42Z

Hugh Dickins wrote:
>
> It's frustrating that when Verbose BUG() reporting is configured,
> info gets lost: fix for i386 below. This is your area, Andrew:

Well you know I'm a sucker for debug code.

> please confirm to Marcelo if you'd like him to apply this.

I'd like it.

> Example: in hpa's recent prune_dcache crash, %eax showed the length of
> the kernel BUG printk, when we'd have liked to see the invalid d_count:
> off-by-one or obviously corrupted?

Absolutely.

> Hugh
>
> --- 2.4.18-pre9/arch/i386/kernel/entry.S Thu Feb 7 14:38:06 2002
> +++ linux/arch/i386/kernel/entry.S Fri Feb 8 21:47:39 2002

The implementation looks fine to me. You've checked that it
builds OK with CONFIG_DEBUG_BUGVERBOSE=n?

It's a shame that gcc never seems to have gained full support for
attribute __interrupt__, which, if they did it right, would preserve
all registers. gcc-for-PPC seems to support it.

-