Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Support source lookup using gdb's "set substitute path"

Hi all,

At the last multicore debug meeting, we began discussing using gdb's "set substitute path", here's the summary from the minutes
  • CDT path mappings were added before this support from GDB
  • Using GDB's feature instead would allow the GDB console to show all the proper paths
  • Can we use this GDB feature to power the CDT path mapping feature?
The current source lookup solution works well for the most part. However we keep running into various issues with source look up that cannot be easily solved with the current framework. e.g.to do with relative paths. A quick search turns up about a dozen other bugs we feel would be resolved based on source lookup using the set-substitue-path mechanism[1]. Long term we feel this will be a much more robust solution and provide a better user experience.

We've been able to implement a source look up solution based on set-substitute-path that Renesas are using in their e2studio. We would like to make this available generally for CDT 9.0.

The general approach of this new solution would be:
  • Creation of a new source container type that supports this mechanism
  • If used this mapping issues an appropriate 'set substitute path' mi command to GDB which means GDB is effectively handling the mapping itself
  • CDT code no longer has to maintain mappings itself
  • A first version of this was submitted in bug 472765
We are considering the best way to go about making this available in CDT.

Any thoughts/input would be appreciated.

Regards,
Tracy

[1] Source look up bugs that are fixed using this mechanism
477057 - Source "Path Mapping" of relative paths do not work with breakpoints
408389 - Source lookup gets confused by invalid fullname returned by GDB129349 - Source lookup doesn't handle paths properly
225805 - [sourcelookup] Sourcelookup handling does not scale to large projects

235181 - [source lookup] Get rid of dependency on CSourceLookupDirector
202375 - [source lookup] Add source "lookup changed events" to source lookup service.
159954 - [source lookup] Browse to source wizard.
327167 - Path mapping editor converts normal slashes to backslashes
377387 - Breakpoint with MinGW and some Cygwin path mapping set


Back to the top