| Summary: | Launch configuration's Environment tab variables are not passed to the gdb process itself | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Gaetano Santoro <gaetano.santoro> | ||||
| Component: | cdt-debug-dsf-gdb | Assignee: | Project Inbox <cdt-debug-dsf-gdb-inbox> | ||||
| Status: | NEW --- | QA Contact: | Jonah Graham <jonah> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cdtdoug, jamesblackburn+eclipse, pawel.1.piech | ||||
| Version: | 8.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Gaetano Santoro
Created attachment 189949 [details]
proposed patch
attached my proposed patch
In Bug 196275 comment 1, Doug mentions that the env variables of the target are not the same as the one for the debugger. Do we really want to make the target env become the debugger env? (In reply to comment #2) > Do we really want to make the target env become the debugger env? Here we use the environment defined in the toolchain when running GDB (Properties > C/C++ Build > Environment). This means all tools in the toolchain get a consistent env. I think users have a need to control both the env set when running gdb and the target's env, but that doesn't mean they should be one and the same. I have a gdb command script that invoke a command that use an environment variable the only place where I can set thi variable is the environment tab of launch configuration. When gdb is launched, .gdbinit is executed, THEN the environment variable of the environment tab is passed to the debug session and the target see it (show env var in gdb console) but I need the variable to be visible when executed .gdbinit or other gdb command script when gdb starts if i use RUN instead of DEBUG the environemnt tab variable are available to the gdb process (at least for CDI, but probably I've tested it also in DSF) James you are right, so, the patch become useless for DSF I've developed it for CDI, where what you say do not work then I see that DSF works similar and I propose the simplified patch for DSF now my question is: what is the purpose of the environment tab in launch configuration? (in DSF) if all the env vars from the build are passed to gdb |