Advertisement
Guest User

Untitled

a guest
Jul 31st, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. $ gdb ./test
  2. Reading symbols from ./test...done.
  3. (gdb) break main
  4. Breakpoint 1 at 0x4005c1
  5. (gdb) run
  6. Starting program: /home/fcuny/workspace/tmp/file/test
  7.  
  8. Breakpoint 1, 0x00000000004005c1 in main ()
  9. (gdb) disassemble
  10. Dump of assembler code for function main:
  11. 0x00000000004005bd <+0>: push %rbp
  12. 0x00000000004005be <+1>: mov %rsp,%rbp
  13. => 0x00000000004005c1 <+4>: sub $0x10,%rsp
  14. 0x00000000004005c5 <+8>: mov $0x400694,%esi
  15. 0x00000000004005ca <+13>: mov $0x400696,%edi
  16. 0x00000000004005cf <+18>: callq 0x4004b0 <fopen@plt>
  17. 0x00000000004005d4 <+23>: mov %rax,-0x8(%rbp)
  18. 0x00000000004005d8 <+27>: cmpq $0x0,-0x8(%rbp)
  19. 0x00000000004005dd <+32>: jne 0x4005f0 <main+51>
  20. 0x00000000004005df <+34>: mov $0x4006a1,%edi
  21. 0x00000000004005e4 <+39>: callq 0x4004c0 <perror@plt>
  22. 0x00000000004005e9 <+44>: mov $0x1,%eax
  23. 0x00000000004005ee <+49>: jmp 0x400601 <main+68>
  24. 0x00000000004005f0 <+51>: mov -0x8(%rbp),%rax
  25. 0x00000000004005f4 <+55>: mov %rax,%rdi
  26. 0x00000000004005f7 <+58>: callq 0x400480 <fclose@plt>
  27. 0x00000000004005fc <+63>: mov $0x0,%eax
  28. 0x0000000000400601 <+68>: leaveq
  29. 0x0000000000400602 <+69>: retq
  30. End of assembler dump.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement