When conducting exploit development with pwntools you will often want to utilize the pwnlib gdb feature which will ease the usage of gdb and gdb scripts. Let's look into a simple example.
Assume that you have the following code you are analyzing:
// Compile: gcc -o /tmp/example -no-pie -fno-stack-protector example.c && chmod +x /tmp/example