From: Kevin Buettner <kevinb@redhat.com>
To: Jim Blandy <jimb@redhat.com>, Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [ppc64-linux] gdbarch hook to find true execution entry point
Date: Fri, 13 Jun 2003 22:48:00 -0000 [thread overview]
Message-ID: <1030613224805.ZM7628@localhost.localdomain> (raw)
In-Reply-To: Jim Blandy <jimb@redhat.com> "Re: [ppc64-linux] gdbarch hook to find true execution entry point" (Jun 13, 5:32pm)
On Jun 13, 5:32pm, Jim Blandy wrote:
> > What cases do you know of where calling bfd_get_start_address() is
> > insufficient for finding the start address? I'm wondering if we
> > need a gdbarch hook at all...
>
> The comment on the gdbarch.sh entry is supposed to explain why it's
> necessary. I've expanded it a bit; is it clearer? Is there someplace
> else I should put it?
I probably missed the comment in your original patch. But what you
wrote below looks good to me.
> + # The actual instruction address at which ABFD would begin execution.
> + # If ABFD is position-independent code, this address is not relocated;
> + # it's the address at which execution would begin if the file were
> + # loaded at its sections' vmas.
> + #
> + # On most architectures, this is simply bfd_get_start_address. But on
> + # some (like 64-bit PPC), that points to a function descriptor, not an
> + # instruction. The descriptor contains the actual entry point, and
> + # other pointers needed to call the function.
> + m:1::CORE_ADDR:bfd_entry_point:bfd *abfd:abfd:::generic_bfd_entry_point::0
>
> Revised patch:
>
> 2003-06-11 Jim Blandy <jimb@redhat.com>
>
> * gdbarch.sh (gdbarch_bfd_entry_point): New gdbarch method.
> * arch-utils.c (generic_bfd_entry_point): New function.
> * arch-utils.h (generic_bfd_entry_point): New declaration.
> * gdbarch.c, gdbarch.h: Regenerated.
> * solib-svr4.c (enable_break): Call it, instead of accessing
> tmp_bfd->start_address directly.
The solib-svr4.c change is okay with me. If you can get Andrew on board
for the gdbarch changes, you're good to go. If you wind up implementing
it in bfd, consider the solib change to be pre-approved.
Kevin
next prev parent reply other threads:[~2003-06-13 22:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-11 13:21 Jim Blandy
2003-06-11 13:26 ` Andrew Cagney
2003-06-11 13:48 ` Andrew Cagney
2003-06-12 20:59 ` Jim Blandy
2003-06-12 22:25 ` Andrew Cagney
2003-06-11 23:11 ` Kevin Buettner
2003-06-13 22:31 ` Jim Blandy
2003-06-13 22:48 ` Kevin Buettner [this message]
2003-06-13 23:38 ` Andrew Cagney
2003-06-27 18:46 ` Andrew Cagney
2003-06-30 22:52 ` Jim Blandy
2003-07-01 22:53 ` Andrew Cagney
2003-08-28 22:48 ` Andrew Cagney
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=1030613224805.ZM7628@localhost.localdomain \
--to=kevinb@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@redhat.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