This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Add interface for registering JITed code
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: tromey at redhat dot com
- Cc: rnk at mit dot edu (Reid Kleckner), gdb-patches at sourceware dot org, unladen-swallow at googlegroups dot com
- Date: Fri, 24 Jul 2009 13:30:58 +0200 (CEST)
- Subject: Re: [RFA] Add interface for registering JITed code
Tom Tromey wrote:
> >>>>> "Reid" == Reid Kleckner <rnk@mit.edu> 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