I want to run gdb with only a single variable MyVar in its environment. 
However, the variable's contents are rather complex, containing non-printable ASCII, and so is best set using e.g. MyVar=$(python -c 'print("\xff...")').
I'm left with two options:
- Set the - MyVarin- bashbefore running- gdb. Then inside- gdb, remove all other environment variables individually using- unset environment NAME(very tedious!).
- Clear all environment variables using - unset environment. Then inside- gdb, set- MyVarusing a shell command (as above) (how?)
Any ideas?
 
     
     
    