Issue Details:
The addresses for SEH tables for Windows are incorrect as 1 was unconditionally being added to all addresses. +1 is required for the SEH end address (as it is exclusive), but the SEH start addresses is inclusive and so should be used as-is.
In the IP2State tables, the addresses are +1 for AMD64 to handle the return address for a call being after the actual call instruction but are as-is for ARM and ARM64 as the StateFromIp function in the VC runtime automatically takes this into account and adjusts the address that is it looking up.
Fix Details:
- Split the getLabel function into two: getLabel (used for the SEH start address and ARM+ARM64 IP2State addresses) and getLabelPlusOne (for the SEH end address, and AMD64 IP2State addresses).
@rnk Would you prefer if I followed the existing casing here, or used the casing that clang-tidy suggests?