Mind Dump, Tech And Life Blog
written by Ivan Alenko
published under license Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)copy! share!
posted at 08. Jul '20

Debugging With GDB

Run program with arguments:

gdb --args getent passwd xxx

Commands:

break function_name()
start
continue/c (to next breakpoint)
next/n (next line)
enter (repeat the last command)

Compile with -g -ggdb -O0 to have debug symbols and more.

Add Comment