Debugging Externally Built Deos Apps

From DDCIDeos
Jump to navigationJump to search

Here is how to use OpenArbor as a debugger for a binary that was created outside of OpenArbor.

OpenArbor 5.x

See /desk/help/deos-project-guide.htm#debugging

OpenArbor 3.x

Regarding the external build environment, it is assumed that an .exe and .exe.dbg were produced by compiling and linking source files, and then the .exe, the .exe.dbg, and the sources were not moved after being created. Also, the .exe on the target that's going to be debugged must have a matching crc with the .exe built locally.

In OpenArbor:

  • Create any platform project with the correct arcitecture, let's say qemu-x86.
  • Edit the file qemu-x86-core0/.loadlist and add your app with a path like: app.exe,C:/.../external-project/app.exe. The rest of the file's contents doesn't really matter.
  • Use the Target Manager perspective to create a remote target with the proper hostname.
  • Connect and expand the Load List Manager, and make sure that the .exe file doesn't have any decorators, i.e. make sure the local and remote files have matching crc's. You probably don't want to Update Target Load.
  • Connect the Status Monitor.
  • Right-click the process, and choose "Launch the Debugger".
  • Now you'll get a dialog "Create Resource Links". This dialog will setup the link between OpenArbor and your external build environment.
    • In the textbox, make sure the path to the project root is a common parent of all of the source code for the project and for the built binary.
    • Click OK.

If all goes well, you should get source-level debugging, and futher attempts to launch the debugger should skip the "Create Resource Links" dialog.

Remember that the above steps make several assumptions about the external build environment, such as source code being available and reasonably colocated with the binary. If it is necessary or desirable to move the source code from its location when the binary was built, the "define path" command can be used to substitute an alternate path for the original path. This command should be entered in the DDC-I Debugger Command View, and has the following form (trailing slashes required):

define path C:\svn\Deos\products\tdl\main\branches\mainline\ C:\temp\tdl-source-code\

After defining the alternate path, click in the Debug window to trigger the opening of the corresponding source code file.