| 157 | } |
| 158 | |
| 159 | int main() |
| 160 | { |
| 161 | test(); |
| 162 | |
| 163 | #if 0 |
| 164 | #define offsetof(st, m) __builtin_offsetof(st, m) |
| 165 | |
| 166 | cs_insn insn; |
| 167 | printf("size: %lu\n", sizeof(insn)); |
| 168 | printf("@id: %lu\n", offsetof(cs_insn, id)); |
| 169 | printf("@address: %lu\n", offsetof(cs_insn, address)); |
| 170 | printf("@size: %lu\n", offsetof(cs_insn, size)); |
| 171 | printf("@bytes: %lu\n", offsetof(cs_insn, bytes)); |
| 172 | printf("@mnemonic: %lu\n", offsetof(cs_insn, mnemonic)); |
| 173 | printf("@op_str: %lu\n", offsetof(cs_insn, op_str)); |
| 174 | printf("@regs_read: %lu\n", offsetof(cs_insn, regs_read)); |
| 175 | printf("@regs_read_count: %lu\n", offsetof(cs_insn, regs_read_count)); |
| 176 | printf("@regs_write: %lu\n", offsetof(cs_insn, regs_write)); |
| 177 | printf("@regs_write_count: %lu\n", offsetof(cs_insn, regs_write_count)); |
| 178 | printf("@groups: %lu\n", offsetof(cs_insn, groups)); |
| 179 | printf("@groups_count: %lu\n", offsetof(cs_insn, groups_count)); |
| 180 | printf("@arch: %lu\n", offsetof(cs_insn, x86)); |
| 181 | #endif |
| 182 | |
| 183 | return 0; |
| 184 | } |