How to run gdb with LD_PRELOAD?

Sat Jan 15 14:45:00 GMT 2011

Hi, all

  I have a program using LD_PRELOAD. The program should be run like
this, "LD_PRELOAD=/path/to/ 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/
(gdb) file qemu
(gdb) r -U LD_PRELOAD a.out

  But gdb gave me the error below,

ERROR: object '/nfs_home/chenwj/lib/' from LD_PRELOAD cannot be preloaded: ignored.

  Any suggestion appreciated.  


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

More information about the Gdb mailing list