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: Hui Zhu <teawater at gmail dot com>
- To: ééä <chenwj at iis dot sinica dot edu dot tw>
- Cc: gdb at sourceware dot org
- Date: Sun, 16 Jan 2011 08:52:29 +0800
- Subject: Re: How to run gdb with LD_PRELOAD?
- References: <20110115144525.GD44658@cs.nctu.edu.tw>
http://sourceware.org/gdb/current/onlinedocs/gdb/Environment.html#Environment
On Sat, Jan 15, 2011 at 22:45, ³¯³¥ô <chenwj@iis.sinica.edu.tw> wrote:
> Hi, all
>
> I have a program using LD_PRELOAD. The program should be run like
> this, "LD_PRELOAD=/path/to/libfoo.so qemu -U LD_PRELOAD a.out", if
> without gdb.
>
> Here are what I did while running gdb.
>
> --------------------------------------------------------------------
> $ gdb
> (gdb) set environment LD_PRELOAD=/path/to/libfoo.so
> (gdb) file qemu
> (gdb) r -U LD_PRELOAD a.out
> --------------------------------------------------------------------
>
> But gdb gave me the error below,
>
> ERROR: ld.so: object '/nfs_home/chenwj/lib/libdbo.so' from LD_PRELOAD cannot be preloaded: ignored.
>
> Any suggestion appreciated.
>
> Regards,
> chenwj
>
> --
> Wei-Ren Chen (³¯³¥ô)
> Parallel Processing Lab, Institute of Information Science,
> Academia Sinica, Taiwan (R.O.C.)
> Tel:886-2-2788-3799 #1667
>