Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: PAUL GILLIAM <pgilliam@us.ibm.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] Fixes problem setting breakpoint in dynamic loader
Date: Thu, 25 May 2006 16:27:00 -0000	[thread overview]
Message-ID: <20060525022635.GA15026@nevyn.them.org> (raw)
In-Reply-To: <1148513171.315.104.camel@dufur.beaverton.ibm.com>

On Wed, May 24, 2006 at 04:26:11PM -0700, PAUL GILLIAM wrote:
> +	      interp_sect = bfd_get_section_by_name (tmp_bfd, ".plt");

> +	      interp_sect = bfd_get_section_by_name (tmp_bfd, ".opd");

Magic names...

> +	  if (interp_sect != 0)
> +	    {
> +	      /* Try to convert the function descriptor we found above, into
> +		 the address we need.  It will be relocated below by adding
> +		 "load_addr" to it. */
> +	      char *buf = alloca (sizeof (LONGEST));
> +	      if (bfd_get_section_contents (tmp_bfd, interp_sect, buf,
> +					    sym_addr - sect_offset,
> +					    sizeof (LONGEST)))
> +		sym_addr = extract_unsigned_integer (buf, sizeof (LONGEST));
> +	      else
> +		sym_addr = 0;
> +	    }
> +        }
> +

... and a magic load; you have no idea what the format of a function
descriptor is, at this point.

Can you make convert_from_func_ptr_addr do what you need?  It needs a
target_ops; conveniently you've got one (tmp_bfd_target).  Some targets
use a memory read function which honors the supplied target_ops, others
don't.  rs6000's doesn't so you'd need to fix that.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-05-25  2:26 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-25  2:26 PAUL GILLIAM
2006-05-25 16:27 ` Daniel Jacobowitz [this message]
2006-05-25 22:58   ` PAUL GILLIAM
2006-05-25 23:12     ` Daniel Jacobowitz
2006-05-27 17:52       ` PAUL GILLIAM
2006-06-23 21:33         ` PAUL GILLIAM
2006-06-23 21:48           ` Mark Kettenis
2006-06-26 22:21             ` PAUL GILLIAM
2006-06-26 22:28             ` PAUL GILLIAM
2006-06-26 23:55               ` Kevin Buettner
2006-06-26 18:48           ` Kevin Buettner
2006-06-17 20:21 ` Mark Kettenis
2006-07-06  1:01   ` PAUL GILLIAM
2006-07-06  2:57     ` Daniel Jacobowitz
2006-07-06 16:10     ` Kevin Buettner
2006-07-16 18:57     ` Andreas Schwab
2006-07-19 21:55       ` PAUL GILLIAM
  -- strict thread matches above, loose matches on Subject: below --
2007-04-27 20:59 [PATCH] " Thiago Jung Bauermann
2007-06-14 23:38 ` Joseph S. Myers
2007-06-20 13:15   ` Daniel Jacobowitz
2007-06-20 14:21     ` Daniel Jacobowitz
2007-06-22 14:07       ` Thiago Jung Bauermann
2007-06-20 14:39     ` Ulrich Weigand
2007-06-25 21:28     ` Ulrich Weigand
2007-07-03 15:58       ` Daniel Jacobowitz
2007-06-26 18:43     ` Joel Brobecker
2006-05-20  6:21 [PATCH] -var-update Nick Roberts
2006-05-20 16:34 ` Daniel Jacobowitz
2006-05-21  2:04   ` Nick Roberts
2006-05-21  5:22     ` Daniel Jacobowitz
2006-05-21 23:04       ` Nick Roberts
2006-05-25  0:21         ` Nick Roberts
2006-05-25  0:26           ` [patch] Fixes problem setting breakpoint in dynamic loader PAUL GILLIAM
2006-05-25  0:29             ` PAUL GILLIAM

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=20060525022635.GA15026@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=pgilliam@us.ibm.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