Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [0/8] solib handler rework
@ 2007-10-19 21:32 Ulrich Weigand
  2007-10-22  3:31 ` Joel Brobecker
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Ulrich Weigand @ 2007-10-19 21:32 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 25+ messages in thread
* RE: i386-nto support (was: Re: [0/8] solib handler rework)
@ 2007-10-31 18:42 Aleksandar Ristovski
  0 siblings, 0 replies; 25+ messages in thread
From: Aleksandar Ristovski @ 2007-10-31 18:42 UTC (permalink / raw)
  To: Ulrich Weigand, mark.kettenis; +Cc: kevinb, gdb-patches

Yes, nto platform is alive. We have a gdb 6.7 based gdb on our community
portal. 

Ulrich, thank you for pointing that out and fixing i386-nto for us. We will
get actively involved as of now.

Regards,

Aleksandar

-----Original Message-----
From: Ulrich Weigand [mailto:uweigand@de.ibm.com] 
Sent: October 29, 2007 4:03 PM
To: mark.kettenis@xs4all.nl
Cc: kevinb@redhat.com; gdb-patches@sourceware.org
Subject: i386-nto support (was: Re: [0/8] solib handler rework)

> > Date: Wed, 24 Oct 2007 23:29:54 +0200 (CEST)
> > From: "Ulrich Weigand" <uweigand@de.ibm.com>
> > 
> > 6: No comments received.  However, since i386-nto-tdep.c didn't even
> >    compile before my changes, I didn't think I would ...
> 
> We probably should simply drop that platform.

Hmmm, it still seems to be in active use; on qnx.com there is a development
toolchain for download that includes a GDB based on 6.6.

It would certainly be nice if we'd have more active involvement of the
QNX folks in mainline GDB ...

Bye,
Ulrich

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


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2007-10-31 18:06 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-19 21:32 [0/8] solib handler rework Ulrich Weigand
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
2007-10-31 18:42 Aleksandar Ristovski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox