fixes issue 848
+ add DR_EMIT_MUST_END_TRACE
+ non-trivial to add a test so punting on that

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1485 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
move dr_get_*_option() declarations out of the section of the exported
header that is labeled "PERSISTENT CACHE SUPPORT"

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1486 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
i#849, part 1:
+ add new gencode for client ibl xfer
+ emit single shared routine, or per-thread routines,
  depending on ib targets enabled in current run
+ unlink client ibl routine during unlink flush
+ expose routine to clients for use with
  drwrap_replace_native()
+ test will be added along with drwrap_replace_native() support

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1487 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
i#849, part 2:
+ add dr_mark_safe_to_suspend() so client can hold app lock in
  native replacement code

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1488 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
fixes issue 850
+ set cflags as source file properties on C/C++ files rather than
  target properties, to avoid passing to cpp for asm files which
  can result in problems
+ keep defines and includes as target properties for cpp2asm
+ check for empty flags when appending via utility
  function append_property_string

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1489 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
i#852: add extension libraries to is_in_client_lib() to
allow them to be executed from by the app, as well as reporting
crashes in them.  Really, they should be treated like client libs,
whether static or shared.

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1490 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
fixes issue 849
i#849, part 3:

Switch drwrap_replace_native() to use a continuation strategy:
+ replacement routine must call drwrap_replace_native_fini() prior
  to returning
+ drwrap_replace_native_fini() changes the retaddr (it stored xsp
  so it knows where it is) to a non-exported asm routine replace_native_xfer()
+ uses a series of asm ret_imm instrs so that the client sees the return
  instruction in a bb (for stdcall stack adjust)
+ spill slots get clobbered, so can't easily use bb event to add meta
  instrs for stdcall + push app retaddr to the ret asm code: so
  replace_native_xfer() does some tricky asm to do that while not
  clobbering replacement function return value.
+ replace_native_xfer() then jumps to client ibl xfer pointing at
  asm ret
+ store xsp of retaddr in tls both for client use and for drwrap to
  restore the stack upon return
+ relies on new DR gencode for client ibl xfer
+ update drwrap test to test both new drwrap_replace_native()
  and client ibl xfer

Relies on i#852 allowing an Extension to be run as app code.

Benefits:
1) Replace routine runs natively including its frame teardown (painful
   to emulate or duplicate that separately)
2) Callstack walking up to the call to fini() sees a regular callstack
   (xref drmem i#935)
3) App code stream has the stack adjust for stdcall as well as the matching
   ret for the call to the replacement routine, matching what
   stack-watching clients expect.
4) The replacement routine can now use locks (via forthcoming i#779; xref
   drmem i#900) b/c there's no direct code cache return point.

There is some overhead w/ two ibls plus some dcontext retrievals but it's
less than going back to DR and having a trace barrier.

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1491 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
switch drwrap to use r11 instead of rax for x64 scratch on function entry

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@1492 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
fixes issue 779
+ add dr_mutex_mark_as_app()
+ add dr_rwlock_mark_as_app()
+ add dr_recurlock_mark_as_app()

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