Fix FDE indexing while scan debug_info section.
There are some differences between eh_frame and debug_frame formats that are not considered by DWARFCallFrameInfo::GetFDEIndex. An FDE entry contains CIE_pointer in debug_frame in same place as cie_id in eh_frame. As described in dwarf standard (section 6.4.1), CIE_pointer is an "offset into the .debug_frame section". So, variable cie_offset should be equal cie_id for debug_frame. FDE entries with zeroth CIE pointer (which is actually placed in cie_id variable) shouldn't be ignored also. I have also added a little change which allow to use debug_info section when eh_frame is absent. This case really can take place on some platforms. Patch from tatyana-krasnukha. https://reviews.llvm.org/D33504 llvm-svn: 303847
Loading
Please sign in to comment