mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[0.2.x] fixed : cistom type padding
git-svn-id: https://pykd.svn.codeplex.com/svn@87171 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
222515e191
commit
64501a6598
@ -23,9 +23,20 @@ TypeInfoPtr TypeBuilder::createUnion( const std::string &name, ULONG align )
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
CustomBase::CustomBase( const std::string &name, ULONG pointerSize, ULONG align ) :
|
||||||
|
UdtTypeInfoBase( name )
|
||||||
|
{
|
||||||
|
m_ptrSize = pointerSize;
|
||||||
|
m_align = align ? align : m_ptrSize;
|
||||||
|
m_size = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
ULONG CustomBase::getSize()
|
ULONG CustomBase::getSize()
|
||||||
{
|
{
|
||||||
return alignUp( m_size, getAlignReq() );
|
const ULONG alignReq = getAlignReq();
|
||||||
|
return alignUp( m_size, alignReq < m_align ? alignReq : m_align );
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -59,13 +59,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
CustomBase( const std::string &name, ULONG pointerSize, ULONG align ) :
|
CustomBase( const std::string &name, ULONG pointerSize, ULONG align );
|
||||||
UdtTypeInfoBase( name )
|
|
||||||
{
|
|
||||||
m_ptrSize = pointerSize;
|
|
||||||
m_align = align ? align : m_ptrSize;
|
|
||||||
m_size = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ULONG alignUp(ULONG val, ULONG align);
|
static ULONG alignUp(ULONG val, ULONG align);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user