This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Mixing languages in the same TU and dwarf2out_frame_finish
- From: Cary Coutant <ccoutant at google dot com>
- To: Diego Novillo <dnovillo at google dot com>
- Cc: Jason Merrill <jason at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 7 Jan 2009 18:03:09 -0800
- Subject: Re: Mixing languages in the same TU and dwarf2out_frame_finish
- References: <b798aad50901070727g2ca0e040o8bdd65c42175e31b@mail.gmail.com>
> 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