This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: How to run gdb with LD_PRELOAD?
- From: ééä <chenwj at iis dot sinica dot edu dot tw>
- To: Michael Snyder <msnyder at vmware dot com>
- Cc: ééä <chenwj at iis dot sinica dot edu dot tw>, "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Sun, 16 Jan 2011 10:55:58 +0800
- Subject: Re: How to run gdb with LD_PRELOAD?
- References: <20110115144525.GD44658@cs.nctu.edu.tw> <4D322AC5.2020509@vmware.com>
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