i#1101: Reorder lock ranks for coarse info table after incoming

Fixes issue 1101.

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

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1965 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
fixed issue 1095
- add instrlist_insert_mov_immed_ptrsz and instrlist_insert_push_immed_ptrsz
- add test in abort

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1966 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
Fix bug in use_DynamoRIO_extension() on standalone client

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1967 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
Fix configure error in 2nd DR client/standalone in the same listdir when
CMAKE_C_FLAGS is empty (such as 64-bit Dr. Memory).

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1968 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
i#1100: Fix off-by-one in redirect_RegQueryValueExA and accept REG_SZ TEMP

Fixes issue 1100.

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

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1969 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
Use a stack allocated buffer for private_instr_encode

Profiling shows that this is one of the most frequent callers of
common_heap_alloc.

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

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1970 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
fixed issue 262
- add DR_MEMPROT_EXEC in client.alloc test if READ_IMPLIES_EXEC is set in personality

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1971 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
i#1105: Revert "Use a stack allocated buffer for private_instr_encode"

This reverts r1970.  I wasn't able to quickly come up with a good
solution to encoding instr immediates without truncation assertions.

TBR

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

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1972 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
Ignore stderr from the linker when checking from gold

This was manifesting as a cmake warning when building external clients.
When gcc is using ld.bfd, it calls collect2 which always prints to
stderr, so there's no reason to check it.

Fixes issue 1109.

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

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1973 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
Insert a space between string literals and macro identifiers

Fixes warnings for users who build clients with -std=c++11/-std=c++0x.
C++11 will lex these as user-defined string literals.

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

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1974 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
i#1093 addendum: top 16 bits must be zero for x64

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1975 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
i#915: allow kernelbase to run on x64

With i#1093 fixed, we can continue past the kernelbase entry failure
for x64 now as well as x86.  The TRY_EXCEPT is nice to have but I
can't seem to reproduce the crash described on x64 in the original
i#915 entry: even when I disable kernel32 redirection and i#1093.

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1976 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
Fix bug in appending extension library paths to .drpath files.

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1977 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
fixes issue 350

Add support for TRY_EXCEPT_ALLOW_NO_DCONTEXT without a dcontext for
!dynamo_initialized.  Combined with the already-existing safe_read w/o
a dcontext, this covers all cases where we want TRY_EXCEPT w/o a
dcontext.  Removed support for TRY_EXCEPT_ALLOW_NO_DCONTEXT
post-dynamo_initialized with no thread-private dcontext.  Eliminated
duplication of the try_statement in the macros.

Implemented using a global try-except data struct.

I re-ordered callback_interception_init_start() to be earlier, before
loader_init(), so we can make use of this feature in the loader and
other init routines.  This required added no-thread-private-dcontext
support to some callback routines.

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1978 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
i#915: handle crashes in private library entry routines.

This uses the new TRY_EXCEPT_ALLOW_NO_DCONTEXT support during init
from i#350, and the re-ordering of Ki interception to before
loader_init().

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1979 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
fixes issue 1102

Swap TEB.StackLimit to avoid crashing on private library _chkstk
routines.  I'm only doing this on x64, as we've never seen an issue
for 32-bit.

Requires initializing IS_CLIENT_THREAD data structures before
loader_thread_init().

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1980 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
fixes issue 1103

NtFlushVirtualMemory takes in PULONG_PTR, not PULONG, for the size.

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1981 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
Support >4B 64-bit stats in DRgui:
+ Shrunk client stats name from 50 to 47
+ Added 3 digits to the displayed stats
+ Left DR's alone: they don't line up but that's fine

This ends up working nicely with the 64-bit stats client where the
instr count easily exceeds 4B.

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1982 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
fixes issue 1107

Re-add missing samples install rules.
Fix cmake unmatched if/endif.

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1983 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
Fix crash for standalone mode on dr_query_* asking about pretend
writable areas when those data structures are not initialized.

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1984 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6