C++ (Qt)#include <cstdio>#include <QList> int main(){ QList< int > v; for( int idx = 0; idx < v.size(); ++idx ) { printf("%d\n", idx); } return 0;}
ASM(gdb) disassemble mainDump of assembler code for function main: 0x08048600 <+0>: push %ebp 0x08048601 <+1>: mov %esp,%ebp 0x08048603 <+3>: and $0xfffffff0,%esp 0x08048606 <+6>: push %ebx 0x08048607 <+7>: sub $0x2c,%esp 0x0804860a <+10>: movl $0x80499ec,0x1c(%esp) 0x08048612 <+18>: lock incl 0x80499ec 0x08048619 <+25>: setne %al 0x0804861c <+28>: mov 0x1c(%esp),%edx 0x08048620 <+32>: mov 0xc(%edx),%eax 0x08048623 <+35>: sub 0x8(%edx),%eax 0x08048626 <+38>: test %eax,%eax 0x08048628 <+40>: jle 0x8048651 <main+81> 0x0804862a <+42>: xor %ebx,%ebx 0x0804862c <+44>: lea 0x0(%esi,%eiz,1),%esi 0x08048630 <+48>: mov %ebx,0x4(%esp) 0x08048634 <+52>: movl $0x8048784,(%esp) 0x0804863b <+59>: call 0x8048508 <printf@plt> 0x08048640 <+64>: mov 0x1c(%esp),%edx 0x08048644 <+68>: add $0x1,%ebx 0x08048647 <+71>: mov 0xc(%edx),%eax 0x0804864a <+74>: sub 0x8(%edx),%eax 0x0804864d <+77>: cmp %eax,%ebx 0x0804864f <+79>: jl 0x8048630 <main+48> 0x08048651 <+81>: lea 0x1c(%esp),%eax 0x08048655 <+85>: mov %eax,(%esp) 0x08048658 <+88>: call 0x8048680 <_ZN5QListIiED2Ev> 0x0804865d <+93>: add $0x2c,%esp 0x08048660 <+96>: xor %eax,%eax 0x08048662 <+98>: pop %ebx 0x08048663 <+99>: mov %ebp,%esp 0x08048665 <+101>: pop %ebp 0x08048666 <+102>: ret 0x08048667 <+103>: mov %eax,%ebx 0x08048669 <+105>: lea 0x1c(%esp),%eax 0x0804866d <+109>: mov %eax,(%esp) 0x08048670 <+112>: call 0x8048680 <_ZN5QListIiED2Ev> 0x08048675 <+117>: mov %ebx,(%esp) 0x08048678 <+120>: call 0x8048528 <_Unwind_Resume@plt>End of assembler dump.
ASM0x08048647 <+71>: mov 0xc(%edx),%eax0x0804864a <+74>: sub 0x8(%edx),%eax