diff options
author | Greg Clayton <gclayton@apple.com> | 2011-02-15 00:19:15 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-02-15 00:19:15 +0000 |
commit | e576ab2996b5fa4facf2bf7e73cc4679cb17c133 (patch) | |
tree | bdcafd5e6a9f09adf5a3e9d3b7e92f9d693b939c /lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h | |
parent | 91c08ad14a81cc40769442c19a23addfba28371e (diff) | |
download | bcm5719-llvm-e576ab2996b5fa4facf2bf7e73cc4679cb17c133.tar.gz bcm5719-llvm-e576ab2996b5fa4facf2bf7e73cc4679cb17c133.zip |
All UnwindPlan objects are now passed around as shared pointers.
ArchDefaultUnwindPlan plug-in interfaces are now cached per architecture
instead of being leaked for every frame.
Split the ArchDefaultUnwindPlan_x86 into ArchDefaultUnwindPlan_x86_64 and
ArchDefaultUnwindPlan_i386 interfaces.
There were sporadic crashes that were due to something leaking or being
destroyed when doing stack crawls. This patch should clear up these issues.
llvm-svn: 125541
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h')
-rw-r--r-- | lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h index ba0e0522059..f75a9b84fc5 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h +++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h @@ -20,8 +20,10 @@ class RegisterContextLLDB : public lldb_private::RegisterContext { public: + typedef lldb::SharedPtr<RegisterContextLLDB>::Type SharedPtr; + RegisterContextLLDB (lldb_private::Thread &thread, - const lldb::RegisterContextSP& next_frame, + const SharedPtr& next_frame, lldb_private::SymbolContext& sym_ctx, uint32_t frame_number); @@ -147,22 +149,23 @@ private: bool ReadGPRValue (int register_kind, uint32_t regnum, lldb::addr_t &value); - lldb_private::UnwindPlan * + lldb::UnwindPlanSP GetFastUnwindPlanForFrame (); - lldb_private::UnwindPlan * + lldb::UnwindPlanSP GetFullUnwindPlanForFrame (); lldb_private::Thread& m_thread; - lldb::RegisterContextSP m_next_frame; + + SharedPtr m_next_frame; /// // The following tell us how to retrieve the CALLER's register values (ie the "previous" frame, aka the frame above) // i.e. where THIS frame saved them /// - lldb_private::UnwindPlan *m_fast_unwind_plan; // may be NULL - lldb_private::UnwindPlan *m_full_unwind_plan; + lldb::UnwindPlanSP m_fast_unwind_plan_sp; // may be NULL + lldb::UnwindPlanSP m_full_unwind_plan_sp; bool m_all_registers_available; // Can we retrieve all regs or just nonvolatile regs? int m_frame_type; // enum FrameType |