From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23887 invoked by alias); 24 Jul 2009 11:31:15 -0000 Received: (qmail 23864 invoked by uid 22791); 24 Jul 2009 11:31:12 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mtagate3.de.ibm.com (HELO mtagate3.de.ibm.com) (195.212.29.152) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 24 Jul 2009 11:31:05 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate3.de.ibm.com (8.14.3/8.13.8) with ESMTP id n6OBV0xn046546 for ; Fri, 24 Jul 2009 11:31:00 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 v9.2) with ESMTP id n6OBUxC22080866 for ; Fri, 24 Jul 2009 13:30:59 +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 n6OBUxN3004579 for ; Fri, 24 Jul 2009 13:30:59 +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 n6OBUwMe004564; Fri, 24 Jul 2009 13:30:58 +0200 Message-Id: <200907241130.n6OBUwMe004564@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 24 Jul 2009 13:30:58 +0200 Subject: Re: [RFA] Add interface for registering JITed code To: tromey@redhat.com Date: Fri, 24 Jul 2009 13:25:00 -0000 From: "Ulrich Weigand" Cc: rnk@mit.edu (Reid Kleckner), gdb-patches@sourceware.org, unladen-swallow@googlegroups.com In-Reply-To: from "Tom Tromey" at Jul 23, 2009 11:42:20 AM 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: 2009-07/txt/msg00594.txt.bz2 Tom Tromey wrote: > >>>>> "Reid" == Reid Kleckner writes: > > Reid> So that means we need LLVM to generate dwarf debug info, and we > Reid> need to register it with GDB. > > Nice. > > Your overall approach seems good to me. I agree, this looks good to me as well. > Reid> + /* Hack to work around the fact that BFD does not take ownership of the > Reid> + memory for files allocated in memory. */ > > Is it possible to fix this directly in BFD? Since... > > Reid> + bim = (struct bfd_in_memory *) objfile->obfd->iostream; > > ... this is definitely fishy :-) I'd suggest that Reid instead use bfd_openr_iovec to access an ELF image directly in inferior memory, as is currently done e.g. by remote.c:remote_bfd_open spu-linux-nat.c:spu_bfd_open solib-spu.c:spu_bfd_open (is about to be introduced by the patch http://sourceware.org/ml/gdb-patches/2009-07/msg00546.html) This works without BFD changes or directly accessing BFD internals ... Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com