diff options
author | Jason Molenda <jmolenda@apple.com> | 2013-11-04 09:33:30 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2013-11-04 09:33:30 +0000 |
commit | b57e4a1bc6054a5495d6671f108914108852105b (patch) | |
tree | 0323964656c388cca864bd7eb52bdd1108006c28 /lldb | |
parent | f23b27a837a005c193106c346e139b74a064ec19 (diff) | |
download | bcm5719-llvm-b57e4a1bc6054a5495d6671f108914108852105b.tar.gz bcm5719-llvm-b57e4a1bc6054a5495d6671f108914108852105b.zip |
Roll back the changes I made in r193907 which created a new Frame
pure virtual base class and made StackFrame a subclass of that. As
I started to build on top of that arrangement today, I found that it
wasn't working out like I intended. Instead I'll try sticking with
the single StackFrame class -- there's too much code duplication to
make a more complicated class hierarchy sensible I think.
llvm-svn: 193983
Diffstat (limited to 'lldb')
102 files changed, 462 insertions, 893 deletions
diff --git a/lldb/include/lldb/API/SBFrame.h b/lldb/include/lldb/API/SBFrame.h index c888e8b5c07..4ae38c13bed 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::FrameSP &lldb_object_sp); + SBFrame (const lldb::StackFrameSP &lldb_object_sp); protected: @@ -228,11 +228,11 @@ protected: friend class lldb_private::ScriptInterpreterPython; #endif - lldb::FrameSP + lldb::StackFrameSP GetFrameSP() const; void - SetFrameSP (const lldb::FrameSP &lldb_object_sp); + SetFrameSP (const lldb::StackFrameSP &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 6cf6712bb30..1ef421676ee 100644 --- a/lldb/include/lldb/Core/ValueObject.h +++ b/lldb/include/lldb/Core/ValueObject.h @@ -35,33 +35,32 @@ 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 capability of being the "child" of +/// that is evaluated in some particular scope. The ValueObject also has the capibility 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 { @@ -362,7 +361,7 @@ public: return m_update_point.GetExecutionContextRef().GetThreadSP(); } - lldb::FrameSP + lldb::StackFrameSP 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 c9397fd645a..cd5f6824e19 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/Frame.h" +#include "lldb/Target/StackFrame.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 cc38683d190..47bfebb4664 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::FrameSP &frame_sp); + lldb::StackFrameSP &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 e84043dbf96..5ecdf7fe9ee 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 Frame but + /// Normally this will come from the ExecutionContext's StackFrame 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 6a25da453a6..208a0813392 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/Frame.h" +#include "lldb/Target/StackFrame.h" #include <vector> @@ -58,7 +58,7 @@ public: friend class Materializer; Dematerializer (Materializer &materializer, - lldb::FrameSP &frame_sp, + lldb::StackFrameSP &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::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err); + DematerializerSP Materialize (lldb::StackFrameSP &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::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, + 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, 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 cc414cfa62f..9f529b82291 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::FrameSP& frame_sp, + const lldb::StackFrameSP& frame_sp, const lldb::BreakpointLocationSP &bp_loc_sp); typedef bool (*SWIGWatchpointCallbackFunction) (const char *python_function_name, const char *session_dictionary_name, - const lldb::FrameSP& frame_sp, + const lldb::StackFrameSP& 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::FrameSP& frame, + lldb::StackFrameSP& frame, std::string& output); typedef void* (*SWIGPython_GetDynamicSetting) (void* module, @@ -468,7 +468,7 @@ public: virtual bool RunScriptFormatKeyword (const char* impl_function, - Frame* frame, + StackFrame* frame, std::string& output, Error& error) { diff --git a/lldb/include/lldb/Interpreter/ScriptInterpreterPython.h b/lldb/include/lldb/Interpreter/ScriptInterpreterPython.h index a32f6e1f71c..4b3dc61f3ee 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, - Frame* frame, + StackFrame* frame, std::string& output, Error& error); diff --git a/lldb/include/lldb/Symbol/Variable.h b/lldb/include/lldb/Symbol/Variable.h index 3e45fdade9f..07295d090ee 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 (Frame *frame); + IsInScope (StackFrame *frame); bool - LocationIsValidForFrame (Frame *frame); + LocationIsValidForFrame (StackFrame *frame); bool LocationIsValidForAddress (const Address &address); diff --git a/lldb/include/lldb/Target/ABI.h b/lldb/include/lldb/Target/ABI.h index 8de9219e085..16f8ee7fc7d 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::FrameSP &frame_sp, lldb::ValueObjectSP &new_value) = 0; + SetReturnValueObject(lldb::StackFrameSP &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 f0f9c9b9bae..4038e70b0c5 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::FrameSP &) + /// @see ExecutionContextRef::SetContext(const lldb::StackFrameSP &) //------------------------------------------------------------------ void - SetFrameSP (const lldb::FrameSP &frame_sp); + SetFrameSP (const lldb::StackFrameSP &frame_sp); void SetTargetPtr (Target* target, bool adopt_selected); @@ -245,7 +245,7 @@ public: SetThreadPtr (Thread *thread); void - SetFramePtr (Frame *frame); + SetFramePtr (StackFrame *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::FrameSP + lldb::StackFrameSP 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::FrameSP &frame_sp); + ExecutionContext (const lldb::StackFrameSP &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::FrameWP &frame_wp); + ExecutionContext (const lldb::StackFrameWP &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, - Frame * frame = NULL); + StackFrame * frame = NULL); ~ExecutionContext(); @@ -522,7 +522,7 @@ public: /// /// @see ExecutionContext::HasFrameScope() const //------------------------------------------------------------------ - Frame * + StackFrame * GetFramePtr () const { return m_frame_sp.get(); @@ -580,7 +580,7 @@ public: /// /// @see ExecutionContext::HasFrameScope() const //------------------------------------------------------------------ - Frame & + StackFrame & GetFrameRef () const; //------------------------------------------------------------------ @@ -621,7 +621,7 @@ public: /// /// The returned shared pointer is not guaranteed to be valid. //------------------------------------------------------------------ - const lldb::FrameSP & + const lldb::StackFrameSP & GetFrameSP () const { return m_frame_sp; @@ -649,7 +649,7 @@ public: /// Set accessor to set only the frame shared pointer. //------------------------------------------------------------------ void - SetFrameSP (const lldb::FrameSP &frame_sp); + SetFrameSP (const lldb::StackFrameSP &frame_sp); //------------------------------------------------------------------ /// Set accessor to set only the target shared pointer from a target @@ -677,7 +677,7 @@ public: /// pointer. //------------------------------------------------------------------ void - SetFramePtr (Frame *frame); + SetFramePtr (StackFrame *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::FrameSP &frame_sp); + SetContext (const lldb::StackFrameSP &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::FrameSP m_frame_sp; ///< The stack frame in thread. + lldb::StackFrameSP 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 60ef1a23be1..7ba40971af2 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 Frame. +/// objects include: Process, Thread, RegisterContext and StackFrame. /// /// 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::FrameSP - CalculateFrame () = 0; + virtual lldb::StackFrameSP + CalculateStackFrame () = 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 deleted file mode 100644 index ee52356b1e0..00000000000 --- a/lldb/include/lldb/Target/Frame.h +++ /dev/null @@ -1,421 +0,0 @@ -//===-- 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 d8467f851d9..65c732851da 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::FrameSP - CalculateFrame () + virtual lldb::StackFrameSP + CalculateStackFrame () { - return lldb::FrameSP(); + return lldb::StackFrameSP(); } virtual void diff --git a/lldb/include/lldb/Target/RegisterContext.h b/lldb/include/lldb/Target/RegisterContext.h index 067e22c78d4..bc24cf92e29 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::FrameSP - CalculateFrame (); + virtual lldb::StackFrameSP + CalculateStackFrame (); virtual void CalculateExecutionContext (ExecutionContext &exe_ctx); diff --git a/lldb/include/lldb/Target/StackFrame.h b/lldb/include/lldb/Target/StackFrame.h index c580317c1a3..c7b7e376812 100644 --- a/lldb/include/lldb/Target/StackFrame.h +++ b/lldb/include/lldb/Target/StackFrame.h @@ -22,20 +22,13 @@ #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 Frame + public std::enable_shared_from_this<StackFrame>, + public ExecutionContextScope { public: enum ExpressionPathOption @@ -50,29 +43,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); - ~StackFrame (); + virtual ~StackFrame (); lldb::ThreadSP GetThread () const @@ -85,8 +78,8 @@ public: const Address& GetFrameCodeAddress(); - - bool + + void ChangePC (lldb::addr_t pc); const SymbolContext& @@ -113,9 +106,10 @@ 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); @@ -128,16 +122,10 @@ 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 (); @@ -149,31 +137,37 @@ 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::FrameSP - CalculateFrame (); + + virtual lldb::StackFrameSP + CalculateStackFrame (); 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; @@ -181,16 +175,14 @@ protected: SetSymbolContextScope (SymbolContextScope *symbol_scope); void - UpdateCurrentFrameFromPreviousFrame (Frame &prev_frame); - + UpdateCurrentFrameFromPreviousFrame (StackFrame &prev_frame); + void - UpdatePreviousFrameFromCurrentFrame (Frame &curr_frame); + UpdatePreviousFrameFromCurrentFrame (StackFrame &curr_frame); - virtual const char * - GetFrameType () - { - return "StackFrame"; - } + bool + HasCachedData () const; + private: //------------------------------------------------------------------ // For StackFrame only diff --git a/lldb/include/lldb/Target/StackFrameList.h b/lldb/include/lldb/Target/StackFrameList.h index 2f67bc03c48..2680be3e5a6 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/Frame.h" +#include "lldb/Target/StackFrame.h" namespace lldb_private { @@ -36,18 +36,18 @@ public: uint32_t GetNumFrames (bool can_create = true); - lldb::FrameSP + lldb::StackFrameSP GetFrameAtIndex (uint32_t idx); - lldb::FrameSP + lldb::StackFrameSP GetFrameWithConcreteFrameIndex (uint32_t unwind_idx); - lldb::FrameSP + lldb::StackFrameSP GetFrameWithStackID (const StackID &stack_id); // Mark a stack frame as the current frame uint32_t - SetSelectedFrame (lldb_private::Frame *frame); + SetSelectedFrame (lldb_private::StackFrame *frame); uint32_t GetSelectedFrameIndex () const; @@ -57,7 +57,7 @@ public: SetSelectedFrameByIndex (uint32_t idx); uint32_t - GetVisibleFrameIndex(uint32_t idx) + GetVisibleStackFrameIndex(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::FrameSP - GetFrameSPForFramePtr (Frame *stack_frame_ptr); + lldb::StackFrameSP + GetStackFrameSPForStackFramePtr (StackFrame *stack_frame_ptr); size_t GetStatus (Stream &strm, @@ -96,7 +96,7 @@ protected: friend class Thread; bool - SetFrameAtIndex (uint32_t idx, lldb::FrameSP &frame_sp); + SetFrameAtIndex (uint32_t idx, lldb::StackFrameSP &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::FrameSP> collection; + typedef std::vector<lldb::StackFrameSP> 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 32e7853549c..d5bdec7c502 100644 --- a/lldb/include/lldb/Target/StackID.h +++ b/lldb/include/lldb/Target/StackID.h @@ -109,16 +109,14 @@ public: protected: - friend class Frame; friend class StackFrame; - + void SetPC (lldb::addr_t pc) { m_pc = pc; } - //------------------------------------------------------------------ // Classes that inherit from StackID can see and modify these //------------------------------------------------------------------ diff --git a/lldb/include/lldb/Target/Target.h b/lldb/include/lldb/Target/Target.h index 77e5afffefe..a7609d37116 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::FrameSP - CalculateFrame (); + virtual lldb::StackFrameSP + CalculateStackFrame (); virtual void CalculateExecutionContext (ExecutionContext &exe_ctx); @@ -984,7 +984,7 @@ public: // in in th execution context. ExecutionResults EvaluateExpression (const char *expression, - Frame *frame, + StackFrame *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 228e175b6ed..7dac37caa20 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::FrameSP + static lldb::StackFrameSP GetStackFrameFromEvent (const Event *event_ptr); lldb::ThreadSP @@ -357,13 +357,13 @@ public: return GetStackFrameList()->GetNumFrames(); } - virtual lldb::FrameSP + virtual lldb::StackFrameSP GetStackFrameAtIndex (uint32_t idx) { return GetStackFrameList()->GetFrameAtIndex(idx); } - virtual lldb::FrameSP + virtual lldb::StackFrameSP 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::FrameSP frame_sp, lldb::ValueObjectSP return_value_sp, bool broadcast = false); + ReturnFromFrame (lldb::StackFrameSP 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::FrameSP + virtual lldb::StackFrameSP GetFrameWithStackID (const StackID &stack_id) { if (stack_id.IsValid()) return GetStackFrameList()->GetFrameWithStackID (stack_id); - return lldb::FrameSP(); + return lldb::StackFrameSP(); } uint32_t @@ -401,7 +401,7 @@ public: return GetStackFrameList()->GetSelectedFrameIndex(); } - lldb::FrameSP + lldb::StackFrameSP GetSelectedFrame () { lldb::StackFrameListSP stack_frame_list_sp(GetStackFrameList()); @@ -409,7 +409,7 @@ public: } uint32_t - SetSelectedFrame (lldb_private::Frame *frame, bool broadcast = false); + SetSelectedFrame (lldb_private::StackFrame *frame, bool broadcast = false); bool @@ -428,7 +428,7 @@ public: GetRegisterContext () = 0; virtual lldb::RegisterContextSP - CreateRegisterContextForFrame (Frame *frame) = 0; + CreateRegisterContextForFrame (StackFrame *frame) = 0; virtual void ClearStackFrames (); @@ -914,14 +914,14 @@ public: virtual lldb::ThreadSP CalculateThread (); - virtual lldb::FrameSP - CalculateFrame (); + virtual lldb::StackFrameSP + CalculateStackFrame (); virtual void CalculateExecutionContext (ExecutionContext &exe_ctx); - lldb::FrameSP - GetFrameSPForFramePtr (Frame *stack_frame_ptr); + lldb::StackFrameSP + GetStackFrameSPForStackFramePtr (StackFrame *stack_frame_ptr); size_t GetStatus (Stream &strm, @@ -1008,7 +1008,6 @@ 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 5e9e754611e..7cda4aeb2e1 100644 --- a/lldb/include/lldb/Target/Unwind.h +++ b/lldb/include/lldb/Target/Unwind.h @@ -79,7 +79,7 @@ public: } lldb::RegisterContextSP - CreateRegisterContextForFrame (Frame *frame) + CreateRegisterContextForFrame (StackFrame *frame) { Mutex::Locker locker(m_unwind_mutex); return DoCreateRegisterContextForFrame (frame); @@ -107,7 +107,7 @@ protected: lldb::addr_t& pc) = 0; virtual lldb::RegisterContextSP - DoCreateRegisterContextForFrame (Frame *frame) = 0; + DoCreateRegisterContextForFrame (StackFrame *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 ff01ca72e33..ee59e0e2892 100644 --- a/lldb/include/lldb/lldb-forward.h +++ b/lldb/include/lldb/lldb-forward.h @@ -181,7 +181,8 @@ class SectionList; class Settings; class SourceManager; class SourceManagerImpl; -class Frame; +class StackFrame; +class StackFrameImpl; class StackFrameList; class StackID; class StopInfo; @@ -336,8 +337,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::Frame> FrameSP; - typedef std::weak_ptr<lldb_private::Frame> FrameWP; + typedef std::shared_ptr<lldb_private::StackFrame> StackFrameSP; + typedef std::weak_ptr<lldb_private::StackFrame> StackFrameWP; 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 70948a01a0d..4a3ad31ead4 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::FrameSP& frame_sp, + const lldb::StackFrameSP& 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::FrameSP& frame_sp, + const lldb::StackFrameSP& 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::FrameSP& frame, +lldb::StackFrameSP& frame, std::string& output) { diff --git a/lldb/source/API/SBBlock.cpp b/lldb/source/API/SBBlock.cpp index 86215e66d03..c8a665f7d6f 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/Frame.h" +#include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" using namespace lldb; @@ -264,7 +264,7 @@ SBBlock::GetVariables (lldb::SBFrame& frame, SBValueList value_list; if (block) { - FrameSP frame_sp(frame.GetFrameSP()); + StackFrameSP 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 bc662c91c1a..ac77e2e4112 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::FrameSP& sb_frame, + const lldb::StackFrameSP& sb_frame, const lldb::BreakpointLocationSP& sb_bp_loc); extern "C" bool LLDBSwigPythonWatchpointCallbackFunction (const char *python_function_name, const char *session_dictionary_name, - const lldb::FrameSP& sb_frame, + const lldb::StackFrameSP& 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::FrameSP& frame, + lldb::StackFrameSP& frame, std::string& output); extern "C" void* diff --git a/lldb/source/API/SBFrame.cpp b/lldb/source/API/SBFrame.cpp index 02307c48abd..1a1a63bd067 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/Frame.h" +#include "lldb/Target/StackFrame.h" #include "lldb/Target/StackID.h" #include "lldb/Target/Thread.h" @@ -54,7 +54,7 @@ SBFrame::SBFrame () : { } -SBFrame::SBFrame (const FrameSP &lldb_object_sp) : +SBFrame::SBFrame (const StackFrameSP &lldb_object_sp) : m_opaque_sp (new ExecutionContextRef (lldb_object_sp)) { Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); @@ -86,16 +86,16 @@ SBFrame::~SBFrame() { } -FrameSP +StackFrameSP SBFrame::GetFrameSP() const { if (m_opaque_sp) return m_opaque_sp->GetFrameSP(); - return FrameSP(); + return StackFrameSP(); } void -SBFrame::SetFrameSP (const FrameSP &lldb_object_sp) +SBFrame::SetFrameSP (const StackFrameSP &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); - Frame *frame = NULL; + StackFrame *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); - Frame *frame = NULL; + StackFrame *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); - Frame *frame = NULL; + StackFrame *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); - Frame *frame = NULL; + StackFrame *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); - Frame *frame = NULL; + StackFrame *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); - Frame *frame = NULL; + StackFrame *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); - Frame *frame = NULL; + StackFrame *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); - Frame *frame = NULL; + StackFrame *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()); - Frame *frame = exe_ctx.GetFramePtr(); + StackFrame *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); - Frame *frame = NULL; + StackFrame *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); - Frame *frame = NULL; + StackFrame *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); - Frame *frame = NULL; + StackFrame *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); - Frame *frame = NULL; + StackFrame *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); - Frame *frame = exe_ctx.GetFramePtr(); + StackFrame *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()); - Frame *frame = exe_ctx.GetFramePtr(); + StackFrame *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); - Frame *frame = NULL; + StackFrame *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, - Frame::eExpressionPathOptionCheckPtrVsMember | Frame::eExpressionPathOptionsAllowDirectIVarAccess, + StackFrame::eExpressionPathOptionCheckPtrVsMember | StackFrame::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()); - Frame *frame = exe_ctx.GetFramePtr(); + StackFrame *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); - Frame *frame = NULL; + StackFrame *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()); - Frame *frame = exe_ctx.GetFramePtr(); + StackFrame *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); - Frame *frame = NULL; + StackFrame *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::FrameSP this_sp = GetFrameSP(); - lldb::FrameSP that_sp = that.GetFrameSP(); + lldb::StackFrameSP this_sp = GetFrameSP(); + lldb::StackFrameSP 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); - Frame *frame = NULL; + StackFrame *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()); - Frame *frame = exe_ctx.GetFramePtr(); + StackFrame *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); - Frame *frame = NULL; + StackFrame *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); - Frame *frame = NULL; + StackFrame *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); - Frame *frame = NULL; + StackFrame *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); - Frame *frame; + StackFrame *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()); - Frame *frame = exe_ctx.GetFramePtr(); + StackFrame *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); - Frame *frame = NULL; + StackFrame *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()); - Frame *frame = NULL; + StackFrame *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()); - Frame *frame = NULL; + StackFrame *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 d879470aa2d..2334cc0d124 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/Frame.h" +#include "lldb/Target/StackFrame.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::FrameSP frame_sp (frame.GetFrameSP()); + lldb::StackFrameSP frame_sp (frame.GetFrameSP()); if (frame_sp) { diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp index bb697552a41..cff6e4e2de3 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()); - Frame *frame = NULL; + StackFrame *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 c972ce86239..0c3a17e0df8 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; - FrameSP frame_sp(thread->GetStackFrameAtIndex (0)); + StackFrameSP 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(); - FrameSP frame_sp(thread->GetStackFrameAtIndex (0)); + StackFrameSP 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); - FrameSP frame_sp (sb_frame.GetFrameSP()); + StackFrameSP 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); - FrameSP frame_sp (sb_frame.GetFrameSP()); + StackFrameSP 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; - FrameSP frame_sp; + StackFrameSP 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; - FrameSP frame_sp; + StackFrameSP 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; - FrameSP frame_sp; + StackFrameSP 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 993ffe4bcf1..51b6790dd2b 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/Frame.h" +#include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" @@ -199,13 +199,13 @@ public: return ThreadSP(); } - FrameSP + StackFrameSP GetFrameSP () { if (m_valobj_sp) return m_valobj_sp->GetFrameSP(); else - return FrameSP(); + return StackFrameSP(); } private: @@ -1252,7 +1252,7 @@ lldb::SBFrame SBValue::GetFrame() { SBFrame sb_frame; - FrameSP frame_sp; + StackFrameSP 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 d75bf818d25..3b919d11a56 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/Frame.h" +#include "lldb/Target/StackFrame.h" using namespace lldb; using namespace lldb_private; @@ -139,7 +139,7 @@ CommandObjectArgs::DoExecute (Args& args, CommandReturnObject &result) return false; } - lldb::FrameSP thread_cur_frame = thread->GetSelectedFrame (); + lldb::StackFrameSP 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 78873801b8b..c20da7f3ec5 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/Frame.h" +#include "lldb/Target/StackFrame.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)) { - Frame *cur_frame = m_exe_ctx.GetFramePtr(); + StackFrame *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 376bf4d0214..fc148b1899f 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/Frame.h" +#include "lldb/Target/StackFrame.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; - Frame *frame = m_exe_ctx.GetFramePtr(); + StackFrame *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 89edf42f3f0..8b04da600f4 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/Frame.h" +#include "lldb/Target/StackFrame.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 a380692a686..2e852d0bb76 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/Frame.h" +#include "lldb/Target/StackFrame.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 - Frame *frame = m_exe_ctx.GetFramePtr(); + StackFrame *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 = Frame::eExpressionPathOptionCheckPtrVsMember | - Frame::eExpressionPathOptionsAllowDirectIVarAccess; + uint32_t expr_path_options = StackFrame::eExpressionPathOptionCheckPtrVsMember | + StackFrame::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 dd59aae3f5f..2ee275e11f6 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/Frame.h" +#include "lldb/Target/StackFrame.h" using namespace lldb; using namespace lldb_private; @@ -502,7 +502,7 @@ protected: } ConstString lookup_type_name(type_str.c_str()); - Frame *frame = m_exe_ctx.GetFramePtr(); + StackFrame *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 d5cb1df11cc..ef431e25c3d 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/Frame.h" +#include "lldb/Target/StackFrame.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; - Frame *frame = m_exe_ctx.GetFramePtr(); + StackFrame *frame = m_exe_ctx.GetFramePtr(); CompileUnit *comp_unit = NULL; if (frame) { @@ -3957,7 +3957,7 @@ public: break; } - FrameSP frame = m_exe_ctx.GetFrameSP(); + StackFrameSP 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)) { - Frame *frame = m_exe_ctx.GetFramePtr(); + StackFrame *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 ca64f4b1c37..f46a2219a50 100644 --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -465,7 +465,7 @@ protected: if (m_step_type == eStepTypeInto) { - Frame *frame = thread->GetStackFrameAtIndex(0).get(); + StackFrame *frame = thread->GetStackFrameAtIndex(0).get(); if (frame->HasDebugInformation ()) { @@ -487,7 +487,7 @@ protected: } else if (m_step_type == eStepTypeOver) { - Frame *frame = thread->GetStackFrameAtIndex(0).get(); + StackFrame *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; - Frame *frame = thread->GetStackFrameAtIndex(m_options.m_frame_idx).get(); + StackFrame *frame = thread->GetStackFrameAtIndex(m_options.m_frame_idx).get(); if (frame == NULL) { @@ -1411,7 +1411,7 @@ protected: ValueObjectSP return_valobj_sp; - FrameSP frame_sp = m_exe_ctx.GetFrameSP(); + StackFrameSP 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(); - Frame *frame = m_exe_ctx.GetFramePtr(); + StackFrame *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 4a570d8dd52..ae490e38149 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(); - Frame *frame = m_exe_ctx.GetFramePtr(); + StackFrame *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 = Frame::eExpressionPathOptionCheckPtrVsMember | - Frame::eExpressionPathOptionsAllowDirectIVarAccess; + uint32_t expr_path_options = StackFrame::eExpressionPathOptionCheckPtrVsMember | + StackFrame::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(); - Frame *frame = m_exe_ctx.GetFramePtr(); + StackFrame *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 ea947a63407..3941d82d47b 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 (Frame *frame) +TestPromptFormats (StackFrame *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, - Frame* frame, + StackFrame* frame, bool deref_pointer) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES)); @@ -2112,7 +2112,7 @@ FormatPromptRecurse { if (exe_ctx) { - Frame *frame = exe_ctx->GetFramePtr(); + StackFrame *frame = exe_ctx->GetFramePtr(); if (frame) { var_name_begin += ::strlen ("frame."); @@ -2338,7 +2338,7 @@ FormatPromptRecurse } else if (IsToken (var_name_begin, "pc-offset}")) { - Frame *frame = exe_ctx->GetFramePtr(); + StackFrame *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) { - Frame *frame = exe_ctx->GetFramePtr(); + StackFrame *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 b82d5ca683d..7f830acba1f 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/Frame.h" +#include "lldb/Target/StackFrame.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(); - Frame *frame = exe_ctx.GetFramePtr(); + StackFrame *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; - Frame *frame = exe_ctx.GetFramePtr(); + StackFrame *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 28c439668a8..bf6c6d88b56 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; - Frame *frame = (Frame *) baton; + StackFrame *frame = (StackFrame *) 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; - Frame *frame = (Frame *) baton; + StackFrame *frame = (StackFrame *) baton; ProcessSP process_sp (frame->CalculateProcess()); if (process_sp) @@ -335,7 +335,7 @@ EmulateInstruction::ReadRegisterFrame (EmulateInstruction *instruction, if (!baton) return false; - Frame *frame = (Frame *) baton; + StackFrame *frame = (StackFrame *) baton; return frame->GetRegisterContext()->ReadRegister (reg_info, reg_value); } @@ -349,7 +349,7 @@ EmulateInstruction::WriteRegisterFrame (EmulateInstruction *instruction, if (!baton) return false; - Frame *frame = (Frame *) baton; + StackFrame *frame = (StackFrame *) baton; return frame->GetRegisterContext()->WriteRegister (reg_info, reg_value); } diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 25fa4c2f8a5..d39d21a2a0b 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); - FrameSP frame_sp (exe_ctx.GetFrameSP()); + StackFrameSP frame_sp (exe_ctx.GetFrameSP()); if (!frame_sp) { if (use_selected) @@ -3816,7 +3816,7 @@ ValueObject::EvaluationPoint::SyncWithProcessState() { if (m_exe_ctx_ref.HasFrameRef()) { - FrameSP frame_sp (m_exe_ctx_ref.GetFrameSP()); + StackFrameSP 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 ad7a81b29b3..4f21457519e 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()); - Frame *frame = exe_ctx.GetFramePtr(); + StackFrame *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()); - Frame *frame = exe_ctx.GetFramePtr(); + StackFrame *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()); - Frame *frame = exe_ctx.GetFramePtr(); + StackFrame *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 f0e88e62c0f..3d8b07a3694 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); - Frame *frame = exe_ctx.GetFramePtr(); + StackFrame *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 116017ca6e6..a4b7a1235ff 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) { - FrameSP frame_sp(valobj.GetFrameSP()); + StackFrameSP 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) { - FrameSP frame_sp(valobj.GetFrameSP()); + StackFrameSP 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 d96a9da8be4..e00413556cc 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(); - Frame* stack_frame = exe_ctx.GetFramePtr(); + StackFrame* 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(); - Frame* stack_frame = exe_ctx.GetFramePtr(); + StackFrame* 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(); - Frame* stack_frame = exe_ctx.GetFramePtr(); + StackFrame* 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(); - Frame* stack_frame = exe_ctx.GetFramePtr(); + StackFrame* 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 ca38423dd9d..c67f86a7493 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/Frame.h" +#include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" using namespace lldb; diff --git a/lldb/source/DataFormatters/TypeFormat.cpp b/lldb/source/DataFormatters/TypeFormat.cpp index 2e5fd632155..7f18ddef726 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/Frame.h" +#include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" using namespace lldb; diff --git a/lldb/source/DataFormatters/TypeSummary.cpp b/lldb/source/DataFormatters/TypeSummary.cpp index fb51fa0ea0b..4c75b4b87d0 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/Frame.h" +#include "lldb/Target/StackFrame.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; - Frame *frame = exe_ctx.GetFramePtr(); + StackFrame *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 c5be3ed4890..972be486b78 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/Frame.h" +#include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" using namespace lldb; diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index 172d1118f89..87c984ddcfb 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/Frame.h" +#include "lldb/Target/StackFrame.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(); - Frame *frame = m_parser_vars->m_exe_ctx.GetFramePtr(); + StackFrame *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, - Frame::eExpressionPathOptionCheckPtrVsMember || - Frame::eExpressionPathOptionsAllowDirectIVarAccess || - Frame::eExpressionPathOptionsNoFragileObjcIvar || - Frame::eExpressionPathOptionsNoSyntheticChildren || - Frame::eExpressionPathOptionsNoSyntheticArrayRange, + StackFrame::eExpressionPathOptionCheckPtrVsMember || + StackFrame::eExpressionPathOptionsAllowDirectIVarAccess || + StackFrame::eExpressionPathOptionsNoFragileObjcIvar || + StackFrame::eExpressionPathOptionsNoSyntheticChildren || + StackFrame::eExpressionPathOptionsNoSyntheticArrayRange, var, err); diff --git a/lldb/source/Expression/ClangUserExpression.cpp b/lldb/source/Expression/ClangUserExpression.cpp index e097eb07f77..c9196533974 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/Frame.h" +#include "lldb/Target/StackFrame.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; } - Frame *frame = exe_ctx.GetFramePtr(); + StackFrame *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::FrameSP frame_sp = exe_ctx.GetFrameSP(); + lldb::StackFrameSP 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::FrameSP &frame_sp) + lldb::StackFrameSP &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::FrameSP frame_sp; + lldb::StackFrameSP 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::FrameSP frame_sp, +GetObjectPointer (lldb::StackFrameSP frame_sp, ConstString &object_name, Error &err) { @@ -575,11 +575,11 @@ GetObjectPointer (lldb::FrameSP frame_sp, valobj_sp = frame_sp->GetValueForVariableExpressionPath(object_name.AsCString(), lldb::eNoDynamicValues, - Frame::eExpressionPathOptionCheckPtrVsMember || - Frame::eExpressionPathOptionsAllowDirectIVarAccess || - Frame::eExpressionPathOptionsNoFragileObjcIvar || - Frame::eExpressionPathOptionsNoSyntheticChildren || - Frame::eExpressionPathOptionsNoSyntheticArrayRange, + StackFrame::eExpressionPathOptionCheckPtrVsMember || + StackFrame::eExpressionPathOptionsAllowDirectIVarAccess || + StackFrame::eExpressionPathOptionsNoFragileObjcIvar || + StackFrame::eExpressionPathOptionsNoSyntheticChildren || + StackFrame::eExpressionPathOptionsNoSyntheticArrayRange, var_sp, err); @@ -606,7 +606,7 @@ ClangUserExpression::PrepareToExecuteJITExpression (Stream &error_stream, { lldb::TargetSP target; lldb::ProcessSP process; - lldb::FrameSP frame; + lldb::StackFrameSP frame; if (!LockAndCheckContext(exe_ctx, target, diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp index 6c54f94a125..b36be8e545d 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/Frame.h" +#include "lldb/Target/StackFrame.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; - Frame *frame = NULL; + StackFrame *frame = NULL; if (reg_ctx) pc = reg_ctx->GetPC(); else @@ -1327,7 +1327,7 @@ DWARFExpression::Evaluate std::vector<Value> stack; Process *process = NULL; - Frame *frame = NULL; + StackFrame *frame = NULL; if (exe_ctx) { diff --git a/lldb/source/Expression/IRDynamicChecks.cpp b/lldb/source/Expression/IRDynamicChecks.cpp index 09b3d71dbeb..4030f149ab2 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/Frame.h" +#include "lldb/Target/StackFrame.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 0576ea0a14e..fb9522f0dc3 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/Frame.h" +#include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" @@ -146,7 +146,7 @@ public: } } - void Materialize (lldb::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) + void Materialize (lldb::StackFrameSP &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::FrameSP &frame_sp, + void Dematerialize (lldb::StackFrameSP &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::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) + void Materialize (lldb::StackFrameSP &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::FrameSP &frame_sp, + void Dematerialize (lldb::StackFrameSP &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::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) + void Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) { if (!m_is_program_reference) { @@ -758,7 +758,7 @@ public: } } - void Dematerialize (lldb::FrameSP &frame_sp, + void Dematerialize (lldb::StackFrameSP &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::FrameSP &frame_sp, + lldb::StackFrameSP &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::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) + void Materialize (lldb::StackFrameSP &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::FrameSP &frame_sp, + void Dematerialize (lldb::StackFrameSP &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::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) + void Materialize (lldb::StackFrameSP &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::FrameSP &frame_sp, + void Dematerialize (lldb::StackFrameSP &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::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &error) +Materializer::Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &error) { ExecutionContextScope *exe_scope = frame_sp.get(); @@ -1344,7 +1344,7 @@ Materializer::Materialize (lldb::FrameSP &frame_sp, IRMemoryMap &map, lldb::addr void Materializer::Dematerializer::Dematerialize (Error &error, lldb::ClangExpressionVariableSP &result_sp, lldb::addr_t frame_bottom, lldb::addr_t frame_top) { - lldb::FrameSP frame_sp; + lldb::StackFrameSP 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 2a051b12810..ff94e0f6021 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/Frame.h" +#include "lldb/Target/StackFrame.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 87afd3fed59..fc76f0470d3 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 FrameSP stop_frame_sp (exe_ctx.GetFrameSP()); + const StackFrameSP 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 FrameSP stop_frame_sp (exe_ctx.GetFrameSP()); + const StackFrameSP 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, - Frame* frame, + StackFrame* frame, std::string& output, Error& error) { @@ -2682,7 +2682,7 @@ ScriptInterpreterPython::RunScriptFormatKeyword (const char* impl_function, return false; } { - FrameSP frame_sp(frame->shared_from_this()); + StackFrameSP 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 d3d6f06765c..f27c294a4ab 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::FrameSP &frame_sp, lldb::ValueObjectSP &new_value_sp) +ABIMacOSX_arm::SetReturnValueObject(lldb::StackFrameSP &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 97315fbace7..27cea85aaf6 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::FrameSP &frame_sp, lldb::ValueObjectSP &new_value); + SetReturnValueObject(lldb::StackFrameSP &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 6ad3b85abc6..c64623fe27e 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::FrameSP &frame_sp, lldb::ValueObjectSP &new_value_sp) +ABIMacOSX_i386::SetReturnValueObject(lldb::StackFrameSP &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 95e5245a5a7..5428d0c1e44 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::FrameSP &frame_sp, lldb::ValueObjectSP &new_value); + SetReturnValueObject(lldb::StackFrameSP &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 e178da813cd..7d8dc9f66bf 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/Frame.h" +#include "lldb/Target/StackFrame.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::FrameSP &frame_sp, lldb::ValueObjectSP &new_value_sp) +ABISysV_x86_64::SetReturnValueObject(lldb::StackFrameSP &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 ac41971cf1e..d9d6fd7af79 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::FrameSP &frame_sp, lldb::ValueObjectSP &new_value); + SetReturnValueObject(lldb::StackFrameSP &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 b1aea0ce936..61c3c64d4fc 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/Frame.h" +#include "lldb/Target/StackFrame.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 0a5ee887956..1b2a1f6b7bb 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/Frame.h" +#include "lldb/Target/StackFrame.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 ebe1aa95d6e..f29a481e09a 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/Frame.h" +#include "lldb/Target/StackFrame.h" #include "DynamicLoaderMacOSXDYLD.h" @@ -216,7 +216,7 @@ DynamicLoaderMacOSXDYLD::ProcessDidExec () ThreadSP thread_sp (m_process->GetThreadList().GetThreadAtIndex(0)); if (thread_sp) { - lldb::FrameSP frame_sp (thread_sp->GetStackFrameAtIndex(0)); + lldb::StackFrameSP 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; - Frame *current_frame = thread.GetStackFrameAtIndex(0).get(); + StackFrame *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 a2d3ce62a7c..8e8314feb7d 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; - Frame *frame = thread.GetStackFrameAtIndex(0).get(); + StackFrame *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 761ab700152..bad4118971e 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/Frame.h" +#include "lldb/Target/StackFrame.h" #include "lldb/Target/RegisterContext.h" #include "Utility/ARM_DWARF_Registers.h" @@ -34,7 +34,7 @@ EmulationStateARM::~EmulationStateARM () } bool -EmulationStateARM::LoadPseudoRegistersFromFrame (Frame &frame) +EmulationStateARM::LoadPseudoRegistersFromFrame (StackFrame &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 9eee7c39c82..ad596a3c277 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::Frame &frame); + LoadPseudoRegistersFromFrame (lldb_private::StackFrame &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 be9e968acda..1bcbb4e8c45 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::FrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0); + lldb::StackFrameSP 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 3bef486a2ae..bb7e8a317a0 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 (Frame *frame) +ThreadKDP::CreateRegisterContextForFrame (StackFrame *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 eda801c1f78..7dc373f0355 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::Frame *frame); + CreateRegisterContextForFrame (lldb_private::StackFrame *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 b020db8d007..8b22d6457ad 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); - Frame *frame = thread->GetStackFrameAtIndex (0).get(); + StackFrame *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); - Frame *frame = thread->GetStackFrameAtIndex (0).get(); + StackFrame *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); - Frame *frame = thread->GetStackFrameAtIndex (0).get(); + StackFrame *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 08be777a728..1e282ce74f2 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/Frame.h" +#include "lldb/Target/StackFrame.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 92ec99ff053..c19aec3a02c 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/Frame.h" +#include "lldb/Target/StackFrame.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 52d7f17c4f6..51d2052e193 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::FrameSP frame_sp (thread.GetStackFrameAtIndex(0)); +// lldb::StackFrameSP 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 9ab437d015a..56e5a9a59fa 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 (Frame *frame) +ThreadMemory::CreateRegisterContextForFrame (StackFrame *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 a45c056c19f..07eb45dcb43 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::Frame *frame); + CreateRegisterContextForFrame (lldb_private::StackFrame *frame); virtual bool CalculateStopInfo (); diff --git a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp index 111c5d8a9f5..552ae501bd2 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 (Frame *frame) +UnwindLLDB::DoCreateRegisterContextForFrame (StackFrame *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 23f04be8c59..5725654a686 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::Frame *frame); + DoCreateRegisterContextForFrame (lldb_private::StackFrame *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 fa76d6d650c..d011314b096 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 (Frame *frame) +UnwindMacOSXFrameBackchain::DoCreateRegisterContextForFrame (StackFrame *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(); - Frame *first_frame = exe_ctx.GetFramePtr(); + StackFrame *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; - Frame *first_frame = exe_ctx.GetFramePtr(); + StackFrame *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 501c9ea446c..2695376fd6e 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::Frame *frame); + DoCreateRegisterContextForFrame (lldb_private::StackFrame *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 86c63e103e9..4e475c80bda 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 (Frame *frame) +ThreadGDBRemote::CreateRegisterContextForFrame (StackFrame *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 783e2cf45b6..dd4cc036ef8 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::Frame *frame); + CreateRegisterContextForFrame (lldb_private::StackFrame *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 bd404d71462..85a7a20e042 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 (Frame *frame) +ThreadMachCore::CreateRegisterContextForFrame (StackFrame *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 701def6f27a..756a04a3cbd 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::Frame *frame); + CreateRegisterContextForFrame (lldb_private::StackFrame *frame); static bool ThreadIDIsValid (lldb::tid_t thread); diff --git a/lldb/source/Symbol/Variable.cpp b/lldb/source/Symbol/Variable.cpp index b86452396c0..7276e0a4a1a 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/Frame.h" +#include "lldb/Target/StackFrame.h" #include "lldb/Target/Thread.h" #include "lldb/Target/Target.h" @@ -207,7 +207,7 @@ Variable::CalculateSymbolContext (SymbolContext *sc) } bool -Variable::LocationIsValidForFrame (Frame *frame) +Variable::LocationIsValidForFrame (StackFrame *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 (Frame *frame) +Variable::IsInScope (StackFrame *frame) { switch (m_scope) { @@ -520,7 +520,7 @@ Variable::DumpLocationForAddress (Stream *s, const Address &address) static void -PrivateAutoComplete (Frame *frame, +PrivateAutoComplete (StackFrame *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 (Frame *frame, bool &word_complete); static void -PrivateAutoCompleteMembers (Frame *frame, +PrivateAutoCompleteMembers (StackFrame *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 (Frame *frame, bool &word_complete); static void -PrivateAutoCompleteMembers (Frame *frame, +PrivateAutoCompleteMembers (StackFrame *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 (Frame *frame, } static void -PrivateAutoComplete (Frame *frame, +PrivateAutoComplete (StackFrame *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 ee42e845f14..7a8b60189bc 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/Frame.h" +#include "lldb/Target/StackFrame.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::FrameSP &frame_sp) : +ExecutionContext::ExecutionContext (const lldb::StackFrameSP &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::FrameWP &frame_wp) : +ExecutionContext::ExecutionContext (const lldb::StackFrameWP &frame_wp) : m_target_sp (), m_process_sp (), m_thread_sp (), m_frame_sp () { - lldb::FrameSP frame_sp(frame_wp.lock()); + lldb::StackFrameSP 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, Frame *frame) : +ExecutionContext::ExecutionContext(Process* process, Thread *thread, StackFrame *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; } -Frame & +StackFrame & 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::FrameSP &frame_sp) +ExecutionContext::SetFrameSP (const lldb::StackFrameSP &frame_sp) { m_frame_sp = frame_sp; } @@ -381,7 +381,7 @@ ExecutionContext::SetThreadPtr (Thread *thread) } void -ExecutionContext::SetFramePtr (Frame *frame) +ExecutionContext::SetFramePtr (StackFrame *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::FrameSP &frame_sp) +ExecutionContext::SetContext (const lldb::StackFrameSP &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::FrameSP frame_sp (exe_ctx.GetFrameSP()); + lldb::StackFrameSP 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::FrameSP &frame_sp) +ExecutionContextRef::SetFrameSP (const lldb::StackFrameSP &frame_sp) { if (frame_sp) { @@ -711,7 +711,7 @@ ExecutionContextRef::SetTargetPtr (Target* target, bool adopt_selected) if (thread_sp) { SetThreadSP (thread_sp); - lldb::FrameSP frame_sp (thread_sp->GetSelectedFrame()); + lldb::StackFrameSP 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 (Frame *frame) +ExecutionContextRef::SetFramePtr (StackFrame *frame) { if (frame) SetFrameSP (frame->shared_from_this()); @@ -811,7 +811,7 @@ ExecutionContextRef::GetThreadSP () const return thread_sp; } -lldb::FrameSP +lldb::StackFrameSP 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::FrameSP(); + return lldb::StackFrameSP(); } ExecutionContext diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 15a5506dc6f..738ed5f9fee 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) { - FrameSP frame_sp (thread_sp->GetStackFrameAtIndex (0)); + StackFrameSP frame_sp (thread_sp->GetStackFrameAtIndex (0)); if (frame_sp) { @@ -1885,7 +1885,7 @@ Process::UnloadImage (uint32_t image_token) if (thread_sp) { - FrameSP frame_sp (thread_sp->GetStackFrameAtIndex (0)); + StackFrameSP 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(); - FrameSP selected_frame_sp = thread->GetSelectedFrame(); + StackFrameSP 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()); - FrameSP old_frame_sp = GetThreadList().GetSelectedThread()->GetFrameWithStackID(selected_stack_id); + StackFrameSP 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 0eab5847519..2fd1e73ebdc 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/Frame.h" +#include "lldb/Target/StackFrame.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) { - FrameSP frame_sp(m_thread.GetFrameWithConcreteFrameIndex (m_concrete_frame_idx)); + StackFrameSP 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(); } -FrameSP -RegisterContext::CalculateFrame () +StackFrameSP +RegisterContext::CalculateStackFrame () { // 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 FrameSP(); + return StackFrameSP(); } void diff --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp index 7d730b802d1..a05c03db1ba 100644 --- a/lldb/source/Target/StackFrame.cpp +++ b/lldb/source/Target/StackFrame.cpp @@ -9,7 +9,6 @@ #include "lldb/lldb-python.h" -#include "lldb/Target/Frame.h" #include "lldb/Target/StackFrame.h" // C Includes @@ -205,7 +204,7 @@ StackFrame::GetFrameIndex () const { ThreadSP thread_sp = GetThread(); if (thread_sp) - return thread_sp->GetStackFrameList()->GetVisibleFrameIndex(m_frame_index); + return thread_sp->GetStackFrameList()->GetVisibleStackFrameIndex(m_frame_index); else return m_frame_index; } @@ -247,7 +246,7 @@ StackFrame::GetFrameCodeAddress() return m_frame_code_addr; } -bool +void StackFrame::ChangePC (addr_t pc) { m_frame_code_addr.SetRawAddress(pc); @@ -256,7 +255,6 @@ StackFrame::ChangePC (addr_t pc) ThreadSP thread_sp (GetThread()); if (thread_sp) thread_sp->ClearStackFrames (); - return true; } const char * @@ -1263,8 +1261,8 @@ StackFrame::CalculateThread () return GetThread(); } -FrameSP -StackFrame::CalculateFrame () +StackFrameSP +StackFrame::CalculateStackFrame () { return shared_from_this(); } @@ -1329,47 +1327,51 @@ StackFrame::Dump (Stream *strm, bool show_frame_index, bool show_fullpaths) } void -StackFrame::UpdateCurrentFrameFromPreviousFrame (Frame &prev_frame) +StackFrame::UpdateCurrentFrameFromPreviousFrame (StackFrame &prev_frame) { assert (GetStackID() == prev_frame.GetStackID()); // TODO: remove this after some testing - 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()); - } + 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()); } void -StackFrame::UpdatePreviousFrameFromCurrentFrame (Frame &curr_frame) +StackFrame::UpdatePreviousFrameFromCurrentFrame (StackFrame &curr_frame) { assert (GetStackID() == curr_frame.GetStackID()); // TODO: remove this after some testing - 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(); - } + 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(); } 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 61c8bae40cc..d95ab972a7a 100644 --- a/lldb/source/Target/StackFrameList.cpp +++ b/lldb/source/Target/StackFrameList.cpp @@ -23,7 +23,6 @@ #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" @@ -285,7 +284,7 @@ StackFrameList::GetFramesUpTo(uint32_t end_idx) } } - FrameSP unwind_frame_sp; + StackFrameSP unwind_frame_sp; do { uint32_t idx = m_concrete_frames_fetched++; @@ -325,7 +324,7 @@ StackFrameList::GetFramesUpTo(uint32_t end_idx) else { unwind_frame_sp = m_frames.front(); - cfa = unwind_frame_sp->GetStackID().GetCallFrameAddress(); + cfa = unwind_frame_sp->m_id.GetCallFrameAddress(); } } else @@ -359,7 +358,7 @@ StackFrameList::GetFramesUpTo(uint32_t end_idx) while (unwind_sc.GetParentOfInlinedScope(curr_frame_address, next_frame_sc, next_frame_address)) { - FrameSP frame_sp(new StackFrame (m_thread.shared_from_this(), + StackFrameSP frame_sp(new StackFrame (m_thread.shared_from_this(), m_frames.size(), idx, unwind_frame_sp->GetRegisterContextSP (), @@ -399,8 +398,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; - FrameSP curr_frame_sp (curr_frames->m_frames[curr_frame_idx]); - FrameSP prev_frame_sp (prev_frames->m_frames[prev_frame_idx]); + StackFrameSP curr_frame_sp (curr_frames->m_frames[curr_frame_idx]); + StackFrameSP prev_frame_sp (prev_frames->m_frames[prev_frame_idx]); #if defined (DEBUG_STACK_FRAMES) s.Printf("\n\nCurr frame #%u ", curr_frame_idx); @@ -415,8 +414,8 @@ StackFrameList::GetFramesUpTo(uint32_t end_idx) s.PutCString("NULL"); #endif - Frame *curr_frame = curr_frame_sp.get(); - Frame *prev_frame = prev_frame_sp.get(); + StackFrame *curr_frame = curr_frame_sp.get(); + StackFrame *prev_frame = prev_frame_sp.get(); if (curr_frame == NULL || prev_frame == NULL) break; @@ -485,7 +484,7 @@ StackFrameList::Dump (Stream *s) const_iterator pos, begin = m_frames.begin(), end = m_frames.end(); for (pos = begin; pos != end; ++pos) { - Frame *frame = (*pos).get(); + StackFrame *frame = (*pos).get(); s->Printf("%p: ", frame); if (frame) { @@ -499,10 +498,10 @@ StackFrameList::Dump (Stream *s) s->EOL(); } -FrameSP +StackFrameSP StackFrameList::GetFrameAtIndex (uint32_t idx) { - FrameSP frame_sp; + StackFrameSP frame_sp; Mutex::Locker locker (m_mutex); uint32_t original_idx = idx; @@ -576,7 +575,7 @@ StackFrameList::GetFrameAtIndex (uint32_t idx) return frame_sp; } -FrameSP +StackFrameSP StackFrameList::GetFrameWithConcreteFrameIndex (uint32_t unwind_idx) { // First try assuming the unwind index is the same as the frame index. The @@ -586,7 +585,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; - FrameSP frame_sp (GetFrameAtIndex (frame_idx)); + StackFrameSP frame_sp (GetFrameAtIndex (frame_idx)); while (frame_sp) { if (frame_sp->GetFrameIndex() == unwind_idx) @@ -597,15 +596,15 @@ StackFrameList::GetFrameWithConcreteFrameIndex (uint32_t unwind_idx) } static bool -CompareStackID (const FrameSP &stack_sp, const StackID &stack_id) +CompareStackID (const StackFrameSP &stack_sp, const StackID &stack_id) { return stack_sp->GetStackID() < stack_id; } -FrameSP +StackFrameSP StackFrameList::GetFrameWithStackID (const StackID &stack_id) { - FrameSP frame_sp; + StackFrameSP frame_sp; if (stack_id.IsValid()) { @@ -636,7 +635,7 @@ StackFrameList::GetFrameWithStackID (const StackID &stack_id) } bool -StackFrameList::SetFrameAtIndex (uint32_t idx, FrameSP &frame_sp) +StackFrameList::SetFrameAtIndex (uint32_t idx, StackFrameSP &frame_sp) { if (idx >= m_frames.size()) m_frames.resize(idx + 1); @@ -658,7 +657,7 @@ StackFrameList::GetSelectedFrameIndex () const uint32_t -StackFrameList::SetSelectedFrame (lldb_private::Frame *frame) +StackFrameList::SetSelectedFrame (lldb_private::StackFrame *frame) { Mutex::Locker locker (m_mutex); const_iterator pos; @@ -685,7 +684,7 @@ bool StackFrameList::SetSelectedFrameByIndex (uint32_t idx) { Mutex::Locker locker (m_mutex); - FrameSP frame_sp (GetFrameAtIndex (idx)); + StackFrameSP frame_sp (GetFrameAtIndex (idx)); if (frame_sp) { SetSelectedFrame(frame_sp.get()); @@ -700,7 +699,7 @@ StackFrameList::SetDefaultFileAndLineToSelectedFrame() { if (m_thread.GetID() == m_thread.GetProcess()->GetThreadList().GetSelectedThread()->GetID()) { - FrameSP frame_sp (GetFrameAtIndex (GetSelectedFrameIndex())); + StackFrameSP frame_sp (GetFrameAtIndex (GetSelectedFrameIndex())); if (frame_sp) { SymbolContext sc = frame_sp->GetSymbolContext(eSymbolContextLineEntry); @@ -800,8 +799,8 @@ StackFrameList::Merge (std::unique_ptr<StackFrameList>& curr_ap, lldb::StackFram return; } - FrameSP prev_frame_zero_sp(prev_sp->GetFrameAtIndex (0)); - FrameSP curr_frame_zero_sp(curr_ap->GetFrameAtIndex (0)); + StackFrameSP prev_frame_zero_sp(prev_sp->GetFrameAtIndex (0)); + StackFrameSP 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()); @@ -840,13 +839,13 @@ StackFrameList::Merge (std::unique_ptr<StackFrameList>& curr_ap, lldb::StackFram } -lldb::FrameSP -StackFrameList::GetFrameSPForFramePtr (Frame *stack_frame_ptr) +lldb::StackFrameSP +StackFrameList::GetStackFrameSPForStackFramePtr (StackFrame *stack_frame_ptr) { const_iterator pos; const_iterator begin = m_frames.begin(); const_iterator end = m_frames.end(); - lldb::FrameSP ret_sp; + lldb::StackFrameSP ret_sp; for (pos = begin; pos != end; ++pos) { @@ -872,7 +871,7 @@ StackFrameList::GetStatus (Stream& strm, if (num_frames == 0) return 0; - FrameSP frame_sp; + StackFrameSP frame_sp; uint32_t frame_idx = 0; uint32_t last_frame; @@ -882,7 +881,7 @@ StackFrameList::GetStatus (Stream& strm, else last_frame = first_frame + num_frames; - FrameSP selected_frame_sp = m_thread.GetSelectedFrame(); + StackFrameSP 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 6545fb2200a..c92a2cc3a4a 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/Frame.h" +#include "lldb/Target/StackFrame.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadSpec.h" @@ -1699,10 +1699,10 @@ Target::CalculateThread () return ThreadSP(); } -FrameSP -Target::CalculateFrame () +StackFrameSP +Target::CalculateStackFrame () { - return FrameSP(); + return StackFrameSP(); } void @@ -1832,7 +1832,7 @@ ExecutionResults Target::EvaluateExpression ( const char *expr_cstr, - Frame *frame, + StackFrame *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::FrameSP cur_frame_sp = cur_thread_sp->GetStackFrameAtIndex(0); + lldb::StackFrameSP 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 e6a34404647..98c26019b4a 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; } -FrameSP +StackFrameSP Thread::ThreadEventData::GetStackFrameFromEvent (const Event *event_ptr) { const ThreadEventData *event_data = GetEventDataFromEvent (event_ptr); - FrameSP frame_sp; + StackFrameSP 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::Frame *frame, bool broadcast) +Thread::SetSelectedFrame (lldb_private::StackFrame *frame, bool broadcast) { uint32_t ret_value = GetStackFrameList()->SetSelectedFrame(frame); if (broadcast) @@ -332,7 +332,7 @@ Thread::SetSelectedFrame (lldb_private::Frame *frame, bool broadcast) bool Thread::SetSelectedFrameByIndex (uint32_t frame_idx, bool broadcast) { - FrameSP frame_sp(GetStackFrameList()->GetFrameAtIndex (frame_idx)); + StackFrameSP 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) { - FrameSP frame_sp = GetSelectedFrame(); + StackFrameSP frame_sp = GetSelectedFrame(); if (frame_sp) { bool already_shown = false; @@ -1591,10 +1591,10 @@ Thread::CalculateThread () return shared_from_this(); } -FrameSP -Thread::CalculateFrame () +StackFrameSP +Thread::CalculateStackFrame () { - return FrameSP(); + return StackFrameSP(); } void @@ -1638,7 +1638,7 @@ Thread::ClearStackFrames () m_curr_frames_sp.reset(); } -lldb::FrameSP +lldb::StackFrameSP 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) { - FrameSP frame_sp = GetStackFrameAtIndex (frame_idx); + StackFrameSP 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::FrameSP frame_sp, lldb::ValueObjectSP return_value_sp, bool broadcast) +Thread::ReturnFromFrame (lldb::StackFrameSP frame_sp, lldb::ValueObjectSP return_value_sp, bool broadcast) { Error return_error; @@ -1672,7 +1672,7 @@ Thread::ReturnFromFrame (lldb::FrameSP frame_sp, lldb::ValueObjectSP return_valu Thread *thread = frame_sp->GetThread().get(); uint32_t older_frame_idx = frame_sp->GetFrameIndex() + 1; - FrameSP older_frame_sp = thread->GetStackFrameAtIndex(older_frame_idx); + StackFrameSP 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::FrameSP frame_sp, lldb::ValueObjectSP return_valu // Note, we can't use ReadAllRegisterValues->WriteAllRegisterValues, since the read & write // cook their data - FrameSP youngest_frame_sp = thread->GetStackFrameAtIndex(0); + StackFrameSP 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(); - Frame *frame = exe_ctx.GetFramePtr(); + StackFrame *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; - FrameSP frame_sp; + StackFrameSP 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::FrameSP -Thread::GetFrameSPForFramePtr (Frame *stack_frame_ptr) +lldb::StackFrameSP +Thread::GetStackFrameSPForStackFramePtr (StackFrame *stack_frame_ptr) { - return GetStackFrameList()->GetFrameSPForFramePtr (stack_frame_ptr); + return GetStackFrameList()->GetStackFrameSPForStackFramePtr (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()) { - FrameSP frame_sp = GetStackFrameAtIndex(start_frame); + StackFrameSP 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::FrameSP frame_sp(GetStackFrameAtIndex (0)); + lldb::StackFrameSP 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::FrameSP frame_sp(GetStackFrameAtIndex (0)); + lldb::StackFrameSP 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 70634f1398c..c1f14bd216d 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::FrameSP curr_frame = m_thread.GetStackFrameAtIndex(0); + lldb::StackFrameSP 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 () { - Frame *frame = GetThread().GetStackFrameAtIndex(0).get(); + StackFrame *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; - Frame *frame = current_plan->GetThread().GetStackFrameAtIndex(0).get(); + StackFrame *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 e95f40353bb..f644ee88f70 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); - FrameSP m_start_frame_sp(m_thread.GetStackFrameAtIndex(0)); + StackFrameSP 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; - FrameSP parent_frame_sp = m_thread.GetStackFrameAtIndex(1); + StackFrameSP 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: - Frame *return_frame = m_thread.GetStackFrameAtIndex(1).get(); + StackFrame *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 6e45957c486..c5efb558152 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); - FrameSP return_frame_sp (m_thread.GetStackFrameAtIndex(frame_idx + 1)); - FrameSP immediate_return_from_sp (m_thread.GetStackFrameAtIndex (frame_idx)); + StackFrameSP return_frame_sp (m_thread.GetStackFrameAtIndex(frame_idx + 1)); + StackFrameSP 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. - FrameSP immediate_return_from_sp (m_thread.GetStackFrameAtIndex (0)); + StackFrameSP 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 5c7e460075f..2d8108bf9b7 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) { - FrameSP older_frame_sp = m_thread.GetStackFrameAtIndex(i); + StackFrameSP 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; - FrameSP frame_sp = m_thread.GetStackFrameAtIndex(0); + StackFrameSP 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()); - FrameSP stack_sp = m_thread.GetStackFrameAtIndex(0); + StackFrameSP 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 409b87a6ff3..309f773c505 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... - Frame *frame = m_thread.GetStackFrameAtIndex(0).get(); + StackFrame *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 ed9c23a8413..37cd03c6986 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. - FrameSP return_frame_sp = m_thread.GetFrameWithStackID (m_stack_id); + StackFrameSP 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 a80e0310cc6..62e05c7fe34 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()); - FrameSP frame_sp (m_thread.GetStackFrameAtIndex (frame_idx)); + StackFrameSP 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? - FrameSP return_frame_sp (m_thread.GetStackFrameAtIndex(frame_idx + 1)); + StackFrameSP 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 { - FrameSP older_frame_sp = m_thread.GetStackFrameAtIndex(1); + StackFrameSP 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) |