linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Glynn Clements <glynn@gclements.plus.com>
To: Shriramana Sharma <samjnaa@gmail.com>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: How did KDbg find out the source corresponding to my executable?
Date: Fri, 4 May 2007 14:34:22 +0100	[thread overview]
Message-ID: <17979.13918.156651.96290@cerise.gclements.plus.com> (raw)
In-Reply-To: <4632116C.70109@gmail.com>


Shriramana Sharma wrote:

> Just a few minutes ago, I tried KDbg, the KDE front-end to gdb. (The 
> change in position of g between the two names amuses me for some reason.)
> 
> When I selected an executable which was located at a location different 
> from its source, KDbg automatically found out the location of the 
> source-file and opened it for setting breakpoints etc.
> 
> Is the path to the source embedded in every executable?

It's part of the debug info, so it will be present in an executable
which was built with debug info and hasn't subsequently been stripped.

> Upon examining 
> the executable by nm for symbols I did not find the source path, but 
> maybe that is not a symbol.

It's not a symbol.

Run "strings -a ..." on the file.

-- 
Glynn Clements <glynn@gclements.plus.com>

      reply	other threads:[~2007-05-04 13:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-27 15:06 How did KDbg find out the source corresponding to my executable? Shriramana Sharma
2007-05-04 13:34 ` Glynn Clements [this message]

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=17979.13918.156651.96290@cerise.gclements.plus.com \
    --to=glynn@gclements.plus.com \
    --cc=linux-c-programming@vger.kernel.org \
    --cc=samjnaa@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).