This is the mail archive of the
mailing list for the GDB project.
Re: Help with Code in Multiple Directories
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: Nirf <quicknir at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Fri, 27 Mar 2009 08:33:09 -0700
- Subject: Re: Help with Code in Multiple Directories
- References: <email@example.com>
On Fri, Mar 27, 2009 at 1:43 AM, Nirf <firstname.lastname@example.org> wrote:
> I'm trying to get started with GDB but am having great trouble.
On what platform? Using which version of GDB?
Note that on Linux, or any other platform that uses DWARF
debug format, you shouldn't need to specify 'directory ...'
at all if you build and debug on the same machine: compiler
already supplies all the info GDB needs to find sources
regardless of where in file system they are located.
> However when I type in a command like "list sourcecodename:5" it does not
> find the source code regardless of which file name I insert for
Did you build your program with debugging info (the '-g' GCC option) ?