Using DrDebug requires following two phases
1. recording and 2. replaying.
tar -zxf <kit_tar_gz>
setenv PIN_ROOT <path-to-DrDeubug-kit>
setenv PATH $PIN_ROOT/extras/pinplay/scripts/:$PATH
CAUTION: Recording causes a major (100x or so) slow-down [see PinPlay FAQ], so it is highly recommended that you narrow down the execution region where the bug appears (both 'root cause' and 'symptom') and only record the 'buggy region'. Best alternative is to use 'gdb_record' to first go to the beginning of your region of interest and then turn on recording. Using the 'attach' mode (either 'record' or 'gdb_record') is another good alternative. You can also specify a region to 'record' using some 'controller switches' (e.g. '-log:start_address'/'-log:stop_address' etc.). See documentation on region specification.
Script to use: gdb_record
Usage : gdb_record <options> -- bin args
OR gdb_record --pid=XXXX <options> -- bin #no args
options:Type 'gdb_record --help' for a full list of options.
% gdb_record --pinball=region.pb/log -- bread-demo
(gdb) b 113
Breakpoint 1 at 0x401908: file bread-demo.cpp, line 113.
Breakpoint 1, main (argc=1, argv=0x7fffffffd5b8) at bread-demo. cpp:113
113 Go = true;
(gdb) pin record on
monitor record on
Started recording region number 0
(gdb) b 149
Breakpoint 2 at 0x401b67: file bread-demo.cpp, line 149.
Breakpoint 2, main (argc=1, argv=0x7fffffffd5b8) at bread-demo.cpp:149
149 std::cout << "\n";
(gdb) pin record off
monitor record off
Stopped recording region number 0.
Move forward before turning recording on again.
Script to use: record
Usage : record <options> -- bin args
OR record --pid=XXXX <options> -- bin #no args
options:Type 'record --help' for a full list of options.
% record --pinball=myregion.pb/log --pintool_options="-log:start_address 0x401908 -log:stop_address 0x401b67" -- bread-demo
Script to use: gdb_replay
Usage : gdb_replay <options> -- pinball-basename program-binary
options:Type 'gdb_replay --help' for a full list of options.
% gdb_replay -- region.pb/log_0 bread-demo
(gdb) b 141
Breakpoint 1 at 0x401ae3: file bread-demo.cpp, line 141.
Breakpoint 1, main (argc=1, argv=0x7fffffffd5b8) at bread-demo.cpp:141
141 std::cout << "Total revenue: $" << std::setprecision(2) << std::fix
ed << revenue;
(gdb) print revenue
$1 = 21975.129998207092
Script to use: replay
Usage : replay <options> -- pinball-basename
options:Type 'replay --help' for a full list of options.
% replay -- myregion.pb/log_0
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.
Notice revision #20110804