|
From: <sv...@va...> - 2010-06-23 07:31:05
|
Author: njn
Date: 2010-06-23 08:30:54 +0100 (Wed, 23 Jun 2010)
New Revision: 11188
Log:
Move tests in memcheck/tests/amd64/ that aren't appropriate for Darwin into
memcheck/tests/amd64-linux/, which is a new directory.
Added:
branches/MACOSX106/memcheck/tests/amd64-linux/
branches/MACOSX106/memcheck/tests/amd64-linux/Makefile.am
branches/MACOSX106/memcheck/tests/amd64-linux/defcfaexpr.S
branches/MACOSX106/memcheck/tests/amd64-linux/defcfaexpr.stderr.exp
branches/MACOSX106/memcheck/tests/amd64-linux/defcfaexpr.vgtest
branches/MACOSX106/memcheck/tests/amd64-linux/int3-amd64.c
branches/MACOSX106/memcheck/tests/amd64-linux/int3-amd64.stderr.exp
branches/MACOSX106/memcheck/tests/amd64-linux/int3-amd64.stdout.exp
branches/MACOSX106/memcheck/tests/amd64-linux/int3-amd64.vgtest
Removed:
branches/MACOSX106/memcheck/tests/amd64/defcfaexpr.S
branches/MACOSX106/memcheck/tests/amd64/defcfaexpr.stderr.exp
branches/MACOSX106/memcheck/tests/amd64/defcfaexpr.vgtest
branches/MACOSX106/memcheck/tests/amd64/int3-amd64.c
branches/MACOSX106/memcheck/tests/amd64/int3-amd64.stderr.exp
branches/MACOSX106/memcheck/tests/amd64/int3-amd64.stdout.exp
branches/MACOSX106/memcheck/tests/amd64/int3-amd64.vgtest
Modified:
branches/MACOSX106/configure.in
branches/MACOSX106/memcheck/tests/Makefile.am
branches/MACOSX106/memcheck/tests/amd64/Makefile.am
branches/MACOSX106/memcheck/tests/amd64/xor-undef-amd64.stderr.exp
branches/MACOSX106/memcheck/tests/amd64/xor-undef-amd64.vgtest
Modified: branches/MACOSX106/configure.in
===================================================================
--- branches/MACOSX106/configure.in 2010-06-22 06:46:15 UTC (rev 11187)
+++ branches/MACOSX106/configure.in 2010-06-23 07:30:54 UTC (rev 11188)
@@ -1878,6 +1878,7 @@
memcheck/tests/x86/Makefile
memcheck/tests/linux/Makefile
memcheck/tests/darwin/Makefile
+ memcheck/tests/amd64-linux/Makefile
memcheck/tests/x86-linux/Makefile
memcheck/perf/Makefile
cachegrind/Makefile
Modified: branches/MACOSX106/memcheck/tests/Makefile.am
===================================================================
--- branches/MACOSX106/memcheck/tests/Makefile.am 2010-06-22 06:46:15 UTC (rev 11187)
+++ branches/MACOSX106/memcheck/tests/Makefile.am 2010-06-23 07:30:54 UTC (rev 11188)
@@ -23,8 +23,11 @@
if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
SUBDIRS += x86-linux
endif
+if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
+SUBDIRS += amd64-linux
+endif
-DIST_SUBDIRS = x86 amd64 linux darwin x86-linux .
+DIST_SUBDIRS = x86 amd64 linux darwin x86-linux amd64-linux .
dist_noinst_SCRIPTS = \
filter_addressable \
Modified: branches/MACOSX106/memcheck/tests/amd64/Makefile.am
===================================================================
--- branches/MACOSX106/memcheck/tests/amd64/Makefile.am 2010-06-22 06:46:15 UTC (rev 11187)
+++ branches/MACOSX106/memcheck/tests/amd64/Makefile.am 2010-06-23 07:30:54 UTC (rev 11188)
@@ -20,17 +20,19 @@
xor-undef-amd64.stderr.exp xor-undef-amd64.stdout.exp \
xor-undef-amd64.vgtest
-check_PROGRAMS = bt_everything bug132146 fxsave-amd64 \
- xor-undef-amd64
+check_PROGRAMS = \
+ bt_everything \
+ bug132146 \
+ fxsave-amd64 \
+ more_x87_fp \
+ sse_memory \
+ xor-undef-amd64
-# DDD: not sure if these ones should work on Darwin or not... if not, should
-# be moved into amd64-linux/.
+# DDD: these should be moved into amd64-linux/.
if ! VGCONF_OS_IS_DARWIN
check_PROGRAMS += \
defcfaexpr \
- int3-amd64 \
- more_x87_fp \
- sse_memory
+ int3-amd64
endif
AM_CFLAGS += @FLAG_M64@
Deleted: branches/MACOSX106/memcheck/tests/amd64/defcfaexpr.S
===================================================================
--- branches/MACOSX106/memcheck/tests/amd64/defcfaexpr.S 2010-06-22 06:46:15 UTC (rev 11187)
+++ branches/MACOSX106/memcheck/tests/amd64/defcfaexpr.S 2010-06-23 07:30:54 UTC (rev 11188)
@@ -1,186 +0,0 @@
-
-/* This is really horrible. It checks that the
- stack unwinder understands DW_CFA_def_cfa_expression. It is
- the result of compiling this:
-
-void bbb ( long x )
-{
- __asm__ __volatile__(
- "cmp %0,%0\n\t"
- "jz .Lxyzzy\n"
- ".Lxyzzy:\n\t"
- : : "r"(x) : "cc"
- );
-}
-
-void aaa ( long x ) {
- bbb(x);
-}
-
-int main ( void )
-{
- long *p = malloc(8);
- aaa( *p );
- return 0;
-}
-
-and bracketing the cmp/jz insns with a move down/up by 256 of %rsp.
-The .jz causes memcheck to complain, hence unwind the stack, but
-that cannot be successfully done unless the return address can
-be found. Hence the handwritten CFI below uses
-DW_CFA_def_cfa_expression to make that possible.
-
-The CFI below isn't really right in that aaa appears twice
-in the backtrace
-
-==12868== Conditional jump or move depends on uninitialised value(s)
-==12868== at 0x400512: bbb (in /home/sewardj/VgTRUNK/trunk/mad0)
-==12868== by 0x400520: aaa (in /home/sewardj/VgTRUNK/trunk/mad0)
-==12868== by 0x400520: aaa (in /home/sewardj/VgTRUNK/trunk/mad0)
-==12868== by 0x400538: main (in /home/sewardj/VgTRUNK/trunk/mad0)
-
-but GDB behaves the same, so I'm not too concerned - indicates
-the problem is with the handwritten CFI and not with
-V's interpretation of it.
-*/
-
-
- .file "bad0.c"
- .text
-
-
-.globl bbb
- .type bbb, @function
-bbb:
-.LFB2:
-.Lbbb1:
- subq $256,%rsp
-.Lbbb2:
- cmp %rdi,%rdi
- jz .Lxyzzy
-.Lxyzzy:
- addq $256,%rsp
-.Lbbb3:
- ret
-.Lbbb4:
-.LFE2:
- .size bbb, .-bbb
-
-
-
-.globl aaa
- .type aaa, @function
-aaa:
-.LFB3:
- call bbb
- rep ; ret
-.LFE3:
- .size aaa, .-aaa
-.globl main
- .type main, @function
-main:
-.LFB4:
- subq $8, %rsp
-.LCFI0:
- movl $8, %edi
- call malloc
- movq (%rax), %rdi
- call aaa
- movl $0, %eax
- addq $8, %rsp
- ret
-.LFE4:
- .size main, .-main
- .section .eh_frame,"a",@progbits
-.Lframe1:
- .long .LECIE1-.LSCIE1
-.LSCIE1:
- .long 0x0
- .byte 0x1
- .string "zR"
- .uleb128 0x1
- .sleb128 -8
- .byte 0x10
- .uleb128 0x1
- .byte 0x3
- .byte 0xc
- .uleb128 0x7
- .uleb128 0x8
- .byte 0x90
- .uleb128 0x1
- .align 8
-.LECIE1:
-
-/* start of the FDE for bbb */
-.LSFDE1:
- .long .LEFDE1-.LASFDE1 /* length of FDE */
-.LASFDE1:
- .long .LASFDE1-.Lframe1 /* CIE pointer */
- .long .LFB2 /* & bbb */
- .long .LFE2-.LFB2 /* sizeof(bbb) */
- .uleb128 0 /* augmentation length */
- .byte 0x40 + .Lbbb2 - .Lbbb1 /* _advance_loc to .Lbbb2 */
-
- /* For the section in between .Lbbb2 and .Lbbb3, set the
- CFA to be %rsp+256, and set the return address (dwarf r16)
- to be *(CFA+0). */
- .byte 0x0f /* _def_cfa_expression */
- .uleb128 .Lexpr1e-.Lexpr1s /* length of expression */
-.Lexpr1s:
- .byte 0x77 /* DW_OP_breg7 == %rsp + sleb128(0) */
- .sleb128 0
- .byte 0x40 /* DW_OP_lit16 */
- .byte 0x40 /* DW_OP_lit16 */
- .byte 0x1e /* DW_OP_mul */
- .byte 0x22 /* DW_OP_plus */
-.Lexpr1e:
- .byte 0x90 /* _cfa_offset: r16 = *(cfa+0) */
- .uleb128 0
-
- .byte 0x40 + .Lbbb3 - .Lbbb2 /* _advance_loc to .Lbbb3 */
-
- /* For the section .Lbbb3 to .Lbbb4, should set CFA back to
- something sensible. This tries to do it but still causes
- GDB to show an extraneous aaa frame on the stack. Oh well. */
- /* Now set CFA back to %rsp+0 */
- .byte 0x0f /* _def_cfa_expression */
- .uleb128 .Lexpr2e-.Lexpr2s /* length of expression */
-.Lexpr2s:
- .byte 0x77 /* DW_OP_breg7 == %rsp + sleb128(0) */
- .sleb128 0
- .byte 0x30 /* DW_OP_lit0 */
- .byte 0x1c /* DW_OP_minus */
-.Lexpr2e:
- .byte 0x90 /* _cfa_offset: r16 = *(cfa+0) */
- .uleb128 0
-
- .byte 0x40 + .Lbbb4 - .Lbbb3 /* _advance_loc to .Lbbb4 */
- .uleb128 0x0 /* ??? */
- .align 8
-.LEFDE1:
-/* end of the FDE for bbb */
-
-.LSFDE3:
- .long .LEFDE3-.LASFDE3
-.LASFDE3:
- .long .LASFDE3-.Lframe1
- .long .LFB3
- .long .LFE3-.LFB3
- .uleb128 0x0
- .align 8
-.LEFDE3:
-.LSFDE5:
- .long .LEFDE5-.LASFDE5
-.LASFDE5:
- .long .LASFDE5-.Lframe1
- .long .LFB4
- .long .LFE4-.LFB4
- .uleb128 0x0
- .byte 0x4
- .long .LCFI0-.LFB4
- .byte 0xe
- .uleb128 0x10
- .align 8
-.LEFDE5:
- .ident "GCC: (GNU) 4.1.2 20061115 (prerelease) (SUSE Linux)"
- .section .note.GNU-stack,"",@progbits
Deleted: branches/MACOSX106/memcheck/tests/amd64/defcfaexpr.stderr.exp
===================================================================
--- branches/MACOSX106/memcheck/tests/amd64/defcfaexpr.stderr.exp 2010-06-22 06:46:15 UTC (rev 11187)
+++ branches/MACOSX106/memcheck/tests/amd64/defcfaexpr.stderr.exp 2010-06-23 07:30:54 UTC (rev 11188)
@@ -1,6 +0,0 @@
-Conditional jump or move depends on uninitialised value(s)
- at 0x........: bbb (bogus.S:0)
- by 0x........: aaa (bogus.S:0)
- by 0x........: aaa (bogus.S:0)
- by 0x........: main (bogus.S:0)
-
Deleted: branches/MACOSX106/memcheck/tests/amd64/defcfaexpr.vgtest
===================================================================
--- branches/MACOSX106/memcheck/tests/amd64/defcfaexpr.vgtest 2010-06-22 06:46:15 UTC (rev 11187)
+++ branches/MACOSX106/memcheck/tests/amd64/defcfaexpr.vgtest 2010-06-23 07:30:54 UTC (rev 11188)
@@ -1,3 +0,0 @@
-prog: defcfaexpr
-stderr_filter: filter_defcfaexpr
-vgopts: -q
Deleted: branches/MACOSX106/memcheck/tests/amd64/int3-amd64.c
===================================================================
--- branches/MACOSX106/memcheck/tests/amd64/int3-amd64.c 2010-06-22 06:46:15 UTC (rev 11187)
+++ branches/MACOSX106/memcheck/tests/amd64/int3-amd64.c 2010-06-23 07:30:54 UTC (rev 11188)
@@ -1,52 +0,0 @@
-
-#undef _GNU_SOURCE
-#define _GNU_SOURCE 1
-
-#include <signal.h>
-#include <stdio.h>
-#include <sys/ucontext.h>
-
-static char* rip_at_sig = NULL;
-
-static void int_handler(int signum, siginfo_t *si, void *uc_arg)
-{
- ucontext_t *uc = (ucontext_t *)uc_arg;
- /* Note that uc->uc_mcontext is an embedded struct, not a pointer */
- mcontext_t *mc = &(uc->uc_mcontext);
- void *pc = (void*)mc->gregs[REG_RIP];
- printf("in int_handler, RIP is ...\n");
- rip_at_sig = pc;
-}
-
-static void register_handler(int sig, void *handler)
-{
- struct sigaction sa;
- sa.sa_flags = SA_RESTART | SA_SIGINFO;
- sigfillset(&sa.sa_mask);
- sa.sa_sigaction = handler;
- sigaction(sig, &sa, NULL);
-}
-
-int main(void) {
- char *intaddr = NULL;
- puts("main");
- register_handler(SIGTRAP, int_handler);
- asm volatile(
- "movabsq $zz_int, %%rdx\n"
- "mov %%rdx, %0\n"
- "zz_int:\n"
- "int $3\n"
- : /* no outputs */
- : "m" (intaddr) /* input: address of var to store target addr to */
- : /* clobbers */ "rdx"
- );
- /* intaddr is the address of the int 3 insn. rip_at_sig is the PC
- after the exception, which should be the next insn along.
- Hence: */
- if (intaddr != NULL && rip_at_sig != NULL
- && rip_at_sig == intaddr+1)
- printf("PASS\n");
- else
- printf("FAIL\n");
- return 0;
-}
Deleted: branches/MACOSX106/memcheck/tests/amd64/int3-amd64.stderr.exp
===================================================================
Deleted: branches/MACOSX106/memcheck/tests/amd64/int3-amd64.stdout.exp
===================================================================
--- branches/MACOSX106/memcheck/tests/amd64/int3-amd64.stdout.exp 2010-06-22 06:46:15 UTC (rev 11187)
+++ branches/MACOSX106/memcheck/tests/amd64/int3-amd64.stdout.exp 2010-06-23 07:30:54 UTC (rev 11188)
@@ -1,3 +0,0 @@
-main
-in int_handler, RIP is ...
-PASS
Deleted: branches/MACOSX106/memcheck/tests/amd64/int3-amd64.vgtest
===================================================================
--- branches/MACOSX106/memcheck/tests/amd64/int3-amd64.vgtest 2010-06-22 06:46:15 UTC (rev 11187)
+++ branches/MACOSX106/memcheck/tests/amd64/int3-amd64.vgtest 2010-06-23 07:30:54 UTC (rev 11188)
@@ -1,2 +0,0 @@
-prog: int3-amd64
-vgopts: -q
Modified: branches/MACOSX106/memcheck/tests/amd64/xor-undef-amd64.stderr.exp
===================================================================
--- branches/MACOSX106/memcheck/tests/amd64/xor-undef-amd64.stderr.exp 2010-06-22 06:46:15 UTC (rev 11187)
+++ branches/MACOSX106/memcheck/tests/amd64/xor-undef-amd64.stderr.exp 2010-06-23 07:30:54 UTC (rev 11188)
@@ -1,4 +1,3 @@
-
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (xor-undef-amd64.c:17)
@@ -14,13 +13,3 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (xor-undef-amd64.c:117)
-
-HEAP SUMMARY:
- in use at exit: 0 bytes in 0 blocks
- total heap usage: 1 allocs, 1 frees, 48 bytes allocated
-
-For a detailed leak analysis, rerun with: --leak-check=full
-
-For counts of detected and suppressed errors, rerun with: -v
-Use --track-origins=yes to see where uninitialised values come from
-ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
Modified: branches/MACOSX106/memcheck/tests/amd64/xor-undef-amd64.vgtest
===================================================================
--- branches/MACOSX106/memcheck/tests/amd64/xor-undef-amd64.vgtest 2010-06-22 06:46:15 UTC (rev 11187)
+++ branches/MACOSX106/memcheck/tests/amd64/xor-undef-amd64.vgtest 2010-06-23 07:30:54 UTC (rev 11188)
@@ -1 +1,2 @@
prog: xor-undef-amd64
+vgopts: -q
Copied: branches/MACOSX106/memcheck/tests/amd64-linux/Makefile.am (from rev 11187, branches/MACOSX106/memcheck/tests/x86-linux/Makefile.am)
===================================================================
--- branches/MACOSX106/memcheck/tests/amd64-linux/Makefile.am (rev 0)
+++ branches/MACOSX106/memcheck/tests/amd64-linux/Makefile.am 2010-06-23 07:30:54 UTC (rev 11188)
@@ -0,0 +1,21 @@
+
+include $(top_srcdir)/Makefile.tool-tests.am
+
+dist_noinst_SCRIPTS = \
+ filter_stderr
+
+noinst_HEADERS = scalar.h
+
+EXTRA_DIST = \
+ defcaexpr.vgtest defcaexpr.stderr.exp \
+ int3-x86.vgtest int3-x86.stderr.exp int3-x86.stdout.exp
+
+check_PROGRAMS = \
+ defcaexpr \
+ int3-amd64
+
+
+AM_CFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
+AM_CXXFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
+AM_CCASFLAGS += @FLAG_M32@
+
Copied: branches/MACOSX106/memcheck/tests/amd64-linux/defcfaexpr.S (from rev 11187, branches/MACOSX106/memcheck/tests/amd64/defcfaexpr.S)
===================================================================
--- branches/MACOSX106/memcheck/tests/amd64-linux/defcfaexpr.S (rev 0)
+++ branches/MACOSX106/memcheck/tests/amd64-linux/defcfaexpr.S 2010-06-23 07:30:54 UTC (rev 11188)
@@ -0,0 +1,186 @@
+
+/* This is really horrible. It checks that the
+ stack unwinder understands DW_CFA_def_cfa_expression. It is
+ the result of compiling this:
+
+void bbb ( long x )
+{
+ __asm__ __volatile__(
+ "cmp %0,%0\n\t"
+ "jz .Lxyzzy\n"
+ ".Lxyzzy:\n\t"
+ : : "r"(x) : "cc"
+ );
+}
+
+void aaa ( long x ) {
+ bbb(x);
+}
+
+int main ( void )
+{
+ long *p = malloc(8);
+ aaa( *p );
+ return 0;
+}
+
+and bracketing the cmp/jz insns with a move down/up by 256 of %rsp.
+The .jz causes memcheck to complain, hence unwind the stack, but
+that cannot be successfully done unless the return address can
+be found. Hence the handwritten CFI below uses
+DW_CFA_def_cfa_expression to make that possible.
+
+The CFI below isn't really right in that aaa appears twice
+in the backtrace
+
+==12868== Conditional jump or move depends on uninitialised value(s)
+==12868== at 0x400512: bbb (in /home/sewardj/VgTRUNK/trunk/mad0)
+==12868== by 0x400520: aaa (in /home/sewardj/VgTRUNK/trunk/mad0)
+==12868== by 0x400520: aaa (in /home/sewardj/VgTRUNK/trunk/mad0)
+==12868== by 0x400538: main (in /home/sewardj/VgTRUNK/trunk/mad0)
+
+but GDB behaves the same, so I'm not too concerned - indicates
+the problem is with the handwritten CFI and not with
+V's interpretation of it.
+*/
+
+
+ .file "bad0.c"
+ .text
+
+
+.globl bbb
+ .type bbb, @function
+bbb:
+.LFB2:
+.Lbbb1:
+ subq $256,%rsp
+.Lbbb2:
+ cmp %rdi,%rdi
+ jz .Lxyzzy
+.Lxyzzy:
+ addq $256,%rsp
+.Lbbb3:
+ ret
+.Lbbb4:
+.LFE2:
+ .size bbb, .-bbb
+
+
+
+.globl aaa
+ .type aaa, @function
+aaa:
+.LFB3:
+ call bbb
+ rep ; ret
+.LFE3:
+ .size aaa, .-aaa
+.globl main
+ .type main, @function
+main:
+.LFB4:
+ subq $8, %rsp
+.LCFI0:
+ movl $8, %edi
+ call malloc
+ movq (%rax), %rdi
+ call aaa
+ movl $0, %eax
+ addq $8, %rsp
+ ret
+.LFE4:
+ .size main, .-main
+ .section .eh_frame,"a",@progbits
+.Lframe1:
+ .long .LECIE1-.LSCIE1
+.LSCIE1:
+ .long 0x0
+ .byte 0x1
+ .string "zR"
+ .uleb128 0x1
+ .sleb128 -8
+ .byte 0x10
+ .uleb128 0x1
+ .byte 0x3
+ .byte 0xc
+ .uleb128 0x7
+ .uleb128 0x8
+ .byte 0x90
+ .uleb128 0x1
+ .align 8
+.LECIE1:
+
+/* start of the FDE for bbb */
+.LSFDE1:
+ .long .LEFDE1-.LASFDE1 /* length of FDE */
+.LASFDE1:
+ .long .LASFDE1-.Lframe1 /* CIE pointer */
+ .long .LFB2 /* & bbb */
+ .long .LFE2-.LFB2 /* sizeof(bbb) */
+ .uleb128 0 /* augmentation length */
+ .byte 0x40 + .Lbbb2 - .Lbbb1 /* _advance_loc to .Lbbb2 */
+
+ /* For the section in between .Lbbb2 and .Lbbb3, set the
+ CFA to be %rsp+256, and set the return address (dwarf r16)
+ to be *(CFA+0). */
+ .byte 0x0f /* _def_cfa_expression */
+ .uleb128 .Lexpr1e-.Lexpr1s /* length of expression */
+.Lexpr1s:
+ .byte 0x77 /* DW_OP_breg7 == %rsp + sleb128(0) */
+ .sleb128 0
+ .byte 0x40 /* DW_OP_lit16 */
+ .byte 0x40 /* DW_OP_lit16 */
+ .byte 0x1e /* DW_OP_mul */
+ .byte 0x22 /* DW_OP_plus */
+.Lexpr1e:
+ .byte 0x90 /* _cfa_offset: r16 = *(cfa+0) */
+ .uleb128 0
+
+ .byte 0x40 + .Lbbb3 - .Lbbb2 /* _advance_loc to .Lbbb3 */
+
+ /* For the section .Lbbb3 to .Lbbb4, should set CFA back to
+ something sensible. This tries to do it but still causes
+ GDB to show an extraneous aaa frame on the stack. Oh well. */
+ /* Now set CFA back to %rsp+0 */
+ .byte 0x0f /* _def_cfa_expression */
+ .uleb128 .Lexpr2e-.Lexpr2s /* length of expression */
+.Lexpr2s:
+ .byte 0x77 /* DW_OP_breg7 == %rsp + sleb128(0) */
+ .sleb128 0
+ .byte 0x30 /* DW_OP_lit0 */
+ .byte 0x1c /* DW_OP_minus */
+.Lexpr2e:
+ .byte 0x90 /* _cfa_offset: r16 = *(cfa+0) */
+ .uleb128 0
+
+ .byte 0x40 + .Lbbb4 - .Lbbb3 /* _advance_loc to .Lbbb4 */
+ .uleb128 0x0 /* ??? */
+ .align 8
+.LEFDE1:
+/* end of the FDE for bbb */
+
+.LSFDE3:
+ .long .LEFDE3-.LASFDE3
+.LASFDE3:
+ .long .LASFDE3-.Lframe1
+ .long .LFB3
+ .long .LFE3-.LFB3
+ .uleb128 0x0
+ .align 8
+.LEFDE3:
+.LSFDE5:
+ .long .LEFDE5-.LASFDE5
+.LASFDE5:
+ .long .LASFDE5-.Lframe1
+ .long .LFB4
+ .long .LFE4-.LFB4
+ .uleb128 0x0
+ .byte 0x4
+ .long .LCFI0-.LFB4
+ .byte 0xe
+ .uleb128 0x10
+ .align 8
+.LEFDE5:
+ .ident "GCC: (GNU) 4.1.2 20061115 (prerelease) (SUSE Linux)"
+ .section .note.GNU-stack,"",@progbits
Copied: branches/MACOSX106/memcheck/tests/amd64-linux/defcfaexpr.stderr.exp (from rev 11187, branches/MACOSX106/memcheck/tests/amd64/defcfaexpr.stderr.exp)
===================================================================
--- branches/MACOSX106/memcheck/tests/amd64-linux/defcfaexpr.stderr.exp (rev 0)
+++ branches/MACOSX106/memcheck/tests/amd64-linux/defcfaexpr.stderr.exp 2010-06-23 07:30:54 UTC (rev 11188)
@@ -0,0 +1,6 @@
+Conditional jump or move depends on uninitialised value(s)
+ at 0x........: bbb (bogus.S:0)
+ by 0x........: aaa (bogus.S:0)
+ by 0x........: aaa (bogus.S:0)
+ by 0x........: main (bogus.S:0)
+
Copied: branches/MACOSX106/memcheck/tests/amd64-linux/defcfaexpr.vgtest (from rev 11187, branches/MACOSX106/memcheck/tests/amd64/defcfaexpr.vgtest)
===================================================================
--- branches/MACOSX106/memcheck/tests/amd64-linux/defcfaexpr.vgtest (rev 0)
+++ branches/MACOSX106/memcheck/tests/amd64-linux/defcfaexpr.vgtest 2010-06-23 07:30:54 UTC (rev 11188)
@@ -0,0 +1,3 @@
+prog: defcfaexpr
+stderr_filter: filter_defcfaexpr
+vgopts: -q
Copied: branches/MACOSX106/memcheck/tests/amd64-linux/int3-amd64.c (from rev 11187, branches/MACOSX106/memcheck/tests/amd64/int3-amd64.c)
===================================================================
--- branches/MACOSX106/memcheck/tests/amd64-linux/int3-amd64.c (rev 0)
+++ branches/MACOSX106/memcheck/tests/amd64-linux/int3-amd64.c 2010-06-23 07:30:54 UTC (rev 11188)
@@ -0,0 +1,52 @@
+
+#undef _GNU_SOURCE
+#define _GNU_SOURCE 1
+
+#include <signal.h>
+#include <stdio.h>
+#include <sys/ucontext.h>
+
+static char* rip_at_sig = NULL;
+
+static void int_handler(int signum, siginfo_t *si, void *uc_arg)
+{
+ ucontext_t *uc = (ucontext_t *)uc_arg;
+ /* Note that uc->uc_mcontext is an embedded struct, not a pointer */
+ mcontext_t *mc = &(uc->uc_mcontext);
+ void *pc = (void*)mc->gregs[REG_RIP];
+ printf("in int_handler, RIP is ...\n");
+ rip_at_sig = pc;
+}
+
+static void register_handler(int sig, void *handler)
+{
+ struct sigaction sa;
+ sa.sa_flags = SA_RESTART | SA_SIGINFO;
+ sigfillset(&sa.sa_mask);
+ sa.sa_sigaction = handler;
+ sigaction(sig, &sa, NULL);
+}
+
+int main(void) {
+ char *intaddr = NULL;
+ puts("main");
+ register_handler(SIGTRAP, int_handler);
+ asm volatile(
+ "movabsq $zz_int, %%rdx\n"
+ "mov %%rdx, %0\n"
+ "zz_int:\n"
+ "int $3\n"
+ : /* no outputs */
+ : "m" (intaddr) /* input: address of var to store target addr to */
+ : /* clobbers */ "rdx"
+ );
+ /* intaddr is the address of the int 3 insn. rip_at_sig is the PC
+ after the exception, which should be the next insn along.
+ Hence: */
+ if (intaddr != NULL && rip_at_sig != NULL
+ && rip_at_sig == intaddr+1)
+ printf("PASS\n");
+ else
+ printf("FAIL\n");
+ return 0;
+}
Copied: branches/MACOSX106/memcheck/tests/amd64-linux/int3-amd64.stderr.exp (from rev 11187, branches/MACOSX106/memcheck/tests/amd64/int3-amd64.stderr.exp)
===================================================================
Copied: branches/MACOSX106/memcheck/tests/amd64-linux/int3-amd64.stdout.exp (from rev 11187, branches/MACOSX106/memcheck/tests/amd64/int3-amd64.stdout.exp)
===================================================================
--- branches/MACOSX106/memcheck/tests/amd64-linux/int3-amd64.stdout.exp (rev 0)
+++ branches/MACOSX106/memcheck/tests/amd64-linux/int3-amd64.stdout.exp 2010-06-23 07:30:54 UTC (rev 11188)
@@ -0,0 +1,3 @@
+main
+in int_handler, RIP is ...
+PASS
Copied: branches/MACOSX106/memcheck/tests/amd64-linux/int3-amd64.vgtest (from rev 11187, branches/MACOSX106/memcheck/tests/amd64/int3-amd64.vgtest)
===================================================================
--- branches/MACOSX106/memcheck/tests/amd64-linux/int3-amd64.vgtest (rev 0)
+++ branches/MACOSX106/memcheck/tests/amd64-linux/int3-amd64.vgtest 2010-06-23 07:30:54 UTC (rev 11188)
@@ -0,0 +1,2 @@
+prog: int3-amd64
+vgopts: -q
|