Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341542 - Executables view shows stale location data after source lookup path changes
Summary: Executables view shows stale location data after source lookup path changes
Status: CLOSED DUPLICATE of bug 342141
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Ken Ryall CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-31 16:09 EDT by John Cortell CLA
Modified: 2011-04-14 10:11 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Cortell CLA 2011-03-31 16:09:44 EDT
This used to work but was broken by the performance improvements in the Executables view at the beginning of the Indigo cycle. Basically, the Executables view fails to recognize new mappings caused by additions, removal or changes to the applicable source lookup paths for an executable. The only way to get it to honor the new mappings is to shutdown and relaunch Eclipse.

1. create a new workspace
2. create a Hello World ANSI C Project; call it 'app1'
3. copy the generated executable (app1.exe) to c:\temp
4. make two copies of the project's app1.c file; put one in c:\tempsrc1 and the other in c:\tempsrc2
5. in Eclipse, delete the project (select delete project contents on disk)
6. open the Executables view and select app1.exe
Note the Location column shows the path where the source file was compiled and is grayed. This is expected/correct behavior
7. Add a global source look up path: a Path Mapping with the compilation path to the directory you saw in step 6 and the local path set to c:\tempsrc1
Note the location for app1.c is still grayed and not reflective of the mapping you just added
8. Hit the Refresh button in the Executables view
Note the location for app1.c is still wrong
9. Delete app1.exe from the Executables view and re-add it
Note the location for app1.c is still wrong
10. Close the Executables view and re-open it
Note the location for app1.c is still wrong
11. Shutdown eclipse and relaunch it
Note that, finally, the location for app1.exe correctly shows as c:\tempsrc1\app1.c 

The problem is with the use of fetchedExecutables in SourceFilesContentProvider. The view does respond to a change in the executable itself but not to a change in source locators which might affect the mappings.

Whatever fix is coded needs to also work with a slightly more complicated scenario: have more than one executable in the Executables view. The other executables can be standard ones (not requiring source remapping). Ensure that the view ends up honoring the new mappings even when the affected executable is NOT selected.
Comment 1 John Cortell CLA 2011-03-31 16:12:37 EDT
BTW, the point of creating two copies of the source file in step (4) is for testing changing the source mapping from one local location to another. That needs to work just as well as transitioning from not having a mapping to having one.
Comment 2 John Cortell CLA 2011-04-14 10:11:37 EDT

*** This bug has been marked as a duplicate of bug 342141 ***