variables prior to running your binary. Zero filled sections now get section data correctly filled with zeroes when Target::ReadMemory reads from the object file section data. Added new option groups and option values for file lists. I still need to hook up all of the options to "target variable" to allow more complete introspection by file and shlib. Added the ability for ValueObjectVariable objects to be created with only the target as the execution context. This allows them to be read from the object files through Target::ReadMemory(...). Added a "virtual Module * GetModule()" function to the ValueObject class. By default it will look to the parent variable object and return its module. The module is needed when we have global variables that have file addresses (virtual addresses that are specific to module object files) and in turn allows global variables to be displayed prior to running. Removed all of the unused proxy object support that bit rotted in lldb_private::Value. Replaced a lot of places that used "FileSpec::Compare (lhs, rhs) == 0" code with the more efficient "FileSpec::Equal (lhs, rhs)". Improved logging in GDB remote plug-in. llvm-svn: 134579
95 lines
2.5 KiB
C++
95 lines
2.5 KiB
C++
//===-- ValueObjectMemory.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_ValueObjectMemory_h_
|
|
#define liblldb_ValueObjectMemory_h_
|
|
|
|
// C Includes
|
|
// C++ Includes
|
|
// Other libraries and framework includes
|
|
// Project includes
|
|
#include "lldb/Core/ValueObject.h"
|
|
#include "lldb/Symbol/ClangASTType.h"
|
|
|
|
namespace lldb_private {
|
|
|
|
//----------------------------------------------------------------------
|
|
// A ValueObject that represents memory at a given address, viewed as some
|
|
// set lldb type.
|
|
//----------------------------------------------------------------------
|
|
class ValueObjectMemory : public ValueObject
|
|
{
|
|
public:
|
|
static lldb::ValueObjectSP
|
|
Create (ExecutionContextScope *exe_scope,
|
|
const char *name,
|
|
const Address &address,
|
|
lldb::TypeSP &type_sp);
|
|
|
|
static lldb::ValueObjectSP
|
|
Create (ExecutionContextScope *exe_scope,
|
|
const char *name,
|
|
const Address &address,
|
|
const ClangASTType &ast_type);
|
|
|
|
virtual
|
|
~ValueObjectMemory();
|
|
|
|
virtual size_t
|
|
GetByteSize();
|
|
|
|
virtual clang::ASTContext *
|
|
GetClangAST ();
|
|
|
|
virtual lldb::clang_type_t
|
|
GetClangType ();
|
|
|
|
virtual ConstString
|
|
GetTypeName();
|
|
|
|
virtual uint32_t
|
|
CalculateNumChildren();
|
|
|
|
virtual lldb::ValueType
|
|
GetValueType() const;
|
|
|
|
virtual bool
|
|
IsInScope ();
|
|
|
|
virtual Module*
|
|
GetModule();
|
|
|
|
protected:
|
|
virtual bool
|
|
UpdateValue ();
|
|
|
|
Address m_address; ///< The variable that this value object is based upon
|
|
lldb::TypeSP m_type_sp;
|
|
ClangASTType m_clang_type;
|
|
|
|
private:
|
|
ValueObjectMemory (ExecutionContextScope *exe_scope,
|
|
const char *name,
|
|
const Address &address,
|
|
lldb::TypeSP &type_sp);
|
|
|
|
ValueObjectMemory (ExecutionContextScope *exe_scope,
|
|
const char *name,
|
|
const Address &address,
|
|
const ClangASTType &ast_type);
|
|
//------------------------------------------------------------------
|
|
// For ValueObject only
|
|
//------------------------------------------------------------------
|
|
DISALLOW_COPY_AND_ASSIGN (ValueObjectMemory);
|
|
};
|
|
|
|
} // namespace lldb_private
|
|
|
|
#endif // liblldb_ValueObjectMemory_h_
|