i#1013: add dr_inject_wait_for_process() to drinjectlib

This moves the complexity of waiting for a child process with a timeout up into
drinjectlib so that we don't need to repeat it in every tool frontend.

Fixes issue 1013.

Review URL: https://codereview.appspot.com/7349043

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1916 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
Fix issues with the new drinjectlib process wait code

- Put back DR_EXPORT in dr_inject.h
- Fix the NT timeout code to use negative timer units
- Make the Linux impl of dr_inject_process_exit() not block
- Free drinject resources by always calling dr_inject_process_exit()

Review URL: https://codereview.appspot.com/7331051

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1917 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
i#1063: implement redirect_GetDiskFreeSpace{A,W}

From experimentation, no trailing \ is needed, a relative path turns
into the cur dir, and a file (i.e., not a directory) is passed as-is
and fails.

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1918 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
i#1063: implement redirect_GetDriveType{A,W}

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1919 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
i#1063: implement redirect_GetFileAttributes{A,W}

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1920 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
i#1063: implement redirect_GetFileInformationByHandle()

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1921 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
i#1063: implement redirect_GetFileSize()

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1922 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
i#1063: implement redirect_GetFileType()

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1923 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
i#1063: implement redirect_ExitProcess()

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1924 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
Merge branch 'master' into drdeploy-32
remove cruft, check INVALID_FILE
i#143: presents the app's view of memory to the client wrt writable code
regions that DR has marked read-only.

Rather than trying to hide faults from the app, adds a flag
DR_MEMPROT_PRETEND_WRITE and puts the onus on the client to not write to
the region.

Added a test.

Does not fully fix i#143: we still need to adjust oldprot on
mprotect/ProtectVirtualMemory by the app.

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1925 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
i#1080: Fix special heap lock ranking

Documents a previously hidden constraint between exec_areas and module_data.

Fixes issue 1080.

Review URL: https://codereview.appspot.com/7384044

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1926 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
reflow
Merge branch 'master' into drdeploy-32
Support Linux cross-arch injection in the native drdeploy frontends

This required adding an architecture parameter to
get_config_val_other_app() and detecting the bitwidth of the exe in
drinjectlib.

Also add support for the -dr_home alias used by the Linux suite to test
cross-arch injection.

Review URL: https://codereview.appspot.com/7351043

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1927 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
Merge branch 'master' into drdeploy-32
Merge branch 'drdeploy-32' into drdeploy-suite