0

I'm working with UBUNTU 16.04 Complied with gcc -g I've tried to look for answers for that and couldn't find.

  • 2
    Welcome to SO! Please take the [tour] and read "[ask]". Then please come back and [edit] your question, showing us what you tried, at best with a [example], and what happens against your expectations. – the busybee Apr 29 '20 at 10:37

1 Answers1

0

when executing DDD (aka gdb with extensions) the source code must be visible from the directory where the DDD is executed. The easiest way to have both the source and the executable in the same directory.

However, there are some commands that can be given to DDD to tell it where the source code is located.

Also, when the debugger is GDB or DDD, then for maximum flexibility instead of -g use -ggdb3

The source directory can be set with the command line parameter:

--directory=DIR    Search for source files in DIR.
user3629249
  • 16,402
  • 1
  • 16
  • 17