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 | |
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
102 files changed, 891 insertions, 461 deletions
diff --git a/lldb/include/lldb/API/SBFrame.h b/lldb/include/lldb/API/SBFrame.h index 4ae38c13bed..c888e8b5c07 100644 --- a/lldb/include/lldb/API/SBFrame.h +++ b/lldb/include/lldb/API/SBFrame.h @@ -216,7 +216,7 @@ public: bool GetDescription (lldb::SBStream &description); - SBFrame (const lldb::StackFrameSP &lldb_object_sp); + SBFrame (const lldb::FrameSP &lldb_object_sp); protected: @@ -228,11 +228,11 @@ protected: friend class lldb_private::ScriptInterpreterPython; #endif - lldb::StackFrameSP + lldb::FrameSP GetFrameSP() const; void - SetFrameSP (const lldb::StackFrameSP &lldb_object_sp); + SetFrameSP (const lldb::FrameSP &lldb_object_sp); lldb::ExecutionContextRefSP m_opaque_sp; }; diff --git a/lldb/include/lldb/Core/ValueObject.h b/lldb/include/lldb/Core/ValueObject.h index 1ef421676ee..6cf6712bb30 100644 --- a/lldb/include/lldb/Core/ValueObject.h +++ b/lldb/include/lldb/Core/ValueObject.h @@ -35,32 +35,33 @@ namespace lldb_private { /// ValueObject: /// /// This abstract class provides an interface to a particular value, be it a register, a local or global variable, -/// that is evaluated in some particular scope. The ValueObject also has the capibility of being the "child" of +/// that is evaluated in some particular scope. The ValueObject also has the capability of being the "child" of /// some other variable object, and in turn of having children. /// If a ValueObject is a root variable object - having no parent - then it must be constructed with respect to some /// particular ExecutionContextScope. If it is a child, it inherits the ExecutionContextScope from its parent. /// The ValueObject will update itself if necessary before fetching its value, summary, object description, etc. /// But it will always update itself in the ExecutionContextScope with which it was originally created. - +/// /// A brief note on life cycle management for ValueObjects. This is a little tricky because a ValueObject can contain /// various other ValueObjects - the Dynamic Value, its children, the dereference value, etc. Any one of these can be -/// handed out as a shared pointer, but for that contained value object to be valid, the root object and potentially other -/// of the value objects need to stay around. +/// handed out as a shared pointer, but for that contained value object to be valid, the root object and potentially +/// other of the value objects need to stay around. /// We solve this problem by handing out shared pointers to the Value Object and any of its dependents using a shared /// ClusterManager. This treats each shared pointer handed out for the entire cluster as a reference to the whole /// cluster. The whole cluster will stay around until the last reference is released. /// /// The ValueObject mostly handle this automatically, if a value object is made with a Parent ValueObject, then it adds /// itself to the ClusterManager of the parent. - -/// It does mean that external to the ValueObjects we should only ever make available ValueObjectSP's, never ValueObjects -/// or pointers to them. So all the "Root level" ValueObject derived constructors should be private, and -/// should implement a Create function that new's up object and returns a Shared Pointer that it gets from the GetSP() method. +/// +/// It does mean that external to the ValueObjects we should only ever make available ValueObjectSP's, never +/// ValueObjects or pointers to them. So all the "Root level" ValueObject derived constructors should be private, and +/// should implement a Create function that new's up object and returns a Shared Pointer that it gets from the GetSP() +/// method. /// /// However, if you are making an derived ValueObject that will be contained in a parent value object, you should just /// hold onto a pointer to it internally, and by virtue of passing the parent ValueObject into its constructor, it will -/// be added to the ClusterManager for the parent. Then if you ever hand out a Shared Pointer to the contained ValueObject, -/// just do so by calling GetSP() on the contained object. +/// be added to the ClusterManager for the parent. Then if you ever hand out a Shared Pointer to the contained +/// ValueObject, just do so by calling GetSP() on the contained object. class ValueObject : public UserID { @@ -361,7 +362,7 @@ public: return m_update_point.GetExecutionContextRef().GetThreadSP(); } - lldb::StackFrameSP + lldb::FrameSP GetFrameSP() const { return m_update_point.GetExecutionContextRef().GetFrameSP(); diff --git a/lldb/include/lldb/DataFormatters/FormatNavigator.h b/lldb/include/lldb/DataFormatters/FormatNavigator.h index cd5f6824e19..c9397fd645a 100644 --- a/lldb/include/lldb/DataFormatters/FormatNavigator.h +++ b/lldb/include/lldb/DataFormatters/FormatNavigator.h @@ -32,7 +32,7 @@ #include "lldb/Target/ObjCLanguageRuntime.h" #include "lldb/Target/Process.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/TargetList.h" namespace lldb_private { diff --git a/lldb/include/lldb/Expression/ClangUserExpression.h b/lldb/include/lldb/Expression/ClangUserExpression.h index 47bfebb4664..cc38683d190 100644 --- a/lldb/include/lldb/Expression/ClangUserExpression.h +++ b/lldb/include/lldb/Expression/ClangUserExpression.h @@ -394,7 +394,7 @@ private: LockAndCheckContext (ExecutionContext &exe_ctx, lldb::TargetSP &target_sp, lldb::ProcessSP &process_sp, - lldb::StackFrameSP &frame_sp); + lldb::FrameSP &frame_sp); lldb::ProcessWP m_process_wp; ///< The process used as the context for the expression. Address m_address; ///< The address the process is stopped in. diff --git a/lldb/include/lldb/Expression/DWARFExpression.h b/lldb/include/lldb/Expression/DWARFExpression.h index 5ecdf7fe9ee..e84043dbf96 100644 --- a/lldb/include/lldb/Expression/DWARFExpression.h +++ b/lldb/include/lldb/Expression/DWARFExpression.h @@ -310,7 +310,7 @@ public: /// @param[in] reg_ctx /// An optional parameter which provides a RegisterContext for use /// when evaluating the expression (i.e. for fetching register values). - /// Normally this will come from the ExecutionContext's StackFrame but + /// Normally this will come from the ExecutionContext's Frame but /// in the case where an expression needs to be evaluated while building /// the stack frame list, this short-cut is available. /// diff --git a/lldb/include/lldb/Expression/Materializer.h b/lldb/include/lldb/Expression/Materializer.h index 208a0813392..6a25da453a6 100644 --- a/lldb/include/lldb/Expression/Materializer.h +++ b/lldb/include/lldb/Expression/Materializer.h @@ -15,7 +15,7 @@ #include "lldb/Expression/IRMemoryMap.h" #include "lldb/Host/Mutex.h" #include "lldb/Symbol/SymbolContext.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include <vector> @@ -58,7 +58,7 @@ public: friend class Materializer; Dematerializer (Materializer &materializer, - lldb::StackFrameSP &frame_sp, + lldb::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address) : m_materializer(&materializer), @@ -82,7 +82,7 @@ public: typedef std::shared_ptr<Dematerializer> DematerializerSP; typedef std::weak_ptr<Dematerializer> DematerializerWP; - DematerializerSP Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err); + DematerializerSP Materialize (lldb::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err); uint32_t AddPersistentVariable (lldb::ClangExpressionVariableSP &persistent_variable_sp, Error &err); uint32_t AddVariable (lldb::VariableSP &variable_sp, Error &err); @@ -122,8 +122,8 @@ public: { } - virtual void Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) = 0; - virtual void Dematerialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, + virtual void Materialize (lldb::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) = 0; + virtual void Dematerialize (lldb::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, lldb::addr_t frame_top, lldb::addr_t frame_bottom, Error &err) = 0; virtual void DumpToLog (IRMemoryMap &map, lldb::addr_t process_address, Log *log) = 0; virtual void Wipe (IRMemoryMap &map, lldb::addr_t process_address) = 0; diff --git a/lldb/include/lldb/Interpreter/ScriptInterpreter.h b/lldb/include/lldb/Interpreter/ScriptInterpreter.h index 9f529b82291..cc414cfa62f 100644 --- a/lldb/include/lldb/Interpreter/ScriptInterpreter.h +++ b/lldb/include/lldb/Interpreter/ScriptInterpreter.h @@ -86,12 +86,12 @@ public: typedef bool (*SWIGBreakpointCallbackFunction) (const char *python_function_name, const char *session_dictionary_name, - const lldb::StackFrameSP& frame_sp, + const lldb::FrameSP& frame_sp, const lldb::BreakpointLocationSP &bp_loc_sp); typedef bool (*SWIGWatchpointCallbackFunction) (const char *python_function_name, const char *session_dictionary_name, - const lldb::StackFrameSP& frame_sp, + const lldb::FrameSP& frame_sp, const lldb::WatchpointSP &wp_sp); typedef bool (*SWIGPythonTypeScriptCallbackFunction) (const char *python_function_name, @@ -143,7 +143,7 @@ public: typedef bool (*SWIGPythonScriptKeyword_Frame) (const char* python_function_name, const char* session_dictionary_name, - lldb::StackFrameSP& frame, + lldb::FrameSP& frame, std::string& output); typedef void* (*SWIGPython_GetDynamicSetting) (void* module, @@ -468,7 +468,7 @@ public: virtual bool RunScriptFormatKeyword (const char* impl_function, - StackFrame* frame, + Frame* frame, std::string& output, Error& error) { diff --git a/lldb/include/lldb/Interpreter/ScriptInterpreterPython.h b/lldb/include/lldb/Interpreter/ScriptInterpreterPython.h index 4b3dc61f3ee..a32f6e1f71c 100644 --- a/lldb/include/lldb/Interpreter/ScriptInterpreterPython.h +++ b/lldb/include/lldb/Interpreter/ScriptInterpreterPython.h @@ -202,7 +202,7 @@ public: virtual bool RunScriptFormatKeyword (const char* impl_function, - StackFrame* frame, + Frame* frame, std::string& output, Error& error); diff --git a/lldb/include/lldb/Symbol/Variable.h b/lldb/include/lldb/Symbol/Variable.h index 07295d090ee..3e45fdade9f 100644 --- a/lldb/include/lldb/Symbol/Variable.h +++ b/lldb/include/lldb/Symbol/Variable.h @@ -124,10 +124,10 @@ public: CalculateSymbolContext (SymbolContext *sc); bool - IsInScope (StackFrame *frame); + IsInScope (Frame *frame); bool - LocationIsValidForFrame (StackFrame *frame); + LocationIsValidForFrame (Frame *frame); bool LocationIsValidForAddress (const Address &address); diff --git a/lldb/include/lldb/Target/ABI.h b/lldb/include/lldb/Target/ABI.h index 16f8ee7fc7d..8de9219e085 100644 --- a/lldb/include/lldb/Target/ABI.h +++ b/lldb/include/lldb/Target/ABI.h @@ -53,7 +53,7 @@ public: // Set the Return value object in the current frame as though a function with virtual Error - SetReturnValueObject(lldb::StackFrameSP &frame_sp, lldb::ValueObjectSP &new_value) = 0; + SetReturnValueObject(lldb::FrameSP &frame_sp, lldb::ValueObjectSP &new_value) = 0; protected: // This is the method the ABI will call to actually calculate the return value. diff --git a/lldb/include/lldb/Target/ExecutionContext.h b/lldb/include/lldb/Target/ExecutionContext.h index 4038e70b0c5..f0f9c9b9bae 100644 --- a/lldb/include/lldb/Target/ExecutionContext.h +++ b/lldb/include/lldb/Target/ExecutionContext.h @@ -230,10 +230,10 @@ public: /// context to make a weak reference to the frame's thread, process /// and target, use the ExecutionContextRef::SetContext() functions. /// - /// @see ExecutionContextRef::SetContext(const lldb::StackFrameSP &) + /// @see ExecutionContextRef::SetContext(const lldb::FrameSP &) //------------------------------------------------------------------ void - SetFrameSP (const lldb::StackFrameSP &frame_sp); + SetFrameSP (const lldb::FrameSP &frame_sp); void SetTargetPtr (Target* target, bool adopt_selected); @@ -245,7 +245,7 @@ public: SetThreadPtr (Thread *thread); void - SetFramePtr (StackFrame *frame); + SetFramePtr (Frame *frame); //------------------------------------------------------------------ /// Get accessor that creates a strong reference from the weak target @@ -284,7 +284,7 @@ public: /// @returns /// A shared pointer to a frame that is not guaranteed to be valid. //------------------------------------------------------------------ - lldb::StackFrameSP + lldb::FrameSP GetFrameSP () const; //------------------------------------------------------------------ @@ -393,14 +393,14 @@ public: ExecutionContext (const lldb::TargetSP &target_sp, bool get_process); ExecutionContext (const lldb::ProcessSP &process_sp); ExecutionContext (const lldb::ThreadSP &thread_sp); - ExecutionContext (const lldb::StackFrameSP &frame_sp); + ExecutionContext (const lldb::FrameSP &frame_sp); //------------------------------------------------------------------ // Create execution contexts from weak pointers //------------------------------------------------------------------ ExecutionContext (const lldb::TargetWP &target_wp, bool get_process); ExecutionContext (const lldb::ProcessWP &process_wp); ExecutionContext (const lldb::ThreadWP &thread_wp); - ExecutionContext (const lldb::StackFrameWP &frame_wp); + ExecutionContext (const lldb::FrameWP &frame_wp); ExecutionContext (const ExecutionContextRef &exe_ctx_ref); ExecutionContext (const ExecutionContextRef *exe_ctx_ref); @@ -440,7 +440,7 @@ public: //------------------------------------------------------------------ ExecutionContext (Process* process, Thread *thread = NULL, - StackFrame * frame = NULL); + Frame * frame = NULL); ~ExecutionContext(); @@ -522,7 +522,7 @@ public: /// /// @see ExecutionContext::HasFrameScope() const //------------------------------------------------------------------ - StackFrame * + Frame * GetFramePtr () const { return m_frame_sp.get(); @@ -580,7 +580,7 @@ public: /// /// @see ExecutionContext::HasFrameScope() const //------------------------------------------------------------------ - StackFrame & + Frame & GetFrameRef () const; //------------------------------------------------------------------ @@ -621,7 +621,7 @@ public: /// /// The returned shared pointer is not guaranteed to be valid. //------------------------------------------------------------------ - const lldb::StackFrameSP & + const lldb::FrameSP & GetFrameSP () const { return m_frame_sp; @@ -649,7 +649,7 @@ public: /// Set accessor to set only the frame shared pointer. //------------------------------------------------------------------ void - SetFrameSP (const lldb::StackFrameSP &frame_sp); + SetFrameSP (const lldb::FrameSP &frame_sp); //------------------------------------------------------------------ /// Set accessor to set only the target shared pointer from a target @@ -677,7 +677,7 @@ public: /// pointer. //------------------------------------------------------------------ void - SetFramePtr (StackFrame *frame); + SetFramePtr (Frame *frame); //------------------------------------------------------------------ // Set the execution context using a target shared pointer. @@ -717,7 +717,7 @@ public: // If "frame_sp" is not valid, all shared pointers are reset. //------------------------------------------------------------------ void - SetContext (const lldb::StackFrameSP &frame_sp); + SetContext (const lldb::FrameSP &frame_sp); //------------------------------------------------------------------ /// Returns true the ExecutionContext object contains a valid @@ -774,7 +774,7 @@ protected: lldb::TargetSP m_target_sp; ///< The target that owns the process/thread/frame lldb::ProcessSP m_process_sp; ///< The process that owns the thread/frame lldb::ThreadSP m_thread_sp; ///< The thread that owns the frame - lldb::StackFrameSP m_frame_sp; ///< The stack frame in thread. + lldb::FrameSP m_frame_sp; ///< The stack frame in thread. }; } // namespace lldb_private diff --git a/lldb/include/lldb/Target/ExecutionContextScope.h b/lldb/include/lldb/Target/ExecutionContextScope.h index 7ba40971af2..60ef1a23be1 100644 --- a/lldb/include/lldb/Target/ExecutionContextScope.h +++ b/lldb/include/lldb/Target/ExecutionContextScope.h @@ -27,7 +27,7 @@ namespace lldb_private { /// objects can inherit from this pure virtual class can reconstruct /// their execution context without having to keep a complete /// ExecutionContext object in the object state. Examples of these -/// objects include: Process, Thread, RegisterContext and StackFrame. +/// objects include: Process, Thread, RegisterContext and Frame. /// /// Bbjects can contain a valid pointer to an instance of this so they /// can reconstruct the execution context. @@ -51,8 +51,8 @@ public: virtual lldb::ThreadSP CalculateThread () = 0; - virtual lldb::StackFrameSP - CalculateStackFrame () = 0; + virtual lldb::FrameSP + CalculateFrame () = 0; //------------------------------------------------------------------ /// Reconstruct the object's execution context into \a sc. diff --git a/lldb/include/lldb/Target/Frame.h b/lldb/include/lldb/Target/Frame.h new file mode 100644 index 00000000000..ee52356b1e0 --- /dev/null +++ b/lldb/include/lldb/Target/Frame.h @@ -0,0 +1,421 @@ +//===-- Frame.h --------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef liblldb_Frame_h_ +#define liblldb_Frame_h_ + +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes +#include "lldb/Core/Error.h" +#include "lldb/Core/Flags.h" +#include "lldb/Core/Scalar.h" +#include "lldb/Core/StreamString.h" +#include "lldb/Core/UserID.h" +#include "lldb/Core/ValueObjectList.h" +#include "lldb/Symbol/SymbolContext.h" +#include "lldb/Target/ExecutionContextScope.h" +#include "lldb/Target/StackID.h" + +namespace lldb_private { + +/// @class Frame Frame.h "lldb/Target/Frame.h" +/// +/// @brief This base class provides an interface to stack frames. +/// +/// Frame is a pure virtual class, instances of the subclasses should be +/// created depending on the type of frame -- a live frame on a thread's +/// stack, an inlined code frame, a historical frame. +/// +/// Frames may have a Canonical Frame Address (CFA) or not. A frame may +/// have a plain pc value or it may have a pc value + stop_id to indicate +/// a specific point in the debug session so the correct section load list +/// is used for symbolication. +/// +/// Local variables may be available, or not. A register context may be +/// available, or not. + +class Frame : + public ExecutionContextScope, + public std::enable_shared_from_this<Frame> +{ +public: + enum ExpressionPathOption + { + eExpressionPathOptionCheckPtrVsMember = (1u << 0), + eExpressionPathOptionsNoFragileObjcIvar = (1u << 1), + eExpressionPathOptionsNoSyntheticChildren = (1u << 2), + eExpressionPathOptionsNoSyntheticArrayRange = (1u << 3), + eExpressionPathOptionsAllowDirectIVarAccess = (1u << 4) + }; + + virtual + ~Frame () {} + + virtual lldb::ThreadSP + GetThread () const = 0; + + virtual StackID& + GetStackID() = 0; + + //------------------------------------------------------------------ + /// Get an Address for the current pc value in this Frame. + /// + /// May not be the same as the actual PC value for inlined stack frames. + /// + /// @return + /// The Address object set to the current PC value. + //------------------------------------------------------------------ + virtual const Address& + GetFrameCodeAddress() = 0; + + //------------------------------------------------------------------ + /// Change the pc value for a given thread. + /// + /// Change the current pc value for the frame on this thread. + /// + /// @param[in] pc + /// The load address that the pc will be set to. + /// + /// @return + /// true if the pc was changed. false if this failed -- possibly + /// because this frame is not a live Frame. + //------------------------------------------------------------------ + virtual bool + ChangePC (lldb::addr_t pc) = 0; + + //------------------------------------------------------------------ + /// Provide a SymbolContext for this Frame's current pc value. + /// + /// The Frame maintains this SymbolContext and adds additional information + /// to it on an as-needed basis. This helps to avoid different functions + /// looking up symbolic information for a given pc value multple times. + /// + /// @params [in] resolve_scope + /// Flags from the SymbolContextItem enumerated type which specify what + /// type of symbol context is needed by this caller. + /// + /// @return + /// A SymbolContext reference which includes the types of information + /// requested by resolve_scope, if they are available. + //------------------------------------------------------------------ + virtual const SymbolContext& + GetSymbolContext (uint32_t resolve_scope) = 0; + + //------------------------------------------------------------------ + /// Return the Canonical Frame Address (DWARF term) for this frame. + /// + /// The CFA is typically the value of the stack pointer register before + /// the call invocation is made. It will not change during the lifetime + /// of a stack frame. It is often not the same thing as the frame pointer + /// register value. + /// + /// Live Frames will always have a CFA but other types of frames may + /// not be able to supply one. + /// + /// @param [out] value + /// The address of the CFA for this frame, if available. + /// + /// @param [out] error_ptr + /// If there is an error determining the CFA address, this may contain a + /// string explaining the failure. + /// + /// @return + /// Returns true if the CFA value was successfully set in value. Some + /// frames may be unable to provide this value; they will return false. + //------------------------------------------------------------------ + virtual bool + GetFrameBaseValue(Scalar &value, Error *error_ptr) = 0; + + //------------------------------------------------------------------ + /// Get the current lexical scope block for this Frame, if possible. + /// + /// If debug information is available for this stack frame, return a + /// pointer to the innermost lexical Block that the frame is currently + /// executing. + /// + /// @return + /// A pointer to the current Block. NULL is returned if this can + /// not be provided. + //------------------------------------------------------------------ + virtual Block * + GetFrameBlock () = 0; + + //------------------------------------------------------------------ + /// Get the RegisterContext for this frame, if possible. + /// + /// Returns a shared pointer to the RegisterContext for this stack frame. + /// Only a live Frame object will be able to return a RegisterContext - + /// callers must be prepared for an empty shared pointer being returned. + /// + /// Even a live Frame RegisterContext may not be able to provide all + /// registers. Only the currently executing frame (frame 0) can reliably + /// provide every register in the register context. + /// + /// @return + /// The RegisterContext shared point for this frame. + //------------------------------------------------------------------ + virtual lldb::RegisterContextSP + GetRegisterContext () = 0; + + virtual const lldb::RegisterContextSP & + GetRegisterContextSP () const = 0; + + //------------------------------------------------------------------ + /// Retrieve the list of variables that are in scope at this Frame's pc. + /// + /// A frame that is not live may return an empty VariableList for a given + /// pc value even though variables would be available at this point if + /// it were a live stack frame. + /// + /// @param[in] get_file_globals + /// Whether to also retrieve compilation-unit scoped variables + /// that are visisble to the entire compilation unit (e.g. file + /// static in C, globals that are homed in this CU). + /// + /// @return + /// A pointer to a list of variables. + //------------------------------------------------------------------ + virtual VariableList * + GetVariableList (bool get_file_globals) = 0; + + //------------------------------------------------------------------ + /// Retrieve the list of variables that are in scope at this Frame's pc. + /// + /// A frame that is not live may return an empty VariableListSP for a + /// given pc value even though variables would be available at this point + /// if it were a live stack frame. + /// + /// @param[in] get_file_globals + /// Whether to also retrieve compilation-unit scoped variables + /// that are visisble to the entire compilation unit (e.g. file + /// static in C, globals that are homed in this CU). + /// + /// @return + /// A pointer to a list of variables. + //------------------------------------------------------------------ + virtual lldb::VariableListSP + GetInScopeVariableList (bool get_file_globals) = 0; + + //------------------------------------------------------------------ + /// Create a ValueObject for a variable name / pathname, possibly + /// including simple dereference/child selection syntax. + /// + /// @param[in] var_expr + /// The string specifying a variable to base the VariableObject off + /// of. + /// + /// @param[in] use_dynamic + /// Whether the correct dynamic type of an object pointer should be + /// determined before creating the object, or if the static type is + /// sufficient. One of the DynamicValueType enumerated values. + /// + /// @param[in] options + /// An unsigned integer of flags, values from Frame::ExpressionPathOption + /// enum. + /// @param[in] var_sp + /// A VariableSP that will be set to the variable described in the + /// var_expr path. + /// + /// @param[in] error + /// Record any errors encountered while evaluating var_expr. + /// + /// @return + /// A shared pointer to the ValueObject described by var_expr. + //------------------------------------------------------------------ + virtual lldb::ValueObjectSP + GetValueForVariableExpressionPath (const char *var_expr, + lldb::DynamicValueType use_dynamic, + uint32_t options, + lldb::VariableSP &var_sp, + Error &error) = 0; + + //------------------------------------------------------------------ + /// Determine whether this Frame has debug information available or not + /// + /// @return + // true if debug information is available for this frame (function, + // compilation unit, block, etc.) + //------------------------------------------------------------------ + virtual bool + HasDebugInformation () = 0; + + //------------------------------------------------------------------ + /// Return the disassembly for the instructions of this Frame's function + /// as a single C string. + /// + /// @return + // C string with the assembly instructions for this function. + //------------------------------------------------------------------ + virtual const char * + Disassemble () = 0; + + //------------------------------------------------------------------ + /// Print a description for this frame using the frame-format formatter settings. + /// + /// @param [in] strm + /// The Stream to print the description to. + /// + /// @param [in] frame_marker + /// Optional string that will be prepended to the frame output description. + //------------------------------------------------------------------ + virtual void + DumpUsingSettingsFormat (Stream *strm, const char *frame_marker = NULL) = 0; + + //------------------------------------------------------------------ + /// Print a description for this frame using a default format. + /// + /// @param [in] strm + /// The Stream to print the description to. + /// + /// @param [in] show_frame_index + /// Whether to print the frame number or not. + /// + /// @param [in] show_fullpaths + /// Whether to print the full source paths or just the file base name. + //------------------------------------------------------------------ + virtual void + Dump (Stream *strm, bool show_frame_index, bool show_fullpaths) = 0; + + //------------------------------------------------------------------ + /// Print a description of this stack frame and/or the source context/assembly + /// for this stack frame. + /// + /// @param[in] strm + /// The Stream to send the output to. + /// + /// @param[in] show_frame_info + /// If true, print the frame info by calling DumpUsingSettingsFormat(). + /// + /// @param[in] show_source + /// If true, print source or disassembly as per the user's settings. + /// + /// @param[in] frame_marker + /// Passed to DumpUsingSettingsFormat() for the frame info printing. + /// + /// @return + /// Returns true if successful. + //------------------------------------------------------------------ + virtual bool + GetStatus (Stream &strm, + bool show_frame_info, + bool show_source, + const char *frame_marker = NULL) = 0; + + //------------------------------------------------------------------ + /// Query whether this frame is a concrete frame on the call stack, + /// or if it is an inlined frame derived from the debug information + /// and presented by the debugger. + /// + /// @return + /// true if this is an inlined frame. + //------------------------------------------------------------------ + virtual bool + IsInlined () = 0; + + //------------------------------------------------------------------ + /// Query this frame to find what frame it is in this Thread's StackFrameList. + /// + /// @return + /// Frame index 0 indicates the currently-executing function. Inline + /// frames are included in this frame index count. + //------------------------------------------------------------------ + virtual uint32_t + GetFrameIndex () const = 0; + + //------------------------------------------------------------------ + /// Query this frame to find what frame it is in this Thread's StackFrameList, + /// not counting inlined frames. + /// + /// @return + /// Frame index 0 indicates the currently-executing function. Inline + /// frames are not included in this frame index count; their concrete + /// frame index will be the same as the concrete frame that they are + /// derived from. + //------------------------------------------------------------------ + virtual uint32_t + GetConcreteFrameIndex () const = 0; + + //------------------------------------------------------------------ + /// Create a ValueObject for a given Variable in this Frame. + /// + /// @params [in] variable_sp + /// The Variable to base this ValueObject on + /// + /// @params [in] use_dynamic + /// Whether the correct dynamic type of the variable should be + /// determined before creating the ValueObject, or if the static type + /// is sufficient. One of the DynamicValueType enumerated values. + /// + /// @return + // A ValueObject for this variable. + //------------------------------------------------------------------ + virtual lldb::ValueObjectSP + GetValueObjectForFrameVariable (const lldb::VariableSP &variable_sp, lldb::DynamicValueType use_dynamic) = 0; + + //------------------------------------------------------------------ + /// Add an arbitrary Variable object (e.g. one that specifics a global or static) + /// to a Frame's list of ValueObjects. + /// + /// @params [in] variable_sp + /// The Variable to base this ValueObject on + /// + /// @params [in] use_dynamic + /// Whether the correct dynamic type of the variable should be + /// determined before creating the ValueObject, or if the static type + /// is sufficient. One of the DynamicValueType enumerated values. + /// + /// @return + // A ValueObject for this variable. + //------------------------------------------------------------------ + virtual lldb::ValueObjectSP + TrackGlobalVariable (const lldb::VariableSP &variable_sp, lldb::DynamicValueType use_dynamic) = 0; + + //------------------------------------------------------------------ + // lldb::ExecutionContextScope pure virtual functions + //------------------------------------------------------------------ + virtual lldb::TargetSP + CalculateTarget () = 0; + + virtual lldb::ProcessSP + CalculateProcess () = 0; + + virtual lldb::ThreadSP + CalculateThread () = 0; + + virtual lldb::FrameSP + CalculateFrame () = 0; + + virtual void + CalculateExecutionContext (ExecutionContext &exe_ctx) = 0; + +protected: + friend class StackFrameList; + friend class StackFrame; + + virtual void + SetSymbolContextScope (SymbolContextScope *symbol_scope) = 0; + + virtual void + UpdateCurrentFrameFromPreviousFrame (Frame &prev_frame) = 0; + + virtual void + UpdatePreviousFrameFromCurrentFrame (Frame &curr_frame) = 0; + + virtual const char * + GetFrameType () + { + return "Frame"; + } +}; + +} // namespace lldb_private + +#endif // liblldb_Frame_h_ diff --git a/lldb/include/lldb/Target/Process.h b/lldb/include/lldb/Target/Process.h index 65c732851da..d8467f851d9 100644 --- a/lldb/include/lldb/Target/Process.h +++ b/lldb/include/lldb/Target/Process.h @@ -3478,10 +3478,10 @@ public: return lldb::ThreadSP(); } - virtual lldb::StackFrameSP - CalculateStackFrame () + virtual lldb::FrameSP + CalculateFrame () { - return lldb::StackFrameSP(); + return lldb::FrameSP(); } virtual void diff --git a/lldb/include/lldb/Target/RegisterContext.h b/lldb/include/lldb/Target/RegisterContext.h index bc24cf92e29..067e22c78d4 100644 --- a/lldb/include/lldb/Target/RegisterContext.h +++ b/lldb/include/lldb/Target/RegisterContext.h @@ -178,8 +178,8 @@ public: virtual lldb::ThreadSP CalculateThread (); - virtual lldb::StackFrameSP - CalculateStackFrame (); + virtual lldb::FrameSP + CalculateFrame (); virtual void CalculateExecutionContext (ExecutionContext &exe_ctx); diff --git a/lldb/include/lldb/Target/StackFrame.h b/lldb/include/lldb/Target/StackFrame.h index c7b7e376812..c580317c1a3 100644 --- a/lldb/include/lldb/Target/StackFrame.h +++ b/lldb/include/lldb/Target/StackFrame.h @@ -22,13 +22,20 @@ #include "lldb/Core/ValueObjectList.h" #include "lldb/Symbol/SymbolContext.h" #include "lldb/Target/ExecutionContextScope.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/StackID.h" namespace lldb_private { +/// StackFrame: +/// +/// This class provides an interface to a stack frame in a process/thread. +/// +/// This class is used for a live stack frame in a live process at the current point in time. +/// It may represent either an actual stack frame or a synthesized inlined function frame. + class StackFrame : - public std::enable_shared_from_this<StackFrame>, - public ExecutionContextScope + public Frame { public: enum ExpressionPathOption @@ -43,29 +50,29 @@ public: // Constructors and Destructors //------------------------------------------------------------------ StackFrame (const lldb::ThreadSP &thread_sp, - lldb::user_id_t frame_idx, - lldb::user_id_t concrete_frame_idx, - lldb::addr_t cfa, - lldb::addr_t pc, + lldb::user_id_t frame_idx, + lldb::user_id_t concrete_frame_idx, + lldb::addr_t cfa, + lldb::addr_t pc, const SymbolContext *sc_ptr); StackFrame (const lldb::ThreadSP &thread_sp, - lldb::user_id_t frame_idx, - lldb::user_id_t concrete_frame_idx, - const lldb::RegisterContextSP ®_context_sp, - lldb::addr_t cfa, - lldb::addr_t pc, + lldb::user_id_t frame_idx, + lldb::user_id_t concrete_frame_idx, + const lldb::RegisterContextSP ®_context_sp, + lldb::addr_t cfa, + lldb::addr_t pc, const SymbolContext *sc_ptr); - + StackFrame (const lldb::ThreadSP &thread_sp, - lldb::user_id_t frame_idx, - lldb::user_id_t concrete_frame_idx, - const lldb::RegisterContextSP ®_context_sp, - lldb::addr_t cfa, - const Address& pc, + lldb::user_id_t frame_idx, + lldb::user_id_t concrete_frame_idx, + const lldb::RegisterContextSP ®_context_sp, + lldb::addr_t cfa, + const Address& pc, const SymbolContext *sc_ptr); - virtual ~StackFrame (); + ~StackFrame (); lldb::ThreadSP GetThread () const @@ -78,8 +85,8 @@ public: const Address& GetFrameCodeAddress(); - - void + + bool ChangePC (lldb::addr_t pc); const SymbolContext& @@ -106,10 +113,9 @@ public: lldb::VariableListSP GetInScopeVariableList (bool get_file_globals); - // See ExpressionPathOption enumeration for "options" values lldb::ValueObjectSP - GetValueForVariableExpressionPath (const char *var_expr, - lldb::DynamicValueType use_dynamic, + GetValueForVariableExpressionPath (const char *var_expr, + lldb::DynamicValueType use_dynamic, uint32_t options, lldb::VariableSP &var_sp, Error &error); @@ -122,10 +128,16 @@ public: void DumpUsingSettingsFormat (Stream *strm, const char *frame_marker = NULL); - + void Dump (Stream *strm, bool show_frame_index, bool show_fullpaths); - + + bool + GetStatus (Stream &strm, + bool show_frame_info, + bool show_source, + const char *frame_marker = NULL); + bool IsInlined (); @@ -137,37 +149,31 @@ public: { return m_concrete_frame_index; } - + lldb::ValueObjectSP GetValueObjectForFrameVariable (const lldb::VariableSP &variable_sp, lldb::DynamicValueType use_dynamic); lldb::ValueObjectSP TrackGlobalVariable (const lldb::VariableSP &variable_sp, lldb::DynamicValueType use_dynamic); - + //------------------------------------------------------------------ // lldb::ExecutionContextScope pure virtual functions //------------------------------------------------------------------ virtual lldb::TargetSP CalculateTarget (); - + virtual lldb::ProcessSP CalculateProcess (); - + virtual lldb::ThreadSP CalculateThread (); - - virtual lldb::StackFrameSP - CalculateStackFrame (); + + virtual lldb::FrameSP + CalculateFrame (); virtual void CalculateExecutionContext (ExecutionContext &exe_ctx); - - bool - GetStatus (Stream &strm, - bool show_frame_info, - bool show_source, - const char *frame_marker = NULL); - + protected: friend class StackFrameList; @@ -175,14 +181,16 @@ protected: SetSymbolContextScope (SymbolContextScope *symbol_scope); void - UpdateCurrentFrameFromPreviousFrame (StackFrame &prev_frame); - + UpdateCurrentFrameFromPreviousFrame (Frame &prev_frame); + void - UpdatePreviousFrameFromCurrentFrame (StackFrame &curr_frame); + UpdatePreviousFrameFromCurrentFrame (Frame &curr_frame); - bool - HasCachedData () const; - + virtual const char * + GetFrameType () + { + return "StackFrame"; + } private: //------------------------------------------------------------------ // For StackFrame only diff --git a/lldb/include/lldb/Target/StackFrameList.h b/lldb/include/lldb/Target/StackFrameList.h index 2680be3e5a6..2f67bc03c48 100644 --- a/lldb/include/lldb/Target/StackFrameList.h +++ b/lldb/include/lldb/Target/StackFrameList.h @@ -17,7 +17,7 @@ // Other libraries and framework includes // Project includes #include "lldb/Host/Mutex.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" namespace lldb_private { @@ -36,18 +36,18 @@ public: uint32_t GetNumFrames (bool can_create = true); - lldb::StackFrameSP + lldb::FrameSP GetFrameAtIndex (uint32_t idx); - lldb::StackFrameSP + lldb::FrameSP GetFrameWithConcreteFrameIndex (uint32_t unwind_idx); - lldb::StackFrameSP + lldb::FrameSP GetFrameWithStackID (const StackID &stack_id); // Mark a stack frame as the current frame uint32_t - SetSelectedFrame (lldb_private::StackFrame *frame); + SetSelectedFrame (lldb_private::Frame *frame); uint32_t GetSelectedFrameIndex () const; @@ -57,7 +57,7 @@ public: SetSelectedFrameByIndex (uint32_t idx); uint32_t - GetVisibleStackFrameIndex(uint32_t idx) + GetVisibleFrameIndex(uint32_t idx) { if (m_current_inlined_depth < UINT32_MAX) return idx - m_current_inlined_depth; @@ -80,8 +80,8 @@ public: void Dump (Stream *s); - lldb::StackFrameSP - GetStackFrameSPForStackFramePtr (StackFrame *stack_frame_ptr); + lldb::FrameSP + GetFrameSPForFramePtr (Frame *stack_frame_ptr); size_t GetStatus (Stream &strm, @@ -96,7 +96,7 @@ protected: friend class Thread; bool - SetFrameAtIndex (uint32_t idx, lldb::StackFrameSP &frame_sp); + SetFrameAtIndex (uint32_t idx, lldb::FrameSP &frame_sp); static void Merge (std::unique_ptr<StackFrameList>& curr_ap, @@ -132,7 +132,7 @@ protected: //------------------------------------------------------------------ // Classes that inherit from StackFrameList can see and modify these //------------------------------------------------------------------ - typedef std::vector<lldb::StackFrameSP> collection; + typedef std::vector<lldb::FrameSP> collection; typedef collection::iterator iterator; typedef collection::const_iterator const_iterator; diff --git a/lldb/include/lldb/Target/StackID.h b/lldb/include/lldb/Target/StackID.h index 7e713c73d97..32e7853549c 100644 --- a/lldb/include/lldb/Target/StackID.h +++ b/lldb/include/lldb/Target/StackID.h @@ -109,6 +109,7 @@ public: protected: + friend class Frame; friend class StackFrame; void diff --git a/lldb/include/lldb/Target/Target.h b/lldb/include/lldb/Target/Target.h index a7609d37116..77e5afffefe 100644 --- a/lldb/include/lldb/Target/Target.h +++ b/lldb/include/lldb/Target/Target.h @@ -961,8 +961,8 @@ public: virtual lldb::ThreadSP CalculateThread (); - virtual lldb::StackFrameSP - CalculateStackFrame (); + virtual lldb::FrameSP + CalculateFrame (); virtual void CalculateExecutionContext (ExecutionContext &exe_ctx); @@ -984,7 +984,7 @@ public: // in in th execution context. ExecutionResults EvaluateExpression (const char *expression, - StackFrame *frame, + Frame *frame, lldb::ValueObjectSP &result_valobj_sp, const EvaluateExpressionOptions& options = EvaluateExpressionOptions()); diff --git a/lldb/include/lldb/Target/Thread.h b/lldb/include/lldb/Target/Thread.h index 7dac37caa20..228e175b6ed 100644 --- a/lldb/include/lldb/Target/Thread.h +++ b/lldb/include/lldb/Target/Thread.h @@ -109,7 +109,7 @@ public: static StackID GetStackIDFromEvent (const Event *event_ptr); - static lldb::StackFrameSP + static lldb::FrameSP GetStackFrameFromEvent (const Event *event_ptr); lldb::ThreadSP @@ -357,13 +357,13 @@ public: return GetStackFrameList()->GetNumFrames(); } - virtual lldb::StackFrameSP + virtual lldb::FrameSP GetStackFrameAtIndex (uint32_t idx) { return GetStackFrameList()->GetFrameAtIndex(idx); } - virtual lldb::StackFrameSP + virtual lldb::FrameSP GetFrameWithConcreteFrameIndex (uint32_t unwind_idx); bool @@ -382,17 +382,17 @@ public: ReturnFromFrameWithIndex (uint32_t frame_idx, lldb::ValueObjectSP return_value_sp, bool broadcast = false); Error - ReturnFromFrame (lldb::StackFrameSP frame_sp, lldb::ValueObjectSP return_value_sp, bool broadcast = false); + ReturnFromFrame (lldb::FrameSP frame_sp, lldb::ValueObjectSP return_value_sp, bool broadcast = false); Error JumpToLine (const FileSpec &file, uint32_t line, bool can_leave_function, std::string *warnings = NULL); - virtual lldb::StackFrameSP + virtual lldb::FrameSP GetFrameWithStackID (const StackID &stack_id) { if (stack_id.IsValid()) return GetStackFrameList()->GetFrameWithStackID (stack_id); - return lldb::StackFrameSP(); + return lldb::FrameSP(); } uint32_t @@ -401,7 +401,7 @@ public: return GetStackFrameList()->GetSelectedFrameIndex(); } - lldb::StackFrameSP + lldb::FrameSP GetSelectedFrame () { lldb::StackFrameListSP stack_frame_list_sp(GetStackFrameList()); @@ -409,7 +409,7 @@ public: } uint32_t - SetSelectedFrame (lldb_private::StackFrame *frame, bool broadcast = false); + SetSelectedFrame (lldb_private::Frame *frame, bool broadcast = false); bool @@ -428,7 +428,7 @@ public: GetRegisterContext () = 0; virtual lldb::RegisterContextSP - CreateRegisterContextForFrame (StackFrame *frame) = 0; + CreateRegisterContextForFrame (Frame *frame) = 0; virtual void ClearStackFrames (); @@ -914,14 +914,14 @@ public: virtual lldb::ThreadSP CalculateThread (); - virtual lldb::StackFrameSP - CalculateStackFrame (); + virtual lldb::FrameSP + CalculateFrame (); virtual void CalculateExecutionContext (ExecutionContext &exe_ctx); - lldb::StackFrameSP - GetStackFrameSPForStackFramePtr (StackFrame *stack_frame_ptr); + lldb::FrameSP + GetFrameSPForFramePtr (Frame *stack_frame_ptr); size_t GetStatus (Stream &strm, @@ -1008,6 +1008,7 @@ protected: friend class ThreadEventData; friend class StackFrameList; friend class StackFrame; + friend class Frame; friend class OperatingSystem; // This is necessary to make sure thread assets get destroyed while the thread is still in good shape diff --git a/lldb/include/lldb/Target/Unwind.h b/lldb/include/lldb/Target/Unwind.h index 7cda4aeb2e1..5e9e754611e 100644 --- a/lldb/include/lldb/Target/Unwind.h +++ b/lldb/include/lldb/Target/Unwind.h @@ -79,7 +79,7 @@ public: } lldb::RegisterContextSP - CreateRegisterContextForFrame (StackFrame *frame) + CreateRegisterContextForFrame (Frame *frame) { Mutex::Locker locker(m_unwind_mutex); return DoCreateRegisterContextForFrame (frame); @@ -107,7 +107,7 @@ protected: lldb::addr_t& pc) = 0; virtual lldb::RegisterContextSP - DoCreateRegisterContextForFrame (StackFrame *frame) = 0; + DoCreateRegisterContextForFrame (Frame *frame) = 0; Thread &m_thread; Mutex m_unwind_mutex; diff --git a/lldb/include/lldb/lldb-forward.h b/lldb/include/lldb/lldb-forward.h index ee59e0e2892..ff01ca72e33 100644 --- a/lldb/include/lldb/lldb-forward.h +++ b/lldb/include/lldb/lldb-forward.h @@ -181,8 +181,7 @@ class SectionList; class Settings; class SourceManager; class SourceManagerImpl; -class StackFrame; -class StackFrameImpl; +class Frame; class StackFrameList; class StackID; class StopInfo; @@ -337,8 +336,8 @@ namespace lldb { typedef std::weak_ptr<lldb_private::Section> SectionWP; typedef std::shared_ptr<lldb_private::SearchFilter> SearchFilterSP; typedef std::shared_ptr<lldb_private::Settings> SettingsSP; - typedef std::shared_ptr<lldb_private::StackFrame> StackFrameSP; - typedef std::weak_ptr<lldb_private::StackFrame> StackFrameWP; + typedef std::shared_ptr<lldb_private::Frame> FrameSP; + typedef std::weak_ptr<lldb_private::Frame> FrameWP; typedef std::shared_ptr<lldb_private::StackFrameList> StackFrameListSP; typedef std::shared_ptr<lldb_private::StopInfo> StopInfoSP; typedef std::shared_ptr<lldb_private::StoppointLocation> StoppointLocationSP; diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig index 4a3ad31ead4..70948a01a0d 100644 --- a/lldb/scripts/Python/python-wrapper.swig +++ b/lldb/scripts/Python/python-wrapper.swig @@ -211,7 +211,7 @@ LLDBSwigPythonBreakpointCallbackFunction ( const char *python_function_name, const char *session_dictionary_name, - const lldb::StackFrameSP& frame_sp, + const lldb::FrameSP& frame_sp, const lldb::BreakpointLocationSP& bp_loc_sp ) { @@ -251,7 +251,7 @@ LLDBSwigPythonWatchpointCallbackFunction ( const char *python_function_name, const char *session_dictionary_name, - const lldb::StackFrameSP& frame_sp, + const lldb::FrameSP& frame_sp, const lldb::WatchpointSP& wp_sp ) { @@ -855,7 +855,7 @@ SWIGEXPORT bool LLDBSWIGPythonRunScriptKeywordFrame (const char* python_function_name, const char* session_dictionary_name, -lldb::StackFrameSP& frame, +lldb::FrameSP& frame, std::string& output) { diff --git a/lldb/source/API/SBBlock.cpp b/lldb/source/API/SBBlock.cpp index c8a665f7d6f..86215e66d03 100644 --- a/lldb/source/API/SBBlock.cpp +++ b/lldb/source/API/SBBlock.cpp @@ -20,7 +20,7 @@ #include "lldb/Symbol/Function.h" #include "lldb/Symbol/SymbolContext.h" #include "lldb/Symbol/VariableList.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Target.h" using namespace lldb; @@ -264,7 +264,7 @@ SBBlock::GetVariables (lldb::SBFrame& frame, SBValueList value_list; if (block) { - StackFrameSP frame_sp(frame.GetFrameSP()); + FrameSP frame_sp(frame.GetFrameSP()); VariableListSP variable_list_sp (block->GetBlockVariableList (true)); if (variable_list_sp) diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp index ac77e2e4112..bc662c91c1a 100644 --- a/lldb/source/API/SBCommandInterpreter.cpp +++ b/lldb/source/API/SBCommandInterpreter.cpp @@ -392,13 +392,13 @@ init_lldb(void); extern "C" bool LLDBSwigPythonBreakpointCallbackFunction (const char *python_function_name, const char *session_dictionary_name, - const lldb::StackFrameSP& sb_frame, + const lldb::FrameSP& sb_frame, const lldb::BreakpointLocationSP& sb_bp_loc); extern "C" bool LLDBSwigPythonWatchpointCallbackFunction (const char *python_function_name, const char *session_dictionary_name, - const lldb::StackFrameSP& sb_frame, + const lldb::FrameSP& sb_frame, const lldb::WatchpointSP& sb_wp); extern "C" bool @@ -473,7 +473,7 @@ LLDBSWIGPythonRunScriptKeywordTarget (const char* python_function_name, extern "C" bool LLDBSWIGPythonRunScriptKeywordFrame (const char* python_function_name, const char* session_dictionary_name, - lldb::StackFrameSP& frame, + lldb::FrameSP& frame, std::string& output); extern "C" void* diff --git a/lldb/source/API/SBFrame.cpp b/lldb/source/API/SBFrame.cpp index 1a1a63bd067..02307c48abd 100644 --- a/lldb/source/API/SBFrame.cpp +++ b/lldb/source/API/SBFrame.cpp @@ -33,7 +33,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/StackID.h" #include "lldb/Target/Thread.h" @@ -54,7 +54,7 @@ SBFrame::SBFrame () : { } -SBFrame::SBFrame (const StackFrameSP &lldb_object_sp) : +SBFrame::SBFrame (const FrameSP &lldb_object_sp) : m_opaque_sp (new ExecutionContextRef (lldb_object_sp)) { Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); @@ -86,16 +86,16 @@ SBFrame::~SBFrame() { } -StackFrameSP +FrameSP SBFrame::GetFrameSP() const { if (m_opaque_sp) return m_opaque_sp->GetFrameSP(); - return StackFrameSP(); + return FrameSP(); } void -SBFrame::SetFrameSP (const StackFrameSP &lldb_object_sp) +SBFrame::SetFrameSP (const FrameSP &lldb_object_sp) { return m_opaque_sp->SetFrameSP(lldb_object_sp); } @@ -114,7 +114,7 @@ SBFrame::GetSymbolContext (uint32_t resolve_scope) const Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -156,7 +156,7 @@ SBFrame::GetModule () const Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -198,7 +198,7 @@ SBFrame::GetCompileUnit () const Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -238,7 +238,7 @@ SBFrame::GetFunction () const Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -278,7 +278,7 @@ SBFrame::GetSymbol () const Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -317,7 +317,7 @@ SBFrame::GetBlock () const Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -355,7 +355,7 @@ SBFrame::GetFrameBlock () const Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); Process *process = exe_ctx.GetProcessPtr(); @@ -395,7 +395,7 @@ SBFrame::GetLineEntry () const Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -432,7 +432,7 @@ SBFrame::GetFrameID () const uint32_t frame_idx = UINT32_MAX; ExecutionContext exe_ctx(m_opaque_sp.get()); - StackFrame *frame = exe_ctx.GetFramePtr(); + Frame *frame = exe_ctx.GetFramePtr(); if (frame) frame_idx = frame->GetFrameIndex (); @@ -451,7 +451,7 @@ SBFrame::GetPC () const Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -491,7 +491,7 @@ SBFrame::SetPC (addr_t new_pc) Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -532,7 +532,7 @@ SBFrame::GetSP () const Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -572,7 +572,7 @@ SBFrame::GetFP () const Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -612,7 +612,7 @@ SBFrame::GetPCAddress () const Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = exe_ctx.GetFramePtr(); + Frame *frame = exe_ctx.GetFramePtr(); Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -653,7 +653,7 @@ SBFrame::GetValueForVariablePath (const char *var_path) { SBValue sb_value; ExecutionContext exe_ctx(m_opaque_sp.get()); - StackFrame *frame = exe_ctx.GetFramePtr(); + Frame *frame = exe_ctx.GetFramePtr(); Target *target = exe_ctx.GetTargetPtr(); if (frame && target) { @@ -678,7 +678,7 @@ SBFrame::GetValueForVariablePath (const char *var_path, DynamicValueType use_dyn ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -693,7 +693,7 @@ SBFrame::GetValueForVariablePath (const char *var_path, DynamicValueType use_dyn Error error; ValueObjectSP value_sp (frame->GetValueForVariableExpressionPath (var_path, eNoDynamicValues, - StackFrame::eExpressionPathOptionCheckPtrVsMember | StackFrame::eExpressionPathOptionsAllowDirectIVarAccess, + Frame::eExpressionPathOptionCheckPtrVsMember | Frame::eExpressionPathOptionsAllowDirectIVarAccess, var_sp, error)); sb_value.SetSP(value_sp, use_dynamic); @@ -718,7 +718,7 @@ SBFrame::FindVariable (const char *name) { SBValue value; ExecutionContext exe_ctx(m_opaque_sp.get()); - StackFrame *frame = exe_ctx.GetFramePtr(); + Frame *frame = exe_ctx.GetFramePtr(); Target *target = exe_ctx.GetTargetPtr(); if (frame && target) { @@ -747,7 +747,7 @@ SBFrame::FindVariable (const char *name, lldb::DynamicValueType use_dynamic) Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -807,7 +807,7 @@ SBFrame::FindValue (const char *name, ValueType value_type) { SBValue value; ExecutionContext exe_ctx(m_opaque_sp.get()); - StackFrame *frame = exe_ctx.GetFramePtr(); + Frame *frame = exe_ctx.GetFramePtr(); Target *target = exe_ctx.GetTargetPtr(); if (frame && target) { @@ -834,7 +834,7 @@ SBFrame::FindValue (const char *name, ValueType value_type, lldb::DynamicValueTy Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -967,8 +967,8 @@ SBFrame::FindValue (const char *name, ValueType value_type, lldb::DynamicValueTy bool SBFrame::IsEqual (const SBFrame &that) const { - lldb::StackFrameSP this_sp = GetFrameSP(); - lldb::StackFrameSP that_sp = that.GetFrameSP(); + lldb::FrameSP this_sp = GetFrameSP(); + lldb::FrameSP that_sp = that.GetFrameSP(); return (this_sp && that_sp && this_sp->GetStackID() == that_sp->GetStackID()); } @@ -1014,7 +1014,7 @@ SBFrame::Disassemble () const Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -1055,7 +1055,7 @@ SBFrame::GetVariables (bool arguments, { SBValueList value_list; ExecutionContext exe_ctx(m_opaque_sp.get()); - StackFrame *frame = exe_ctx.GetFramePtr(); + Frame *frame = exe_ctx.GetFramePtr(); Target *target = exe_ctx.GetTargetPtr(); if (frame && target) { @@ -1078,7 +1078,7 @@ SBFrame::GetVariables (bool arguments, Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); if (log) @@ -1174,7 +1174,7 @@ SBFrame::GetRegisters () Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -1224,7 +1224,7 @@ SBFrame::FindRegister (const char *name) Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -1281,7 +1281,7 @@ SBFrame::GetDescription (SBStream &description) Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrame *frame; + Frame *frame; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -1318,7 +1318,7 @@ SBFrame::EvaluateExpression (const char *expr) { SBValue result; ExecutionContext exe_ctx(m_opaque_sp.get()); - StackFrame *frame = exe_ctx.GetFramePtr(); + Frame *frame = exe_ctx.GetFramePtr(); Target *target = exe_ctx.GetTargetPtr(); if (frame && target) { @@ -1374,7 +1374,7 @@ SBFrame::EvaluateExpression (const char *expr, const SBExpressionOptions &option if (log) log->Printf ("SBFrame()::EvaluateExpression (expr=\"%s\")...", expr); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); @@ -1436,7 +1436,7 @@ SBFrame::IsInlined() { Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); ExecutionContext exe_ctx(m_opaque_sp.get()); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) @@ -1474,7 +1474,7 @@ SBFrame::GetFunctionName() Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); const char *name = NULL; ExecutionContext exe_ctx(m_opaque_sp.get()); - StackFrame *frame = NULL; + Frame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); Process *process = exe_ctx.GetProcessPtr(); if (target && process) diff --git a/lldb/source/API/SBInstruction.cpp b/lldb/source/API/SBInstruction.cpp index 2334cc0d124..d879470aa2d 100644 --- a/lldb/source/API/SBInstruction.cpp +++ b/lldb/source/API/SBInstruction.cpp @@ -22,7 +22,7 @@ #include "lldb/Core/EmulateInstruction.h" #include "lldb/Core/StreamFile.h" #include "lldb/Target/ExecutionContext.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Target.h" using namespace lldb; @@ -196,7 +196,7 @@ SBInstruction::EmulateWithFrame (lldb::SBFrame &frame, uint32_t evaluate_options { if (m_opaque_sp) { - lldb::StackFrameSP frame_sp (frame.GetFrameSP()); + lldb::FrameSP frame_sp (frame.GetFrameSP()); if (frame_sp) { diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp index cff6e4e2de3..bb697552a41 100644 --- a/lldb/source/API/SBTarget.cpp +++ b/lldb/source/API/SBTarget.cpp @@ -2644,7 +2644,7 @@ SBTarget::EvaluateExpression (const char *expr, const SBExpressionOptions &optio ExecutionResults exe_results = eExecutionSetupError; ValueObjectSP expr_value_sp; TargetSP target_sp(GetSP()); - StackFrame *frame = NULL; + Frame *frame = NULL; if (target_sp) { if (expr == NULL || expr[0] == '\0') diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp index 0c3a17e0df8..c972ce86239 100644 --- a/lldb/source/API/SBThread.cpp +++ b/lldb/source/API/SBThread.cpp @@ -594,7 +594,7 @@ SBThread::StepOver (lldb::RunMode stop_other_threads) { Thread *thread = exe_ctx.GetThreadPtr(); bool abort_other_plans = false; - StackFrameSP frame_sp(thread->GetStackFrameAtIndex (0)); + FrameSP frame_sp(thread->GetStackFrameAtIndex (0)); ThreadPlanSP new_plan_sp; if (frame_sp) @@ -645,7 +645,7 @@ SBThread::StepInto (const char *target_name, lldb::RunMode stop_other_threads) bool abort_other_plans = false; Thread *thread = exe_ctx.GetThreadPtr(); - StackFrameSP frame_sp(thread->GetStackFrameAtIndex (0)); + FrameSP frame_sp(thread->GetStackFrameAtIndex (0)); ThreadPlanSP new_plan_sp; if (frame_sp && frame_sp->HasDebugInformation ()) @@ -711,7 +711,7 @@ SBThread::StepOutOfFrame (lldb::SBFrame &sb_frame) Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrameSP frame_sp (sb_frame.GetFrameSP()); + FrameSP frame_sp (sb_frame.GetFrameSP()); if (log) { SBStream frame_desc_strm; @@ -801,7 +801,7 @@ SBThread::StepOverUntil (lldb::SBFrame &sb_frame, Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - StackFrameSP frame_sp (sb_frame.GetFrameSP()); + FrameSP frame_sp (sb_frame.GetFrameSP()); if (log) { @@ -1112,7 +1112,7 @@ SBThread::GetFrameAtIndex (uint32_t idx) Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); SBFrame sb_frame; - StackFrameSP frame_sp; + FrameSP frame_sp; Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); @@ -1148,7 +1148,7 @@ SBThread::GetSelectedFrame () Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); SBFrame sb_frame; - StackFrameSP frame_sp; + FrameSP frame_sp; Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); @@ -1184,7 +1184,7 @@ SBThread::SetSelectedFrame (uint32_t idx) Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); SBFrame sb_frame; - StackFrameSP frame_sp; + FrameSP frame_sp; Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp index 51b6790dd2b..993ffe4bcf1 100644 --- a/lldb/source/API/SBValue.cpp +++ b/lldb/source/API/SBValue.cpp @@ -38,7 +38,7 @@ #include "lldb/Symbol/VariableList.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" @@ -199,13 +199,13 @@ public: return ThreadSP(); } - StackFrameSP + FrameSP GetFrameSP () { if (m_valobj_sp) return m_valobj_sp->GetFrameSP(); else - return StackFrameSP(); + return FrameSP(); } private: @@ -1252,7 +1252,7 @@ lldb::SBFrame SBValue::GetFrame() { SBFrame sb_frame; - StackFrameSP frame_sp; + FrameSP frame_sp; if (m_opaque_sp) { frame_sp = m_opaque_sp->GetFrameSP(); diff --git a/lldb/source/Commands/CommandObjectArgs.cpp b/lldb/source/Commands/CommandObjectArgs.cpp index 3b919d11a56..d75bf818d25 100644 --- a/lldb/source/Commands/CommandObjectArgs.cpp +++ b/lldb/source/Commands/CommandObjectArgs.cpp @@ -30,7 +30,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" using namespace lldb; using namespace lldb_private; @@ -139,7 +139,7 @@ CommandObjectArgs::DoExecute (Args& args, CommandReturnObject &result) return false; } - lldb::StackFrameSP thread_cur_frame = thread->GetSelectedFrame (); + lldb::FrameSP thread_cur_frame = thread->GetSelectedFrame (); if (!thread_cur_frame) { result.AppendError ("The current thread has no current frame."); diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp index c20da7f3ec5..78873801b8b 100644 --- a/lldb/source/Commands/CommandObjectBreakpoint.cpp +++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -26,7 +26,7 @@ #include "lldb/Interpreter/CommandReturnObject.h" #include "lldb/Target/Target.h" #include "lldb/Interpreter/CommandCompletions.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadSpec.h" @@ -581,7 +581,7 @@ private: // Then use the current stack frame's file. if (!target->GetSourceManager().GetDefaultFileAndLine(file, default_line)) { - StackFrame *cur_frame = m_exe_ctx.GetFramePtr(); + Frame *cur_frame = m_exe_ctx.GetFramePtr(); if (cur_frame == NULL) { result.AppendError ("No selected frame to use to find the default file."); diff --git a/lldb/source/Commands/CommandObjectDisassemble.cpp b/lldb/source/Commands/CommandObjectDisassemble.cpp index fc148b1899f..376bf4d0214 100644 --- a/lldb/source/Commands/CommandObjectDisassemble.cpp +++ b/lldb/source/Commands/CommandObjectDisassemble.cpp @@ -27,7 +27,7 @@ #include "lldb/Symbol/Function.h" #include "lldb/Symbol/Symbol.h" #include "lldb/Target/Process.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Target.h" #define DEFAULT_DISASM_BYTE_SIZE 32 @@ -370,7 +370,7 @@ CommandObjectDisassemble::DoExecute (Args& command, CommandReturnObject &result) else { AddressRange range; - StackFrame *frame = m_exe_ctx.GetFramePtr(); + Frame *frame = m_exe_ctx.GetFramePtr(); if (m_options.frame_line) { if (frame == NULL) diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp index 8b04da600f4..89edf42f3f0 100644 --- a/lldb/source/Commands/CommandObjectExpression.cpp +++ b/lldb/source/Commands/CommandObjectExpression.cpp @@ -32,7 +32,7 @@ #include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/Variable.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 "llvm/ADT/StringRef.h" diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp index 2e852d0bb76..a380692a686 100644 --- a/lldb/source/Commands/CommandObjectFrame.cpp +++ b/lldb/source/Commands/CommandObjectFrame.cpp @@ -42,7 +42,7 @@ #include "lldb/Symbol/Variable.h" #include "lldb/Symbol/VariableList.h" #include "lldb/Target/Process.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Thread.h" #include "lldb/Target/Target.h" @@ -378,7 +378,7 @@ protected: DoExecute (Args& command, CommandReturnObject &result) { // No need to check "frame" for validity as eFlagRequiresFrame ensures it is valid - StackFrame *frame = m_exe_ctx.GetFramePtr(); + Frame *frame = m_exe_ctx.GetFramePtr(); Stream &s = result.GetOutputStream(); @@ -470,8 +470,8 @@ protected: else // No regex, either exact variable names or variable expressions. { Error error; - uint32_t expr_path_options = StackFrame::eExpressionPathOptionCheckPtrVsMember | - StackFrame::eExpressionPathOptionsAllowDirectIVarAccess; + uint32_t expr_path_options = Frame::eExpressionPathOptionCheckPtrVsMember | + Frame::eExpressionPathOptionsAllowDirectIVarAccess; lldb::VariableSP var_sp; valobj_sp = frame->GetValueForVariableExpressionPath (name_cstr, m_varobj_options.use_dynamic, diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp index 2ee275e11f6..dd59aae3f5f 100644 --- a/lldb/source/Commands/CommandObjectMemory.cpp +++ b/lldb/source/Commands/CommandObjectMemory.cpp @@ -34,7 +34,7 @@ #include "lldb/Interpreter/OptionValueString.h" #include "lldb/Symbol/TypeList.h" #include "lldb/Target/Process.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" using namespace lldb; using namespace lldb_private; @@ -502,7 +502,7 @@ protected: } ConstString lookup_type_name(type_str.c_str()); - StackFrame *frame = m_exe_ctx.GetFramePtr(); + Frame *frame = m_exe_ctx.GetFramePtr(); if (frame) { sc = frame->GetSymbolContext (eSymbolContextModule); diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index ef431e25c3d..d5cb1df11cc 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -49,7 +49,7 @@ #include "lldb/Symbol/UnwindPlan.h" #include "lldb/Symbol/VariableList.h" #include "lldb/Target/Process.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadSpec.h" @@ -909,7 +909,7 @@ protected: if (num_compile_units == 0 && num_shlibs == 0) { bool success = false; - StackFrame *frame = m_exe_ctx.GetFramePtr(); + Frame *frame = m_exe_ctx.GetFramePtr(); CompileUnit *comp_unit = NULL; if (frame) { @@ -3957,7 +3957,7 @@ public: break; } - StackFrameSP frame = m_exe_ctx.GetFrameSP(); + FrameSP frame = m_exe_ctx.GetFrameSP(); if (!frame) return false; @@ -4546,7 +4546,7 @@ protected: const StateType process_state = process->GetState(); if (StateIsStoppedState (process_state, true)) { - StackFrame *frame = m_exe_ctx.GetFramePtr(); + Frame *frame = m_exe_ctx.GetFramePtr(); if (frame) { ModuleSP frame_module_sp (frame->GetSymbolContext(eSymbolContextModule).module_sp); diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp index f46a2219a50..ca64f4b1c37 100644 --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -465,7 +465,7 @@ protected: if (m_step_type == eStepTypeInto) { - StackFrame *frame = thread->GetStackFrameAtIndex(0).get(); + Frame *frame = thread->GetStackFrameAtIndex(0).get(); if (frame->HasDebugInformation ()) { @@ -487,7 +487,7 @@ protected: } else if (m_step_type == eStepTypeOver) { - StackFrame *frame = thread->GetStackFrameAtIndex(0).get(); + Frame *frame = thread->GetStackFrameAtIndex(0).get(); if (frame->HasDebugInformation()) new_plan_sp = thread->QueueThreadPlanForStepOverRange (abort_other_plans, @@ -999,7 +999,7 @@ protected: const bool abort_other_plans = false; - StackFrame *frame = thread->GetStackFrameAtIndex(m_options.m_frame_idx).get(); + Frame *frame = thread->GetStackFrameAtIndex(m_options.m_frame_idx).get(); if (frame == NULL) { @@ -1411,7 +1411,7 @@ protected: ValueObjectSP return_valobj_sp; - StackFrameSP frame_sp = m_exe_ctx.GetFrameSP(); + FrameSP frame_sp = m_exe_ctx.GetFrameSP(); uint32_t frame_idx = frame_sp->GetFrameIndex(); if (frame_sp->IsInlined()) @@ -1588,7 +1588,7 @@ protected: bool DoExecute (Args& args, CommandReturnObject &result) { RegisterContext *reg_ctx = m_exe_ctx.GetRegisterContext(); - StackFrame *frame = m_exe_ctx.GetFramePtr(); + Frame *frame = m_exe_ctx.GetFramePtr(); Thread *thread = m_exe_ctx.GetThreadPtr(); Target *target = m_exe_ctx.GetTargetPtr(); const SymbolContext &sym_ctx = frame->GetSymbolContext (eSymbolContextLineEntry); diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp index ae490e38149..4a570d8dd52 100644 --- a/lldb/source/Commands/CommandObjectWatchpoint.cpp +++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp @@ -989,7 +989,7 @@ protected: DoExecute (Args& command, CommandReturnObject &result) { Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - StackFrame *frame = m_exe_ctx.GetFramePtr(); + Frame *frame = m_exe_ctx.GetFramePtr(); // If no argument is present, issue an error message. There's no way to set a watchpoint. if (command.GetArgumentCount() <= 0) @@ -1024,8 +1024,8 @@ protected: // Things have checked out ok... Error error; - uint32_t expr_path_options = StackFrame::eExpressionPathOptionCheckPtrVsMember | - StackFrame::eExpressionPathOptionsAllowDirectIVarAccess; + uint32_t expr_path_options = Frame::eExpressionPathOptionCheckPtrVsMember | + Frame::eExpressionPathOptionsAllowDirectIVarAccess; valobj_sp = frame->GetValueForVariableExpressionPath (command.GetArgumentAtIndex(0), eNoDynamicValues, expr_path_options, @@ -1188,7 +1188,7 @@ protected: m_option_group.NotifyOptionParsingStarting(); // This is a raw command, so notify the option group Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - StackFrame *frame = m_exe_ctx.GetFramePtr(); + Frame *frame = m_exe_ctx.GetFramePtr(); Args command(raw_command); const char *expr = NULL; diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index 3941d82d47b..ea947a63407 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -1137,7 +1137,7 @@ Debugger::FindDebuggerWithID (lldb::user_id_t id) } static void -TestPromptFormats (StackFrame *frame) +TestPromptFormats (Frame *frame) { if (frame == NULL) return; @@ -1359,7 +1359,7 @@ static bool RunScriptFormatKeyword(Stream &s, ScriptInterpreter *script_interpre static ValueObjectSP ExpandIndexedExpression (ValueObject* valobj, size_t index, - StackFrame* frame, + Frame* frame, bool deref_pointer) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES)); @@ -2112,7 +2112,7 @@ FormatPromptRecurse { if (exe_ctx) { - StackFrame *frame = exe_ctx->GetFramePtr(); + Frame *frame = exe_ctx->GetFramePtr(); if (frame) { var_name_begin += ::strlen ("frame."); @@ -2338,7 +2338,7 @@ FormatPromptRecurse } else if (IsToken (var_name_begin, "pc-offset}")) { - StackFrame *frame = exe_ctx->GetFramePtr(); + Frame *frame = exe_ctx->GetFramePtr(); var_success = frame != NULL; if (var_success) { @@ -2397,7 +2397,7 @@ FormatPromptRecurse // If format addr is valid, then we need to print an address if (reg_num != LLDB_INVALID_REGNUM) { - StackFrame *frame = exe_ctx->GetFramePtr(); + Frame *frame = exe_ctx->GetFramePtr(); // We have a register value to display... if (reg_num == LLDB_REGNUM_GENERIC_PC && reg_kind == eRegisterKindGeneric) { diff --git a/lldb/source/Core/Disassembler.cpp b/lldb/source/Core/Disassembler.cpp index 7f830acba1f..b82d5ca683d 100644 --- a/lldb/source/Core/Disassembler.cpp +++ b/lldb/source/Core/Disassembler.cpp @@ -35,7 +35,7 @@ #include "lldb/Symbol/ObjectFile.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" #define DEFAULT_DISASM_BYTE_SIZE 32 @@ -410,7 +410,7 @@ Disassembler::PrintInstructions AddressRange sc_range; const Address *pc_addr_ptr = NULL; ExecutionContextScope *exe_scope = exe_ctx.GetBestExecutionContextScope(); - StackFrame *frame = exe_ctx.GetFramePtr(); + Frame *frame = exe_ctx.GetFramePtr(); TargetSP target_sp (exe_ctx.GetTargetSP()); SourceManager &source_manager = target_sp ? target_sp->GetSourceManager() : debugger.GetSourceManager(); @@ -518,7 +518,7 @@ Disassembler::Disassemble ) { AddressRange range; - StackFrame *frame = exe_ctx.GetFramePtr(); + Frame *frame = exe_ctx.GetFramePtr(); if (frame) { SymbolContext sc(frame->GetSymbolContext(eSymbolContextFunction | eSymbolContextSymbol)); diff --git a/lldb/source/Core/EmulateInstruction.cpp b/lldb/source/Core/EmulateInstruction.cpp index bf6c6d88b56..28c439668a8 100644 --- a/lldb/source/Core/EmulateInstruction.cpp +++ b/lldb/source/Core/EmulateInstruction.cpp @@ -292,7 +292,7 @@ EmulateInstruction::ReadMemoryFrame (EmulateInstruction *instruction, if (!baton || dst == NULL || dst_len == 0) return 0; - StackFrame *frame = (StackFrame *) baton; + Frame *frame = (Frame *) baton; ProcessSP process_sp (frame->CalculateProcess()); if (process_sp) @@ -314,7 +314,7 @@ EmulateInstruction::WriteMemoryFrame (EmulateInstruction *instruction, if (!baton || src == NULL || src_len == 0) return 0; - StackFrame *frame = (StackFrame *) baton; + Frame *frame = (Frame *) baton; ProcessSP process_sp (frame->CalculateProcess()); if (process_sp) @@ -335,7 +335,7 @@ EmulateInstruction::ReadRegisterFrame (EmulateInstruction *instruction, if (!baton) return false; - StackFrame *frame = (StackFrame *) baton; + Frame *frame = (Frame *) baton; return frame->GetRegisterContext()->ReadRegister (reg_info, reg_value); } @@ -349,7 +349,7 @@ EmulateInstruction::WriteRegisterFrame (EmulateInstruction *instruction, if (!baton) return false; - StackFrame *frame = (StackFrame *) baton; + Frame *frame = (Frame *) baton; return frame->GetRegisterContext()->WriteRegister (reg_info, reg_value); } diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index d39d21a2a0b..25fa4c2f8a5 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -3732,7 +3732,7 @@ ValueObject::EvaluationPoint::EvaluationPoint (ExecutionContextScope *exe_scope, { m_exe_ctx_ref.SetThreadSP(thread_sp); - StackFrameSP frame_sp (exe_ctx.GetFrameSP()); + FrameSP frame_sp (exe_ctx.GetFrameSP()); if (!frame_sp) { if (use_selected) @@ -3816,7 +3816,7 @@ ValueObject::EvaluationPoint::SyncWithProcessState() { if (m_exe_ctx_ref.HasFrameRef()) { - StackFrameSP frame_sp (m_exe_ctx_ref.GetFrameSP()); + FrameSP frame_sp (m_exe_ctx_ref.GetFrameSP()); if (!frame_sp) { // We used to have a frame, but now it is gone diff --git a/lldb/source/Core/ValueObjectRegister.cpp b/lldb/source/Core/ValueObjectRegister.cpp index 4f21457519e..ad7a81b29b3 100644 --- a/lldb/source/Core/ValueObjectRegister.cpp +++ b/lldb/source/Core/ValueObjectRegister.cpp @@ -77,7 +77,7 @@ ValueObjectRegisterContext::UpdateValue () { m_error.Clear(); ExecutionContext exe_ctx(GetExecutionContextRef()); - StackFrame *frame = exe_ctx.GetFramePtr(); + Frame *frame = exe_ctx.GetFramePtr(); if (frame) m_reg_ctx_sp = frame->GetRegisterContext(); else @@ -177,7 +177,7 @@ ValueObjectRegisterSet::UpdateValue () m_error.Clear(); SetValueDidChange (false); ExecutionContext exe_ctx(GetExecutionContextRef()); - StackFrame *frame = exe_ctx.GetFramePtr(); + Frame *frame = exe_ctx.GetFramePtr(); if (frame == NULL) m_reg_ctx_sp.reset(); else @@ -346,7 +346,7 @@ ValueObjectRegister::UpdateValue () { m_error.Clear(); ExecutionContext exe_ctx(GetExecutionContextRef()); - StackFrame *frame = exe_ctx.GetFramePtr(); + Frame *frame = exe_ctx.GetFramePtr(); if (frame == NULL) { m_reg_ctx_sp.reset(); diff --git a/lldb/source/Core/ValueObjectVariable.cpp b/lldb/source/Core/ValueObjectVariable.cpp index 3d8b07a3694..f0e88e62c0f 100644 --- a/lldb/source/Core/ValueObjectVariable.cpp +++ b/lldb/source/Core/ValueObjectVariable.cpp @@ -263,7 +263,7 @@ ValueObjectVariable::IsInScope () if (exe_ctx_ref.HasFrameRef()) { ExecutionContext exe_ctx (exe_ctx_ref); - StackFrame *frame = exe_ctx.GetFramePtr(); + Frame *frame = exe_ctx.GetFramePtr(); if (frame) { return m_variable_sp->IsInScope (frame); diff --git a/lldb/source/DataFormatters/CF.cpp b/lldb/source/DataFormatters/CF.cpp index a4b7a1235ff..116017ca6e6 100644 --- a/lldb/source/DataFormatters/CF.cpp +++ b/lldb/source/DataFormatters/CF.cpp @@ -79,7 +79,7 @@ lldb_private::formatters::CFBagSummaryProvider (ValueObject& valobj, Stream& str if (is_type_ok == false) { - StackFrameSP frame_sp(valobj.GetFrameSP()); + FrameSP frame_sp(valobj.GetFrameSP()); if (!frame_sp) return false; ValueObjectSP count_sp; @@ -273,7 +273,7 @@ lldb_private::formatters::CFBinaryHeapSummaryProvider (ValueObject& valobj, Stre if (is_type_ok == false) { - StackFrameSP frame_sp(valobj.GetFrameSP()); + FrameSP frame_sp(valobj.GetFrameSP()); if (!frame_sp) return false; ValueObjectSP count_sp; diff --git a/lldb/source/DataFormatters/CXXFormatterFunctions.cpp b/lldb/source/DataFormatters/CXXFormatterFunctions.cpp index e00413556cc..d96a9da8be4 100644 --- a/lldb/source/DataFormatters/CXXFormatterFunctions.cpp +++ b/lldb/source/DataFormatters/CXXFormatterFunctions.cpp @@ -44,7 +44,7 @@ lldb_private::formatters::ExtractValueFromObjCExpression (ValueObject &valobj, ExecutionContext exe_ctx (valobj.GetExecutionContextRef()); lldb::ValueObjectSP result_sp; Target* target = exe_ctx.GetTargetPtr(); - StackFrame* stack_frame = exe_ctx.GetFramePtr(); + Frame* stack_frame = exe_ctx.GetFramePtr(); if (!target || !stack_frame) return false; @@ -78,7 +78,7 @@ lldb_private::formatters::ExtractSummaryFromObjCExpression (ValueObject &valobj, ExecutionContext exe_ctx (valobj.GetExecutionContextRef()); lldb::ValueObjectSP result_sp; Target* target = exe_ctx.GetTargetPtr(); - StackFrame* stack_frame = exe_ctx.GetFramePtr(); + Frame* stack_frame = exe_ctx.GetFramePtr(); if (!target || !stack_frame) return false; @@ -116,7 +116,7 @@ lldb_private::formatters::CallSelectorOnObject (ValueObject &valobj, ExecutionContext exe_ctx (valobj.GetExecutionContextRef()); lldb::ValueObjectSP result_sp; Target* target = exe_ctx.GetTargetPtr(); - StackFrame* stack_frame = exe_ctx.GetFramePtr(); + Frame* stack_frame = exe_ctx.GetFramePtr(); if (!target || !stack_frame) return valobj_sp; @@ -153,7 +153,7 @@ lldb_private::formatters::CallSelectorOnObject (ValueObject &valobj, ExecutionContext exe_ctx (valobj.GetExecutionContextRef()); lldb::ValueObjectSP result_sp; Target* target = exe_ctx.GetTargetPtr(); - StackFrame* stack_frame = exe_ctx.GetFramePtr(); + Frame* stack_frame = exe_ctx.GetFramePtr(); if (!target || !stack_frame) return valobj_sp; diff --git a/lldb/source/DataFormatters/FormatClasses.cpp b/lldb/source/DataFormatters/FormatClasses.cpp index c67f86a7493..ca38423dd9d 100644 --- a/lldb/source/DataFormatters/FormatClasses.cpp +++ b/lldb/source/DataFormatters/FormatClasses.cpp @@ -25,7 +25,7 @@ #include "lldb/DataFormatters/FormatClasses.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Symbol/ClangASTType.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Target.h" using namespace lldb; diff --git a/lldb/source/DataFormatters/TypeFormat.cpp b/lldb/source/DataFormatters/TypeFormat.cpp index 7f18ddef726..2e5fd632155 100644 --- a/lldb/source/DataFormatters/TypeFormat.cpp +++ b/lldb/source/DataFormatters/TypeFormat.cpp @@ -25,7 +25,7 @@ #include "lldb/DataFormatters/TypeFormat.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Symbol/ClangASTType.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Target.h" using namespace lldb; diff --git a/lldb/source/DataFormatters/TypeSummary.cpp b/lldb/source/DataFormatters/TypeSummary.cpp index 4c75b4b87d0..fb51fa0ea0b 100644 --- a/lldb/source/DataFormatters/TypeSummary.cpp +++ b/lldb/source/DataFormatters/TypeSummary.cpp @@ -26,7 +26,7 @@ #include "lldb/DataFormatters/ValueObjectPrinter.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Symbol/ClangASTType.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Target.h" #include "lldb/Host/Host.h" @@ -62,7 +62,7 @@ StringSummaryFormat::FormatObject (ValueObject *valobj, StreamString s; ExecutionContext exe_ctx (valobj->GetExecutionContextRef()); SymbolContext sc; - StackFrame *frame = exe_ctx.GetFramePtr(); + Frame *frame = exe_ctx.GetFramePtr(); if (frame) sc = frame->GetSymbolContext(lldb::eSymbolContextEverything); diff --git a/lldb/source/DataFormatters/TypeSynthetic.cpp b/lldb/source/DataFormatters/TypeSynthetic.cpp index 972be486b78..c5be3ed4890 100644 --- a/lldb/source/DataFormatters/TypeSynthetic.cpp +++ b/lldb/source/DataFormatters/TypeSynthetic.cpp @@ -24,7 +24,7 @@ #include "lldb/DataFormatters/TypeSynthetic.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Symbol/ClangASTType.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Target.h" using namespace lldb; diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index 87c984ddcfb..172d1118f89 100644 --- a/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -45,7 +45,7 @@ #include "lldb/Target/ObjCLanguageRuntime.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" @@ -967,7 +967,7 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context, // Only look for functions by name out in our symbols if the function // doesn't start with our phony prefix of '$' Target *target = m_parser_vars->m_exe_ctx.GetTargetPtr(); - StackFrame *frame = m_parser_vars->m_exe_ctx.GetFramePtr(); + Frame *frame = m_parser_vars->m_exe_ctx.GetFramePtr(); if (name_unique_cstr[0] == '$' && !namespace_decl) { static ConstString g_lldb_class_name ("$__lldb_class"); @@ -1293,11 +1293,11 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context, { valobj = frame->GetValueForVariableExpressionPath(name_unique_cstr, eNoDynamicValues, - StackFrame::eExpressionPathOptionCheckPtrVsMember || - StackFrame::eExpressionPathOptionsAllowDirectIVarAccess || - StackFrame::eExpressionPathOptionsNoFragileObjcIvar || - StackFrame::eExpressionPathOptionsNoSyntheticChildren || - StackFrame::eExpressionPathOptionsNoSyntheticArrayRange, + Frame::eExpressionPathOptionCheckPtrVsMember || + Frame::eExpressionPathOptionsAllowDirectIVarAccess || + Frame::eExpressionPathOptionsNoFragileObjcIvar || + Frame::eExpressionPathOptionsNoSyntheticChildren || + Frame::eExpressionPathOptionsNoSyntheticArrayRange, var, err); diff --git a/lldb/source/Expression/ClangUserExpression.cpp b/lldb/source/Expression/ClangUserExpression.cpp index c9196533974..e097eb07f77 100644 --- a/lldb/source/Expression/ClangUserExpression.cpp +++ b/lldb/source/Expression/ClangUserExpression.cpp @@ -41,7 +41,7 @@ #include "lldb/Symbol/VariableList.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/ThreadPlan.h" #include "lldb/Target/ThreadPlanCallUserExpression.h" @@ -119,7 +119,7 @@ ClangUserExpression::ScanContext(ExecutionContext &exe_ctx, Error &err) return; } - StackFrame *frame = exe_ctx.GetFramePtr(); + Frame *frame = exe_ctx.GetFramePtr(); if (frame == NULL) { if (log) @@ -329,7 +329,7 @@ ClangUserExpression::InstallContext (ExecutionContext &exe_ctx) { m_process_wp = exe_ctx.GetProcessSP(); - lldb::StackFrameSP frame_sp = exe_ctx.GetFrameSP(); + lldb::FrameSP frame_sp = exe_ctx.GetFrameSP(); if (frame_sp) m_address = frame_sp->GetFrameCodeAddress(); @@ -339,7 +339,7 @@ bool ClangUserExpression::LockAndCheckContext (ExecutionContext &exe_ctx, lldb::TargetSP &target_sp, lldb::ProcessSP &process_sp, - lldb::StackFrameSP &frame_sp) + lldb::FrameSP &frame_sp) { lldb::ProcessSP expected_process_sp = m_process_wp.lock(); process_sp = exe_ctx.GetProcessSP(); @@ -367,7 +367,7 @@ ClangUserExpression::MatchesContext (ExecutionContext &exe_ctx) { lldb::TargetSP target_sp; lldb::ProcessSP process_sp; - lldb::StackFrameSP frame_sp; + lldb::FrameSP frame_sp; return LockAndCheckContext(exe_ctx, target_sp, process_sp, frame_sp); } @@ -558,7 +558,7 @@ ClangUserExpression::Parse (Stream &error_stream, } static lldb::addr_t -GetObjectPointer (lldb::StackFrameSP frame_sp, +GetObjectPointer (lldb::FrameSP frame_sp, ConstString &object_name, Error &err) { @@ -575,11 +575,11 @@ GetObjectPointer (lldb::StackFrameSP frame_sp, valobj_sp = frame_sp->GetValueForVariableExpressionPath(object_name.AsCString(), lldb::eNoDynamicValues, - StackFrame::eExpressionPathOptionCheckPtrVsMember || - StackFrame::eExpressionPathOptionsAllowDirectIVarAccess || - StackFrame::eExpressionPathOptionsNoFragileObjcIvar || - StackFrame::eExpressionPathOptionsNoSyntheticChildren || - StackFrame::eExpressionPathOptionsNoSyntheticArrayRange, + Frame::eExpressionPathOptionCheckPtrVsMember || + Frame::eExpressionPathOptionsAllowDirectIVarAccess || + Frame::eExpressionPathOptionsNoFragileObjcIvar || + Frame::eExpressionPathOptionsNoSyntheticChildren || + Frame::eExpressionPathOptionsNoSyntheticArrayRange, var_sp, err); @@ -606,7 +606,7 @@ ClangUserExpression::PrepareToExecuteJITExpression (Stream &error_stream, { lldb::TargetSP target; lldb::ProcessSP process; - lldb::StackFrameSP frame; + lldb::FrameSP frame; if (!LockAndCheckContext(exe_ctx, target, diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp index b36be8e545d..6c54f94a125 100644 --- a/lldb/source/Expression/DWARFExpression.cpp +++ b/lldb/source/Expression/DWARFExpression.cpp @@ -36,7 +36,7 @@ #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/StackID.h" #include "lldb/Target/Thread.h" @@ -1240,7 +1240,7 @@ DWARFExpression::Evaluate { lldb::offset_t offset = 0; addr_t pc; - StackFrame *frame = NULL; + Frame *frame = NULL; if (reg_ctx) pc = reg_ctx->GetPC(); else @@ -1327,7 +1327,7 @@ DWARFExpression::Evaluate std::vector<Value> stack; Process *process = NULL; - StackFrame *frame = NULL; + Frame *frame = NULL; if (exe_ctx) { diff --git a/lldb/source/Expression/IRDynamicChecks.cpp b/lldb/source/Expression/IRDynamicChecks.cpp index 4030f149ab2..09b3d71dbeb 100644 --- a/lldb/source/Expression/IRDynamicChecks.cpp +++ b/lldb/source/Expression/IRDynamicChecks.cpp @@ -15,7 +15,7 @@ #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/ObjCLanguageRuntime.h" #include "lldb/Target/Process.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "llvm/Support/raw_ostream.h" #include "llvm/IR/Constants.h" diff --git a/lldb/source/Expression/Materializer.cpp b/lldb/source/Expression/Materializer.cpp index fb9522f0dc3..0576ea0a14e 100644 --- a/lldb/source/Expression/Materializer.cpp +++ b/lldb/source/Expression/Materializer.cpp @@ -19,7 +19,7 @@ #include "lldb/Symbol/Variable.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/RegisterContext.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" @@ -146,7 +146,7 @@ public: } } - void Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) + void Materialize (lldb::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS)); @@ -191,7 +191,7 @@ public: } } - void Dematerialize (lldb::StackFrameSP &frame_sp, + void Dematerialize (lldb::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, lldb::addr_t frame_top, @@ -418,7 +418,7 @@ public: m_is_reference = m_variable_sp->GetType()->GetClangForwardType().IsReferenceType(); } - void Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) + void Materialize (lldb::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS)); @@ -533,7 +533,7 @@ public: } } - void Dematerialize (lldb::StackFrameSP &frame_sp, + void Dematerialize (lldb::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, lldb::addr_t frame_top, @@ -720,7 +720,7 @@ public: m_alignment = 8; } - void Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) + void Materialize (lldb::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) { if (!m_is_program_reference) { @@ -758,7 +758,7 @@ public: } } - void Dematerialize (lldb::StackFrameSP &frame_sp, + void Dematerialize (lldb::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, lldb::addr_t frame_top, @@ -769,7 +769,7 @@ public: } void Dematerialize (lldb::ClangExpressionVariableSP &result_variable_sp, - lldb::StackFrameSP &frame_sp, + lldb::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, lldb::addr_t frame_top, @@ -987,7 +987,7 @@ public: m_alignment = 8; } - void Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) + void Materialize (lldb::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS)); @@ -1031,7 +1031,7 @@ public: } } - void Dematerialize (lldb::StackFrameSP &frame_sp, + void Dematerialize (lldb::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, lldb::addr_t frame_top, @@ -1115,7 +1115,7 @@ public: m_alignment = m_register_info.byte_size; } - void Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) + void Materialize (lldb::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS)); @@ -1171,7 +1171,7 @@ public: } } - void Dematerialize (lldb::StackFrameSP &frame_sp, + void Dematerialize (lldb::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, lldb::addr_t frame_top, @@ -1298,7 +1298,7 @@ Materializer::~Materializer () } Materializer::DematerializerSP -Materializer::Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &error) +Materializer::Materialize (lldb::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &error) { ExecutionContextScope *exe_scope = frame_sp.get(); @@ -1344,7 +1344,7 @@ Materializer::Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb: void Materializer::Dematerializer::Dematerialize (Error &error, lldb::ClangExpressionVariableSP &result_sp, lldb::addr_t frame_bottom, lldb::addr_t frame_top) { - lldb::StackFrameSP frame_sp; + lldb::FrameSP frame_sp; lldb::ThreadSP thread_sp = m_thread_wp.lock(); if (thread_sp) diff --git a/lldb/source/Interpreter/Args.cpp b/lldb/source/Interpreter/Args.cpp index ff94e0f6021..2a051b12810 100644 --- a/lldb/source/Interpreter/Args.cpp +++ b/lldb/source/Interpreter/Args.cpp @@ -23,7 +23,7 @@ #include "lldb/Interpreter/CommandReturnObject.h" #include "lldb/Target/Process.h" //#include "lldb/Target/RegisterContext.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Target.h" //#include "lldb/Target/Thread.h" diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp index fc76f0470d3..87afd3fed59 100644 --- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp +++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp @@ -2196,7 +2196,7 @@ ScriptInterpreterPython::BreakpointCallbackFunction if (python_function_name != NULL && python_function_name[0] != '\0') { - const StackFrameSP stop_frame_sp (exe_ctx.GetFrameSP()); + const FrameSP stop_frame_sp (exe_ctx.GetFrameSP()); BreakpointSP breakpoint_sp = target->GetBreakpointByID (break_id); if (breakpoint_sp) { @@ -2251,7 +2251,7 @@ ScriptInterpreterPython::WatchpointCallbackFunction if (python_function_name != NULL && python_function_name[0] != '\0') { - const StackFrameSP stop_frame_sp (exe_ctx.GetFrameSP()); + const FrameSP stop_frame_sp (exe_ctx.GetFrameSP()); WatchpointSP wp_sp = target->GetWatchpointList().FindByID (watch_id); if (wp_sp) { @@ -2661,7 +2661,7 @@ ScriptInterpreterPython::RunScriptFormatKeyword (const char* impl_function, bool ScriptInterpreterPython::RunScriptFormatKeyword (const char* impl_function, - StackFrame* frame, + Frame* frame, std::string& output, Error& error) { @@ -2682,7 +2682,7 @@ ScriptInterpreterPython::RunScriptFormatKeyword (const char* impl_function, return false; } { - StackFrameSP frame_sp(frame->shared_from_this()); + FrameSP frame_sp(frame->shared_from_this()); Locker py_lock(this); ret_val = g_swig_run_script_keyword_frame (impl_function, m_dictionary_name.c_str(), frame_sp, output); if (!ret_val) diff --git a/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp b/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp index f27c294a4ab..d3d6f06765c 100644 --- a/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp +++ b/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp @@ -504,7 +504,7 @@ ABIMacOSX_arm::GetReturnValueObjectImpl (Thread &thread, } Error -ABIMacOSX_arm::SetReturnValueObject(lldb::StackFrameSP &frame_sp, lldb::ValueObjectSP &new_value_sp) +ABIMacOSX_arm::SetReturnValueObject(lldb::FrameSP &frame_sp, lldb::ValueObjectSP &new_value_sp) { Error error; if (!new_value_sp) diff --git a/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h b/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h index 27cea85aaf6..97315fbace7 100644 --- a/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h +++ b/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h @@ -42,7 +42,7 @@ public: lldb_private::ValueList &values) const; virtual lldb_private::Error - SetReturnValueObject(lldb::StackFrameSP &frame_sp, lldb::ValueObjectSP &new_value); + SetReturnValueObject(lldb::FrameSP &frame_sp, lldb::ValueObjectSP &new_value); protected: virtual lldb::ValueObjectSP diff --git a/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp b/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp index c64623fe27e..6ad3b85abc6 100644 --- a/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp +++ b/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp @@ -676,7 +676,7 @@ ABIMacOSX_i386::GetArgumentValues (Thread &thread, } Error -ABIMacOSX_i386::SetReturnValueObject(lldb::StackFrameSP &frame_sp, lldb::ValueObjectSP &new_value_sp) +ABIMacOSX_i386::SetReturnValueObject(lldb::FrameSP &frame_sp, lldb::ValueObjectSP &new_value_sp) { Error error; if (!new_value_sp) diff --git a/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h b/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h index 5428d0c1e44..95e5245a5a7 100644 --- a/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h +++ b/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h @@ -52,7 +52,7 @@ public: lldb_private::ValueList &values) const; virtual lldb_private::Error - SetReturnValueObject(lldb::StackFrameSP &frame_sp, lldb::ValueObjectSP &new_value); + SetReturnValueObject(lldb::FrameSP &frame_sp, lldb::ValueObjectSP &new_value); protected: virtual lldb::ValueObjectSP diff --git a/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp b/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp index 7d8dc9f66bf..e178da813cd 100644 --- a/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp +++ b/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp @@ -25,7 +25,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Thread.h" #include "llvm/ADT/Triple.h" @@ -557,7 +557,7 @@ ABISysV_x86_64::GetArgumentValues (Thread &thread, } Error -ABISysV_x86_64::SetReturnValueObject(lldb::StackFrameSP &frame_sp, lldb::ValueObjectSP &new_value_sp) +ABISysV_x86_64::SetReturnValueObject(lldb::FrameSP &frame_sp, lldb::ValueObjectSP &new_value_sp) { Error error; if (!new_value_sp) diff --git a/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h b/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h index d9d6fd7af79..ac41971cf1e 100644 --- a/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h +++ b/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h @@ -46,7 +46,7 @@ public: lldb_private::ValueList &values) const; virtual lldb_private::Error - SetReturnValueObject(lldb::StackFrameSP &frame_sp, lldb::ValueObjectSP &new_value); + SetReturnValueObject(lldb::FrameSP &frame_sp, lldb::ValueObjectSP &new_value); protected: lldb::ValueObjectSP diff --git a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp index 61c3c64d4fc..b1aea0ce936 100644 --- a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp +++ b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp @@ -36,7 +36,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/Target.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Core/RegularExpression.h" diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp index 1b2a1f6b7bb..0a5ee887956 100644 --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -22,7 +22,7 @@ #include "lldb/Host/Symbols.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Target/RegisterContext.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanRunToAddress.h" diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp index f29a481e09a..ebe1aa95d6e 100644 --- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp +++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp @@ -26,7 +26,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanRunToAddress.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "DynamicLoaderMacOSXDYLD.h" @@ -216,7 +216,7 @@ DynamicLoaderMacOSXDYLD::ProcessDidExec () ThreadSP thread_sp (m_process->GetThreadList().GetThreadAtIndex(0)); if (thread_sp) { - lldb::StackFrameSP frame_sp (thread_sp->GetStackFrameAtIndex(0)); + lldb::FrameSP frame_sp (thread_sp->GetStackFrameAtIndex(0)); if (frame_sp) { const Symbol *symbol = frame_sp->GetSymbolContext(eSymbolContextSymbol).symbol; @@ -1604,7 +1604,7 @@ ThreadPlanSP DynamicLoaderMacOSXDYLD::GetStepThroughTrampolinePlan (Thread &thread, bool stop_others) { ThreadPlanSP thread_plan_sp; - StackFrame *current_frame = thread.GetStackFrameAtIndex(0).get(); + Frame *current_frame = thread.GetStackFrameAtIndex(0).get(); const SymbolContext ¤t_context = current_frame->GetSymbolContext(eSymbolContextSymbol); Symbol *current_symbol = current_context.symbol; Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp index 8e8314feb7d..a2d3ce62a7c 100644 --- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp +++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp @@ -379,7 +379,7 @@ DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan(Thread &thread, bool stop) { ThreadPlanSP thread_plan_sp; - StackFrame *frame = thread.GetStackFrameAtIndex(0).get(); + Frame *frame = thread.GetStackFrameAtIndex(0).get(); const SymbolContext &context = frame->GetSymbolContext(eSymbolContextSymbol); Symbol *sym = context.symbol; diff --git a/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp b/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp index bad4118971e..761ab700152 100644 --- a/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp +++ b/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp @@ -13,7 +13,7 @@ #include "lldb/Core/Scalar.h" #include "lldb/Interpreter/OptionValueArray.h" #include "lldb/Interpreter/OptionValueDictionary.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/RegisterContext.h" #include "Utility/ARM_DWARF_Registers.h" @@ -34,7 +34,7 @@ EmulationStateARM::~EmulationStateARM () } bool -EmulationStateARM::LoadPseudoRegistersFromFrame (StackFrame &frame) +EmulationStateARM::LoadPseudoRegistersFromFrame (Frame &frame) { RegisterContext *reg_ctx = frame.GetRegisterContext().get(); bool success = true; diff --git a/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.h b/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.h index ad596a3c277..9eee7c39c82 100644 --- a/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.h +++ b/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.h @@ -42,7 +42,7 @@ public: ClearPseudoMemory (); bool - LoadPseudoRegistersFromFrame (lldb_private::StackFrame &frame); + LoadPseudoRegistersFromFrame (lldb_private::Frame &frame); bool LoadStateFromDictionary (lldb_private::OptionValueDictionary *test_data); diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp index 1bcbb4e8c45..be9e968acda 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp @@ -873,7 +873,7 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan (Thread &thread, bool sto // We are decoding a method dispatch. // First job is to pull the arguments out: - lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0); + lldb::FrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0); const ABI *abi = NULL; ProcessSP process_sp (thread.CalculateProcess()); 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); diff --git a/lldb/source/Symbol/Variable.cpp b/lldb/source/Symbol/Variable.cpp index 7276e0a4a1a..b86452396c0 100644 --- a/lldb/source/Symbol/Variable.cpp +++ b/lldb/source/Symbol/Variable.cpp @@ -22,7 +22,7 @@ #include "lldb/Target/ABI.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Thread.h" #include "lldb/Target/Target.h" @@ -207,7 +207,7 @@ Variable::CalculateSymbolContext (SymbolContext *sc) } bool -Variable::LocationIsValidForFrame (StackFrame *frame) +Variable::LocationIsValidForFrame (Frame *frame) { // Is the variable is described by a single location? if (!m_location.IsLocationList()) @@ -271,7 +271,7 @@ Variable::LocationIsValidForAddress (const Address &address) } bool -Variable::IsInScope (StackFrame *frame) +Variable::IsInScope (Frame *frame) { switch (m_scope) { @@ -520,7 +520,7 @@ Variable::DumpLocationForAddress (Stream *s, const Address &address) static void -PrivateAutoComplete (StackFrame *frame, +PrivateAutoComplete (Frame *frame, const std::string &partial_path, const std::string &prefix_path, // Anything that has been resolved already will be in here const ClangASTType& clang_type, @@ -528,7 +528,7 @@ PrivateAutoComplete (StackFrame *frame, bool &word_complete); static void -PrivateAutoCompleteMembers (StackFrame *frame, +PrivateAutoCompleteMembers (Frame *frame, const std::string &partial_member_name, const std::string &partial_path, const std::string &prefix_path, // Anything that has been resolved already will be in here @@ -537,7 +537,7 @@ PrivateAutoCompleteMembers (StackFrame *frame, bool &word_complete); static void -PrivateAutoCompleteMembers (StackFrame *frame, +PrivateAutoCompleteMembers (Frame *frame, const std::string &partial_member_name, const std::string &partial_path, const std::string &prefix_path, // Anything that has been resolved already will be in here @@ -616,7 +616,7 @@ PrivateAutoCompleteMembers (StackFrame *frame, } static void -PrivateAutoComplete (StackFrame *frame, +PrivateAutoComplete (Frame *frame, const std::string &partial_path, const std::string &prefix_path, // Anything that has been resolved already will be in here const ClangASTType& clang_type, diff --git a/lldb/source/Target/ExecutionContext.cpp b/lldb/source/Target/ExecutionContext.cpp index 7a8b60189bc..ee42e845f14 100644 --- a/lldb/source/Target/ExecutionContext.cpp +++ b/lldb/source/Target/ExecutionContext.cpp @@ -11,7 +11,7 @@ #include "lldb/Core/State.h" #include "lldb/Target/ExecutionContextScope.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" @@ -64,7 +64,7 @@ ExecutionContext::ExecutionContext (const lldb::ThreadSP &thread_sp) : SetContext (thread_sp); } -ExecutionContext::ExecutionContext (const lldb::StackFrameSP &frame_sp) : +ExecutionContext::ExecutionContext (const lldb::FrameSP &frame_sp) : m_target_sp (), m_process_sp (), m_thread_sp (), @@ -107,13 +107,13 @@ ExecutionContext::ExecutionContext (const lldb::ThreadWP &thread_wp) : SetContext (thread_sp); } -ExecutionContext::ExecutionContext (const lldb::StackFrameWP &frame_wp) : +ExecutionContext::ExecutionContext (const lldb::FrameWP &frame_wp) : m_target_sp (), m_process_sp (), m_thread_sp (), m_frame_sp () { - lldb::StackFrameSP frame_sp(frame_wp.lock()); + lldb::FrameSP frame_sp(frame_wp.lock()); if (frame_sp) SetContext (frame_sp); } @@ -136,7 +136,7 @@ ExecutionContext::ExecutionContext (Target* t, bool fill_current_process_thread_ } } -ExecutionContext::ExecutionContext(Process* process, Thread *thread, StackFrame *frame) : +ExecutionContext::ExecutionContext(Process* process, Thread *thread, Frame *frame) : m_target_sp (), m_process_sp (process->shared_from_this()), m_thread_sp (thread->shared_from_this()), @@ -320,7 +320,7 @@ ExecutionContext::GetThreadRef () const return *m_thread_sp; } -StackFrame & +Frame & ExecutionContext::GetFrameRef () const { #if defined (LLDB_CONFIGURATION_DEBUG) || defined (LLDB_CONFIGURATION_RELEASE) @@ -348,7 +348,7 @@ ExecutionContext::SetThreadSP (const lldb::ThreadSP &thread_sp) } void -ExecutionContext::SetFrameSP (const lldb::StackFrameSP &frame_sp) +ExecutionContext::SetFrameSP (const lldb::FrameSP &frame_sp) { m_frame_sp = frame_sp; } @@ -381,7 +381,7 @@ ExecutionContext::SetThreadPtr (Thread *thread) } void -ExecutionContext::SetFramePtr (StackFrame *frame) +ExecutionContext::SetFramePtr (Frame *frame) { if (frame) m_frame_sp = frame->shared_from_this(); @@ -434,7 +434,7 @@ ExecutionContext::SetContext (const lldb::ThreadSP &thread_sp) } void -ExecutionContext::SetContext (const lldb::StackFrameSP &frame_sp) +ExecutionContext::SetContext (const lldb::FrameSP &frame_sp) { m_frame_sp = frame_sp; if (frame_sp) @@ -606,7 +606,7 @@ ExecutionContextRef::operator =(const ExecutionContext &exe_ctx) m_tid = thread_sp->GetID(); else m_tid = LLDB_INVALID_THREAD_ID; - lldb::StackFrameSP frame_sp (exe_ctx.GetFrameSP()); + lldb::FrameSP frame_sp (exe_ctx.GetFrameSP()); if (frame_sp) m_stack_id = frame_sp->GetStackID(); else @@ -666,7 +666,7 @@ ExecutionContextRef::SetThreadSP (const lldb::ThreadSP &thread_sp) } void -ExecutionContextRef::SetFrameSP (const lldb::StackFrameSP &frame_sp) +ExecutionContextRef::SetFrameSP (const lldb::FrameSP &frame_sp) { if (frame_sp) { @@ -711,7 +711,7 @@ ExecutionContextRef::SetTargetPtr (Target* target, bool adopt_selected) if (thread_sp) { SetThreadSP (thread_sp); - lldb::StackFrameSP frame_sp (thread_sp->GetSelectedFrame()); + lldb::FrameSP frame_sp (thread_sp->GetSelectedFrame()); if (!frame_sp) frame_sp = thread_sp->GetStackFrameAtIndex(0); if (frame_sp) @@ -755,7 +755,7 @@ ExecutionContextRef::SetThreadPtr (Thread *thread) } void -ExecutionContextRef::SetFramePtr (StackFrame *frame) +ExecutionContextRef::SetFramePtr (Frame *frame) { if (frame) SetFrameSP (frame->shared_from_this()); @@ -811,7 +811,7 @@ ExecutionContextRef::GetThreadSP () const return thread_sp; } -lldb::StackFrameSP +lldb::FrameSP ExecutionContextRef::GetFrameSP () const { if (m_stack_id.IsValid()) @@ -820,7 +820,7 @@ ExecutionContextRef::GetFrameSP () const if (thread_sp) return thread_sp->GetFrameWithStackID (m_stack_id); } - return lldb::StackFrameSP(); + return lldb::FrameSP(); } ExecutionContext diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 738ed5f9fee..15a5506dc6f 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -1808,7 +1808,7 @@ Process::LoadImage (const FileSpec &image_spec, Error &error) if (thread_sp) { - StackFrameSP frame_sp (thread_sp->GetStackFrameAtIndex (0)); + FrameSP frame_sp (thread_sp->GetStackFrameAtIndex (0)); if (frame_sp) { @@ -1885,7 +1885,7 @@ Process::UnloadImage (uint32_t image_token) if (thread_sp) { - StackFrameSP frame_sp (thread_sp->GetStackFrameAtIndex (0)); + FrameSP frame_sp (thread_sp->GetStackFrameAtIndex (0)); if (frame_sp) { @@ -4723,7 +4723,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx, // Save the thread & frame from the exe_ctx for restoration after we run const uint32_t thread_idx_id = thread->GetIndexID(); - StackFrameSP selected_frame_sp = thread->GetSelectedFrame(); + FrameSP selected_frame_sp = thread->GetSelectedFrame(); if (!selected_frame_sp) { thread->SetSelectedFrame(0); @@ -5451,7 +5451,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx, { // We were able to restore the selected thread, now restore the frame: Mutex::Locker lock(GetThreadList().GetMutex()); - StackFrameSP old_frame_sp = GetThreadList().GetSelectedThread()->GetFrameWithStackID(selected_stack_id); + FrameSP old_frame_sp = GetThreadList().GetSelectedThread()->GetFrameWithStackID(selected_stack_id); if (old_frame_sp) GetThreadList().GetSelectedThread()->SetSelectedFrame(old_frame_sp.get()); } diff --git a/lldb/source/Target/RegisterContext.cpp b/lldb/source/Target/RegisterContext.cpp index 2fd1e73ebdc..0eab5847519 100644 --- a/lldb/source/Target/RegisterContext.cpp +++ b/lldb/source/Target/RegisterContext.cpp @@ -17,7 +17,7 @@ #include "lldb/Core/Scalar.h" #include "lldb/Host/Endian.h" #include "lldb/Target/ExecutionContext.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Process.h" #include "lldb/Target/Thread.h" @@ -104,7 +104,7 @@ RegisterContext::SetPC(uint64_t pc) bool success = WriteRegisterFromUnsigned (reg, pc); if (success) { - StackFrameSP frame_sp(m_thread.GetFrameWithConcreteFrameIndex (m_concrete_frame_idx)); + FrameSP frame_sp(m_thread.GetFrameWithConcreteFrameIndex (m_concrete_frame_idx)); if (frame_sp) frame_sp->ChangePC(pc); else @@ -450,13 +450,13 @@ RegisterContext::CalculateThread () return m_thread.shared_from_this(); } -StackFrameSP -RegisterContext::CalculateStackFrame () +FrameSP +RegisterContext::CalculateFrame () { // Register contexts might belong to many frames if we have inlined // functions inside a frame since all inlined functions share the // same registers, so we can't definitively say which frame we come from... - return StackFrameSP(); + return FrameSP(); } void diff --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp index a05c03db1ba..7d730b802d1 100644 --- a/lldb/source/Target/StackFrame.cpp +++ b/lldb/source/Target/StackFrame.cpp @@ -9,6 +9,7 @@ #include "lldb/lldb-python.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/StackFrame.h" // C Includes @@ -204,7 +205,7 @@ StackFrame::GetFrameIndex () const { ThreadSP thread_sp = GetThread(); if (thread_sp) - return thread_sp->GetStackFrameList()->GetVisibleStackFrameIndex(m_frame_index); + return thread_sp->GetStackFrameList()->GetVisibleFrameIndex(m_frame_index); else return m_frame_index; } @@ -246,7 +247,7 @@ StackFrame::GetFrameCodeAddress() return m_frame_code_addr; } -void +bool StackFrame::ChangePC (addr_t pc) { m_frame_code_addr.SetRawAddress(pc); @@ -255,6 +256,7 @@ StackFrame::ChangePC (addr_t pc) ThreadSP thread_sp (GetThread()); if (thread_sp) thread_sp->ClearStackFrames (); + return true; } const char * @@ -1261,8 +1263,8 @@ StackFrame::CalculateThread () return GetThread(); } -StackFrameSP -StackFrame::CalculateStackFrame () +FrameSP +StackFrame::CalculateFrame () { return shared_from_this(); } @@ -1327,51 +1329,47 @@ StackFrame::Dump (Stream *strm, bool show_frame_index, bool show_fullpaths) } void -StackFrame::UpdateCurrentFrameFromPreviousFrame (StackFrame &prev_frame) +StackFrame::UpdateCurrentFrameFromPreviousFrame (Frame &prev_frame) { assert (GetStackID() == prev_frame.GetStackID()); // TODO: remove this after some testing - m_variable_list_sp = prev_frame.m_variable_list_sp; - m_variable_list_value_objects.Swap (prev_frame.m_variable_list_value_objects); - if (!m_disassembly.GetString().empty()) - m_disassembly.GetString().swap (m_disassembly.GetString()); + if (strcmp (prev_frame.GetFrameType(), "StackFrame") == 0) + { + StackFrame &prev_stackframe = *static_cast<StackFrame*>(&prev_frame); + m_variable_list_sp = prev_stackframe.m_variable_list_sp; + m_variable_list_value_objects.Swap (prev_stackframe.m_variable_list_value_objects); + if (!m_disassembly.GetString().empty()) + m_disassembly.GetString().swap (m_disassembly.GetString()); + } } void -StackFrame::UpdatePreviousFrameFromCurrentFrame (StackFrame &curr_frame) +StackFrame::UpdatePreviousFrameFromCurrentFrame (Frame &curr_frame) { assert (GetStackID() == curr_frame.GetStackID()); // TODO: remove this after some testing - m_id.SetPC (curr_frame.m_id.GetPC()); // Update the Stack ID PC value - assert (GetThread() == curr_frame.GetThread()); - m_frame_index = curr_frame.m_frame_index; - m_concrete_frame_index = curr_frame.m_concrete_frame_index; - m_reg_context_sp = curr_frame.m_reg_context_sp; - m_frame_code_addr = curr_frame.m_frame_code_addr; - assert (m_sc.target_sp.get() == NULL || curr_frame.m_sc.target_sp.get() == NULL || m_sc.target_sp.get() == curr_frame.m_sc.target_sp.get()); - assert (m_sc.module_sp.get() == NULL || curr_frame.m_sc.module_sp.get() == NULL || m_sc.module_sp.get() == curr_frame.m_sc.module_sp.get()); - assert (m_sc.comp_unit == NULL || curr_frame.m_sc.comp_unit == NULL || m_sc.comp_unit == curr_frame.m_sc.comp_unit); - assert (m_sc.function == NULL || curr_frame.m_sc.function == NULL || m_sc.function == curr_frame.m_sc.function); - m_sc = curr_frame.m_sc; - m_flags.Clear(GOT_FRAME_BASE | eSymbolContextEverything); - m_flags.Set (m_sc.GetResolvedMask()); - m_frame_base.Clear(); - m_frame_base_error.Clear(); + if (strcmp (curr_frame.GetFrameType(), "StackFrame") == 0) + { + StackFrame &curr_stackframe = *static_cast<StackFrame*>(&curr_frame); + m_id.SetPC (curr_stackframe.m_id.GetPC()); // Update the Stack ID PC value + assert (GetThread() == curr_stackframe.GetThread()); + m_frame_index = curr_stackframe.m_frame_index; + m_concrete_frame_index = curr_stackframe.m_concrete_frame_index; + m_reg_context_sp = curr_stackframe.m_reg_context_sp; + m_frame_code_addr = curr_stackframe.m_frame_code_addr; + assert (m_sc.target_sp.get() == NULL || curr_stackframe.m_sc.target_sp.get() == NULL || m_sc.target_sp.get() == curr_stackframe.m_sc.target_sp.get()); + assert (m_sc.module_sp.get() == NULL || curr_stackframe.m_sc.module_sp.get() == NULL || m_sc.module_sp.get() == curr_stackframe.m_sc.module_sp.get()); + assert (m_sc.comp_unit == NULL || curr_stackframe.m_sc.comp_unit == NULL || m_sc.comp_unit == curr_stackframe.m_sc.comp_unit); + assert (m_sc.function == NULL || curr_stackframe.m_sc.function == NULL || m_sc.function == curr_stackframe.m_sc.function); + m_sc = curr_stackframe.m_sc; + m_flags.Clear(GOT_FRAME_BASE | eSymbolContextEverything); + m_flags.Set (m_sc.GetResolvedMask()); + m_frame_base.Clear(); + m_frame_base_error.Clear(); + } } bool -StackFrame::HasCachedData () const -{ - if (m_variable_list_sp.get()) - return true; - if (m_variable_list_value_objects.GetSize() > 0) - return true; - if (!m_disassembly.GetString().empty()) - return true; - return false; -} - -bool StackFrame::GetStatus (Stream& strm, bool show_frame_info, bool show_source, diff --git a/lldb/source/Target/StackFrameList.cpp b/lldb/source/Target/StackFrameList.cpp index d95ab972a7a..61c8bae40cc 100644 --- a/lldb/source/Target/StackFrameList.cpp +++ b/lldb/source/Target/StackFrameList.cpp @@ -23,6 +23,7 @@ #include "lldb/Symbol/Symbol.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/StackFrame.h" #include "lldb/Target/StopInfo.h" #include "lldb/Target/Target.h" @@ -284,7 +285,7 @@ StackFrameList::GetFramesUpTo(uint32_t end_idx) } } - StackFrameSP unwind_frame_sp; + FrameSP unwind_frame_sp; do { uint32_t idx = m_concrete_frames_fetched++; @@ -324,7 +325,7 @@ StackFrameList::GetFramesUpTo(uint32_t end_idx) else { unwind_frame_sp = m_frames.front(); - cfa = unwind_frame_sp->m_id.GetCallFrameAddress(); + cfa = unwind_frame_sp->GetStackID().GetCallFrameAddress(); } } else @@ -358,7 +359,7 @@ StackFrameList::GetFramesUpTo(uint32_t end_idx) while (unwind_sc.GetParentOfInlinedScope(curr_frame_address, next_frame_sc, next_frame_address)) { - StackFrameSP frame_sp(new StackFrame (m_thread.shared_from_this(), + FrameSP frame_sp(new StackFrame (m_thread.shared_from_this(), m_frames.size(), idx, unwind_frame_sp->GetRegisterContextSP (), @@ -398,8 +399,8 @@ StackFrameList::GetFramesUpTo(uint32_t end_idx) { const size_t curr_frame_idx = curr_frame_num-1; const size_t prev_frame_idx = prev_frame_num-1; - StackFrameSP curr_frame_sp (curr_frames->m_frames[curr_frame_idx]); - StackFrameSP prev_frame_sp (prev_frames->m_frames[prev_frame_idx]); + FrameSP curr_frame_sp (curr_frames->m_frames[curr_frame_idx]); + FrameSP prev_frame_sp (prev_frames->m_frames[prev_frame_idx]); #if defined (DEBUG_STACK_FRAMES) s.Printf("\n\nCurr frame #%u ", curr_frame_idx); @@ -414,8 +415,8 @@ StackFrameList::GetFramesUpTo(uint32_t end_idx) s.PutCString("NULL"); #endif - StackFrame *curr_frame = curr_frame_sp.get(); - StackFrame *prev_frame = prev_frame_sp.get(); + Frame *curr_frame = curr_frame_sp.get(); + Frame *prev_frame = prev_frame_sp.get(); if (curr_frame == NULL || prev_frame == NULL) break; @@ -484,7 +485,7 @@ StackFrameList::Dump (Stream *s) const_iterator pos, begin = m_frames.begin(), end = m_frames.end(); for (pos = begin; pos != end; ++pos) { - StackFrame *frame = (*pos).get(); + Frame *frame = (*pos).get(); s->Printf("%p: ", frame); if (frame) { @@ -498,10 +499,10 @@ StackFrameList::Dump (Stream *s) s->EOL(); } -StackFrameSP +FrameSP StackFrameList::GetFrameAtIndex (uint32_t idx) { - StackFrameSP frame_sp; + FrameSP frame_sp; Mutex::Locker locker (m_mutex); uint32_t original_idx = idx; @@ -575,7 +576,7 @@ StackFrameList::GetFrameAtIndex (uint32_t idx) return frame_sp; } -StackFrameSP +FrameSP StackFrameList::GetFrameWithConcreteFrameIndex (uint32_t unwind_idx) { // First try assuming the unwind index is the same as the frame index. The @@ -585,7 +586,7 @@ StackFrameList::GetFrameWithConcreteFrameIndex (uint32_t unwind_idx) // frames after we make all the inlined frames. Most of the time the unwind // frame index (or the concrete frame index) is the same as the frame index. uint32_t frame_idx = unwind_idx; - StackFrameSP frame_sp (GetFrameAtIndex (frame_idx)); + FrameSP frame_sp (GetFrameAtIndex (frame_idx)); while (frame_sp) { if (frame_sp->GetFrameIndex() == unwind_idx) @@ -596,15 +597,15 @@ StackFrameList::GetFrameWithConcreteFrameIndex (uint32_t unwind_idx) } static bool -CompareStackID (const StackFrameSP &stack_sp, const StackID &stack_id) +CompareStackID (const FrameSP &stack_sp, const StackID &stack_id) { return stack_sp->GetStackID() < stack_id; } -StackFrameSP +FrameSP StackFrameList::GetFrameWithStackID (const StackID &stack_id) { - StackFrameSP frame_sp; + FrameSP frame_sp; if (stack_id.IsValid()) { @@ -635,7 +636,7 @@ StackFrameList::GetFrameWithStackID (const StackID &stack_id) } bool -StackFrameList::SetFrameAtIndex (uint32_t idx, StackFrameSP &frame_sp) +StackFrameList::SetFrameAtIndex (uint32_t idx, FrameSP &frame_sp) { if (idx >= m_frames.size()) m_frames.resize(idx + 1); @@ -657,7 +658,7 @@ StackFrameList::GetSelectedFrameIndex () const uint32_t -StackFrameList::SetSelectedFrame (lldb_private::StackFrame *frame) +StackFrameList::SetSelectedFrame (lldb_private::Frame *frame) { Mutex::Locker locker (m_mutex); const_iterator pos; @@ -684,7 +685,7 @@ bool StackFrameList::SetSelectedFrameByIndex (uint32_t idx) { Mutex::Locker locker (m_mutex); - StackFrameSP frame_sp (GetFrameAtIndex (idx)); + FrameSP frame_sp (GetFrameAtIndex (idx)); if (frame_sp) { SetSelectedFrame(frame_sp.get()); @@ -699,7 +700,7 @@ StackFrameList::SetDefaultFileAndLineToSelectedFrame() { if (m_thread.GetID() == m_thread.GetProcess()->GetThreadList().GetSelectedThread()->GetID()) { - StackFrameSP frame_sp (GetFrameAtIndex (GetSelectedFrameIndex())); + FrameSP frame_sp (GetFrameAtIndex (GetSelectedFrameIndex())); if (frame_sp) { SymbolContext sc = frame_sp->GetSymbolContext(eSymbolContextLineEntry); @@ -799,8 +800,8 @@ StackFrameList::Merge (std::unique_ptr<StackFrameList>& curr_ap, lldb::StackFram return; } - StackFrameSP prev_frame_zero_sp(prev_sp->GetFrameAtIndex (0)); - StackFrameSP curr_frame_zero_sp(curr_ap->GetFrameAtIndex (0)); + FrameSP prev_frame_zero_sp(prev_sp->GetFrameAtIndex (0)); + FrameSP curr_frame_zero_sp(curr_ap->GetFrameAtIndex (0)); StackID curr_stack_id (curr_frame_zero_sp->GetStackID()); StackID prev_stack_id (prev_frame_zero_sp->GetStackID()); @@ -839,13 +840,13 @@ StackFrameList::Merge (std::unique_ptr<StackFrameList>& curr_ap, lldb::StackFram } -lldb::StackFrameSP -StackFrameList::GetStackFrameSPForStackFramePtr (StackFrame *stack_frame_ptr) +lldb::FrameSP +StackFrameList::GetFrameSPForFramePtr (Frame *stack_frame_ptr) { const_iterator pos; const_iterator begin = m_frames.begin(); const_iterator end = m_frames.end(); - lldb::StackFrameSP ret_sp; + lldb::FrameSP ret_sp; for (pos = begin; pos != end; ++pos) { @@ -871,7 +872,7 @@ StackFrameList::GetStatus (Stream& strm, if (num_frames == 0) return 0; - StackFrameSP frame_sp; + FrameSP frame_sp; uint32_t frame_idx = 0; uint32_t last_frame; @@ -881,7 +882,7 @@ StackFrameList::GetStatus (Stream& strm, else last_frame = first_frame + num_frames; - StackFrameSP selected_frame_sp = m_thread.GetSelectedFrame(); + FrameSP selected_frame_sp = m_thread.GetSelectedFrame(); const char *unselected_marker = NULL; std::string buffer; if (selected_frame_marker) diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index c92a2cc3a4a..6545fb2200a 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -42,7 +42,7 @@ #include "lldb/lldb-private-log.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Target/Process.h" -#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Frame.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadSpec.h" @@ -1699,10 +1699,10 @@ Target::CalculateThread () return ThreadSP(); } -StackFrameSP -Target::CalculateStackFrame () +FrameSP +Target::CalculateFrame () { - return StackFrameSP(); + return FrameSP(); } void @@ -1832,7 +1832,7 @@ ExecutionResults Target::EvaluateExpression ( const char *expr_cstr, - StackFrame *frame, + Frame *frame, lldb::ValueObjectSP &result_valobj_sp, const EvaluateExpressionOptions& options ) @@ -2086,7 +2086,7 @@ Target::RunStopHooks () lldb::ThreadSP cur_thread_sp = cur_threadlist.GetThreadAtIndex (i); if (cur_thread_sp->ThreadStoppedForAReason()) { - lldb::StackFrameSP cur_frame_sp = cur_thread_sp->GetStackFrameAtIndex(0); + lldb::FrameSP cur_frame_sp = cur_thread_sp->GetStackFrameAtIndex(0); exc_ctx_with_reasons.push_back(ExecutionContext(m_process_sp.get(), cur_thread_sp.get(), cur_frame_sp.get())); sym_ctx_with_reasons.push_back(cur_frame_sp->GetSymbolContext(eSymbolContextEverything)); } diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp index 98c26019b4a..e6a34404647 100644 --- a/lldb/source/Target/Thread.cpp +++ b/lldb/source/Target/Thread.cpp @@ -211,11 +211,11 @@ Thread::ThreadEventData::GetStackIDFromEvent (const Event *event_ptr) return stack_id; } -StackFrameSP +FrameSP Thread::ThreadEventData::GetStackFrameFromEvent (const Event *event_ptr) { const ThreadEventData *event_data = GetEventDataFromEvent (event_ptr); - StackFrameSP frame_sp; + FrameSP frame_sp; if (event_data) { ThreadSP thread_sp = event_data->GetThread(); @@ -321,7 +321,7 @@ Thread::BroadcastSelectedFrameChange(StackID &new_frame_id) } uint32_t -Thread::SetSelectedFrame (lldb_private::StackFrame *frame, bool broadcast) +Thread::SetSelectedFrame (lldb_private::Frame *frame, bool broadcast) { uint32_t ret_value = GetStackFrameList()->SetSelectedFrame(frame); if (broadcast) @@ -332,7 +332,7 @@ Thread::SetSelectedFrame (lldb_private::StackFrame *frame, bool broadcast) bool Thread::SetSelectedFrameByIndex (uint32_t frame_idx, bool broadcast) { - StackFrameSP frame_sp(GetStackFrameList()->GetFrameAtIndex (frame_idx)); + FrameSP frame_sp(GetStackFrameList()->GetFrameAtIndex (frame_idx)); if (frame_sp) { GetStackFrameList()->SetSelectedFrame(frame_sp.get()); @@ -351,7 +351,7 @@ Thread::SetSelectedFrameByIndexNoisily (uint32_t frame_idx, Stream &output_strea bool success = SetSelectedFrameByIndex (frame_idx, broadcast); if (success) { - StackFrameSP frame_sp = GetSelectedFrame(); + FrameSP frame_sp = GetSelectedFrame(); if (frame_sp) { bool already_shown = false; @@ -1591,10 +1591,10 @@ Thread::CalculateThread () return shared_from_this(); } -StackFrameSP -Thread::CalculateStackFrame () +FrameSP +Thread::CalculateFrame () { - return StackFrameSP(); + return FrameSP(); } void @@ -1638,7 +1638,7 @@ Thread::ClearStackFrames () m_curr_frames_sp.reset(); } -lldb::StackFrameSP +lldb::FrameSP Thread::GetFrameWithConcreteFrameIndex (uint32_t unwind_idx) { return GetStackFrameList()->GetFrameWithConcreteFrameIndex (unwind_idx); @@ -1648,7 +1648,7 @@ Thread::GetFrameWithConcreteFrameIndex (uint32_t unwind_idx) Error Thread::ReturnFromFrameWithIndex (uint32_t frame_idx, lldb::ValueObjectSP return_value_sp, bool broadcast) { - StackFrameSP frame_sp = GetStackFrameAtIndex (frame_idx); + FrameSP frame_sp = GetStackFrameAtIndex (frame_idx); Error return_error; if (!frame_sp) @@ -1660,7 +1660,7 @@ Thread::ReturnFromFrameWithIndex (uint32_t frame_idx, lldb::ValueObjectSP return } Error -Thread::ReturnFromFrame (lldb::StackFrameSP frame_sp, lldb::ValueObjectSP return_value_sp, bool broadcast) +Thread::ReturnFromFrame (lldb::FrameSP frame_sp, lldb::ValueObjectSP return_value_sp, bool broadcast) { Error return_error; @@ -1672,7 +1672,7 @@ Thread::ReturnFromFrame (lldb::StackFrameSP frame_sp, lldb::ValueObjectSP return Thread *thread = frame_sp->GetThread().get(); uint32_t older_frame_idx = frame_sp->GetFrameIndex() + 1; - StackFrameSP older_frame_sp = thread->GetStackFrameAtIndex(older_frame_idx); + FrameSP older_frame_sp = thread->GetStackFrameAtIndex(older_frame_idx); if (!older_frame_sp) { return_error.SetErrorString("No older frame to return to."); @@ -1720,7 +1720,7 @@ Thread::ReturnFromFrame (lldb::StackFrameSP frame_sp, lldb::ValueObjectSP return // Note, we can't use ReadAllRegisterValues->WriteAllRegisterValues, since the read & write // cook their data - StackFrameSP youngest_frame_sp = thread->GetStackFrameAtIndex(0); + FrameSP youngest_frame_sp = thread->GetStackFrameAtIndex(0); if (youngest_frame_sp) { lldb::RegisterContextSP reg_ctx_sp (youngest_frame_sp->GetRegisterContext()); @@ -1768,7 +1768,7 @@ Thread::JumpToLine (const FileSpec &file, uint32_t line, bool can_leave_function Target *target = exe_ctx.GetTargetPtr(); TargetSP target_sp = exe_ctx.GetTargetSP(); RegisterContext *reg_ctx = exe_ctx.GetRegisterContext(); - StackFrame *frame = exe_ctx.GetFramePtr(); + Frame *frame = exe_ctx.GetFramePtr(); const SymbolContext &sc = frame->GetSymbolContext(eSymbolContextFunction); // Find candidate locations. @@ -1832,7 +1832,7 @@ Thread::DumpUsingSettingsFormat (Stream &strm, uint32_t frame_idx) if (process == NULL) return; - StackFrameSP frame_sp; + FrameSP frame_sp; SymbolContext frame_sc; if (frame_idx != LLDB_INVALID_INDEX32) { @@ -1881,10 +1881,10 @@ Thread::GetThreadLocalData (const ModuleSP module) return LLDB_INVALID_ADDRESS; } -lldb::StackFrameSP -Thread::GetStackFrameSPForStackFramePtr (StackFrame *stack_frame_ptr) +lldb::FrameSP +Thread::GetFrameSPForFramePtr (Frame *stack_frame_ptr) { - return GetStackFrameList()->GetStackFrameSPForStackFramePtr (stack_frame_ptr); + return GetStackFrameList()->GetFrameSPForFramePtr (stack_frame_ptr); } const char * @@ -1942,7 +1942,7 @@ Thread::GetStatus (Stream &strm, uint32_t start_frame, uint32_t num_frames, uint strm.Printf("%c ", is_selected ? '*' : ' '); if (target && target->GetDebugger().GetUseExternalEditor()) { - StackFrameSP frame_sp = GetStackFrameAtIndex(start_frame); + FrameSP frame_sp = GetStackFrameAtIndex(start_frame); if (frame_sp) { SymbolContext frame_sc(frame_sp->GetSymbolContext (eSymbolContextLineEntry)); @@ -1997,7 +1997,7 @@ Thread::GetStackFrameStatus (Stream& strm, bool Thread::SaveFrameZeroState (RegisterCheckpoint &checkpoint) { - lldb::StackFrameSP frame_sp(GetStackFrameAtIndex (0)); + lldb::FrameSP frame_sp(GetStackFrameAtIndex (0)); if (frame_sp) { checkpoint.SetStackID(frame_sp->GetStackID()); @@ -2017,7 +2017,7 @@ Thread::RestoreSaveFrameZero (const RegisterCheckpoint &checkpoint) bool Thread::ResetFrameZeroRegisters (lldb::DataBufferSP register_data_sp) { - lldb::StackFrameSP frame_sp(GetStackFrameAtIndex (0)); + lldb::FrameSP frame_sp(GetStackFrameAtIndex (0)); if (frame_sp) { lldb::RegisterContextSP reg_ctx_sp (frame_sp->GetRegisterContext()); diff --git a/lldb/source/Target/ThreadPlanStepInRange.cpp b/lldb/source/Target/ThreadPlanStepInRange.cpp index c1f14bd216d..70634f1398c 100644 --- a/lldb/source/Target/ThreadPlanStepInRange.cpp +++ b/lldb/source/Target/ThreadPlanStepInRange.cpp @@ -202,7 +202,7 @@ ThreadPlanStepInRange::ShouldStop (Event *event_ptr) if (!m_sub_plan_sp && frame_order == eFrameCompareYounger && m_step_past_prologue) { - lldb::StackFrameSP curr_frame = m_thread.GetStackFrameAtIndex(0); + lldb::FrameSP curr_frame = m_thread.GetStackFrameAtIndex(0); if (curr_frame) { size_t bytes_to_skip = 0; @@ -275,7 +275,7 @@ ThreadPlanStepInRange::SetDefaultFlagValue (uint32_t new_value) bool ThreadPlanStepInRange::FrameMatchesAvoidRegexp () { - StackFrame *frame = GetThread().GetStackFrameAtIndex(0).get(); + Frame *frame = GetThread().GetStackFrameAtIndex(0).get(); const RegularExpression *avoid_regexp_to_use = m_avoid_regexp_ap.get(); if (avoid_regexp_to_use == NULL) @@ -321,7 +321,7 @@ ThreadPlanSP ThreadPlanStepInRange::DefaultShouldStopHereCallback (ThreadPlan *current_plan, Flags &flags, void *baton) { bool should_step_out = false; - StackFrame *frame = current_plan->GetThread().GetStackFrameAtIndex(0).get(); + Frame *frame = current_plan->GetThread().GetStackFrameAtIndex(0).get(); Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); if (flags.Test(eAvoidNoDebug)) diff --git a/lldb/source/Target/ThreadPlanStepInstruction.cpp b/lldb/source/Target/ThreadPlanStepInstruction.cpp index f644ee88f70..e95f40353bb 100644 --- a/lldb/source/Target/ThreadPlanStepInstruction.cpp +++ b/lldb/source/Target/ThreadPlanStepInstruction.cpp @@ -44,12 +44,12 @@ ThreadPlanStepInstruction::ThreadPlanStepInstruction m_step_over (step_over) { m_instruction_addr = m_thread.GetRegisterContext()->GetPC(0); - StackFrameSP m_start_frame_sp(m_thread.GetStackFrameAtIndex(0)); + FrameSP m_start_frame_sp(m_thread.GetStackFrameAtIndex(0)); m_stack_id = m_start_frame_sp->GetStackID(); m_start_has_symbol = m_start_frame_sp->GetSymbolContext(eSymbolContextSymbol).symbol != NULL; - StackFrameSP parent_frame_sp = m_thread.GetStackFrameAtIndex(1); + FrameSP parent_frame_sp = m_thread.GetStackFrameAtIndex(1); if (parent_frame_sp) m_parent_frame_id = parent_frame_sp->GetStackID(); } @@ -127,7 +127,7 @@ ThreadPlanStepInstruction::ShouldStop (Event *event_ptr) else { // We've stepped in, step back out again: - StackFrame *return_frame = m_thread.GetStackFrameAtIndex(1).get(); + Frame *return_frame = m_thread.GetStackFrameAtIndex(1).get(); if (return_frame) { if (return_frame->GetStackID() != m_parent_frame_id || m_start_has_symbol) diff --git a/lldb/source/Target/ThreadPlanStepOut.cpp b/lldb/source/Target/ThreadPlanStepOut.cpp index c5efb558152..6e45957c486 100644 --- a/lldb/source/Target/ThreadPlanStepOut.cpp +++ b/lldb/source/Target/ThreadPlanStepOut.cpp @@ -57,8 +57,8 @@ ThreadPlanStepOut::ThreadPlanStepOut { m_step_from_insn = m_thread.GetRegisterContext()->GetPC(0); - StackFrameSP return_frame_sp (m_thread.GetStackFrameAtIndex(frame_idx + 1)); - StackFrameSP immediate_return_from_sp (m_thread.GetStackFrameAtIndex (frame_idx)); + FrameSP return_frame_sp (m_thread.GetStackFrameAtIndex(frame_idx + 1)); + FrameSP immediate_return_from_sp (m_thread.GetStackFrameAtIndex (frame_idx)); if (!return_frame_sp || !immediate_return_from_sp) return; // we can't do anything here. ValidatePlan() will return false. @@ -401,7 +401,7 @@ ThreadPlanStepOut::QueueInlinedStepPlan (bool queue_now) // Now figure out the range of this inlined block, and set up a "step through range" // plan for that. If we've been provided with a context, then use the block in that // context. - StackFrameSP immediate_return_from_sp (m_thread.GetStackFrameAtIndex (0)); + FrameSP immediate_return_from_sp (m_thread.GetStackFrameAtIndex (0)); if (!immediate_return_from_sp) return false; diff --git a/lldb/source/Target/ThreadPlanStepOverRange.cpp b/lldb/source/Target/ThreadPlanStepOverRange.cpp index 2d8108bf9b7..5c7e460075f 100644 --- a/lldb/source/Target/ThreadPlanStepOverRange.cpp +++ b/lldb/source/Target/ThreadPlanStepOverRange.cpp @@ -137,7 +137,7 @@ ThreadPlanStepOverRange::ShouldStop (Event *event_ptr) // start function really is our start function... for(uint32_t i = 1;; ++i) { - StackFrameSP older_frame_sp = m_thread.GetStackFrameAtIndex(i); + FrameSP older_frame_sp = m_thread.GetStackFrameAtIndex(i); if (!older_frame_sp) { // We can't unwind the next frame we should just get out of here & stop... break; @@ -192,7 +192,7 @@ ThreadPlanStepOverRange::ShouldStop (Event *event_ptr) if (m_addr_context.line_entry.IsValid()) { SymbolContext sc; - StackFrameSP frame_sp = m_thread.GetStackFrameAtIndex(0); + FrameSP frame_sp = m_thread.GetStackFrameAtIndex(0); sc = frame_sp->GetSymbolContext (eSymbolContextEverything); if (sc.line_entry.IsValid()) { @@ -357,7 +357,7 @@ ThreadPlanStepOverRange::DoWillResume (lldb::StateType resume_state, bool curren if (log) log->Printf ("ThreadPlanStepInRange::DoWillResume: adjusting range to the frame at inlined depth %d.", m_thread.GetCurrentInlinedDepth()); - StackFrameSP stack_sp = m_thread.GetStackFrameAtIndex(0); + FrameSP stack_sp = m_thread.GetStackFrameAtIndex(0); if (stack_sp) { Block *frame_block = stack_sp->GetFrameBlock(); diff --git a/lldb/source/Target/ThreadPlanStepRange.cpp b/lldb/source/Target/ThreadPlanStepRange.cpp index 309f773c505..409b87a6ff3 100644 --- a/lldb/source/Target/ThreadPlanStepRange.cpp +++ b/lldb/source/Target/ThreadPlanStepRange.cpp @@ -148,7 +148,7 @@ ThreadPlanStepRange::InRange () if (!ret_value) { // See if we've just stepped to another part of the same line number... - StackFrame *frame = m_thread.GetStackFrameAtIndex(0).get(); + Frame *frame = m_thread.GetStackFrameAtIndex(0).get(); SymbolContext new_context(frame->GetSymbolContext(eSymbolContextEverything)); if (m_addr_context.line_entry.IsValid() && new_context.line_entry.IsValid()) diff --git a/lldb/source/Target/ThreadPlanStepThrough.cpp b/lldb/source/Target/ThreadPlanStepThrough.cpp index 37cd03c6986..ed9c23a8413 100644 --- a/lldb/source/Target/ThreadPlanStepThrough.cpp +++ b/lldb/source/Target/ThreadPlanStepThrough.cpp @@ -51,7 +51,7 @@ ThreadPlanStepThrough::ThreadPlanStepThrough (Thread &thread, StackID &m_stack_i // We are going to return back to the concrete frame 1, we might pass by some inlined code that we're in // the middle of by doing this, but it's easier than trying to figure out where the inlined code might return to. - StackFrameSP return_frame_sp = m_thread.GetFrameWithStackID (m_stack_id); + FrameSP return_frame_sp = m_thread.GetFrameWithStackID (m_stack_id); if (return_frame_sp) { diff --git a/lldb/source/Target/ThreadPlanStepUntil.cpp b/lldb/source/Target/ThreadPlanStepUntil.cpp index 62e05c7fe34..a80e0310cc6 100644 --- a/lldb/source/Target/ThreadPlanStepUntil.cpp +++ b/lldb/source/Target/ThreadPlanStepUntil.cpp @@ -54,7 +54,7 @@ ThreadPlanStepUntil::ThreadPlanStepUntil // Stash away our "until" addresses: TargetSP target_sp (m_thread.CalculateTarget()); - StackFrameSP frame_sp (m_thread.GetStackFrameAtIndex (frame_idx)); + FrameSP frame_sp (m_thread.GetStackFrameAtIndex (frame_idx)); if (frame_sp) { m_step_from_insn = frame_sp->GetStackID().GetPC(); @@ -63,7 +63,7 @@ ThreadPlanStepUntil::ThreadPlanStepUntil // Find the return address and set a breakpoint there: // FIXME - can we do this more securely if we know first_insn? - StackFrameSP return_frame_sp (m_thread.GetStackFrameAtIndex(frame_idx + 1)); + FrameSP return_frame_sp (m_thread.GetStackFrameAtIndex(frame_idx + 1)); if (return_frame_sp) { // TODO: add inline functionality @@ -247,7 +247,7 @@ ThreadPlanStepUntil::AnalyzeStop() done = false; else { - StackFrameSP older_frame_sp = m_thread.GetStackFrameAtIndex(1); + FrameSP older_frame_sp = m_thread.GetStackFrameAtIndex(1); // But if we can't even unwind one frame we should just get out of here & stop... if (older_frame_sp) |