Changes between Version 28 and Version 29 of AppDebug


Ignore:
Timestamp:
Apr 12, 2017, 1:33:18 PM (8 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AppDebug

    v28 v29  
    11= Application debugging =
    22[[PageOutline]]
    3 Some suggestions for debugging applications:
     3In debugging a BOINC application,
     4you need to make sure that it interfaces properly with the BOINC client.
     5You can do this in stages, as follows:
    46
    5 == Testing without a BOINC client ==
     7== Testing without a BOINC client, part 1 ==
    68
    79When you have built your application and linked it with the BOINC libraries,
    810you can run it in '''standalone mode''' (without a BOINC client present).
    9 To do this, put instances of all input files in the same directory (with the proper logical, not physical, names).
    10 The application should run and produce output files (also with their logical names).
     11To do this, put instances of all input files in the same directory
     12(with the proper logical, not physical, names).
     13The application should run, produce output files (also with their logical names),
     14and exit with 0 status.
    1115You can run the program under a debugger.
    12 When you run an application in standalone mode, the BOINC API will recognize this and take it into account.
    1316
    14 Note: {{{boinc_time_to_checkpoint()}}} will always return false, so your application will never checkpoint.
     17Note: {{{boinc_time_to_checkpoint()}}} will always return false,
     18so your application will never checkpoint.
     19
     20== Testing without a BOINC client, part 2 ==
     21
     22The next step is to make sure that suspend, resume, and abort work.
     23To do this:
     24
     25 * Edit boinc/api/boinc_api.cpp; uncomment the #defines of
     26 MSGS_FROM_FILE and (if you want) VERBOSE.
     27 This tells the BOINC API to look for process control messages
     28 in a file "msgs.txt" rather than in shared memory.
     29 Rebuild the BOINC API library, and rebuild your app.
     30 * Run your app.
     31 * To suspend your app, write "<suspend/>" to msgs.txt.
     32 You need to do this atomically, e.g. write "<suspend/>" to another file,
     33 then copy that file to msgs.txt.
     34 "cat > msgs.txt" doesn't work.
     35 * Similar for <resume/> and <abort/>.
     36 Verify that they all work.
    1537
    1638== Testing with a BOINC client but no project ==
     
    2446and an output file with logical name '''out''' and physical name '''output.txt'''.
    2547
    26  * Make a directory and put the BOINC client there.  Note: you'll need a 6.10.14 or later client.
     48 * Make a directory and put the BOINC client there.  You'll need a 6.10.14 or later client.
    2749 * Put the file
    2850   [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]
     
    143165There are several techniques for deciphering these.
    144166For details see [MacBacktrace Mac Backtrace].
    145 Although that page is written primarily for the Mac, much of it can be used on Linux and UNIX systems as well.
    146 
     167Although that page is written primarily for the Mac,
     168much of it can be used on Linux and UNIX systems as well.