# gdb: (No debugging symbols found in ./app)

**Code:** `no debugging symbols` · **Category:** C/C++ · **Seen on:** C/C++, GDB, Linux

gdb can load the program but there is no debug information, so it cannot show source lines or variable names.

## Meaning

Debug info is added by compiling with `-g`. Release builds, `-s` (strip) or build systems that default to `-O2` without `-g` leave only machine addresses.

## Common causes

- Compiled without `-g`
- Binary stripped
- CMake `CMAKE_BUILD_TYPE=Release`
- Debug symbols in a separate `.debug` file not installed

## Quick fix

1. Rebuild with `-g -O0` (or `RelWithDebInfo`)
2. Install the `-dbgsym` / debuginfo package
3. Do not run `strip` on binaries you want to debug

## Detailed fix by platform

### GCC

1. `g++ -g -O0 main.cpp -o app`

### CMake

1. `cmake -DCMAKE_BUILD_TYPE=Debug ..`

## How to diagnose

1. **Flag** — -g used?
2. **Strip** — Binary stripped?
3. **Type** — Build type?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/cpp/gdb-no-debugging-symbols-found)
