[valgrind] [Bug 411203] valgrind should have a mean to pass environment variable to target program
https://bugs.kde.org/show_bug.cgi?id=411203 --- Comment #6 from Paul Floyd --- It would probably be easiest to do this in valgrind itself. It already does this to insert LD_PRELOADs for the core and tool vgpreaload libs. -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 411203] valgrind should have a mean to pass environment variable to target program
https://bugs.kde.org/show_bug.cgi?id=411203 Frank Ch. Eigler changed: What|Removed |Added CC||f...@redhat.com --- Comment #5 from Frank Ch. Eigler --- Another case where this sort of feature would be useful relates to debuginfod. We may need a way of passing $DEBUGINFOD_URLS only to valgrind or only to the target process (depending on what it is we're trying to debug). Consider a command line option scheme kind of like docker's or /bin/env's: valgrind -e ENV1= -e ENV2=foo /bin/target which could mean "drop ENV1 from, and override ENV2=foo in, valgrind's environment" -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 411203] valgrind should have a mean to pass environment variable to target program
https://bugs.kde.org/show_bug.cgi?id=411203 Paul Floyd changed: What|Removed |Added CC||pjfl...@wanadoo.fr --- Comment #4 from Paul Floyd --- Valgrind certainly can change the guest environment. For a start Valgrind is responsible for synthesizing the guest stack which includes argv, envp, and auxv. As necessary it will either add or modify LD_PRELOAD and GLIBC_TUNABLES (on Linux, LD_32_PRELOAD and DYLD_INSERT_LIBRARIES on other platforms). In addition the launcher will add or modify VALGRIND_LIB. -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 411203] valgrind should have a mean to pass environment variable to target program
https://bugs.kde.org/show_bug.cgi?id=411203 --- Comment #3 from Yann Droneaud --- (In reply to Julian Seward from comment #2) > (In reply to Yann Droneaud from comment #0) > > > Unfortunately, AFAICT, valgrind doesn't have (yet) support for altering the > > tracee environment variables. > > Why do you say that? AFAIK, V passes the env vars to the program it is > running. It's not possible to add/remove variables to the tracee's environment only. For example, if I want to enable LD_VERBOSE=1 (only) for test-program to be traced, doing "LD_PROFILE=1 valgrind test-program" will affect valgrind too. strace has the -E option that enable to set environment variables only for the program to be traced. See http://man7.org/linux/man-pages/man1/strace.1.html#OPTIONS -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 411203] valgrind should have a mean to pass environment variable to target program
https://bugs.kde.org/show_bug.cgi?id=411203 --- Comment #2 from Julian Seward --- (In reply to Yann Droneaud from comment #0) > Unfortunately, AFAICT, valgrind doesn't have (yet) support for altering the > tracee environment variables. Why do you say that? AFAIK, V passes the env vars to the program it is running. -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 411203] valgrind should have a mean to pass environment variable to target program
https://bugs.kde.org/show_bug.cgi?id=411203 --- Comment #1 from Yann Droneaud --- It shouldn't be difficult to implement, but it's a bit tricky as valgrind launcher already communicate with each tool through environment variables. So environment variable to be added/removed from tracee environment have to be encoded in environment variables passed to valgrind's tool. I've to find how (and where) to implement this. -- You are receiving this mail because: You are watching all bug changes.