From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7663 invoked by alias); 19 Jun 2007 19:06:00 -0000 Received: (qmail 7650 invoked by uid 22791); 19 Jun 2007 19:06:00 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate5.de.ibm.com (HELO mtagate5.de.ibm.com) (195.212.29.154) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 19 Jun 2007 19:05:55 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate5.de.ibm.com (8.13.8/8.13.8) with ESMTP id l5JJ5pHX340844 for ; Tue, 19 Jun 2007 19:05:51 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l5JJ5pUo4137176 for ; Tue, 19 Jun 2007 21:05:51 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l5JJ5pS3014269 for ; Tue, 19 Jun 2007 21:05:51 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id l5JJ5pcj014266; Tue, 19 Jun 2007 21:05:51 +0200 Message-Id: <200706191905.l5JJ5pcj014266@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Tue, 19 Jun 2007 21:05:51 +0200 Subject: Re: For example only, updated Windows DLL support and gdbserver DLL support To: drow@false.org (Daniel Jacobowitz) Date: Tue, 19 Jun 2007 19:06:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org, pedro_alves@portugalmail.pt (Pedro Alves) In-Reply-To: <20070618150816.GA24037@caradoc.them.org> from "Daniel Jacobowitz" at Jun 18, 2007 11:08:16 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-06/txt/msg00376.txt.bz2 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)) break; if (!last) { warning (_("\"%s\": member \"%s\" missing."), objname, mem); bfd_close (abfd); return NULL; } if (!bfd_check_format (last, bfd_object)) { warning (_("\"%s\": member \"%s\" not in executable format: %s."), objname, mem, bfd_errmsg (bfd_get_error ())); bfd_close (last); bfd_close (abfd); return NULL; } 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 archive members. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com