eclipse-cdt-cloud / cdt-gdb-adapter

CDT GDB Debug Adapter
Eclipse Public License 2.0
27 stars 40 forks source link

Add support for setting the cwd of the gdb process #306

Closed jonahgraham closed 9 months ago

jonahgraham commented 9 months ago

For some use cases the executable being debugged expects to find its sources relative to the current working directory ($cwd) instead of the compilation directory ($cdir).

This can happen in a couple of circumstances:

  1. The source and executable have been moved from the location it was compiled from.
  2. The compiler did not save the compilation directory for the given file.

The compilation directory can be examined with "info source" in the GDB debugger console.