StackID.h revision 24943d2ee8bfaa7cf5893e4709143924157a5c1e
1//===-- StackID.h -----------------------------------------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10#ifndef liblldb_StackID_h_ 11#define liblldb_StackID_h_ 12 13// C Includes 14// C++ Includes 15// Other libraries and framework includes 16// Project includes 17#include "lldb/lldb-private.h" 18#include "lldb/Core/AddressRange.h" 19 20namespace lldb_private { 21 22class StackID 23{ 24public: 25 //------------------------------------------------------------------ 26 // Constructors and Destructors 27 //------------------------------------------------------------------ 28 StackID (); 29 explicit StackID (lldb::addr_t cfa); 30 StackID (const Address& start_address, lldb::addr_t cfa); 31 StackID (const StackID& rhs); 32 virtual ~StackID(); 33 34 const Address& 35 GetStartAddress() const; 36 37 void 38 SetStartAddress(const Address& start_address); 39 40 lldb::addr_t 41 GetCallFrameAddress() const; 42 43 //------------------------------------------------------------------ 44 // Operators 45 //------------------------------------------------------------------ 46 const StackID& 47 operator=(const StackID& rhs); 48 49protected: 50 //------------------------------------------------------------------ 51 // Classes that inherit from StackID can see and modify these 52 //------------------------------------------------------------------ 53 Address m_start_address; // The address range for the function for this frame 54 lldb::addr_t m_cfa; // The call frame address (stack pointer) value 55 // at the beginning of the function that uniquely 56 // identifies this frame 57}; 58 59bool operator== (const StackID& lhs, const StackID& rhs); 60bool operator!= (const StackID& lhs, const StackID& rhs); 61bool operator< (const StackID& lhs, const StackID& rhs); 62 63} // namespace lldb_private 64 65#endif // liblldb_StackID_h_ 66