Changes between Initial Version and Version 1 of AppDebug


Ignore:
Timestamp:
Apr 24, 2007, 5:32:19 PM (17 years ago)
Author:
Nicolas
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AppDebug

    v1 v1  
     1= Application debugging =
     2
     3Some suggestions for debugging applications:
     4
     5== Standalone mode ==
     6
     7When you have built your application and linked it with the BOINC libraries, you can run it in 'standalone mode' (without a BOINC core client present). To do this, put instances of all input files in the same directory. (with the proper logical, not physical, names). The application should run and produce output files (also with their logical names). You can run the program under a debugger. When you run an application in standalone mode, the BOINC API will recognize this and take it into account. A couple of things to note:
     8 * If your application does graphics, it will open a graphics window. Closing this window will exit your application.
     9 * boinc_time_to_checkpoint() will always return false, so your application will never checkpoint.
     10
     11== Using the anonymous platform mechanism ==
     12
     13Once your application works in standalone mode you'll want to run it from the BOINC core client. This will exercise the various forms of interaction with the core client. To get this process started, create a test project, add an application version and some work, then run the core client. It will download everything and run your application, which will possibly crash.
     14At this point you'll want to start experimenting with your application. It would be very tedious to create a new application version for each change. It's far easier to use BOINC's [AnonymousPlatform anonymous platform] mechanism. To do this:
     15 * Following the [AnonymousPlatform directions], create a file 'app_info.xml' in the client's project_* directory, with the appropriate name and version number of your application.
     16 * Each time your build a new version of your application, copy the executable into the project_* directory, making sure it has the appropriate name. Then restart the core client.
     17
     18On Unix, it's possible to attach a debugger to a running process. Use 'ps' to find the process ID of your application, then something like
     19{{{
     20gdb exec_filename PID
     21}}}
     22to attach a debugger to it.
     23
     24== Getting and deciphering stack traces ==
     25Once your application is working on your own computers, you're ready to test it with outside computers (alpha testers initially). It may crash on some computers, e.g. because their software or hardware is different from yours. You'll get some information back in the stderr_txt field of the results. If your application called boinc_init_diagnostics() with the BOINC_DIAG_DUMPCALLSTACKENABLED flag set, and you included symbols, hopefully you'll get symbolic stack traces.
     26
     27To decipher a Windows stack trace go [http://boinc.berkeley.edu/app_debug_win.php here].
     28
     29Otherwise, you should at least get numeric (hex) stack traces. You can decipher these by running a symbolic debugger with an unstripped version and typing in the hex addresses. See [http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS Debugging without symbols]