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: how to determine location of source?


> According to documentation I read, debug binaries have the location of
> the source embedded in them. How do I extract this location from the
> binary? Can GDB do this?

I haven't need this type of info much, but "info sources" has been
handy sometimes.

> Also, is there an environment variable or config file that can control
> the directories that source is looked for in?

There are several ways of doing this depending of what you are trying
to do. There is the "dir" command. But perhaps you have moved the
sources elsewhere, and want to translate the encoded source locations
into your new location. Have a look at "set substitute-path".
That's as much as remember off the top of my head.

PS: Sounds like you could benefit greatly from reading the GDB
    documentation. Best advice I ever received in my first year
    of Engineering School.

-- 
Joel


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