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