This is the mail archive of the
mailing list for the GDB project.
Re: For example only, updated Windows DLL support and gdbserver DLL support
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: drow at false dot org (Daniel Jacobowitz)
- Cc: gdb-patches at sourceware dot org, pedro_alves at portugalmail dot pt (Pedro Alves)
- Date: Tue, 19 Jun 2007 21:05:51 +0200 (CEST)
- Subject: Re: For example only, updated Windows DLL support and gdbserver DLL support
Daniel Jacobowitz wrote:
> Ulrich, what do you think - would this work for AIX solib support?
The general idea looks good to me; in particular I think the segment
relocation approach should be suitable for AIX.
One thing I don't quite like is this:
> + case TARGET_OBJECT_LIBRARIES:
> + if (core_vec->xfer_shared_libraries != NULL)
> + return core_vec->xfer_shared_libraries (ops, object, annex, readbuf,
> + writebuf, offset, len);
I had understood the core_fns method of providing a core file target to
be deprecated, and in fact I just recently got rid of it for AIX in favour
of the gdbarch_regset_from_core_section callback ... I'd prefer this to
be a gdbarch callback (which would also support core file cross-debugging).
The build dependency on libexpat may be a bit annoying on AIX, but I guess
we'll just have to live with that anyway.
The one big unresolved problem (but that was also still unresolved with my
other approach) is the way AIX handles library archives. It is possible
to use an archive (.a) member as shared library; the operating system
loader will report a pair of file name and member name to identify
the "shared object".
The current rs6000-nat.c code uses this to open such an object:
/* make sure we have an object file */
if (bfd_check_format (abfd, bfd_object))
vp = map_vmap (abfd, 0);
else if (bfd_check_format (abfd, bfd_archive))
last = 0;
/* FIXME??? am I tossing BFDs? bfd? */
while ((last = bfd_openr_next_archived_file (abfd, last)))
if (DEPRECATED_STREQ (mem, last->filename))
warning (_("\"%s\": member \"%s\" missing."), objname, mem);
if (!bfd_check_format (last, bfd_object))
warning (_("\"%s\": member \"%s\" not in executable format: %s."),
objname, mem, bfd_errmsg (bfd_get_error ()));
It looks like the only way to get this to work within the regular solib
framework would be to actually teach solib.c itself about this form of
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE