Adds new options and interfaces to specify alternate-bitwidth client libraries for use when the application creates a child process of the other bitwidth.
For DR, adds -client_lib32 and -client_lib64 options. Switches main usage to use the appropriate option, with its contents then copied into -client_lib (to avoid the pain of removing that option).
For drconfiglib, adds dr_register_client_ex() with dr_client_iterator_next_ex() to support querying other-bitwidth client registrations.
Adds a new libutil.drconfig_test for drconfiglib. Fixes a bug found by the test: existing client queries were cutting off the last character of the path and options.
For drrun and drconfig, adds "-c32" and "-c64" options, with an additional "--" separating the client options between them.
For tool files, adds CLIENT{32,64}_{REL,ABS}. Updates drcov, drcpusim, and drcachesim to use the new syntax and drcachesim's launcher to process it. Tested these manually: =========================================================================== $ ninja install $ rm *.log $ ../exports/bin64/drrun -t drcov -- ~/dr/test/execve64 ~/dr/test/hello32 $ l -t .log 20K drcov.execve64.109583.0000.proc.log 20K drcov.execve64.109585.0000.proc.log 20K drcov.hello32.109585.0000.proc.log $ rm -rf drm.dir $ ../exports/bin64/drrun -verbose -t drcachesim -verbose 1 -offline -- ~/dr/test/execve64 ~/dr/test/hello32 $ l -td *.dir 4.0K drmemtrace.hello32.117714.7095.dir/ 4.0K drmemtrace.execve64.117714.6260.dir/ 4.0K drmemtrace.execve64.117713.9314.dir/ ===========================================================================
Adds tests of -c32/-c64 to the existing cross-arch linux.execve{32,64} tests (Windows won't work until #803 (closed) is addressed). The tests look like this: =========================================================================== $ cmake . && ctest -V -R 'linux.execve(32|64)'
8: Running test command: "/home/bruening/dr/git/build_x64_dbg_tests/bin64/drrun" "-32" "-dr_home" "/home/bruening/dr/git/build_x64_dbg_tests/suite/tests/32bit" "-stderr_mask" "0xC" "-dumpcore_mask" "0" "-c32" "/home/bruening/dr/git/build_x64_dbg_tests/suite/tests/32bit/suite/tests/bin/libclient.large_options.dll.so" "-paramA" "foo" "-paramB" "bar" "--" "-c64" "/home/bruening/dr/git/build_x64_dbg_tests/suite/tests/bin/libclient.large_options.dll.so" "-paramA" "foo" "-paramB" "bar" "--" "/home/bruening/dr/git/build_x64_dbg_tests/suite/tests/32bit/suite/tests/bin/linux.execve32" "/home/bruening/dr/git/build_x64_dbg_tests/suite/tests/bin/linux.execve-sub64"
8: large_options passed: -paramA foo -paramB bar
8: parent is running under DynamoRIO
8: parent waiting for child
8: child is running under DynamoRIO
8: large_options passed: -paramA foo -paramB bar
8: it_worked
8: running under DynamoRIO
8: large_options exiting
8: child has exited
8: large_options exiting
8:
1/2 Test #8: linux.execve32 ................... Passed 3.93 sec
9: Test command: /home/bruening/dr/git/build_x64_dbg_tests/bin64/drrun "-stderr_mask" "0xC" "-dumpcore_mask" "0" "-c32" "/home/bruening/dr/git/build_x64_dbg_tests/suite/tests/32bit/suite/tests/bin/libclient.large_options.dll.so" "-paramA" "foo" "-paramB" "bar" "--" "-c64" "/home/bruening/dr/git/build_x64_dbg_tests/suite/tests/bin/libclient.large_options.dll.so" "-paramA" "foo" "-paramB" "bar" "--" "/home/bruening/dr/git/build_x64_dbg_tests/suite/tests/bin/linux.execve64" "/home/bruening/dr/git/build_x64_dbg_tests/suite/tests/32bit/suite/tests/bin/linux.execve-sub32"
9: Test timeout computed to be: 1500
9: large_options passed: -paramA foo -paramB bar
9: parent is running under DynamoRIO
9: parent waiting for child
9: child is running under DynamoRIO
9: large_options passed: -paramA foo -paramB bar
9: it_worked
9: running under DynamoRIO
9: large_options exiting
9: child has exited
9: large_options exiting
2/2 Test #9: linux.execve64 ................... Passed 0.86 sec
===========================================================================
Issue: #147 (closed), #803 (closed) Fixes: #147 (closed)