clayborg added a comment.
My opinion is we need to be able to ask both the SymbolFile and ObjectFile for
unwind plans in the API, but we can always just ask the SymbolFile for the
unwind plan and the default SymbolFile virtual function can just defer to the
ObjectFile. We also need to say "I need an async unwind plan" or "I need an
sync unwind plan". Since we always have a symbol file, we fall back to
SymbolFileSymtab if we don't have DWARF or PDB.
If we look at FuncUnwinders we see just how many different ways we currently
have:
class FuncUnwinders {
...
lldb::UnwindPlanSP m_unwind_plan_assembly_sp;
lldb::UnwindPlanSP m_unwind_plan_eh_frame_sp;
lldb::UnwindPlanSP m_unwind_plan_debug_frame_sp;
// augmented by assembly inspection so it's valid everywhere
lldb::UnwindPlanSP m_unwind_plan_eh_frame_augmented_sp;
lldb::UnwindPlanSP m_unwind_plan_debug_frame_augmented_sp;
std::vector<lldb::UnwindPlanSP> m_unwind_plan_compact_unwind;
lldb::UnwindPlanSP m_unwind_plan_arm_unwind_sp;
lldb::UnwindPlanSP m_unwind_plan_symbol_file_sp;
lldb::UnwindPlanSP m_unwind_plan_fast_sp;
lldb::UnwindPlanSP m_unwind_plan_arch_default_sp;
lldb::UnwindPlanSP m_unwind_plan_arch_default_at_func_entry_sp;
};
So it seems we need to be able to ask:
- SymbolFile for unwind plan which would be able to get us:
- m_unwind_plan_debug_frame_sp
- m_unwind_plan_debug_frame_augmented_sp
- m_unwind_plan_symbol_file_sp
- ObjectFile for unwind plan which would get us:
- m_unwind_plan_eh_frame_sp
- m_unwind_plan_eh_frame_augmented_sp
- m_unwind_plan_arm_unwind_sp
- would assembly unwind go here?
- Achitecture plug-ins for unwind plan
- m_unwind_plan_arch_default_sp
- m_unwind_plan_arch_default_at_func_entry_sp
- would assembly unwind go here?
It would be great to clean this up with a function that SymbolFile, ObjectFile
and Architecture implement like:
virtual UnwindPlanSP GetUnwindPlan(bool async);
The architecture plug-ins could drop the "bool async" part. But in general this
would really clean up the code in FuncUnwinders.
Repository:
rLLDB LLDB
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67347/new/
https://reviews.llvm.org/D67347
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits