[compiler-rt] r194803 - tsan: add proper cfi directives to assembly code

Dmitry Vyukov dvyukov at google.com
Fri Nov 15 02:25:53 PST 2013


Author: dvyukov
Date: Fri Nov 15 04:25:53 2013
New Revision: 194803

URL: http://llvm.org/viewvc/llvm-project?rev=194803&view=rev
Log:
tsan: add proper cfi directives to assembly code
this allows gdb to unwind through our hacky call


Modified:
    compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.h

Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.h?rev=194803&r1=194802&r2=194803&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.h (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.h Fri Nov 15 04:25:53 2013
@@ -727,11 +727,11 @@ void AcquireReleaseImpl(ThreadState *thr
 // so we create a reserve stack frame for it (1024b must be enough).
 #define HACKY_CALL(f) \
   __asm__ __volatile__("sub $1024, %%rsp;" \
-                       "/*.cfi_adjust_cfa_offset 1024;*/" \
+                       ".cfi_adjust_cfa_offset 1024;" \
                        ".hidden " #f "_thunk;" \
                        "call " #f "_thunk;" \
                        "add $1024, %%rsp;" \
-                       "/*.cfi_adjust_cfa_offset -1024;*/" \
+                       ".cfi_adjust_cfa_offset -1024;" \
                        ::: "memory", "cc");
 #else
 #define HACKY_CALL(f) f()





More information about the llvm-commits mailing list