gdb has incorrect paths for source files in library compiled with -flto
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
New
|
Undecided
|
Unassigned |
Bug Description
After building a binary that linked in a library (both main project and library were compiled/linked with -flto), I found that gdb could not find some source files in the library. This is using the latest release (6-2017-q1-update)
The "info sources" returned invalid paths - it seemed that the relative path to the source file from the libraries perspective is being wrongly used/interpreted as a relative path from the main project's perspective.
For example, if the file in the library is at ../source/
Hi Tim,
Thanks for the report.
Can you check a build without -flto if 'info sources' gives the right path? Looking at your report, I'm guessing you're on Windows. Any chance you could give it a try with -flto on Linux?
Thanks,
Tejas.