Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Randolph Chung <randolph@tausq.org>, Joel Brobecker <brobecker@gnat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch/rfa] hppa-linux target, 2nd try
Date: Wed, 28 Apr 2004 15:54:00 -0000	[thread overview]
Message-ID: <408FD3CA.1080500@gnu.org> (raw)
In-Reply-To: <20040425003004.GH2923@tausq.org>

>>> I actually started looking at that about 10 days ago, but it is hard for
>>> me to figure out what is going wrong, because I don't know too well the
>>> machinery for calling functions inside shared libraries. And then I got
>>> pre-empted by something else.
> 
> 
> ah, ok :)
> 
> the problem seems to be that gdb wants to jump directly to the malloc()
> (or whatever) shared lib function, whereas normally to do a shlib call
> you have to go through the import stub/plt (so that the r19/dp are
> set correctly).... not sure how to do that in gdb. 

Two^D^D^Dthree^D^D^D^Dfour FYIs,

On some GNU/Linux systems, GDB is know to call the wrong "malloc", 
there's apparently one in crt0.  The bug is in the shlib symbol lookup 
code not mimicing the shlib symbol lookup semantics.

There's NAME_OF_MALLOC in the architecture vector, it might help.

There was talk of parameterizing the inferior function call code with 
the full function symbol (and not just it's parameters) so that 
alternative abi's could be handled.  That doesn't seem to have got very 
far :-(

The 64-bit SVR4 PPC ABI code sets the DP register, see the tail end of 
ppc64_sysv_abi_push_dummy_call.

Andrew


>>> It's something that's on my reasonably-near-future list.
> 
> 
> cool, thanks.
> 
> randolph
> -- Randolph Chung Debian GNU/Linux Developer, hppa/ia64 ports http://www.tausq.org/ 



  reply	other threads:[~2004-04-28 15:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-24 19:26 Randolph Chung
2004-04-25  0:25 ` Joel Brobecker
2004-04-25  0:30   ` Randolph Chung
2004-04-28 15:54     ` Andrew Cagney [this message]
2004-04-25  6:07   ` Randolph Chung
2004-04-28 15:58 ` Andrew Cagney
2004-04-28 16:00   ` Randolph Chung
2004-04-28 20:53     ` 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=408FD3CA.1080500@gnu.org \
    --to=cagney@gnu.org \
    --cc=brobecker@gnat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=randolph@tausq.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