arceus
arceus

Reputation: 337

Introducing Kernel hang for debugging purposes

Is there any way to make kernel hang or panic very early during bootup process, i.e.,while executing start_kernel function. Currently I am using while(1); in start_kernel function to hang the kernel. But I want to use real case scenarios where kernel might hang or panic such as by Enabling/Disabling some config in menuconfig. This is for understanding and applying various kernel debugging solutions for kernel hang.

Upvotes: 2

Views: 459

Answers (1)

arceus
arceus

Reputation: 337

I was able to add a kernel panic without using any pointers and just with the use of panic("Message") function wherever we wanted the panic to test.

Upvotes: 1

Related Questions