Changes between Version 26 and Version 27 of AppDebug


Ignore:
Timestamp:
Apr 29, 2014, 8:29:50 PM (10 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AppDebug

    v26 v27  
    66
    77When you have built your application and linked it with the BOINC libraries,
    8 you can run it in 'standalone mode' (without a BOINC core client present).
     8you can run it in '''standalone mode''' (without a BOINC client present).
    99To do this, put instances of all input files in the same directory (with the proper logical, not physical, names).
    1010The application should run and produce output files (also with their logical names).
     
    1717
    1818Once your application works in standalone mode,
    19 the next step is to run it under the BOINC client.
     19you can test it under the BOINC client, but without a project server.
    2020This will exercise the various forms of interaction with the client.
    2121If you already have a working project, skip to the next section.
    2222
    23 You can test an application under the BOINC client,
    24 but without a project server, as shown in the following example.
    2523This example assumes that your executable name is '''test.exe''',
    2624and that it has an input file with logical name '''in''' and physical name '''input.txt''',
     
    2826
    2927 * Make a directory and put the BOINC client there.  Note: you'll need a 6.10.14 or later client.
    30  * Put the file [http://boinc.berkeley.edu/trac/browser/trunk/boinc/samples/client_state_save.xml samples/client_state_save.xml] in it
    31    (modify this file as needed).
     28 * Put the file
     29   [http://boinc.berkeley.edu/gitweb/?p=boinc-v2.git;a=blob_plain;f=samples/client_state_save.xml;hb=HEAD samples/client_state_save.xml]
     30   in it (modify this file as needed).
    3231 * Create a file '''account_test.xml''' containing
    3332{{{
     
    6160are working.
    6261
    63 If your app isn't working,
    64 there are two ways to debug it.
     62If your app isn't working, there are two ways to debug it.
    6563First, if you put
    6664{{{
     
    7068the BOINC client will set up the "slot directory" (usually slots/0/)
    7169where your application will run, and then exit.
    72 (Note: a client based on [24143] or later is needed for this).
    7370You can cd into that directory,
    7471check that the needed files are there,
     
    9996It's easier to use BOINC's [http://boinc.berkeley.edu/wiki/Anonymous_platform anonymous platform] mechanism.
    10097To do this:
    101  * Following the [http://boinc.berkeley.edu/wiki/Anonymous_platform directions], create a file 'app_info.xml' in the client's project_* directory, with the appropriate name and version number of your application.
    102  * Each time you 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.
     98 * Following the [http://boinc.berkeley.edu/wiki/Anonymous_platform directions],
     99   create a file 'app_info.xml' in the client's project_* directory,
     100   with the appropriate name and version number of your application.
     101 * Each time you build a new version of your application, copy the executable into the project_* directory,
     102   making sure it has the appropriate name.
     103   Then restart the core client.
    103104
    104 On 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
     105On Unix, it's possible to attach a debugger to a running process.
     106Use 'ps' to find the process ID of your application, then something like
    105107{{{
    106108gdb exec_filename PID
     
    126128  and verify that the output files are there.
    127129
    128 
    129130== Getting and deciphering stack traces ==
    130 Once 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.
     131Once your application is working on your own computers,
     132you're ready to test it with outside computers (alpha testers initially).
     133It may crash on some computers, e.g. because their software or hardware is different from yours.
     134You'll get some information back in the stderr_txt field of the results.
     135If your application called `boinc_init_diagnostics()` with the `BOINC_DIAG_DUMPCALLSTACKENABLED` flag set,
     136and you included symbols, hopefully you'll get symbolic stack traces.
    131137
    132138There are separate instructions about [AppDebugWin deciphering a Windows stack trace].
    133139
    134 Otherwise, you should at least get numeric (hex) stack traces. There are several techniques for deciphering these. For details see [MacBacktrace Mac Backtrace].  Although that page is written primarily for the Mac, much of it can be used on Linux and UNIX systems as well.
     140Otherwise, you should at least get numeric (hex) stack traces.
     141There are several techniques for deciphering these.
     142For details see [MacBacktrace Mac Backtrace].
     143Although that page is written primarily for the Mac, much of it can be used on Linux and UNIX systems as well.