您可以
set environment在gdb中使用该命令来更改gdb用于启动要调试的程序的环境。从gdb帮助中提取:
(gdb) help set environment Set environment variable value to give the program.Arguments are VAR VALUE where VAR is variable name and VALUE is value.VALUES of environment variables are uninterpreted strings.This does not affect the program until the next "run" command.
范例
LD_LIBRARY_PATH:
(gdb) set environment LD_LIBRARY_PATH /home/paceholder/projects/geo/lib/debug



