diff options
author | Jason Molenda <jmolenda@apple.com> | 2013-11-02 02:23:02 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2013-11-02 02:23:02 +0000 |
commit | f23bf7432cfe632976bf9004707cf8133f30e3e1 (patch) | |
tree | 7c999f09d60866c9bea2a4dd8bc1caaa165d1877 /lldb/source/Plugins/Process | |
parent | 30bfa3623b6ec59fc03cba486040eef77cd5f847 (diff) | |
download | bcm5719-llvm-f23bf7432cfe632976bf9004707cf8133f30e3e1.tar.gz bcm5719-llvm-f23bf7432cfe632976bf9004707cf8133f30e3e1.zip |
Add a new base class, Frame. It is a pure virtual function which
defines a protocol that all subclasses will implement. StackFrame
is currently the only subclass and the methods that Frame vends are
nearly identical to StackFrame's old methods.
Update all callers to use Frame*/Frame& instead of pointers to
StackFrames.
This is almost entirely a mechanical change that touches a lot of
the code base so I'm committing it alone. No new functionality is
added with this patch, no new subclasses of Frame exist yet.
I'll probably need to tweak some of the separation, possibly moving
some of StackFrame's methods up in to Frame, but this is a good
starting point.
<rdar://problem/15314068>
llvm-svn: 193907
Diffstat (limited to 'lldb/source/Plugins/Process')
16 files changed, 20 insertions, 20 deletions
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp index bb7e8a317a0..3bef486a2ae 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp @@ -109,7 +109,7 @@ ThreadKDP::GetRegisterContext () } lldb::RegisterContextSP -ThreadKDP::CreateRegisterContextForFrame (StackFrame *frame) +ThreadKDP::CreateRegisterContextForFrame (Frame *frame) { lldb::RegisterContextSP reg_ctx_sp; uint32_t concrete_frame_idx = 0; diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.h b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.h index 7dc373f0355..eda801c1f78 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.h +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.h @@ -39,7 +39,7 @@ public: GetRegisterContext (); virtual lldb::RegisterContextSP - CreateRegisterContextForFrame (lldb_private::StackFrame *frame); + CreateRegisterContextForFrame (lldb_private::Frame *frame); void Dump (lldb_private::Log *log, uint32_t index); diff --git a/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp b/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp index 8b22d6457ad..b020db8d007 100644 --- a/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp +++ b/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp @@ -109,7 +109,7 @@ bool lldb_private::InferiorCallMmap(Process *process, addr_t &allocated_addr, call_plan_sp->SetIsMasterPlan (true); call_plan_sp->SetOkayToDiscard(true); - StackFrame *frame = thread->GetStackFrameAtIndex (0).get(); + Frame *frame = thread->GetStackFrameAtIndex (0).get(); if (frame) { ExecutionContext exe_ctx; @@ -195,7 +195,7 @@ bool lldb_private::InferiorCallMunmap(Process *process, addr_t addr, call_plan_sp->SetIsMasterPlan (true); call_plan_sp->SetOkayToDiscard(true); - StackFrame *frame = thread->GetStackFrameAtIndex (0).get(); + Frame *frame = thread->GetStackFrameAtIndex (0).get(); if (frame) { ExecutionContext exe_ctx; @@ -249,7 +249,7 @@ bool lldb_private::InferiorCall(Process *process, const Address *address, addr_t call_plan_sp->SetIsMasterPlan (true); call_plan_sp->SetOkayToDiscard(true); - StackFrame *frame = thread->GetStackFrameAtIndex (0).get(); + Frame *frame = thread->GetStackFrameAtIndex (0).get(); if (frame) { ExecutionContext exe_ctx; diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDummy.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDummy.cpp index 1e282ce74f2..08be777a728 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextDummy.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextDummy.cpp @@ -25,7 +25,7 @@ #include "lldb/Target/ABI.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Process.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Target/DynamicLoader.h" diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp index c19aec3a02c..92ec99ff053 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp @@ -26,7 +26,7 @@ #include "lldb/Target/ABI.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Process.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Target/DynamicLoader.h" diff --git a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp index 51d2052e193..52d7f17c4f6 100644 --- a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp +++ b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp @@ -335,7 +335,7 @@ StopInfoMachException::CreateStopReasonWithMachException // { // // We have a SIGTRAP, make sure we didn't exec by checking // // for the PC being at "_dyld_start"... -// lldb::StackFrameSP frame_sp (thread.GetStackFrameAtIndex(0)); +// lldb::FrameSP frame_sp (thread.GetStackFrameAtIndex(0)); // if (frame_sp) // { // const Symbol *symbol = frame_sp->GetSymbolContext(eSymbolContextSymbol).symbol; diff --git a/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp b/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp index 56e5a9a59fa..9ab437d015a 100644 --- a/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp +++ b/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp @@ -78,7 +78,7 @@ ThreadMemory::GetRegisterContext () } RegisterContextSP -ThreadMemory::CreateRegisterContextForFrame (StackFrame *frame) +ThreadMemory::CreateRegisterContextForFrame (Frame *frame) { RegisterContextSP reg_ctx_sp; uint32_t concrete_frame_idx = 0; diff --git a/lldb/source/Plugins/Process/Utility/ThreadMemory.h b/lldb/source/Plugins/Process/Utility/ThreadMemory.h index 07eb45dcb43..a45c056c19f 100644 --- a/lldb/source/Plugins/Process/Utility/ThreadMemory.h +++ b/lldb/source/Plugins/Process/Utility/ThreadMemory.h @@ -37,7 +37,7 @@ public: GetRegisterContext (); virtual lldb::RegisterContextSP - CreateRegisterContextForFrame (lldb_private::StackFrame *frame); + CreateRegisterContextForFrame (lldb_private::Frame *frame); virtual bool CalculateStopInfo (); diff --git a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp index 552ae501bd2..111c5d8a9f5 100644 --- a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp +++ b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp @@ -220,7 +220,7 @@ UnwindLLDB::DoGetFrameInfoAtIndex (uint32_t idx, addr_t& cfa, addr_t& pc) } lldb::RegisterContextSP -UnwindLLDB::DoCreateRegisterContextForFrame (StackFrame *frame) +UnwindLLDB::DoCreateRegisterContextForFrame (Frame *frame) { lldb::RegisterContextSP reg_ctx_sp; uint32_t idx = frame->GetConcreteFrameIndex (); diff --git a/lldb/source/Plugins/Process/Utility/UnwindLLDB.h b/lldb/source/Plugins/Process/Utility/UnwindLLDB.h index 5725654a686..23f04be8c59 100644 --- a/lldb/source/Plugins/Process/Utility/UnwindLLDB.h +++ b/lldb/source/Plugins/Process/Utility/UnwindLLDB.h @@ -75,7 +75,7 @@ protected: lldb::addr_t& start_pc); lldb::RegisterContextSP - DoCreateRegisterContextForFrame (lldb_private::StackFrame *frame); + DoCreateRegisterContextForFrame (lldb_private::Frame *frame); typedef std::shared_ptr<RegisterContextLLDB> RegisterContextLLDBSP; diff --git a/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp b/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp index d011314b096..fa76d6d650c 100644 --- a/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp +++ b/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp @@ -73,7 +73,7 @@ UnwindMacOSXFrameBackchain::DoGetFrameInfoAtIndex (uint32_t idx, addr_t& cfa, ad } lldb::RegisterContextSP -UnwindMacOSXFrameBackchain::DoCreateRegisterContextForFrame (StackFrame *frame) +UnwindMacOSXFrameBackchain::DoCreateRegisterContextForFrame (Frame *frame) { lldb::RegisterContextSP reg_ctx_sp; uint32_t concrete_idx = frame->GetConcreteFrameIndex (); @@ -88,7 +88,7 @@ UnwindMacOSXFrameBackchain::GetStackFrameData_i386 (const ExecutionContext &exe_ { m_cursors.clear(); - StackFrame *first_frame = exe_ctx.GetFramePtr(); + Frame *first_frame = exe_ctx.GetFramePtr(); Process *process = exe_ctx.GetProcessPtr(); if (process == NULL) @@ -191,7 +191,7 @@ UnwindMacOSXFrameBackchain::GetStackFrameData_x86_64 (const ExecutionContext &ex if (process == NULL) return 0; - StackFrame *first_frame = exe_ctx.GetFramePtr(); + Frame *first_frame = exe_ctx.GetFramePtr(); std::pair<lldb::addr_t, lldb::addr_t> fp_pc_pair; diff --git a/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h b/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h index 2695376fd6e..501c9ea446c 100644 --- a/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h +++ b/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h @@ -46,7 +46,7 @@ protected: lldb::addr_t& pc); lldb::RegisterContextSP - DoCreateRegisterContextForFrame (lldb_private::StackFrame *frame); + DoCreateRegisterContextForFrame (lldb_private::Frame *frame); friend class RegisterContextMacOSXFrameBackchain; diff --git a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp index 4e475c80bda..86c63e103e9 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp @@ -187,7 +187,7 @@ ThreadGDBRemote::GetRegisterContext () } lldb::RegisterContextSP -ThreadGDBRemote::CreateRegisterContextForFrame (StackFrame *frame) +ThreadGDBRemote::CreateRegisterContextForFrame (Frame *frame) { lldb::RegisterContextSP reg_ctx_sp; uint32_t concrete_frame_idx = 0; diff --git a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h index dd4cc036ef8..783e2cf45b6 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h +++ b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h @@ -45,7 +45,7 @@ public: GetRegisterContext (); virtual lldb::RegisterContextSP - CreateRegisterContextForFrame (lldb_private::StackFrame *frame); + CreateRegisterContextForFrame (lldb_private::Frame *frame); void Dump (lldb_private::Log *log, uint32_t index); diff --git a/lldb/source/Plugins/Process/mach-core/ThreadMachCore.cpp b/lldb/source/Plugins/Process/mach-core/ThreadMachCore.cpp index 85a7a20e042..bd404d71462 100644 --- a/lldb/source/Plugins/Process/mach-core/ThreadMachCore.cpp +++ b/lldb/source/Plugins/Process/mach-core/ThreadMachCore.cpp @@ -88,7 +88,7 @@ ThreadMachCore::GetRegisterContext () } lldb::RegisterContextSP -ThreadMachCore::CreateRegisterContextForFrame (StackFrame *frame) +ThreadMachCore::CreateRegisterContextForFrame (Frame *frame) { lldb::RegisterContextSP reg_ctx_sp; uint32_t concrete_frame_idx = 0; diff --git a/lldb/source/Plugins/Process/mach-core/ThreadMachCore.h b/lldb/source/Plugins/Process/mach-core/ThreadMachCore.h index 756a04a3cbd..701def6f27a 100644 --- a/lldb/source/Plugins/Process/mach-core/ThreadMachCore.h +++ b/lldb/source/Plugins/Process/mach-core/ThreadMachCore.h @@ -35,7 +35,7 @@ public: GetRegisterContext (); virtual lldb::RegisterContextSP - CreateRegisterContextForFrame (lldb_private::StackFrame *frame); + CreateRegisterContextForFrame (lldb_private::Frame *frame); static bool ThreadIDIsValid (lldb::tid_t thread); |