When debugging with GDB fails, first identify which workflow you are using: a local executable, a live remote target, or a core-file investigation. Check that GDB has the right executable and symbols, then match the error to how the program is being run. The exact error text, GDB version, operating system, target architecture, build settings, and launch command are essential for choosing a specific fix.
Start by checking the executable and symbols
GDB needs the program file to read its symbol table. Without the right executable and debugging information, it may still inspect a process or target, but source-level names and locations can be missing or misleading. The official GDB files documentation explains how executable, symbol, and core files are used.
For a local program, start GDB with the executable or load it from the prompt:
gdb programstarts GDB withprogram.file programselects the executable in an existing GDB session.symbol-file filereads symbols from a specified file.
Confirm that the executable matches the build you are trying to debug. If the executable lacks debugging information, or belongs to a different build than the running program, GDB may not be able to map execution back to the expected source and symbols.
#1 Best Overall
Why does GDB say the remote target does not support run?
The error The "remote" target does not support "run". Try "help target" or "continue" describes a target limitation, not necessarily a broken GDB session. The official remote-debugging documentation distinguishes connecting to a remote target from launching a normal local process. Some targets cannot run GDB in its usual way; small systems and kernels are examples, and some environments do not have a conventional process concept.
For a connected remote target, use continue to resume execution. Depending on the target and setup, you may need to transfer the program first with load. Follow the instructions for the target connection you established rather than assuming run will launch a process remotely. A bare-board target may not provide a core-dump facility.
Rank #2
- Used Book in Good Condition
Why is my GDB breakpoint pending or not stopping?
A pending breakpoint means GDB could not resolve the requested location yet. This can be expected when the relevant shared library or its symbols are not loaded. GDB reevaluates pending breakpoints as shared libraries load and unload; a breakpoint can resolve once the matching symbol or source line becomes available. The breakpoint documentation describes the set breakpoint pending setting, which controls whether GDB asks, creates pending breakpoints automatically, or declines unresolved ones.
To narrow down a breakpoint that does not resolve or does not stop execution:
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
- Used Book in Good Condition
- Run
info breakpointsto inspect its current status and location. - Check that the function name, source file, and line number are correct for the executable and libraries actually loaded.
- If the code is in a shared library, check whether that library has loaded before expecting the breakpoint to resolve.
- For overloaded C++ functions, verify that the requested name identifies the intended location; one name can match multiple locations.
If the location is valid but its code is not loaded yet, keeping the breakpoint pending may be appropriate. If it remains unresolved after the relevant code is available, recheck the requested name and the symbols GDB has loaded.
How do I troubleshoot a core file that shows the wrong state or is ignored?
A core file is a saved record of process memory and status for post-mortem debugging. It does not replace the executable: GDB uses the executable for program and symbol information and the core for saved memory. Open the matching executable and core together with gdb program core, or select the core in an existing session with core-file core. See the official core-file documentation.
Rank #4
If GDB ignores the core file while a program is still running under GDB, terminate that child process before switching to core analysis. Also verify that the core belongs to the executable you supplied; mismatched files can make the saved state or symbols appear inconsistent. Core-file availability and completeness depend on the environment, and remote bare-board targets may have no core-dump facility.
Choose the workflow that matches the program state
| Situation | What GDB needs | Typical next action |
|---|---|---|
| Local program you want to launch | The executable and its available symbols | Start with gdb program, then use the local execution workflow. |
| Connected remote target | A working target connection and the program appropriate to that target | Use continue; use load first if required by the setup. |
| Program has crashed and you have a core | The matching executable and the core file | Open them together with gdb program core, or load the core with core-file. |
| Breakpoint location is not available yet | A valid location and symbols when the relevant code is loaded | Inspect with info breakpoints; a pending breakpoint may resolve when a shared library loads. |
What information is needed to diagnose a specific GDB failure?
General documentation cannot identify the cause of an unspecified failure. Include the exact error text and the details that distinguish the workflows:
Recommended Free Tools
Best Value
- Used Book in Good Condition
- GDB version and operating system.
- Target architecture and whether the session is local, attached to a process, core-based, or remote.
- The exact command used to start GDB and any commands entered before the failure.
- Compiler and debugging-symbol settings, plus whether the executable and any core file match the build being investigated.
- For a breakpoint issue, the requested function or source location and whether its library is loaded.
The GNU Project’s GDB documentation page also notes that GNU Press offers printed versions of most manuals, including Debugging with GDB.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

