> However, on LTO, we may have several personality functions in the same > object file. So, it's not clear what should we do here. Should we > call dwarf2out_frame_finish() for each of the personalities that we > saw in that file?
I don't think so. We're calling dwarf2out_frame_finish() at the end of the TU, not at the end of each function, and it generates the CFI information for all functions in the TU at once. I think you're going to need to do the following: - In dwarf2out_begin_prologue, store the value of get_personality_function (current_function_decl) in the fde_table entry for the current function. - In output_call_frame_info, scan the fde_table, and generate a separate CIE record for each unique personality function -- this is where the pointer to the personality routine is recorded. Then when generating the FDE records, set the CIE_pointer field to point to the appropriate CIE record. Currently, all FDE records share a single CIE record. On the other hand, if you can arrange for dwarf2out_do_cfi_asm() to return true, the assembler should take care of it already. -cary