Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Jerome Guitton <guitton@adacore.com>
Cc: Paul Pluzhnikov <ppluzhnikov@google.com>, gdb@sourceware.org
Subject: Re: add-symbol-file/load and scripts
Date: Tue, 02 Jun 2009 17:26:00 -0000	[thread overview]
Message-ID: <e394668d0906021026p63f63d34m3b849afbc7f53a60@mail.gmail.com> (raw)
In-Reply-To: <20090602170414.GL3029@adacore.com>

On Tue, Jun 2, 2009 at 10:04 AM, Jerome Guitton <guitton@adacore.com> wrote:
> Paul Pluzhnikov (ppluzhnikov@google.com):
>
>> On Tue, Jun 2, 2009 at 9:27 AM, Jerome Guitton <guitton@adacore.com> wrote:
>>
>> > the text's address, as initialized
>> > in the symbol file itself, would be the appropriate defaut.
>>
>> AFAIU, on any UNIX system it would be appropriate default *only* for ET_EXEC.
>> For non-prelinked ET_DYN, one needs to add the base load address.
>
> Thank you for pointing this out! This definitely rules out the first
> solution.
>
> So, what about the second possibility? (That is to say: when it is
> possible, setting a convenience variable to the start address after
> load).

With a better scripting language with better tools for access to elf
files (a small subset of all of the various kinds of things one would
like to be able to script better), one could pass the .elf file to a
function and it would return the desired value.

add-symbol-file foo.elf $elf.load_address ("foo.elf")    # [just
winging syntax here, it's subordinate to the main point]


  reply	other threads:[~2009-06-02 17:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-02 16:27 Jerome Guitton
2009-06-02 16:48 ` Paul Pluzhnikov
2009-06-02 17:04   ` Jerome Guitton
2009-06-02 17:26     ` Doug Evans [this message]
2009-06-02 18:41       ` Paul Pluzhnikov
2009-06-02 19:40         ` 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=e394668d0906021026p63f63d34m3b849afbc7f53a60@mail.gmail.com \
    --to=dje@google.com \
    --cc=gdb@sourceware.org \
    --cc=guitton@adacore.com \
    --cc=ppluzhnikov@google.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