From: Daniel Jacobowitz <drow@false.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: RFC: Improve support for "debugging" unlinked objects
Date: Thu, 09 Jun 2005 13:17:00 -0000 [thread overview]
Message-ID: <20050609131722.GA965@nevyn.them.org> (raw)
In-Reply-To: <uzmu08a9m.fsf@gnu.org>
On Thu, Jun 09, 2005 at 06:44:05AM +0300, Eli Zaretskii wrote:
> > Date: Wed, 8 Jun 2005 17:49:56 -0400
> > From: Daniel Jacobowitz <drow@false.org>
> >
> > If you compile a file containing both code and initialized data, and load
> > the unlinked object (.o) file using GDB, "print Variable" won't work.
>
> In what situations would such a method (loading an unlinked object
> file) be useful? I don't see it documented anywhere in the manual, so
> I'd like to consider saying a few words about when and how to do that.
It's useful for examination: you can disassemble functions and inspect
variables. Also, with a fix that I'm going to commit to bfd soon, you
can use "gdb -write" to patch an object file.
Note that it's not _very_ useful, because gdb can neither interpret nor
modify relocations. So branches and some initialized variables will
appear to go to the wrong place. But it's still handy from time to
time.
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-06-09 13:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-08 21:50 Daniel Jacobowitz
2005-06-09 3:44 ` Eli Zaretskii
2005-06-09 13:17 ` Daniel Jacobowitz [this message]
2005-06-09 19:50 ` Eli Zaretskii
2005-06-09 19:51 ` Daniel Jacobowitz
2005-06-10 20:10 ` Michael Snyder
2005-06-13 16:15 ` Daniel Jacobowitz
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=20050609131722.GA965@nevyn.them.org \
--to=drow@false.org \
--cc=eliz@gnu.org \
--cc=gdb-patches@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