[Lldb-commits] [lldb] r177091 - <rdar://problem/13421412>
Greg Clayton
gclayton at apple.com
Thu Mar 14 11:31:44 PDT 2013
Author: gclayton
Date: Thu Mar 14 13:31:44 2013
New Revision: 177091
URL: http://llvm.org/viewvc/llvm-project?rev=177091&view=rev
Log:
<rdar://problem/13421412>
Many "byte size" members and variables were using a mixture of uint32_t and size_t. Switching over to using uint64_t everywhere.
Modified:
lldb/trunk/include/lldb/API/SBType.h
lldb/trunk/include/lldb/Core/DataBuffer.h
lldb/trunk/include/lldb/Core/DataBufferHeap.h
lldb/trunk/include/lldb/Core/DataBufferMemoryMap.h
lldb/trunk/include/lldb/Core/Value.h
lldb/trunk/include/lldb/Core/ValueObject.h
lldb/trunk/include/lldb/Core/ValueObjectCast.h
lldb/trunk/include/lldb/Core/ValueObjectChild.h
lldb/trunk/include/lldb/Core/ValueObjectConstResult.h
lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h
lldb/trunk/include/lldb/Core/ValueObjectMemory.h
lldb/trunk/include/lldb/Core/ValueObjectRegister.h
lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h
lldb/trunk/include/lldb/Core/ValueObjectVariable.h
lldb/trunk/include/lldb/Symbol/ClangASTContext.h
lldb/trunk/include/lldb/Symbol/ClangASTType.h
lldb/trunk/include/lldb/Symbol/Type.h
lldb/trunk/scripts/Python/interface/SBType.i
lldb/trunk/source/API/SBType.cpp
lldb/trunk/source/Commands/CommandObjectMemory.cpp
lldb/trunk/source/Core/DataBufferHeap.cpp
lldb/trunk/source/Core/DataBufferMemoryMap.cpp
lldb/trunk/source/Core/Value.cpp
lldb/trunk/source/Core/ValueObject.cpp
lldb/trunk/source/Core/ValueObjectCast.cpp
lldb/trunk/source/Core/ValueObjectChild.cpp
lldb/trunk/source/Core/ValueObjectConstResult.cpp
lldb/trunk/source/Core/ValueObjectDynamicValue.cpp
lldb/trunk/source/Core/ValueObjectMemory.cpp
lldb/trunk/source/Core/ValueObjectRegister.cpp
lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp
lldb/trunk/source/Core/ValueObjectVariable.cpp
lldb/trunk/source/Expression/DWARFExpression.cpp
lldb/trunk/source/Expression/IRForTarget.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/trunk/source/Symbol/ClangASTContext.cpp
lldb/trunk/source/Symbol/ClangASTType.cpp
lldb/trunk/source/Symbol/Type.cpp
Modified: lldb/trunk/include/lldb/API/SBType.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBType.h?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBType.h (original)
+++ lldb/trunk/include/lldb/API/SBType.h Thu Mar 14 13:31:44 2013
@@ -81,7 +81,7 @@ public:
bool
IsValid() const;
- size_t
+ uint64_t
GetByteSize();
bool
Modified: lldb/trunk/include/lldb/Core/DataBuffer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/DataBuffer.h?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/DataBuffer.h (original)
+++ lldb/trunk/include/lldb/Core/DataBuffer.h Thu Mar 14 13:31:44 2013
@@ -84,7 +84,7 @@ public:
/// @return
/// The number of bytes this object currently contains.
//------------------------------------------------------------------
- virtual size_t
+ virtual lldb::offset_t
GetByteSize() const = 0;
};
Modified: lldb/trunk/include/lldb/Core/DataBufferHeap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/DataBufferHeap.h?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/DataBufferHeap.h (original)
+++ lldb/trunk/include/lldb/Core/DataBufferHeap.h Thu Mar 14 13:31:44 2013
@@ -50,7 +50,7 @@ public:
/// @param[in] ch
/// The character to use when filling the buffer initially.
//------------------------------------------------------------------
- DataBufferHeap (size_t n, uint8_t ch);
+ DataBufferHeap (lldb::offset_t n, uint8_t ch);
//------------------------------------------------------------------
/// Construct by making a copy of \a src_len bytes from \a src.
@@ -61,7 +61,7 @@ public:
/// @param[in] src_len
/// The number of bytes in \a src to copy.
//------------------------------------------------------------------
- DataBufferHeap (const void *src, size_t src_len);
+ DataBufferHeap (const void *src, lldb::offset_t src_len);
//------------------------------------------------------------------
/// Destructor.
@@ -87,7 +87,7 @@ public:
//------------------------------------------------------------------
/// @copydoc DataBuffer::GetByteSize() const
//------------------------------------------------------------------
- virtual size_t
+ virtual lldb::offset_t
GetByteSize () const;
//------------------------------------------------------------------
@@ -104,8 +104,8 @@ public:
/// The size in bytes after that this heap buffer was
/// successfully resized to.
//------------------------------------------------------------------
- size_t
- SetByteSize (size_t byte_size);
+ lldb::offset_t
+ SetByteSize (lldb::offset_t byte_size);
//------------------------------------------------------------------
/// Makes a copy of the \a src_len bytes in \a src.
@@ -119,7 +119,7 @@ public:
/// The number of bytes in \a src to copy.
//------------------------------------------------------------------
void
- CopyData (const void *src, size_t src_len);
+ CopyData (const void *src, lldb::offset_t src_len);
private:
//------------------------------------------------------------------
Modified: lldb/trunk/include/lldb/Core/DataBufferMemoryMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/DataBufferMemoryMap.h?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/DataBufferMemoryMap.h (original)
+++ lldb/trunk/include/lldb/Core/DataBufferMemoryMap.h Thu Mar 14 13:31:44 2013
@@ -70,7 +70,7 @@ public:
//------------------------------------------------------------------
/// @copydoc DataBuffer::GetByteSize() const
//------------------------------------------------------------------
- virtual size_t
+ virtual lldb::offset_t
GetByteSize () const;
//------------------------------------------------------------------
@@ -107,8 +107,8 @@ public:
//------------------------------------------------------------------
size_t
MemoryMapFromFileSpec (const FileSpec* file,
- off_t offset = 0,
- size_t length = SIZE_MAX,
+ lldb::offset_t offset = 0,
+ lldb::offset_t length = SIZE_MAX,
bool writeable = false);
//------------------------------------------------------------------
@@ -136,8 +136,8 @@ public:
//------------------------------------------------------------------
size_t
MemoryMapFromFileDescriptor (int fd,
- off_t offset,
- size_t length,
+ lldb::offset_t offset,
+ lldb::offset_t length,
bool write,
bool fd_is_file);
@@ -148,7 +148,7 @@ protected:
uint8_t * m_mmap_addr; ///< The actual pointer that was returned from \c mmap()
size_t m_mmap_size; ///< The actual number of bytes that were mapped when \c mmap() was called
uint8_t *m_data; ///< The data the user requested somewhere within the memory mapped data.
- size_t m_size; ///< The size of the data the user got when data was requested
+ lldb::offset_t m_size; ///< The size of the data the user got when data was requested
private:
DISALLOW_COPY_AND_ASSIGN (DataBufferMemoryMap);
Modified: lldb/trunk/include/lldb/Core/Value.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Value.h?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Value.h (original)
+++ lldb/trunk/include/lldb/Core/Value.h Thu Mar 14 13:31:44 2013
@@ -227,7 +227,7 @@ public:
lldb::Format
GetValueDefaultFormat ();
- size_t
+ uint64_t
GetValueByteSize (clang::ASTContext *ast_context, Error *error_ptr);
Error
Modified: lldb/trunk/include/lldb/Core/ValueObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObject.h?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObject.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObject.h Thu Mar 14 13:31:44 2013
@@ -602,7 +602,7 @@ public:
//------------------------------------------------------------------
// Sublasses must implement the functions below.
//------------------------------------------------------------------
- virtual size_t
+ virtual uint64_t
GetByteSize() = 0;
virtual lldb::ValueType
@@ -1004,7 +1004,7 @@ public:
uint32_t item_idx = 0,
uint32_t item_count = 1);
- virtual size_t
+ virtual uint64_t
GetData (DataExtractor& data);
bool
Modified: lldb/trunk/include/lldb/Core/ValueObjectCast.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectCast.h?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectCast.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectCast.h Thu Mar 14 13:31:44 2013
@@ -32,7 +32,7 @@ public:
virtual
~ValueObjectCast();
- virtual size_t
+ virtual uint64_t
GetByteSize();
virtual size_t
Modified: lldb/trunk/include/lldb/Core/ValueObjectChild.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectChild.h?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectChild.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectChild.h Thu Mar 14 13:31:44 2013
@@ -26,7 +26,7 @@ class ValueObjectChild : public ValueObj
public:
virtual ~ValueObjectChild();
- virtual size_t
+ virtual uint64_t
GetByteSize()
{
return m_byte_size;
@@ -96,7 +96,7 @@ protected:
clang::ASTContext *m_clang_ast; // The clang AST that the clang type comes from
void *m_clang_type; // The type of the child in question within the parent (m_parent_sp)
ConstString m_type_name;
- uint32_t m_byte_size;
+ uint64_t m_byte_size;
int32_t m_byte_offset;
uint8_t m_bitfield_bit_size;
uint8_t m_bitfield_bit_offset;
@@ -114,7 +114,7 @@ protected:
clang::ASTContext *clang_ast,
void *clang_type,
const ConstString &name,
- uint32_t byte_size,
+ uint64_t byte_size,
int32_t byte_offset,
uint32_t bitfield_bit_size,
uint32_t bitfield_bit_offset,
Modified: lldb/trunk/include/lldb/Core/ValueObjectConstResult.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectConstResult.h?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectConstResult.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectConstResult.h Thu Mar 14 13:31:44 2013
@@ -72,7 +72,7 @@ public:
virtual ~ValueObjectConstResult();
- virtual size_t
+ virtual uint64_t
GetByteSize();
virtual lldb::ValueType
@@ -147,7 +147,7 @@ protected:
clang::ASTContext *m_clang_ast; // The clang AST that the clang type comes from
ConstString m_type_name;
- size_t m_byte_size;
+ uint64_t m_byte_size;
ValueObjectConstResultImpl m_impl;
Modified: lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h Thu Mar 14 13:31:44 2013
@@ -29,7 +29,7 @@ public:
virtual
~ValueObjectDynamicValue();
- virtual size_t
+ virtual uint64_t
GetByteSize();
virtual ConstString
Modified: lldb/trunk/include/lldb/Core/ValueObjectMemory.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectMemory.h?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectMemory.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectMemory.h Thu Mar 14 13:31:44 2013
@@ -41,7 +41,7 @@ public:
virtual
~ValueObjectMemory();
- virtual size_t
+ virtual uint64_t
GetByteSize();
virtual ConstString
Modified: lldb/trunk/include/lldb/Core/ValueObjectRegister.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectRegister.h?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectRegister.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectRegister.h Thu Mar 14 13:31:44 2013
@@ -31,7 +31,7 @@ public:
virtual
~ValueObjectRegisterContext();
- virtual size_t
+ virtual uint64_t
GetByteSize();
virtual lldb::ValueType
@@ -81,7 +81,7 @@ public:
virtual
~ValueObjectRegisterSet();
- virtual size_t
+ virtual uint64_t
GetByteSize();
virtual lldb::ValueType
@@ -142,7 +142,7 @@ public:
virtual
~ValueObjectRegister();
- virtual size_t
+ virtual uint64_t
GetByteSize();
virtual lldb::ValueType
Modified: lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h Thu Mar 14 13:31:44 2013
@@ -33,7 +33,7 @@ public:
virtual
~ValueObjectSynthetic();
- virtual size_t
+ virtual uint64_t
GetByteSize();
virtual ConstString
Modified: lldb/trunk/include/lldb/Core/ValueObjectVariable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectVariable.h?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectVariable.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectVariable.h Thu Mar 14 13:31:44 2013
@@ -31,7 +31,7 @@ public:
virtual
~ValueObjectVariable();
- virtual size_t
+ virtual uint64_t
GetByteSize();
virtual ConstString
Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Thu Mar 14 13:31:44 2013
@@ -853,7 +853,7 @@ public:
CreateMemberPointerType (lldb::clang_type_t clang_pointee_type,
lldb::clang_type_t clang_class_type);
- uint32_t
+ uint64_t
GetPointerBitSize ();
static bool
Modified: lldb/trunk/include/lldb/Symbol/ClangASTType.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTType.h?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangASTType.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTType.h Thu Mar 14 13:31:44 2013
@@ -107,13 +107,13 @@ public:
GetTypeNameForOpaqueQualType (clang::ASTContext *ast,
lldb::clang_type_t opaque_qual_type);
- uint32_t
+ uint64_t
GetClangTypeByteSize ();
- uint32_t
+ uint64_t
GetClangTypeBitWidth ();
- static uint32_t
+ static uint64_t
GetClangTypeBitWidth (clang::ASTContext *ast_context, lldb::clang_type_t opaque_clang_qual_type);
size_t
@@ -138,7 +138,7 @@ public:
Stream *s,
lldb::Format format,
const DataExtractor &data,
- uint32_t data_offset,
+ lldb::offset_t data_offset,
size_t data_byte_size,
uint32_t bitfield_bit_size,
uint32_t bitfield_bit_offset,
@@ -154,7 +154,7 @@ public:
Stream *s,
lldb::Format format,
const DataExtractor &data,
- uint32_t data_offset,
+ lldb::offset_t data_offset,
size_t data_byte_size,
uint32_t bitfield_bit_size,
uint32_t bitfield_bit_offset,
@@ -167,7 +167,7 @@ public:
DumpTypeValue (Stream *s,
lldb::Format format,
const DataExtractor &data,
- uint32_t data_offset,
+ lldb::offset_t data_offset,
size_t data_byte_size,
uint32_t bitfield_bit_size,
uint32_t bitfield_bit_offset,
@@ -180,7 +180,7 @@ public:
Stream *s,
lldb::Format format,
const DataExtractor &data,
- uint32_t data_offset,
+ lldb::offset_t data_offset,
size_t data_byte_size,
uint32_t bitfield_bit_size,
uint32_t bitfield_bit_offset,
@@ -190,7 +190,7 @@ public:
DumpSummary (ExecutionContext *exe_ctx,
Stream *s,
const DataExtractor &data,
- uint32_t data_offset,
+ lldb::offset_t data_offset,
size_t data_byte_size);
@@ -200,7 +200,7 @@ public:
ExecutionContext *exe_ctx,
Stream *s,
const DataExtractor &data,
- uint32_t data_offset,
+ lldb::offset_t data_offset,
size_t data_byte_size);
void
@@ -218,10 +218,10 @@ public:
Stream *s);
lldb::Encoding
- GetEncoding (uint32_t &count);
+ GetEncoding (uint64_t &count);
static lldb::Encoding
- GetEncoding (lldb::clang_type_t opaque_clang_qual_type, uint32_t &count);
+ GetEncoding (lldb::clang_type_t opaque_clang_qual_type, uint64_t &count);
lldb::Format
GetFormat ();
@@ -229,16 +229,16 @@ public:
static lldb::Format
GetFormat (lldb::clang_type_t opaque_clang_qual_type);
- uint32_t
+ uint64_t
GetTypeByteSize() const;
- static uint32_t
+ static uint64_t
GetTypeByteSize(clang::ASTContext *ast_context,
lldb::clang_type_t opaque_clang_qual_type);
bool
GetValueAsScalar (const DataExtractor &data,
- uint32_t data_offset,
+ lldb::offset_t data_offset,
size_t data_byte_size,
Scalar &value);
@@ -246,7 +246,7 @@ public:
GetValueAsScalar (clang::ASTContext *ast_context,
lldb::clang_type_t opaque_clang_qual_type,
const DataExtractor &data,
- uint32_t data_offset,
+ lldb::offset_t data_offset,
size_t data_byte_size,
Scalar &value);
@@ -315,12 +315,12 @@ public:
GetPointeeType (lldb::clang_type_t opaque_clang_qual_type);
lldb::clang_type_t
- GetArrayElementType (uint32_t& stride);
+ GetArrayElementType (uint64_t& stride);
static lldb::clang_type_t
GetArrayElementType (clang::ASTContext* ast,
lldb::clang_type_t opaque_clang_qual_type,
- uint32_t& stride);
+ uint64_t& stride);
lldb::clang_type_t
GetPointerType () const;
Modified: lldb/trunk/include/lldb/Symbol/Type.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Type.h?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Type.h (original)
+++ lldb/trunk/include/lldb/Symbol/Type.h Thu Mar 14 13:31:44 2013
@@ -79,7 +79,7 @@ public:
Type (lldb::user_id_t uid,
SymbolFile* symbol_file,
const ConstString &name,
- uint32_t byte_size,
+ uint64_t byte_size,
SymbolContextScope *context,
lldb::user_id_t encoding_uid,
EncodingDataType encoding_uid_type,
@@ -123,7 +123,7 @@ public:
const ConstString&
GetName();
- uint32_t
+ uint64_t
GetByteSize();
uint32_t
@@ -147,9 +147,6 @@ public:
lldb::TypeSP
GetTypedefType();
- void
- SetByteSize(uint32_t byte_size);
-
const ConstString &
GetName () const
{
@@ -206,7 +203,7 @@ public:
GetFormat ();
lldb::Encoding
- GetEncoding (uint32_t &count);
+ GetEncoding (uint64_t &count);
SymbolContextScope *
GetSymbolContextScope()
@@ -304,7 +301,7 @@ protected:
Type *m_encoding_type;
lldb::user_id_t m_encoding_uid;
EncodingDataType m_encoding_uid_type;
- uint32_t m_byte_size;
+ uint64_t m_byte_size;
Declaration m_decl;
lldb::clang_type_t m_clang_type;
Modified: lldb/trunk/scripts/Python/interface/SBType.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBType.i?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBType.i (original)
+++ lldb/trunk/scripts/Python/interface/SBType.i Thu Mar 14 13:31:44 2013
@@ -153,7 +153,7 @@ public:
bool
IsValid();
- size_t
+ uint64_t
GetByteSize();
bool
Modified: lldb/trunk/source/API/SBType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBType.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/API/SBType.cpp (original)
+++ lldb/trunk/source/API/SBType.cpp Thu Mar 14 13:31:44 2013
@@ -136,7 +136,7 @@ SBType::IsValid() const
return m_opaque_sp->IsValid();
}
-size_t
+uint64_t
SBType::GetByteSize()
{
if (!IsValid())
Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Thu Mar 14 13:31:44 2013
@@ -538,7 +538,7 @@ protected:
--pointer_count;
}
- m_format_options.GetByteSizeValue() = (clang_ast_type.GetClangTypeBitWidth () + 7) / 8;
+ m_format_options.GetByteSizeValue() = clang_ast_type.GetClangTypeByteSize();
if (m_format_options.GetByteSizeValue() == 0)
{
Modified: lldb/trunk/source/Core/DataBufferHeap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataBufferHeap.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Core/DataBufferHeap.cpp (original)
+++ lldb/trunk/source/Core/DataBufferHeap.cpp Thu Mar 14 13:31:44 2013
@@ -23,7 +23,7 @@ DataBufferHeap::DataBufferHeap () :
// Initialize this class with "n" characters and fill the buffer
// with "ch".
//----------------------------------------------------------------------
-DataBufferHeap::DataBufferHeap (size_t n, uint8_t ch) :
+DataBufferHeap::DataBufferHeap (lldb::offset_t n, uint8_t ch) :
m_data(n, ch)
{
}
@@ -32,7 +32,7 @@ DataBufferHeap::DataBufferHeap (size_t n
// Initialize this class with a copy of the "n" bytes from the "bytes"
// buffer.
//----------------------------------------------------------------------
-DataBufferHeap::DataBufferHeap (const void *src, size_t src_len) :
+DataBufferHeap::DataBufferHeap (const void *src, lldb::offset_t src_len) :
m_data()
{
CopyData (src, src_len);
@@ -73,7 +73,7 @@ DataBufferHeap::GetBytes () const
//----------------------------------------------------------------------
// Return the number of bytes this object currently contains.
//----------------------------------------------------------------------
-size_t
+uint64_t
DataBufferHeap::GetByteSize () const
{
return m_data.size();
@@ -84,15 +84,15 @@ DataBufferHeap::GetByteSize () const
// Sets the number of bytes that this object should be able to
// contain. This can be used prior to copying data into the buffer.
//----------------------------------------------------------------------
-size_t
-DataBufferHeap::SetByteSize (size_t new_size)
+uint64_t
+DataBufferHeap::SetByteSize (uint64_t new_size)
{
m_data.resize(new_size);
return m_data.size();
}
void
-DataBufferHeap::CopyData (const void *src, size_t src_len)
+DataBufferHeap::CopyData (const void *src, uint64_t src_len)
{
const uint8_t *src_u8 = (const uint8_t *)src;
if (src && src_len > 0)
Modified: lldb/trunk/source/Core/DataBufferMemoryMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataBufferMemoryMap.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Core/DataBufferMemoryMap.cpp (original)
+++ lldb/trunk/source/Core/DataBufferMemoryMap.cpp Thu Mar 14 13:31:44 2013
@@ -68,7 +68,7 @@ DataBufferMemoryMap::GetBytes() const
//----------------------------------------------------------------------
// Return the number of bytes this object currently contains.
//----------------------------------------------------------------------
-size_t
+uint64_t
DataBufferMemoryMap::GetByteSize() const
{
return m_size;
@@ -104,8 +104,8 @@ DataBufferMemoryMap::Clear()
//----------------------------------------------------------------------
size_t
DataBufferMemoryMap::MemoryMapFromFileSpec (const FileSpec* filespec,
- off_t offset,
- size_t length,
+ lldb::offset_t offset,
+ lldb::offset_t length,
bool writeable)
{
if (filespec != NULL)
@@ -113,7 +113,7 @@ DataBufferMemoryMap::MemoryMapFromFileSp
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_MMAP));
if (log)
{
- log->Printf("DataBufferMemoryMap::MemoryMapFromFileSpec(file=\"%s/%s\", offset=0x%" PRIx64 ", length=0x%zx, writeable=%i",
+ log->Printf("DataBufferMemoryMap::MemoryMapFromFileSpec(file=\"%s/%s\", offset=0x%" PRIx64 ", length=0x%" PRIx64 ", writeable=%i",
filespec->GetDirectory().GetCString(),
filespec->GetFilename().GetCString(),
offset,
@@ -156,8 +156,8 @@ DataBufferMemoryMap::MemoryMapFromFileSp
//----------------------------------------------------------------------
size_t
DataBufferMemoryMap::MemoryMapFromFileDescriptor (int fd,
- off_t offset,
- size_t length,
+ lldb::offset_t offset,
+ lldb::offset_t length,
bool writeable,
bool fd_is_file)
{
@@ -167,7 +167,7 @@ DataBufferMemoryMap::MemoryMapFromFileDe
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_MMAP|LIBLLDB_LOG_VERBOSE));
if (log)
{
- log->Printf("DataBufferMemoryMap::MemoryMapFromFileSpec(fd=%i, offset=0x%" PRIx64 ", length=0x%zx, writeable=%i, fd_is_file=%i)",
+ log->Printf("DataBufferMemoryMap::MemoryMapFromFileSpec(fd=%i, offset=0x%" PRIx64 ", length=0x%" PRIx64 ", writeable=%i, fd_is_file=%i)",
fd,
offset,
length,
Modified: lldb/trunk/source/Core/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Value.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Core/Value.cpp (original)
+++ lldb/trunk/source/Core/Value.cpp Thu Mar 14 13:31:44 2013
@@ -169,10 +169,10 @@ Value::ValueOf(ExecutionContext *exe_ctx
return false;
}
-size_t
+uint64_t
Value::GetValueByteSize (clang::ASTContext *ast_context, Error *error_ptr)
{
- size_t byte_size = 0;
+ uint64_t byte_size = 0;
switch (m_context_type)
{
@@ -190,8 +190,7 @@ Value::GetValueByteSize (clang::ASTConte
}
else
{
- uint64_t bit_width = ClangASTType::GetClangTypeBitWidth (ast_context, m_context);
- byte_size = (bit_width + 7 ) / 8;
+ byte_size = ClangASTType(ast_context, m_context).GetClangTypeByteSize();
}
break;
@@ -348,9 +347,8 @@ Value::GetValueAsData (ExecutionContext
data.SetByteOrder (lldb::endian::InlHostByteOrder());
if (m_context_type == eContextTypeClangType && ast_context)
{
- uint32_t ptr_bit_width = ClangASTType::GetClangTypeBitWidth (ast_context,
- ClangASTContext::GetVoidPtrType(ast_context, false));
- uint32_t ptr_byte_size = (ptr_bit_width + 7) / 8;
+ ClangASTType ptr_type (ast_context, ClangASTContext::GetVoidPtrType(ast_context, false));
+ uint64_t ptr_byte_size = ptr_type.GetClangTypeByteSize();
data.SetAddressByteSize (ptr_byte_size);
}
else
Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Thu Mar 14 13:31:44 2013
@@ -998,7 +998,7 @@ ValueObject::GetPointeeData (DataExtract
return 0;
}
-size_t
+uint64_t
ValueObject::GetData (DataExtractor& data)
{
UpdateValueIfNeeded(false);
@@ -1717,7 +1717,7 @@ ValueObject::SetValueFromCString (const
return false;
}
- uint32_t count = 0;
+ uint64_t count = 0;
Encoding encoding = ClangASTType::GetEncoding (GetClangType(), count);
const size_t byte_size = GetByteSize();
Modified: lldb/trunk/source/Core/ValueObjectCast.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectCast.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectCast.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectCast.cpp Thu Mar 14 13:31:44 2013
@@ -79,7 +79,7 @@ ValueObjectCast::GetClangASTImpl ()
return m_cast_type.GetASTContext();
}
-size_t
+uint64_t
ValueObjectCast::GetByteSize()
{
return m_value.GetValueByteSize(GetClangAST(), NULL);
Modified: lldb/trunk/source/Core/ValueObjectChild.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectChild.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectChild.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectChild.cpp Thu Mar 14 13:31:44 2013
@@ -30,7 +30,7 @@ ValueObjectChild::ValueObjectChild
clang::ASTContext *clang_ast,
void *clang_type,
const ConstString &name,
- uint32_t byte_size,
+ uint64_t byte_size,
int32_t byte_offset,
uint32_t bitfield_bit_size,
uint32_t bitfield_bit_offset,
Modified: lldb/trunk/source/Core/ValueObjectConstResult.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectConstResult.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectConstResult.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectConstResult.cpp Thu Mar 14 13:31:44 2013
@@ -286,7 +286,7 @@ ValueObjectConstResult::GetValueType() c
return eValueTypeConstResult;
}
-size_t
+uint64_t
ValueObjectConstResult::GetByteSize()
{
if (m_byte_size == 0)
Modified: lldb/trunk/source/Core/ValueObjectDynamicValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectDynamicValue.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectDynamicValue.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectDynamicValue.cpp Thu Mar 14 13:31:44 2013
@@ -106,7 +106,7 @@ ValueObjectDynamicValue::GetClangASTImpl
return m_parent->GetClangAST ();
}
-size_t
+uint64_t
ValueObjectDynamicValue::GetByteSize()
{
const bool success = UpdateValueIfNeeded(false);
Modified: lldb/trunk/source/Core/ValueObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectMemory.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectMemory.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectMemory.cpp Thu Mar 14 13:31:44 2013
@@ -165,12 +165,12 @@ ValueObjectMemory::GetClangASTImpl ()
return m_clang_type.GetASTContext();
}
-size_t
+uint64_t
ValueObjectMemory::GetByteSize()
{
if (m_type_sp)
return m_type_sp->GetByteSize();
- return (m_clang_type.GetClangTypeBitWidth () + 7) / 8;
+ return m_clang_type.GetClangTypeByteSize ();
}
lldb::ValueType
Modified: lldb/trunk/source/Core/ValueObjectRegister.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectRegister.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectRegister.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectRegister.cpp Thu Mar 14 13:31:44 2013
@@ -72,7 +72,7 @@ ValueObjectRegisterContext::GetClangASTI
return NULL;
}
-size_t
+uint64_t
ValueObjectRegisterContext::GetByteSize()
{
return 0;
@@ -177,7 +177,7 @@ ValueObjectRegisterSet::GetClangASTImpl
return NULL;
}
-size_t
+uint64_t
ValueObjectRegisterSet::GetByteSize()
{
return 0;
@@ -361,7 +361,7 @@ ValueObjectRegister::GetClangASTImpl ()
return NULL;
}
-size_t
+uint64_t
ValueObjectRegister::GetByteSize()
{
return m_reg_info.byte_size;
Modified: lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp Thu Mar 14 13:31:44 2013
@@ -135,7 +135,7 @@ ValueObjectSynthetic::GetClangASTImpl ()
return m_parent->GetClangAST ();
}
-size_t
+uint64_t
ValueObjectSynthetic::GetByteSize()
{
return m_parent->GetByteSize();
Modified: lldb/trunk/source/Core/ValueObjectVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectVariable.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectVariable.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectVariable.cpp Thu Mar 14 13:31:44 2013
@@ -102,16 +102,15 @@ ValueObjectVariable::GetClangASTImpl ()
return 0;
}
-size_t
+uint64_t
ValueObjectVariable::GetByteSize()
{
- ClangASTType type(GetClangAST(),
- GetClangType());
+ ClangASTType type(GetClangAST(), GetClangType());
if (!type.IsValid())
return 0;
- return (ClangASTType::GetClangTypeBitWidth(type.GetASTContext(), type.GetOpaqueQualType()) + 7) / 8;
+ return type.GetClangTypeByteSize();
}
lldb::ValueType
Modified: lldb/trunk/source/Expression/DWARFExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DWARFExpression.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DWARFExpression.cpp (original)
+++ lldb/trunk/source/Expression/DWARFExpression.cpp Thu Mar 14 13:31:44 2013
@@ -2794,7 +2794,7 @@ DWARFExpression::Evaluate
addr_t source_addr = (addr_t)tmp.GetScalar().ULongLong();
addr_t target_addr = (addr_t)stack.back().GetScalar().ULongLong();
- size_t byte_size = (ClangASTType::GetClangTypeBitWidth(ast_context, clang_type) + 7) / 8;
+ const uint64_t byte_size = ClangASTType::GetTypeByteSize(ast_context, clang_type);
switch (source_value_type)
{
Modified: lldb/trunk/source/Expression/IRForTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRForTarget.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRForTarget.cpp (original)
+++ lldb/trunk/source/Expression/IRForTarget.cpp Thu Mar 14 13:31:44 2013
@@ -707,7 +707,7 @@ IRForTarget::CreateResultVariable (llvm:
m_result_name = m_decl_map->GetPersistentResultName();
if (log)
- log->Printf("Creating a new result global: \"%s\" with size 0x%x",
+ log->Printf("Creating a new result global: \"%s\" with size 0x%" PRIx64,
m_result_name.GetCString(),
m_result_type.GetClangTypeBitWidth() / 8);
@@ -1674,11 +1674,11 @@ IRForTarget::MaybeHandleVariable (Value
value_type = global_variable->getType();
}
- size_t value_size = (ast_context->getTypeSize(qual_type) + 7) / 8;
- off_t value_alignment = (ast_context->getTypeAlign(qual_type) + 7) / 8;
+ uint64_t value_size = (ast_context->getTypeSize(qual_type) + 7ull) / 8ull;
+ off_t value_alignment = (ast_context->getTypeAlign(qual_type) + 7ull) / 8ull;
if (log)
- log->Printf("Type of \"%s\" is [clang \"%s\", llvm \"%s\"] [size %lu, align %" PRId64 "]",
+ log->Printf("Type of \"%s\" is [clang \"%s\", llvm \"%s\"] [size %" PRIu64 ", align %" PRId64 "]",
name.c_str(),
qual_type.getAsString().c_str(),
PrintType(value_type).c_str(),
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Thu Mar 14 13:31:44 2013
@@ -5442,7 +5442,7 @@ SymbolFileDWARF::ParseType (const Symbol
const char *type_name_cstr = NULL;
ConstString type_name_const_str;
Type::ResolveState resolve_state = Type::eResolveStateUnresolved;
- size_t byte_size = 0;
+ uint64_t byte_size = 0;
Declaration decl;
Type::EncodingDataType encoding_data_type = Type::eEncodingIsUID;
Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Thu Mar 14 13:31:44 2013
@@ -5598,7 +5598,7 @@ ClangASTContext::CreateMemberPointerType
return NULL;
}
-uint32_t
+uint64_t
ClangASTContext::GetPointerBitSize ()
{
ASTContext *ast = getASTContext();
Modified: lldb/trunk/source/Symbol/ClangASTType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTType.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTType.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTType.cpp Thu Mar 14 13:31:44 2013
@@ -141,7 +141,7 @@ ClangASTType::GetPointeeType (clang_type
}
lldb::clang_type_t
-ClangASTType::GetArrayElementType (uint32_t& stride)
+ClangASTType::GetArrayElementType (uint64_t& stride)
{
return GetArrayElementType(m_ast, m_type, stride);
}
@@ -149,7 +149,7 @@ ClangASTType::GetArrayElementType (uint3
lldb::clang_type_t
ClangASTType::GetArrayElementType (clang::ASTContext* ast,
lldb::clang_type_t opaque_clang_qual_type,
- uint32_t& stride)
+ uint64_t& stride)
{
if (opaque_clang_qual_type)
{
@@ -187,7 +187,7 @@ ClangASTType::GetPointerType (clang::AST
}
lldb::Encoding
-ClangASTType::GetEncoding (uint32_t &count)
+ClangASTType::GetEncoding (uint64_t &count)
{
return GetEncoding(m_type, count);
}
@@ -363,7 +363,7 @@ ClangASTType::GetMinimumLanguage (clang:
}
lldb::Encoding
-ClangASTType::GetEncoding (clang_type_t clang_type, uint32_t &count)
+ClangASTType::GetEncoding (clang_type_t clang_type, uint64_t &count)
{
count = 1;
clang::QualType qual_type(clang::QualType::getFromOpaquePtr(clang_type));
@@ -631,7 +631,7 @@ ClangASTType::DumpValue
Stream *s,
lldb::Format format,
const lldb_private::DataExtractor &data,
- uint32_t data_byte_offset,
+ lldb::offset_t data_byte_offset,
size_t data_byte_size,
uint32_t bitfield_bit_size,
uint32_t bitfield_bit_offset,
@@ -667,7 +667,7 @@ ClangASTType::DumpValue
Stream *s,
lldb::Format format,
const lldb_private::DataExtractor &data,
- uint32_t data_byte_offset,
+ lldb::offset_t data_byte_offset,
size_t data_byte_size,
uint32_t bitfield_bit_size,
uint32_t bitfield_bit_offset,
@@ -965,7 +965,7 @@ bool
ClangASTType::DumpTypeValue (Stream *s,
lldb::Format format,
const lldb_private::DataExtractor &data,
- uint32_t byte_offset,
+ lldb::offset_t byte_offset,
size_t byte_size,
uint32_t bitfield_bit_size,
uint32_t bitfield_bit_offset,
@@ -990,7 +990,7 @@ ClangASTType::DumpTypeValue (clang::ASTC
Stream *s,
lldb::Format format,
const lldb_private::DataExtractor &data,
- uint32_t byte_offset,
+ lldb::offset_t byte_offset,
size_t byte_size,
uint32_t bitfield_bit_size,
uint32_t bitfield_bit_offset,
@@ -1153,7 +1153,7 @@ ClangASTType::DumpSummary
ExecutionContext *exe_ctx,
Stream *s,
const lldb_private::DataExtractor &data,
- uint32_t data_byte_offset,
+ lldb::offset_t data_byte_offset,
size_t data_byte_size
)
{
@@ -1174,7 +1174,7 @@ ClangASTType::DumpSummary
ExecutionContext *exe_ctx,
Stream *s,
const lldb_private::DataExtractor &data,
- uint32_t data_byte_offset,
+ lldb::offset_t data_byte_offset,
size_t data_byte_size
)
{
@@ -1219,19 +1219,19 @@ ClangASTType::DumpSummary
}
}
-uint32_t
+uint64_t
ClangASTType::GetClangTypeByteSize ()
{
return (GetClangTypeBitWidth (m_ast, m_type) + 7) / 8;
}
-uint32_t
+uint64_t
ClangASTType::GetClangTypeBitWidth ()
{
return GetClangTypeBitWidth (m_ast, m_type);
}
-uint32_t
+uint64_t
ClangASTType::GetClangTypeBitWidth (clang::ASTContext *ast_context, clang_type_t clang_type)
{
if (ClangASTContext::GetCompleteType (ast_context, clang_type))
@@ -1428,7 +1428,7 @@ bool
ClangASTType::GetValueAsScalar
(
const lldb_private::DataExtractor &data,
- uint32_t data_byte_offset,
+ lldb::offset_t data_byte_offset,
size_t data_byte_size,
Scalar &value
)
@@ -1447,7 +1447,7 @@ ClangASTType::GetValueAsScalar
clang::ASTContext *ast_context,
clang_type_t clang_type,
const lldb_private::DataExtractor &data,
- uint32_t data_byte_offset,
+ lldb::offset_t data_byte_offset,
size_t data_byte_size,
Scalar &value
)
@@ -1460,14 +1460,14 @@ ClangASTType::GetValueAsScalar
}
else
{
- uint32_t count = 0;
+ uint64_t count = 0;
lldb::Encoding encoding = GetEncoding (clang_type, count);
if (encoding == lldb::eEncodingInvalid || count != 1)
return false;
uint64_t bit_width = ast_context->getTypeSize(qual_type);
- uint32_t byte_size = (bit_width + 7 ) / 8;
+ uint64_t byte_size = (bit_width + 7 ) / 8;
lldb::offset_t offset = data_byte_offset;
switch (encoding)
{
@@ -1603,18 +1603,18 @@ ClangASTType::SetValueFromScalar
if (!ClangASTContext::IsAggregateType (clang_type))
{
strm.GetFlags().Set(Stream::eBinary);
- uint32_t count = 0;
+ uint64_t count = 0;
lldb::Encoding encoding = GetEncoding (clang_type, count);
if (encoding == lldb::eEncodingInvalid || count != 1)
return false;
- uint64_t bit_width = ast_context->getTypeSize(qual_type);
+ const uint64_t bit_width = ast_context->getTypeSize(qual_type);
// This function doesn't currently handle non-byte aligned assignments
if ((bit_width % 8) != 0)
return false;
- uint32_t byte_size = (bit_width + 7 ) / 8;
+ const uint64_t byte_size = (bit_width + 7 ) / 8;
switch (encoding)
{
case lldb::eEncodingInvalid:
@@ -1673,13 +1673,10 @@ ClangASTType::SetValueFromScalar
}
bool
-ClangASTType::ReadFromMemory
-(
- lldb_private::ExecutionContext *exe_ctx,
- lldb::addr_t addr,
- AddressType address_type,
- lldb_private::DataExtractor &data
-)
+ClangASTType::ReadFromMemory (lldb_private::ExecutionContext *exe_ctx,
+ lldb::addr_t addr,
+ AddressType address_type,
+ lldb_private::DataExtractor &data)
{
return ReadFromMemory (m_ast,
m_type,
@@ -1689,24 +1686,21 @@ ClangASTType::ReadFromMemory
data);
}
-uint32_t
+uint64_t
ClangASTType::GetTypeByteSize() const
{
- return GetTypeByteSize(m_ast,
- m_type);
+ return GetTypeByteSize (m_ast, m_type);
}
-uint32_t
-ClangASTType::GetTypeByteSize(
- clang::ASTContext *ast_context,
- lldb::clang_type_t opaque_clang_qual_type)
+uint64_t
+ClangASTType::GetTypeByteSize(clang::ASTContext *ast_context, lldb::clang_type_t opaque_clang_qual_type)
{
if (ClangASTContext::GetCompleteType (ast_context, opaque_clang_qual_type))
{
clang::QualType qual_type(clang::QualType::getFromOpaquePtr(opaque_clang_qual_type));
- uint32_t byte_size = (ast_context->getTypeSize (qual_type) + 7) / 8;
+ uint64_t byte_size = (ast_context->getTypeSize (qual_type) + (uint64_t)7) / (uint64_t)8;
if (ClangASTContext::IsObjCClassType(opaque_clang_qual_type))
byte_size += ast_context->getTypeSize(ast_context->ObjCBuiltinClassTy) / 8; // isa
@@ -1718,15 +1712,12 @@ ClangASTType::GetTypeByteSize(
bool
-ClangASTType::ReadFromMemory
-(
- clang::ASTContext *ast_context,
- clang_type_t clang_type,
- lldb_private::ExecutionContext *exe_ctx,
- lldb::addr_t addr,
- AddressType address_type,
- lldb_private::DataExtractor &data
-)
+ClangASTType::ReadFromMemory (clang::ASTContext *ast_context,
+ clang_type_t clang_type,
+ lldb_private::ExecutionContext *exe_ctx,
+ lldb::addr_t addr,
+ AddressType address_type,
+ lldb_private::DataExtractor &data)
{
if (address_type == eAddressTypeFile)
{
@@ -1740,7 +1731,7 @@ ClangASTType::ReadFromMemory
clang::QualType qual_type(clang::QualType::getFromOpaquePtr(clang_type));
- const uint32_t byte_size = (ast_context->getTypeSize (qual_type) + 7) / 8;
+ const uint64_t byte_size = (ast_context->getTypeSize (qual_type) + 7) / 8;
if (data.GetByteSize() < byte_size)
{
lldb::DataBufferSP data_sp(new DataBufferHeap (byte_size, '\0'));
@@ -1808,7 +1799,7 @@ ClangASTType::WriteToMemory
return false;
}
clang::QualType qual_type(clang::QualType::getFromOpaquePtr(clang_type));
- const uint32_t byte_size = (ast_context->getTypeSize (qual_type) + 7) / 8;
+ const uint64_t byte_size = (ast_context->getTypeSize (qual_type) + 7) / 8;
if (byte_size > 0)
{
Modified: lldb/trunk/source/Symbol/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Type.cpp?rev=177091&r1=177090&r2=177091&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Type.cpp (original)
+++ lldb/trunk/source/Symbol/Type.cpp Thu Mar 14 13:31:44 2013
@@ -51,7 +51,7 @@ Type::Type
lldb::user_id_t uid,
SymbolFile* symbol_file,
const ConstString &name,
- uint32_t byte_size,
+ uint64_t byte_size,
SymbolContextScope *context,
user_id_t encoding_uid,
EncodingDataType encoding_uid_type,
@@ -138,7 +138,7 @@ Type::GetDescription (Stream *s, lldb::D
// Call the get byte size accesor so we resolve our byte size
if (GetByteSize())
- s->Printf(", byte-size = %u", m_byte_size);
+ s->Printf(", byte-size = %" PRIu64, m_byte_size);
bool show_fullpaths = (level == lldb::eDescriptionLevelVerbose);
m_decl.Dump(s, show_fullpaths);
@@ -178,7 +178,7 @@ Type::Dump (Stream *s, bool show_context
*s << ", name = \"" << m_name << "\"";
if (m_byte_size != 0)
- s->Printf(", size = %u", m_byte_size);
+ s->Printf(", size = %" PRIu64, m_byte_size);
if (show_context && m_context != NULL)
{
@@ -289,7 +289,7 @@ Type::GetEncodingType ()
-uint32_t
+uint64_t
Type::GetByteSize()
{
if (m_byte_size == 0)
@@ -375,7 +375,7 @@ Type::GetFormat ()
lldb::Encoding
-Type::GetEncoding (uint32_t &count)
+Type::GetEncoding (uint64_t &count)
{
// Make sure we resolve our type if it already hasn't been.
if (!ResolveClangType(eResolveStateForward))
@@ -426,7 +426,7 @@ Type::ReadFromMemory (ExecutionContext *
return false;
}
- const uint32_t byte_size = GetByteSize();
+ const uint64_t byte_size = GetByteSize();
if (data.GetByteSize() < byte_size)
{
lldb::DataBufferSP data_sp(new DataBufferHeap (byte_size, '\0'));
More information about the lldb-commits
mailing list