>> lscpu
>> cat /proc/cpuifo
# First attach gdp to a running process
>> gdp /bin/bash
# set a break point
>> (gdb) break main
# See all CPU registers
>> (gdb) info registers
# See EAX in hex (General purpose flag)
>> (gdb) display /x $ax
>> (gdb) display /x $eax
>> (gdb) display /x $ax
>> (gdb) display /x $ah
>> (gdb) disassemble $eip
>> (gdb) info all-registers
>> (gdb) set disassembly-flavor intel
# Get proccess pid
>> ps | grep <process name>
>> cat /proc/<pid>/maps
OR
>> pmap -d <pid>
OR Attach the process to GDB
>> (gdb) info proc mappings
>> vim /usr/include/i386-linux-gnu/asm/unistd_32.h
>> man 2 <func name>
# e.g.
>> man 2 write
# building
>> nasm -f elf32 hello_world.asm -o hello_world.o
# linking
>> ld hello_world.o -o HelloWorld
# running
>> ./HelloWorld
# Debugging
>> gdb ./HelloWorld
>> (gdb) break _start
>> (gdb) run
>> (gdb) set disassembly-flavor intel
>> (gdb) disassemble
>> (gdb) info registers
>> (gdb) stepibb