Search notes:

GDB (GNU debugger)

Some commands:
Setting the syntax of disassembled code:
set disassembly-flavor intel
Compare with

Python

gdb is built with a python interpreter.
For example, existing breakpoints can be displayed with
(gdb) python print(gdb.breakpoints())
(gdb) python print(gdb.breakpoints()[0].location)

See also

/usr/include/sys/user.h
Apparently, on Linux, gdb used ptrace to debug a program.
gcc -ggdb

Index