|
From: Julian S. <js...@ac...> - 2003-11-03 14:58:50
|
CVS commit by jseward:
Merge in .cfi support from head:
configure.in 1.96 (partial) and 1.98
coregrind/vg_startup.S 1.17 and 1.18
M +17 -0 configure.in 1.93.2.3
M +17 -0 coregrind/vg_startup.S 1.16.2.1
--- valgrind/configure.in #1.93.2.2:1.93.2.3
@@ -282,4 +282,21 @@
+# check if the GNU as supports CFI directives
+AC_MSG_CHECKING([if gas accepts .cfi])
+AC_TRY_LINK(, [
+
+__asm__ __volatile__ (".cfi_startproc\n"
+ ".cfi_adjust_cfa_offset 0x0\n"
+ ".cfi_endproc\n");
+],
+[
+ AC_DEFINE_UNQUOTED([HAVE_GAS_CFI], 1, [Define if your GNU as supports .cfi])
+ AC_MSG_RESULT(yes)
+],
+ AC_MSG_RESULT(no)
+)
+
+
+
AC_MSG_CHECKING([if this is an NPTL-based system])
safe_LIBS="$LIBS"
--- valgrind/coregrind/vg_startup.S #1.16:1.16.2.1
@@ -31,4 +31,5 @@
#include "vg_constants.h"
+#include "../config.h"
@@ -229,6 +230,10 @@
.text
+.type VG_(swizzle_esp_then_start_GDB),@function
.global VG_(swizzle_esp_then_start_GDB)
VG_(swizzle_esp_then_start_GDB):
+#ifdef HAVE_GAS_CFI
+ .cfi_startproc
+#endif
pushal
@@ -257,6 +262,12 @@
# push %EBP. This is a faked %ebp-chain pointer.
pushl %eax
+#ifdef HAVE_GAS_CFI
+ .cfi_adjust_cfa_offset 0x4
+#endif
movl %esp, %ebp
+#ifdef HAVE_GAS_CFI
+ .cfi_def_cfa_register ebp
+#endif
call VG_(start_GDB_whilst_on_client_stack)
@@ -265,7 +276,13 @@
movl vg_ebp_saved_over_GDB_start, %ebp
movl vg_esp_saved_over_GDB_start, %esp
+#ifdef HAVE_GAS_CFI
+ .cfi_adjust_cfa_offset -0x4
+#endif
popal
ret
+#ifdef HAVE_GAS_CFI
+ .cfi_endproc
+#endif
# gcc puts this construction at the end of every function. I think it
|