For historical reasons Darwin/i386 has ebp and esp swapped in the eh_frame register numbering. That is:
Darwin Other Reg # eh_frame eh_frame DWARF ===== ======== ======== ===== 4 ebp esp esp 5 esp ebp ebp
Although the UNW_X86_* constants are not intended to be coupled with DWARF / eh_frame numbering they are currently conflated in libunwind, so add the numbering for non-Darwin operating systems.