This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]