I run a program with LD_PRELOADing a specific library. Like this.
LD_PRELOAD=./my.so ./my_program
How do I run this program with gdb<
gdb<
You can supply env as an exec-wrapper on the command line using the -iex flag:
env
-iex
gdb -iex "set exec-wrapper env LD_PRELOAD=./my.so" ./my_program