This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: how to determine location of source?
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Brendan Miller <catphive at catphive dot net>
- Cc: gdb at sourceware dot org
- Date: Mon, 2 Mar 2009 17:04:51 -0800
- Subject: Re: how to determine location of source?
- References: <ef38762f0903021656x66ea7a4ye8528c7a888a5ef3@mail.gmail.com>
> 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