Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Brendan Miller <catphive@catphive.net>
Cc: gdb@sourceware.org
Subject: Re: how to determine location of source?
Date: Tue, 03 Mar 2009 01:05:00 -0000	[thread overview]
Message-ID: <20090303010451.GM3632@adacore.com> (raw)
In-Reply-To: <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


  reply	other threads:[~2009-03-03  1:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-03  0:57 Brendan Miller
2009-03-03  1:05 ` Joel Brobecker [this message]
     [not found]   ` <ef38762f0903021735v54143dd4ga38ed350616357a2@mail.gmail.com>
2009-03-03  1:39     ` Fwd: " Brendan Miller
2009-03-03  1:52       ` Joel Brobecker
2009-03-03  2:22         ` Brendan Miller
2009-03-03  2:39           ` Joel Brobecker
     [not found]             ` <ef38762f0903021927oe1429aakef0d6971ef9be5@mail.gmail.com>
2009-03-03  3:27               ` Fwd: " Brendan Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090303010451.GM3632@adacore.com \
    --to=brobecker@adacore.com \
    --cc=catphive@catphive.net \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox