Walk agents through GDB sessions from first launch to advanced workflows: crash diagnosis, reverse debugging, remote debugging, and multi-thread inspection.
Always compile with -g (GCC/Clang). Use -Og or -O0 for most debuggable code.
For release builds: use -g -O2 and keep the binary with symbols (strip separately with objcopy).
C/C++ 프로그램용 GDB 디버거 기술. GDB 세션 시작, 중단점 설정, 코드 단계별 실행, 변수 검사, 충돌 디버깅, 역방향 디버깅(기록/재생) 사용, gdbserver를 통한 원격 디버깅 또는 코어 덤프 로드 시 사용합니다. GDB 명령, segfault, 정지, 감시점, 조건부 중단점, 프리티 프린터, Python GDB 스크립팅 또는 다중 스레드 디버깅에 대한 쿼리에서 활성화됩니다. 출처: mohitmishra786/low-level-dev-skills.