llvm-project/lldb/include/lldb/Core/ValueObjectCast.h
Greg Clayton c7bece56fa <rdar://problem/13069948>
Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary.

So I defined a new "lldb::offset_t" which should be used for all file offsets.

After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed.

Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections.

llvm-svn: 173463
2013-01-25 18:06:21 +00:00

91 lines
2.2 KiB
C++

//===-- ValueObjectDynamicValue.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_ValueObjectCast_h_
#define liblldb_ValueObjectCast_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/Core/ValueObject.h"
namespace lldb_private {
//---------------------------------------------------------------------------------
// A ValueObject that represents a given value represented as a different type.
//---------------------------------------------------------------------------------
class ValueObjectCast : public ValueObject
{
public:
static lldb::ValueObjectSP
Create (ValueObject &parent,
const ConstString &name,
const ClangASTType &cast_type);
virtual
~ValueObjectCast();
virtual size_t
GetByteSize();
virtual size_t
CalculateNumChildren();
virtual lldb::ValueType
GetValueType() const;
virtual bool
IsInScope ();
virtual ValueObject *
GetParent()
{
if (m_parent)
return m_parent->GetParent();
else
return NULL;
}
virtual const ValueObject *
GetParent() const
{
if (m_parent)
return m_parent->GetParent();
else
return NULL;
}
protected:
virtual bool
UpdateValue ();
virtual clang::ASTContext *
GetClangASTImpl ();
virtual lldb::clang_type_t
GetClangTypeImpl ();
ClangASTType m_cast_type;
private:
ValueObjectCast (ValueObject &parent,
const ConstString &name,
const ClangASTType &cast_type);
//------------------------------------------------------------------
// For ValueObject only
//------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN (ValueObjectCast);
};
} // namespace lldb_private
#endif // liblldb_ValueObjectCast_h_