This is an archive of the discontinued LLVM Phabricator instance.

[libunwind] [SEH] Add initial support for AArch64
ClosedPublic

Authored by mstorsjo on Dec 13 2018, 2:18 PM.

Details

Summary

This doesn't yet implement inspecting the .pdata/.xdata to find the LSDA pointer (in UnwindCursor::getInfoFromSEH), but normal C++ exception handling seems to run just fine without it. (The only place I can see where it's even referenced is in unwind_phase2_forced, and I can't find a codepath where libcxxabi would end up calling that.)

Diff Detail

Event Timeline

mstorsjo created this revision.Dec 13 2018, 2:18 PM

LGTM, but I'd feel better if someone else signed off on this, too.

src/Unwind-seh.cpp
175–180

This looks suspicious for AArch64... I guess the values for UNW_ARM_R0 and UNW_ARM64_X0 are the same.

mstorsjo marked 2 inline comments as done.Dec 13 2018, 11:52 PM
mstorsjo added inline comments.
src/Unwind-seh.cpp
175–180

Oh, good catch. Yes, they have the same values, but I shouldn't (and didn't intend to) rely on that.

mstorsjo updated this revision to Diff 178189.Dec 13 2018, 11:52 PM
mstorsjo marked an inline comment as done.

Using the right UNW_ARM64_X0/1 constants with unw_get_reg.

Ping @mclow.lists - this got a LGTM from @cdavis5x last week

This revision is now accepted and ready to land.Dec 18 2018, 11:54 AM
This revision was automatically updated to reflect the committed changes.