Wednesday, April 21, 2010
Optima debugger in softkernel halts before starting
Q: I am trying to get the debugger in the soft kernel for OSE5.4.1 going on Optima 2.x. I've followed the instructions in the Optima User Guide to the letter, and the soft kernel builds and runs, but when I try to debug it in Optima I get no further than this error:
Can't find a source file at "/cygdrive/c/OSE/ose5.4.1_ppc/src/osemain.c"
Locate the file or edit the source lookup path to include its location.
I thought I did everything right. Why is Optima complaining now?
Can't find a source file at "/cygdrive/c/OSE/ose5.4.1_ppc/src/osemain.c"
Locate the file or edit the source lookup path to include its location.
I thought I did everything right. Why is Optima complaining now?
A: The docs for Optima need a small amount of updating, mainly to account for the fact that they were written before the big split-off of the BSP products from the "mainline" OSE stream. Beginning in OSE5.3, BSPs were no longer delivered with the main OSE5 delivery and were purchased - and delivered - separately. Our BSP delivery docs advise users to install a directory heirarchy that co-locates the BSP at the save level with the OSE5 directory, rather than underneath it.
And now, the Optima tool runs in a completely different area of the product - within the BSP delivery, e.g. under C:/BSP_SFK_OSE5.4.1/refsys/rtose/sfk-win32. The config doc wasn't updated for this subtlety, which requires for Windows users adding a Path Mapping (under Eclipse C/C++ view in Debug -> Debug Configurations...). Hence the Optima tool's failure to find the source paths for osemain.c, which is located under the OSE5 mainline directory under C:/OSE/OSE5.4.1_PPC/src .
The simplest solution is to follow the button titled "Locate File..." as shown above in the pic. Using the standard windows file dialogue, just add the full path to the osemain.c in OSE5.4.1_PPC mainline area. You'll also have to add this for hello.c if you continue following the doc example (when it tells you to step over the hello.c breakpoint). This will automagically add the desired Path Mapping entries in your Debug Configuration for this debug run, where it can be found later under the Source tab.
Labels: debugger, gdb, Optima, OSE5, OSE5.3, OSE5.4
free invisible web counter