Structure padding is not done by C Parser
ptomin opened this issue · comments
ptomin commented
Input:
typedef struct str
{
char ch;
int i;
} str;
Command:
c2xml.exe -a x86-protected-32 -e win32 -d msvc test.h
Output
<?xml version="1.0" encoding="utf-8"?>
<library xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemata.jklnet.org/Decompiler">
<Types>
<struct name="str" size="5">
<field offset="0" name="ch">
<prim domain="Character" size="1" />
</field>
<field offset="1" name="i">
<prim domain="SignedInt" size="4" />
</field>
</struct>
<typedef name="str">
<struct name="str" />
</typedef>
</Types>
</library>
I think offset of i
field should 4.