Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Jim Blandy <jimb@redhat.com>
Cc: Kevin Buettner <kevinb@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [ppc64-linux] gdbarch hook to find true execution entry point
Date: Tue, 01 Jul 2003 22:53:00 -0000	[thread overview]
Message-ID: <3F0210EA.8050009@redhat.com> (raw)
In-Reply-To: <vt2isqn2n7k.fsf@zenia.home>

> - Can infcall.c instead explicitly call CONVERT_FROM_FUNC_PTR_ADDR on
>> CALL_DUMMY_ADDRESS, or better, have entry_point_address do this?  It
>> would help eliminate CALL_DUMMY_ADDRESS.
> 
> 
> I'm not sure I understand enough of the details to say anything about
> this.  Why isn't infcall.c just using entry_point_address right now?

Unfortunatly, a number of targets, such as PowerPC 64 GNU/Linux, have 
added custom CALL_DUMMY_ADDRESS methods :-(

My original concern here was that CALL_DUMMY_ADDRESS, 
CONVERT_FROM_FUNC_PTR_ADDR, and this new architecture method all 
appeared to be doing roughly the same thing.

Can at PowerPC 64 GNU/Linux's CALL_DUMMY_ADDRESS be eliminated?

> So, given a function descriptor at VMA bfd_get_start_address(), there
>> are two possible code addresses:
>> 
>> - The relocated address found by reading the descriptor from the target.
>> This is CONVERT_FROM_FUNC_PTR_ADDR (bfd_get_start_address(), target memory)?
>> 
>> - The un-relocated address found by reading the descriptor from the bfd.
>> This is CONVERT_FROM_FUNC_PTR_ADDR (bfd_get_start_address(), use bfd
>> memory)?
>> 
>> and the two values are different.  Hence the new method.
> 
> 
> That's the important difference, yes.  The trick the solib code uses
> to find the dynamic linker's load offset really does need the
> unrelocated address --- the amount by which it would need to be
> relocated is exactly what we're computing there.

So technically, CONVERT_FROM_FUNC_PTR_ADDR should be modified to take a 
memory accessor method (bfd or the target).  That would require a major 
target stack overhaul though, outch :-(

This leaves either GDB or BFD needing this method.  I guess, for the 
moment, GDB gets it, but can it at least be called something meaningful?

A guess is CONVERT_FROM_BFD_CODE_PTR_ADDR(entry_point, bfd)?  Better? 
ENTRY_POINT_FROM_BFD? (I believe FUNC in the above should have been CODE?).

Your also going to need documentation.

Andrew



  reply	other threads:[~2003-07-01 22:53 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
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 [this message]
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=3F0210EA.8050009@redhat.com \
    --to=ac131313@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@redhat.com \
    --cc=kevinb@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