Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: gdb-patches@sourceware.org
Subject: [0/8] solib handler rework
Date: Fri, 19 Oct 2007 21:32:00 -0000	[thread overview]
Message-ID: <200710192131.l9JLVYuv002496@d12av02.megacenter.de.ibm.com> (raw)

Hello,

one of the last remaining obstacles to enabling supporting multiple
targets at the same time the current_target_so_ops global variable.
Each variant of shared library handler currently set that variable
in its initialization function, making it impossible to link more
than one shared library handler into a single GDB binary.

This series of patches fixes this problem by moving selection of
the proper shared library handler to the target architecture; the
approriate gdbarch init function will call set_solib_ops.

One twist is that some solib handlers cannot even be compiled 
except on the native configuration, because they make use of
platform specific header files or libraries.  This patch series
does not fix this problem, but at least stops it hurting other
platforms.  After the patch series is applied, there are two
classes of solib handlers:

- Native-only solib: File is compiled and linked only in native
  configurations (via NATDEPFILES), it installs itself via the
  global current_target_so_ops, and there are no references from
  any tdep file to the solib file.

- Cross-platform solib: File can be compiled and linked on an
  arbitrary host platform; it *is* compiled and linked on both
  cross and native configurations (via TDEPFILES), it does *not*
  touch current_target_so_ops.  There *may* be references from
  tdep files (for the same configuration) to the solib file.


This implies that any cross-debugger configuration will be able
to debug shared libraries correctly, as long as the target system
uses a cross-platform solib.  In the future, it will be possible
to build multi-target configurations that support multiple
different solib handlers simultaneously.


After the patch series is applied, the only remaining native-only
solib handlers will in fact be solib-sunos and solib-osf.  Those
could probably converted to cross-platform handlers as well, by
removing dependencies on native header files.  I'll leave that
part to someone who has access to those platforms ...


The whole series was tested on s390-linux, s390x-linux, powerpc-
linux, i386-linux, and ia64-linux.   Tests on other affected
platforms would be welcome: alpha-linux, arm-wince, arm-linux,
i386-gnu, i386-cygwin, i386-nto, m32r-linux, hppa-hpux (32-bit
and 64-bit), mips-irix, and frv.

OK to apply to mainline?

Bye,
Ulrich
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


             reply	other threads:[~2007-10-19 21:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-19 21:32 Ulrich Weigand [this message]
2007-10-22  3:31 ` Joel Brobecker
2007-10-22  4:17   ` Joel Brobecker
2007-10-22 18:47     ` Joel Brobecker
2007-10-22 20:42       ` Ulrich Weigand
2007-10-24  6:38         ` Joel Brobecker
2007-10-24  7:59           ` Joel Brobecker
2007-10-24 11:48             ` Daniel Jacobowitz
2007-10-24 19:29               ` Eli Zaretskii
2007-10-24 19:21             ` Eli Zaretskii
2007-10-24 19:23               ` Joel Brobecker
2007-10-22 13:44   ` Ulrich Weigand
2007-10-22 17:51     ` Joel Brobecker
2007-10-22 20:03       ` Ulrich Weigand
2007-10-24  6:05         ` Joel Brobecker
2007-10-24 21:25           ` Ulrich Weigand
2007-10-22 10:00 ` Pedro Alves
2007-10-23 10:16   ` Pedro Alves
2007-10-23 13:12     ` Ulrich Weigand
2007-10-24 13:03 ` Daniel Jacobowitz
2007-10-24 15:46 ` Kevin Buettner
2007-10-24 22:02   ` Ulrich Weigand
2007-10-25  8:12     ` Mark Kettenis
2007-10-29 20:06       ` i386-nto support (was: Re: [0/8] solib handler rework) Ulrich Weigand

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=200710192131.l9JLVYuv002496@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gdb-patches@sourceware.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