This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
CCS: 4.0.2.01003
I've got a workspace with the following structure:
main project
--->main.c
rtsc_configuration project
--->app.cfg
library project
--->lib.c
The library project is compiled into a .lib file, and then linked by main. In the project dependencies, main depends on the rtsc and library projects.
When I do a source level debug, I can only step through main.c. It tells me that /main/lib.c does not exist.
The Source Lookup settings seem to be okay. They read as:
Default
--main
----.launches - \main
----.settings - \main
----Debug - \main
----library
------.launches - \library
... etc
Even adding the project explicitly does not work. If I copy lib.c into the main project folder it works fine.
How can I set this up properly to do source debugging?
Thanks
David Kelly
Hi David,
You can try adding a global source lookup path (Window->Preferences->C/C++->Debug->Common Source Lookup Path) and see if this helps.
Is your library built without any debug symbols (--symdebug:none)?
ki
Hi Ki,
I've tried the setting the global source lookup, both by adding the workspace and the direct file path. All the projects are in full symbolic debug.
It seems to me like the source debugger is looking for the file "main/lib.c" instead of "lib.c" or something like that because it works if I copy lib.c into the "main" directory. I can also keep source stepping and the dsp/bios calls from lib.c will step into the bios files properly.
David Kelly
The symbol file has relative path information to the file so that it can automatically find source files relative to the out file. It thinks lib.c is in the main folder. Where actually is the library folder relative to the main folder?
Relative to 'workspace/main/', lib.c is:
../lib/lib.c
where 'lib' is the library's project folder at the root of the workspace the same as 'main/'
Hi David,
I can reproduce this issue. Looks like the relative path information that CCS is using to find the source file from the library is relative to the location of the library and not the out file since the info was generated when the lib was built (in you case it's main\lib.c since the library file is probably in \lib\<configuration> like \lib\Debug and ..\lib.c relative path gets resolved to main\lib.c since the main project folder is the current directory).
I will file an bug for this.
Thanks
ki
Thank you.
In the meantime, is there any workaround such as changing the output directory for the library?
David Kelly
David,
Could you try editing source lookup paths? However, please try doing it slightly differently than mentioned above. Start a debug session, then in Debug view (where call stack is displayed) right click on Thread node and select "Edit Source Lookup" then click on Add, then Project and select your library project. Close the dialog and check if library source files are found. The setting will be preserved between debug sessions.
Martin
I've tried this route, adding both the project, the workspace and the direct system file path. No method has helped.
David Kelly
David,
I tried this out in 4.1 and the issue appears to be gone. You might want to give 4.1 a try. We currently do not have a patch update so you'll have to install the full image
ki
My issue was directly related to yours. (see : http://e2e.ti.com/support/development_tools/f/81/p/30661/106875.aspx#106875)
It's now fixed in 4.1. In fact 4.1 has been the best release so far for me. (good work guys !)
With 4.0.2 I had so many problems I had to revert to 4.0 (memory leak that would by default crash the IDE every hour, I had to raise the amount of memory dedicated to the JVM to more than one 1G to stay up for a few hours) and this source lookup problem I mentioned.
The good thing is that it's fixed now so thanks for the improvements !