Custom panic handler?

I’m working on an x86-64 OS kernel project. I have a kpanic proc that does what I need but I wanted to investigate setting a custom panic handler. I’ve dug through the base and core packages and haven’t seen anything to indicate that I can do so. I just wanted to make sure I didn’t overlook anything.

To be clear, I’m not suggesting this should be a feature. Just crossing my i’s and dotting my t’s.

2 Likes

panic calls context.assertion_failure_proc, but that is about as far as the default Odin runtime goes for customizing it. You can see this being used in the test runner.

3 Likes

Oh I missed that. I’m setting up a context in my kernel init code so that might work? I’ll give it a try. Thanks.

Edit: It does work. Appreciate it!

1 Like