How to use gdb with LD_PRELOAD February 24, 2023 by Tarik Do the following. gdb your_program (gdb) set environment LD_PRELOAD ./yourso.so (gdb) start