Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 196275

Summary: GDB Hardware Debugging environment variables
Product: [Tools] CDT Reporter: Paul McConkey <paul.mcconkey>
Component: cdt-debug-cdi-gdbAssignee: cdt-debug-inbox <cdt-debug-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3    
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Paul McConkey CLA 2007-07-12 05:04:15 EDT
Would it be possible to set environment variable for the GDB Hardware debugger, in the same way that you can for the Local Application debugger launch configuration?

At present I have to set up environment variables globally in a batch file that launches my Eclipse session and it would be much more helpful if I could set variables (PATH especially) on a per-project basis.
Comment 1 Doug Schaefer CLA 2007-07-12 14:50:56 EDT
The environment variables in the Debugger settings apply the target implementation, not the debugger. Other than the path to GDB, which other environment changes do you need? For the MinGW integration, I found using the full path to GDB sufficient.
Comment 2 Paul McConkey CLA 2007-07-13 09:45:34 EDT
OK, I see the problem, there would have to be environment variables for two contexts - the debugger and the target.

My GDB 'target remote' command refers to a stub executable which GDB can only find if the folder containing the stub is added to the PATH environment variable.

It may be as well to leave it lke this rather than complicate the issue.

However, when researching this, I noticed that the environment variables are sent to the debugger after the Hardware debugger plugin sends the load command, which also means that the Image file name has to be specified with a full path, rather than than one relative to the project folders. Can this be changed?

Comment 3 Gaetano Santoro CLA 2011-02-28 09:52:25 EST
after many years the problem i still present, I proposed a patch for cdi and dsf

https://bugs.eclipse.org/bugs/show_bug.cgi?id=338418
https://bugs.eclipse.org/bugs/show_bug.cgi?id=338420
Comment 4 Jonah Graham CLA 2017-10-23 13:38:58 EDT
(this is part of a batch change)

The CDI debug implementation has been removed in CDT 9.0. Please see bug 484900 and the entry on the New and Noteworthy page https://wiki.eclipse.org/CDT/User/NewIn90#API_modifications