Prev Next

Using Enterprise Architect's Visual Execution Analyzer (VEA) With Wine

Note these points before attempting to analyze your application with Enterprise Architect running under Wine:

  • These instructions only apply to native code (C/C++), when running under Wine.
  • These instructions assume your application is installed successfully into the Wine environment, and all dependencies are met. For example, you have installed msxml6 if your application requires it and it is not deployed as part of your installer.
  • These instructions assume you have built your program in Visual Studio as Debug or Release with PDB support.
  • If you are using a Debug executable file, you might have to copy the MFC/ATL Debug SXS from your Windows machine to your Wine environment. So the folder C:\windows\WinSxS would map to ~/.wine/drive_c/windows/winsxs.
  • For every EXE/DLL that you want to debug or profile using the VEA, you must have the PDB for that file.

Using the Visual Execution Analyzer

Deploy and analyze your application with Enterprise Architect's VEA using these steps:

1

Copy all of your source files from your development machine to the Wine environment. The path must match exactly. For example, if your source code was compiled in C:\source\yourApp, then you must copy the source code files to ~/.wine/drive_c/source/yourApp.

This means that if you build your code on a separate machine, you might first have to use 'winecfg' to map a drive, in order to get the correct path.

2

Run your application manually via the command line using a command of the form:

  • wine PATH_TO_APPLICATION

3

If the application runs, proceed to the next step. Otherwise, check the console for Wine output and install any DLLs to resolve missing dependencies. Once you are certain that there are no missing dependencies and that the crash is due to something else, proceed to the next step.

Tip:  If a huge amount of output is generated by WINE, pipe the output to a file using a command of the form:

  • wine PATH_TO_APPLICATION >& output.txt

4

Import your source code. This is optional - you don't have to import your code into Enterprise Architect, but it does help when you want to set breakpoints within your code.

5

Set up Enterprise Architect Build Scripts using these steps:

  • Add a build script to a package. For details, see the Help topic:  Analyzer Script Editor
  • Configure the Run command.
  • Configure the Debug command.
  • Set the Debugger value to Microsoft Native.

6

Open the Debugger window or use the Execution Analysis - Debug workspace (preferred).

7

Select the Build Script you created in the previous step.

8

Click the Play button.

Notes

  • Check that the breakpoint is bound. If it is bound, it will stay red. If it has a question mark, it is not bound.
  • If your breakpoint didn't bind, then check carefully that the source path matches exactly.
  • Ensure that the PDB file(s) is in the same directory as your EXE file(s).
  • Ensure that EXE and PDB files match; that is, that they are from the same compilation.