Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Randolph Chung <tausq@debian.org>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA/hpux] SEGV when running program using dlopen
Date: Wed, 15 Dec 2004 17:27:00 -0000	[thread overview]
Message-ID: <20041215170602.GB29171@tausq.org> (raw)
In-Reply-To: <20041215165738.GQ964@adacore.com>

> The answer is in the body of lookup_minimal_symbol_solib_trampoline().
> 
> It iterates over all msymbols of the objfile, and returns the first
> one whose name matches *and* whose ``MSYMBOL_TYPE (msymbol) ==
> mst_solib_trampoline''. See minsyms.c, around line 353.
> 
> Since in our case, the symbol we're looking for is not inside
> a shared library, the lookup always fails.

hrm, i see....

> I was also wondering whether the current code might be working
> by pure luck in the other case. Assuming that the objfile contains
> two symbols (one stub, one function) in the shared library, what
> guaranty do we have that the lookup will find the one we're looking
> for?

yeah, seems a bit bogus :) i think it works only because export stubs
normally occur earlier in a file than the real function; but i suppose
that doesn't have to be the case.

> AFAIK, it provides some help in debugging by exporting some specified
> symbols. The only use I know of if with shared libraries...

ok, thanks. your patch looks good; i'm still wondering if we should have
unified logic to search for (export|import) stubs... but that's for
later.

thanks,
randolph
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/


  reply	other threads:[~2004-12-15 17:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-15  9:20 Joel Brobecker
2004-12-15 17:14 ` Randolph Chung
2004-12-15 17:23   ` Joel Brobecker
2004-12-15 17:27     ` Randolph Chung [this message]
2004-12-15 18:29       ` Joel Brobecker
2004-12-17  7:15       ` Joel Brobecker
2004-12-17  7:44         ` Randolph Chung
2004-12-17 19:22           ` Joel Brobecker

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=20041215170602.GB29171@tausq.org \
    --to=tausq@debian.org \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sources.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