Page MenuHomeFreeBSD

trap_cfi(9): introduce powerpc implemenation
AcceptedPublic

Authored by mchoo on Sun, Sep 13, 6:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 2, 2:14 AM
Unknown Object (File)
Thu, Oct 1, 6:03 PM
Unknown Object (File)
Thu, Oct 1, 10:16 AM
Unknown Object (File)
Thu, Oct 1, 7:56 AM
Unknown Object (File)
Thu, Oct 1, 7:54 AM
Unknown Object (File)
Thu, Oct 1, 7:48 AM
Unknown Object (File)
Thu, Oct 1, 7:07 AM
Unknown Object (File)
Thu, Oct 1, 7:02 AM
Subscribers

Details

Reviewers
jhb
jhibbits
adrian
Group Reviewers
PowerPC
Summary

MFC after: 2 weeks
MFC to: stable/14, stable/15
Sponsored by: FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
No Test Coverage
Build Status
Buildable 77270
Build 74153: arc lint + arc unit

Event Timeline

mchoo requested review of this revision.Sun, Sep 13, 6:19 PM

ooo whats this do!

Early in this year, I created a PR on lldb side that does trapframe unwinding similar to what KGDB does, but one contributors from Apple was against it. Instead, he suggested using CFI directives for unwinding special frames which is what Apple folks do for debugging Darwin. I thought it was a good idea because a) no major changes needed on LLDB side and b) this is more "standard" (DWARF) way of debugging across call frames.

I've tested trapframe unwinding on amd64 with fully CFI-patched kernel and lldb. It gives equivalent result to KGDB for backtrace and more accurate result for inspecting registers as KGDB displays some amd64 GPRs with values from earlier frames instead of marking them unavailable. I haven't tested the fully CFI-patched kernel for other architectures, but this revision only introduces necessary helpers and doesn't add anything to the kernel binary, so I think it's fine. If you want to see the full series of patches, see here. I'll upstream these once I finish all the tests (currently CFI looks fine on ELF inspection, but I need to run the kernels)

  • trap_cfi(9): add assembly interface for powerpc
  • trap_cfi(9): add exception handler CFI for powerpc

I could not open HPT mmu minidump through libkvm, so this hasn't been tested yet similar to armv7 (D59650)

mchoo retitled this revision from trap_cfi(9): add assembly interface for powerpc to trap_cfi(9): introduce powerpc implemenation.Tue, Sep 15, 5:37 PM

I could not open HPT mmu minidump through libkvm, so this hasn't been tested yet similar to armv7 (D59650)

Applying D59719 lets me extract and debug ppc64le dumps. I can confirm frame unwinding works. Ready for review.

reflect changes from amd64 revision

This revision is now accepted and ready to land.Thu, Sep 24, 7:18 PM