This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help with Code in Multiple Directories


On Fri, Mar 27, 2009 at 1:43 AM, Nirf <quicknir@gmail.com> 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
> sourcecodename.

Did you build your program with debugging info (the '-g' GCC option) ?

Cheers,
-- 
Paul Pluzhnikov


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]