This is the mail archive of the gdb@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: How to run gdb with LD_PRELOAD?


Hi, Michael

> (gdb) set environment LD_PRELOAD=/path/to/libfoo.so qemu -U LD_PRELOAD
> (gdb) run

  Thanks for your reply.

  I actually use qemu as an emulator to run a program like "a.out". And the
LD_PRELOAD  is for qemu not the a.out. I did what you said, but gdb gave
me the error below,

ERROR: ld.so: object '/nfs_home/chenwj/tools/bin/qemu-i386' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '-U' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object 'LD_PRELOAD' from LD_PRELOAD cannot be preloaded: ignored.
Inconsistency detected by ld.so: rtld.c: 757: init_tls: Assertion `i == _rtld_local._dl_tls_max_dtv_idx' failed!
During startup program exited with code 127.

Regards,
chenwj

-- 
Wei-Ren Chen (ééä)
Parallel Processing Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667


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