Compile Line Changes
|
Link Line Changes
|
---|---|
Change CCFLAGS or CPPFLAGS to add /Od /Z7.
|
Change the /debug flag to /debug:full. Remove or comment the lines that delete $(OBJS) after a successful build.
|
• | If your application is a DLL that creates user interface and notification callbacks to be used by the interactive user, refer to the following section on Debugging an Interactive DLL. |
• | If your application is a DLL that runs in batch mode (from user_initialize()), refer to Debugging an Interactive DLL. |
• | If your application is a spawn or asynchronous application, refer to Debugging a Multiprocess Application. |
1. | Start Creo Parametric with the DLL registered and loaded. |
2. | Use the debugger to attach to the process xtop.exe. |
3. | Set breakpoints in the callback functions that you wish to debug. |
1. | Setup a Creo Parametric start command that uses the debugger as follows:
RUN="$PRO_DIRECTORY/bin/parametric1"
RUN="dbx $PRO_DIRECTORY/bin/parametric1"
|
2. | Run the Creo Parametric start command. The debugger starts. |
3. | Set up a breakpoint that triggers when the DLL is loaded. In dbx, enter stop dlopen <DLL name> For example, stop dlopen pt_inst_test.dll.
If you are using a graphical debugger such as Sun’s Workshop, the same procedure is possible. Workshop allows a “CUSTOM” breakpoint
using dbx syntax, such as dlopenpt_inst_test.dll.
|
4. | Enter run. The program runs to the point of loading the DLL. |
5. | When the dlopen breakpoint is triggered, add a breakpoint to user_initialize(). At this point, the DLL is loaded and the user_initialize() function is in memory. |
1. | Setup a Creo Parametric start command that uses the debugger as follows:
RUN="%PRO_DIRECTORY%\%PRO_MACHINE_TYPE%\obj\
xtop.exe"
RUN=devenv
"%PRO_DIRECTORY%\%PRO_MACHINE_TYPE%\obj\
xtop.exe"
|
2. | Run the Creo Parametric start command. The debugger starts. |
3. | Load the source file containing the functions into the debugger, and graphically set a breakpoint to the start of user_initialize(). |
4. | Run the program from the debugger User Interface. Even if the debugger indicates that no debugger information is available
for xtop.exe, continue debugging. When the DLL is loaded, the program will stop in the DLL’s user_initialize().
|