[Lldb-commits] [Bug 12882] New: Problems with structures defined with #pragma pack()
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri May 18 10:52:01 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12882
Bug #: 12882
Summary: Problems with structures defined with #pragma pack()
Product: lldb
Version: unspecified
Platform: PC
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
AssignedTo: lldb-commits at cs.uiuc.edu
ReportedBy: vadim at kalinsky.ru
Classification: Unclassified
Here is the sample:
#pragma pack(push,1)
typedef struct MOVIentry {
int32_t flags;
int32_t size;
int32_t pos;
int32_t samplesInChunk;
char key_frame;
int32_t entries;
int64_t cts;
int64_t dts;
} MOVIentry;
#pragma pack(pop)
int main()
{
MOVIentry ee;
ee.flags = 1;
ee.size = 2;
ee.pos = 3;
ee.samplesInChunk = 4;
ee.key_frame = 5;
ee.entries = 6;
ee.cts = 7;
ee.dts = 8;
unsigned long ee_size = sizeof(ee);
return 0;
}
Memory for ee:
01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 05 06 00 00 00 07 00 00 00 00
00 00 00 08 00 00 00 00 00 00 00 00 00 00
(lldb) expr -f hex -- ee.entries
(int32_t) $2 = 0x00000700
(lldb) expr sizeof(ee)
(unsigned long) $0 = 40
(lldb) expr ee_size
(unsigned long) $1 = 37
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the lldb-commits
mailing list