| GDB shows TEST instruction |
Dump of assembler code for function *__GI___poll: 0x00007f73ec2120b0 : sub $0x28,%rsp 0x00007f73ec2120b4 : mov 0x29c52e(%rip),%eax # 0x7f73ec4ae5e8 0x00007f73ec2120ba : test %eax,%eax 0x00007f73ec2120bc : jne 0x7f73ec2120d5 0x00007f73ec2120be : movslq %edx,%rdx 0x00007f73ec2120c1 : mov $0x7,%eax 0x00007f73ec2120c6 : syscall 0x00007f73ec2120c8 : cmp $0xfffffffffffff000,%rax 0x00007f73ec2120ce : ja 0x7f73ec212121 0x00007f73ec2120d0 : add $0x28,%rsp 0x00007f73ec2120d4 : retq 0x00007f73ec2120d5 : mov %edx,0x8(%rsp) 0x00007f73ec2120d9 : mov %rsi,0x10(%rsp) 0x00007f73ec2120de : mov %rdi,0x18(%rsp) 0x00007f73ec2120e3 : callq 0x7f73ec229b50 0x00007f73ec2120e8 : mov 0x8(%rsp),%edx 0x00007f73ec2120ec : mov %eax,%r8d 0x00007f73ec2120ef : mov 0x10(%rsp),%rsi 0x00007f73ec2120f4 : mov 0x18(%rsp),%rdi 0x00007f73ec2120f9 : mov $0x7,%eax 0x00007f73ec2120fe : movslq %edx,%rdx 0x00007f73ec212101 : syscall
test %eax,%eax
Process Invovled
Downloading Using a Torrent File.
file: gnewsense-livecd-deltah-i386-2.3.iso | | size: 643,176,448 (613.38 MiB) | | dest: /home/jeffrin/Downloads/gnewsense-livecd-deltah-i386-2.3.iso | | progress: ##_______________________________________________________________________________________________________________ | | status: finishing in 1:32:50 (1.9%) | | dl speed: 112.3 KB/s | | ul speed: 0.0 KB/s | | sharing: 0.000 (0.0 MB up / 11.8 MB down) | | seeds: 11 seen now, plus 0.018 distributed copies | | peers: 0 seen now, 0.0% done at 1382.9 kB/s
Explanation
In the x86 assembly language, the TEST instruction performs a bitwise AND on two operands. The flags SF, ZF, PF, CF, OF and AF are modified while the result of the AND is discarded. There are 9 different opcodes for the TEST instruction depending on the type and size of the operands. It can compare 8bit, 16bit or 32bit values. It can also compare registers, immediate values and register indirect values.[1] source : http://en.wikipedia.org/wiki/TEST_(x86_instruction)