Advertisement
Guest User

Untitled

a guest
Aug 14th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. For help, type "help".
  2. Type "apropos word" to search for commands related to "word"...
  3. "/Users/persev/Desktop/oscp_gym/asm/./HelloWorld.asm": not in executable format: File format not recognized
  4. (gdb) exit
  5. Undefined command: "exit".  Try "help".
  6. (gdb) quit
  7. mlds-MacBook-Pro:asm persev$ disas HelloWorld
  8. -bash: disas: command not found
  9. mlds-MacBook-Pro:asm persev$ gdb HelloWorld
  10. GNU gdb (GDB) 8.1
  11. Copyright (C) 2018 Free Software Foundation, Inc.
  12. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  13. This is free software: you are free to change and redistribute it.
  14. There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  15. and "show warranty" for details.
  16. This GDB was configured as "x86_64-apple-darwin17.3.0".
  17. Type "show configuration" for configuration details.
  18. For bug reporting instructions, please see:
  19. <http://www.gnu.org/software/gdb/bugs/>.
  20. Find the GDB manual and other documentation resources online at:
  21. <http://www.gnu.org/software/gdb/documentation/>.
  22. For help, type "help".
  23. Type "apropos word" to search for commands related to "word"...
  24. Reading symbols from HelloWorld...(no debugging symbols found)...done.
  25. (gdb) disas main
  26. Dump of assembler code for function main:
  27.    0x0000000100000f96 <+0>: mov    $0x2000004,%eax
  28.    0x0000000100000f9b <+5>: mov    $0x1,%edi
  29.    0x0000000100000fa0 <+10>:    movabs $0x100001000,%rsi
  30.    0x0000000100000faa <+20>:    mov    $0xd,%edx
  31.    0x0000000100000faf <+25>:    syscall
  32.    0x0000000100000fb1 <+27>:    mov    $0x2000001,%eax
  33.    0x0000000100000fb6 <+32>:    syscall
  34. End of assembler dump.
  35. (gdb) disas -r main
  36. No symbol table is loaded.  Use the "file" command.
  37. (gdb) disas /r main
  38. Dump of assembler code for function main:
  39.    0x0000000100000f96 <+0>: b8 04 00 00 02  mov    $0x2000004,%eax
  40.    0x0000000100000f9b <+5>: bf 01 00 00 00  mov    $0x1,%edi
  41.    0x0000000100000fa0 <+10>:    48 be 00 10 00 00 01 00 00 00   movabs $0x100001000,%rsi
  42.    0x0000000100000faa <+20>:    ba 0d 00 00 00  mov    $0xd,%edx
  43.    0x0000000100000faf <+25>:    0f 05   syscall
  44.    0x0000000100000fb1 <+27>:    b8 01 00 00 02  mov    $0x2000001,%eax
  45.    0x0000000100000fb6 <+32>:    0f 05   syscall
  46. End of assembler dump.
  47. (gdb)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement