This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Show number of padding bytes in data structures


Hi,

is there any way of using one of the binutils to show the additional padding bytes that a compiler inserted into a struct/class to make it align according to the systems memory alignment rules? Or is this information lost once the compiler has done its job?

For example, for the following data structure compiled on x64, I would expect the tool to tell me that the compiler added 4 padding bytes:

class MyData {
  int i;
  double d;
};

Thanks for any help,
Frank


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]