Bug 337780 - Support expanding binaries created with Cygwin based toolchain in Project Explorer
Summary: Support expanding binaries created with Cygwin based toolchain in Project Exp...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 253681
  Show dependency tree
 
Reported: 2011-02-21 18:31 EST by Alex Freidin CLA
Modified: 2020-09-04 15:22 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 Alex Freidin CLA 2011-02-21 18:31:20 EST
Build Identifier: M20100909-0800

Cygwin GCC and Cygwin based GCC cross compilers (e.g. for ARM) generate debug information that includes Cygwin paths like: /cygdrive/c/workspace/project/file.c or /c/workspace/project/file.c. 
Expanding an executable in the Binaries container of Project Explorer, displays the list of source files fetched from the debug information. Double-click on the file opens an empty editor and the path at the status bar is like: file:/C:/cygdrive/c/workspace/project/file.c.

Cross compilers typically use DWARF debug info and thus with ELF binary, the problem always reproducible. 
Standard Windows Cygwin GCC prior to version 4.3 generates STABS debug info by default. CDT's StabsReader fixes Cygwin paths, so the problem doesn't surface. However, with Cygwin GCC 4.3.x, the binary includes DWARF debug info by default and the problem occurs.
The simplest way to reproduce is to compile with GCC 4.3.x. 

Bug 253170 attempted to resolve this by fixing the paths in DwarfReader in the same manner as done in StabsReader, but this has its own problems and was removed in bug 297778. Obviously, the path translation should be done outside the debug info readers. So, it should be removed also from StabsReader.
The implementation should support Windows and cross compilers binaries. It should be in sync with the Executables view that suffers from the same problem.

The Binary class uses ISourceFinder to locate the files from the debug info, perhaps it can be used for translation of Cygwin paths. 

Reproducible: Always