A short example of what you can do to see some things about your program. $ is a shell prompt, and gdb> is a gdb prompt, so don't type those:
$ gdb myprogram ... info about gdb and myprogram gdb> disas main ... disassembly of the main function gdb> break main ... sets a breakpoint in main; you see a message about this probably calling it breakpoint 1 gdb> run ... program starts and stops immediately at the start of main gdb> ir ... lots of info about register contents gdb> p $rip ... current instruction pointer (assuming x86_64) gdb> s ... program runs for one source line. gdb> p $rip ... ip has advanced a bit.
source share