NAME=pf QeQ FILE=- CMDS=< 0x00000010 "hello" 0x00000004 = 0x00000004 -> 0x00000010 "hello" (*0x10)0x00000000 = 0x6c6c6568 (*0x10)0x00000004 = 0x6c6c6568 (*0x10)0x00000000 = "hello" (*0x10)0x00000004 = "hello" EOF RUN NAME=simple union test FILE=malloc://1024 CMDS=< integer : 0x00000004 = 4000 word : 0x00000008 = 0x002a Two : struct integer : 0x0000000a = 16 word : 0x0000000e = 0xbeef secondInt : 0x00000010 = 32 EOF RUN NAME=nested struct FILE=malloc://1024 CMDS=< integer : 0x00000004 = 4000 word : 0x00000008 = 0x3412 Bah : (*0x10) struct integer : 0x00000010 = 42 word : 0x00000014 = 0x002a Bah : (*0x0) NULL plop : 0x0000000e = 0x1664 EOF RUN NAME=nested unions FILE=malloc://1024 CMDS=< integer : 0x00000004 = 4000 swagg : struct first : 0x00000004 = 0x00000fa0 second : 0x00000008 = 0x000020a0 word : 0x00000004 = 0x0fa0 plop : 0x0000000c = 0x7201 EOF RUN NAME=complex nested struct FILE=malloc://1024 CMDS=< first : 0x00000004 = 666 Boh : struct integer : 0x00000008 = 4000 word : 0x0000000c = 0x002a Bah : (*0x30) struct integer : 0x00000030 = 20 word : 0x00000034 = 0x1664 Bah : (*0x20) struct integer : 0x00000020 = 1664 word : 0x00000024 = 0x4000 Bah : (*0x0) NULL bwa : 0x00000012 = 0x4214 foo : 0x00000014 = 0x00001664 EOF RUN NAME=flag for nested struct FILE=malloc://1024 CMDS=< int : 0x00000000 = 1919252337 ptr : 0x00000004 = (qword)0x7361706f69757974 structname : struct int : 0x0000000c = 1751606884 ptr : 0x00000010 = (qword)0x627663787a6c6b6a EOF RUN NAME=print with byte(s) skip FILE=malloc://1024 CMDS=< machine : 0x00000084 = machine (enum pe_machine) = 0x14c ; IMAGE_FILE_MACHINE_I386 numberOfSections : 0x00000086 = 0x0004 timeDateStamp : 0x00000088 = Thu Sep 11 18:21:46 2014 pointerToSymbolTable : 0x0000008c = 0x00000000 numberOfSymbols : 0x00000090 = 0x00000000 sizeOfOptionalHeader : 0x00000094 = 0x00e0 characteristics : 0x00000096 = characteristics (bitfield) = 0x00000102 : IMAGE_FILE_EXECUTABLE_IMAGE | IMAGE_FILE_32BIT_MACHINE optionalHeader : struct magic : 0x00000098 = magic (enum pe_magic) = 0x10b ; IMAGE_NT_OPTIONAL_HDR32_MAGIC majorLinkerVersion : 0x0000009a = 0x0b minorLinkerVersion : 0x0000009b = 0x00 sizeOfCode : 0x0000009c = 0x00003000 sizeOfInitializedData : 0x000000a0 = 0x00003400 sizeOfUninitializedData : 0x000000a4 = 0x00000000 addressOfEntryPoint : 0x000000a8 = 0x00004f3e baseOfCode : 0x000000ac = 0x00002000 baseOfData : 0x000000b0 = 0x00006000 imageBase : 0x000000b4 = 0x00400000 sectionAlignment : 0x000000b8 = 0x00002000 fileAlignment : 0x000000bc = 0x00000200 majorOperatingSystemVersion : 0x000000c0 = 0x0004 minorOperatingSystemVersion : 0x000000c2 = 0x0000 majorImageVersion : 0x000000c4 = 0x0000 minorImageVersion : 0x000000c6 = 0x0000 majorSubsystemVersion : 0x000000c8 = 0x0006 minorSubsystemVersion : 0x000000ca = 0x0000 win32VersionValue : 0x000000cc = 0x00000000 sizeOfImage : 0x000000d0 = 0x0000e000 sizeOfHeaders : 0x000000d4 = 0x00000400 checkSum : 0x000000d8 = 0x00000000 subsystem : 0x000000dc = subsystem (enum pe_subsystem) = 0x2 ; IMAGE_SUBSYSTEM_WINDOWS_GUI dllCharacteristics : 0x000000de = dllCharacteristics (bitfield) = 0x00008560 : IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA | IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE | IMAGE_DLLCHARACTERISTICS_NX_COMPAT | IMAGE_DLLCHARACTERISTICS_NO_SEH | IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE sizeOfStackReserve : 0x000000e0 = 0x00100000 sizeOfStackCommit : 0x000000e4 = 0x00001000 sizeOfHeapReserve : 0x000000e8 = 0x00100000 sizeOfHeapCommit : 0x000000ec = 0x00001000 loaderFlags : 0x000000f0 = 0x00000000 numberOfRvaAndSizes : 0x000000f4 = 0x00000010 dataDirectory : [ struct virtualAddress : 0x000000f8 = 0x00000000 size : 0x000000fc = 0x00000000 struct virtualAddress : 0x00000100 = 0x00004ef0 size : 0x00000104 = 0x0000004b struct virtualAddress : 0x00000108 = 0x00008000 size : 0x0000010c = 0x00002e40 struct virtualAddress : 0x00000110 = 0x00000000 size : 0x00000114 = 0x00000000 struct virtualAddress : 0x00000118 = 0x00000000 size : 0x0000011c = 0x00000000 struct virtualAddress : 0x00000120 = 0x0000c000 size : 0x00000124 = 0x0000000c struct virtualAddress : 0x00000128 = 0x00006000 size : 0x0000012c = 0x0000001c struct virtualAddress : 0x00000130 = 0x00000000 size : 0x00000134 = 0x00000000 struct virtualAddress : 0x00000138 = 0x00000000 size : 0x0000013c = 0x00000000 struct virtualAddress : 0x00000140 = 0x00000000 size : 0x00000144 = 0x00000000 struct virtualAddress : 0x00000148 = 0x00000000 size : 0x0000014c = 0x00000000 struct virtualAddress : 0x00000150 = 0x00000000 size : 0x00000154 = 0x00000000 struct virtualAddress : 0x00000158 = 0x00002000 size : 0x0000015c = 0x00000008 struct virtualAddress : 0x00000160 = 0x00000000 size : 0x00000164 = 0x00000000 struct virtualAddress : 0x00000168 = 0x00002008 size : 0x0000016c = 0x00000048 struct virtualAddress : 0x00000170 = 0x00000000 size : 0x00000174 = 0x00000000 ] EOF RUN NAME=Variable length array FILE=malloc://1024 CMDS=< /dev/null ; pf. EXPECT=< /dev/null ; pf. EXPECT=< t : struct t1 : 0x00000000 = 0x1234 s1 : 0x00000002 = 0x56789abc f1 : 0x00000006 = (qword)0xdef0123456789abc [ { "name": "s", "type": "second", "offset": 0, "value": [ { "name": "t", "type": "third", "offset": 0, "value": [ { "name": "t1", "type": "w", "offset": 0, "value": 4660 } ] }, { "name": "s1", "type": "x", "offset": 2, "value": 1450744508 } ] }, { "name": "f1", "type": "q", "offset": 6, "value": -2382384186880648516 } ] EOF RUN NAME=pfj and Matryoshka dolls FILE=- CMDS=< t : struct fo : struct fo1 : 0x00000000 = 0x7f f1 : 0x00000001 = (qword)0xdef0123456789abc [ { "name": "s", "type": "second", "offset": 0, "value": [ { "name": "t", "type": "third", "offset": 0, "value": [ { "name": "fo", "type": "fourth", "offset": 0, "value": [ { "name": "fo1", "type": "b", "offset": 0, "value": 127 } ] } ] } ] }, { "name": "f1", "type": "q", "offset": 1, "value": -2382384186880648516 } ] s : struct t : struct fo : struct fo1 : 0x00000000 = 0x7f [ { "name": "s", "type": "second", "offset": 0, "value": [ { "name": "t", "type": "third", "offset": 0, "value": [ { "name": "fo", "type": "fourth", "offset": 0, "value": [ { "name": "fo1", "type": "b", "offset": 0, "value": 127 } ] } ] } ] } ] EOF RUN