Ahmed Mohamed
Posted on June 28, 2023
After have Postgres configured with enabling debugging flags and a running Postgres instance. An open session running and age extension is loaded
- Get PID of the current session
SELECT pg_backend_pid();
- Open new terminal tab and run
sudo gdb
to run the debugger - Attach gdb to to the PID that we got from the previous step e.g. PID: 123
(gdb) attach 123
- Add a break point to a specific line or function at some where
(gdb) b <function_name>
The following are The basic GDB commands:
- b for breakpoint, (b )
- c for continue - continues to the next breakpoint
- n for next line
- s for step into
- p for print, (p *) for pointers
- d for delete all breakpoints
- q for quit
Ref:
apache age repo
GDB Docs
💖 💪 🙅 🚩
Ahmed Mohamed
Posted on June 28, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.