Page MenuHomeFreeBSD

Always print a stack when in the kernel debugger
AcceptedPublic

Authored by andrew on Dec 15 2021, 4:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 16 2025, 12:22 AM
Unknown Object (File)
Nov 14 2025, 9:15 PM
Unknown Object (File)
Nov 13 2025, 10:18 AM
Unknown Object (File)
Nov 6 2025, 10:46 PM
Unknown Object (File)
Nov 6 2025, 4:29 PM
Unknown Object (File)
Nov 4 2025, 4:39 PM
Unknown Object (File)
Oct 28 2025, 3:20 AM
Unknown Object (File)
Oct 24 2025, 12:28 AM
Subscribers

Details

Reviewers
jhb
markj
manu
imp
Group Reviewers
arm64
Summary

When in the kernel debugger it's useful to print the stack even if it
isn't within the expected stack memory. This can happen early in the
boot when the thread stack memory has't been set.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43379
Build 40267: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Dec 15 2021, 5:38 PM

I think this won't work in CHERI? Another approach might be to recognize the early boot case in unwind_frame() and skip the kstack_contains check if you are on the early stack (e.g. !cold) instead which would be smaller (don't have to add the bool and change all the callers)