You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
(9) |
2
(7) |
3
(15) |
4
(14) |
|
5
(12) |
6
(18) |
7
(16) |
8
(13) |
9
(14) |
10
(20) |
11
(26) |
|
12
(14) |
13
(25) |
14
(20) |
15
(15) |
16
(14) |
17
(13) |
18
(12) |
|
19
(8) |
20
(16) |
21
(15) |
22
(37) |
23
(15) |
24
(18) |
25
(12) |
|
26
(8) |
27
(13) |
28
(12) |
|
|
|
|
|
From: <sv...@va...> - 2006-02-07 20:58:16
|
Author: sewardj
Date: 2006-02-07 20:58:12 +0000 (Tue, 07 Feb 2006)
New Revision: 5618
Log:
Add regression tests for the twi and tdi instructions, and also for=20
consequent SIGTRAP handling.
Added:
trunk/none/tests/ppc32/twi.c
trunk/none/tests/ppc32/twi.stderr.exp
trunk/none/tests/ppc32/twi.stdout.exp
trunk/none/tests/ppc32/twi.vgtest
trunk/none/tests/ppc64/twi_tdi.c
trunk/none/tests/ppc64/twi_tdi.stderr.exp
trunk/none/tests/ppc64/twi_tdi.stdout.exp
trunk/none/tests/ppc64/twi_tdi.vgtest
Modified:
trunk/none/tests/ppc32/Makefile.am
trunk/none/tests/ppc64/Makefile.am
Modified: trunk/none/tests/ppc32/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/ppc32/Makefile.am 2006-02-07 20:56:41 UTC (rev 5617)
+++ trunk/none/tests/ppc32/Makefile.am 2006-02-07 20:58:12 UTC (rev 5618)
@@ -9,10 +9,11 @@
test_fx.stderr.exp test_fx.stdout.exp test_fx.vgtest \
test_gx.stderr.exp test_gx.stdout.exp test_gx.vgtest \
testVMX.stderr.exp testVMX.stdout.exp testVMX.vgtest \
+ twi.stderr.exp twi.stdout.exp twi.vgtest \
xlc_dbl_u32.stderr.exp xlc_dbl_u32.stdout.exp xlc_dbl_u32.vgtest
=20
check_PROGRAMS =3D \
- lsw jm-insns test_fx test_gx testVMX xlc_dbl_u32
+ lsw jm-insns test_fx test_gx testVMX twi xlc_dbl_u32
=20
AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/inc=
lude \
@FLAG_M32@
Added: trunk/none/tests/ppc32/twi.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/ppc32/twi.c (rev 0)
+++ trunk/none/tests/ppc32/twi.c 2006-02-07 20:58:12 UTC (rev 5618)
@@ -0,0 +1 @@
+link ../ppc64/twi_tdi.c
\ No newline at end of file
Property changes on: trunk/none/tests/ppc32/twi.c
___________________________________________________________________
Name: svn:special
+ *
Added: trunk/none/tests/ppc32/twi.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/ppc32/twi.stderr.exp (rev 0)
+++ trunk/none/tests/ppc32/twi.stderr.exp 2006-02-07 20:58:12 UTC (rev 56=
18)
@@ -0,0 +1,2 @@
+
+
Added: trunk/none/tests/ppc32/twi.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/ppc32/twi.stdout.exp (rev 0)
+++ trunk/none/tests/ppc32/twi.stdout.exp 2006-02-07 20:58:12 UTC (rev 56=
18)
@@ -0,0 +1,96 @@
+twi_0_neg100(-150) -> no trap
+twi_0_neg100(-100) -> no trap
+twi_0_neg100( -50) -> no trap
+twi_1_neg100(-150) -> no trap
+twi_1_neg100(-100) -> no trap
+twi_1_neg100( -50) -> TRAP
+twi_2_neg100(-150) -> TRAP
+twi_2_neg100(-100) -> no trap
+twi_2_neg100( -50) -> no trap
+twi_3_neg100(-150) -> TRAP
+twi_3_neg100(-100) -> no trap
+twi_3_neg100( -50) -> TRAP
+twi_4_neg100(-150) -> no trap
+twi_4_neg100(-100) -> TRAP
+twi_4_neg100( -50) -> no trap
+twi_5_neg100(-150) -> no trap
+twi_5_neg100(-100) -> TRAP
+twi_5_neg100( -50) -> TRAP
+twi_6_neg100(-150) -> TRAP
+twi_6_neg100(-100) -> TRAP
+twi_6_neg100( -50) -> no trap
+twi_7_neg100(-150) -> TRAP
+twi_7_neg100(-100) -> TRAP
+twi_7_neg100( -50) -> TRAP
+twi_8_neg100(-150) -> no trap
+twi_8_neg100(-100) -> no trap
+twi_8_neg100( -50) -> TRAP
+twi_9_neg100(-150) -> no trap
+twi_9_neg100(-100) -> no trap
+twi_9_neg100( -50) -> TRAP
+twi_10_neg100(-150) -> TRAP
+twi_10_neg100(-100) -> no trap
+twi_10_neg100( -50) -> TRAP
+twi_11_neg100(-150) -> TRAP
+twi_11_neg100(-100) -> no trap
+twi_11_neg100( -50) -> TRAP
+twi_12_neg100(-150) -> no trap
+twi_12_neg100(-100) -> TRAP
+twi_12_neg100( -50) -> TRAP
+twi_13_neg100(-150) -> no trap
+twi_13_neg100(-100) -> TRAP
+twi_13_neg100( -50) -> TRAP
+twi_14_neg100(-150) -> TRAP
+twi_14_neg100(-100) -> TRAP
+twi_14_neg100( -50) -> TRAP
+twi_15_neg100(-150) -> TRAP
+twi_15_neg100(-100) -> TRAP
+twi_15_neg100( -50) -> TRAP
+twi_16_neg100(-150) -> TRAP
+twi_16_neg100(-100) -> no trap
+twi_16_neg100( -50) -> no trap
+twi_17_neg100(-150) -> TRAP
+twi_17_neg100(-100) -> no trap
+twi_17_neg100( -50) -> TRAP
+twi_18_neg100(-150) -> TRAP
+twi_18_neg100(-100) -> no trap
+twi_18_neg100( -50) -> no trap
+twi_19_neg100(-150) -> TRAP
+twi_19_neg100(-100) -> no trap
+twi_19_neg100( -50) -> TRAP
+twi_20_neg100(-150) -> TRAP
+twi_20_neg100(-100) -> TRAP
+twi_20_neg100( -50) -> no trap
+twi_21_neg100(-150) -> TRAP
+twi_21_neg100(-100) -> TRAP
+twi_21_neg100( -50) -> TRAP
+twi_22_neg100(-150) -> TRAP
+twi_22_neg100(-100) -> TRAP
+twi_22_neg100( -50) -> no trap
+twi_23_neg100(-150) -> TRAP
+twi_23_neg100(-100) -> TRAP
+twi_23_neg100( -50) -> TRAP
+twi_24_neg100(-150) -> TRAP
+twi_24_neg100(-100) -> no trap
+twi_24_neg100( -50) -> TRAP
+twi_25_neg100(-150) -> TRAP
+twi_25_neg100(-100) -> no trap
+twi_25_neg100( -50) -> TRAP
+twi_26_neg100(-150) -> TRAP
+twi_26_neg100(-100) -> no trap
+twi_26_neg100( -50) -> TRAP
+twi_27_neg100(-150) -> TRAP
+twi_27_neg100(-100) -> no trap
+twi_27_neg100( -50) -> TRAP
+twi_28_neg100(-150) -> TRAP
+twi_28_neg100(-100) -> TRAP
+twi_28_neg100( -50) -> TRAP
+twi_29_neg100(-150) -> TRAP
+twi_29_neg100(-100) -> TRAP
+twi_29_neg100( -50) -> TRAP
+twi_30_neg100(-150) -> TRAP
+twi_30_neg100(-100) -> TRAP
+twi_30_neg100( -50) -> TRAP
+twi_31_neg100(-150) -> TRAP
+twi_31_neg100(-100) -> TRAP
+twi_31_neg100( -50) -> TRAP
Added: trunk/none/tests/ppc32/twi.vgtest
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/ppc32/twi.vgtest (rev 0)
+++ trunk/none/tests/ppc32/twi.vgtest 2006-02-07 20:58:12 UTC (rev 5618)
@@ -0,0 +1 @@
+prog: twi
Modified: trunk/none/tests/ppc64/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/ppc64/Makefile.am 2006-02-07 20:56:41 UTC (rev 5617)
+++ trunk/none/tests/ppc64/Makefile.am 2006-02-07 20:58:12 UTC (rev 5618)
@@ -5,10 +5,11 @@
jm-int.stderr.exp jm-int.stdout.exp jm-int.vgtest \
jm-fp.stderr.exp jm-fp.stdout.exp jm-fp.vgtest \
jm-vmx.stderr.exp jm-vmx.stdout.exp jm-vmx.vgtest \
- lsw.stderr.exp lsw.stdout.exp lsw.vgtest
+ lsw.stderr.exp lsw.stdout.exp lsw.vgtest \
+ twi_tdi.stderr.exp twi_tdi.stdout.exp twi_tdi.vgtest
=20
check_PROGRAMS =3D \
- jm-insns lsw
+ jm-insns lsw twi_tdi
=20
AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/inc=
lude \
@FLAG_M64@
Added: trunk/none/tests/ppc64/twi_tdi.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/ppc64/twi_tdi.c (rev 0)
+++ trunk/none/tests/ppc64/twi_tdi.c 2006-02-07 20:58:12 UTC (rev 5618)
@@ -0,0 +1,374 @@
+
+#include <stdio.h>
+#include <signal.h>
+#include <setjmp.h>
+#include <string.h>
+#include <assert.h>
+
+static jmp_buf env_sigtrap;
+static void handler_sigtrap ( int x ) { longjmp(env_sigtrap,1); }
+
+void try ( char* who, void(*maybe_traps)(long), long arg )
+{
+ struct sigaction tmp_act;
+ int r, trapped =3D 0;
+ memset(&tmp_act, 0, sizeof(tmp_act));
+ tmp_act.sa_handler =3D handler_sigtrap;
+ sigemptyset(&tmp_act.sa_mask);
+ tmp_act.sa_flags =3D SA_NODEFER;
+ r =3D sigaction(SIGTRAP, &tmp_act, NULL);
+ assert(r =3D=3D 0);
+ if (setjmp(env_sigtrap)) {
+ trapped =3D 1;
+ } else {
+ maybe_traps(arg);
+ }
+ signal(SIGTRAP, SIG_DFL);
+
+ printf("%s(%4lld) -> %s\n", who, (long long int)arg,=20
+ trapped ? "TRAP" : "no trap" );
+}
+
+static void twi_0_neg100 ( long n ) {
+ __asm__ __volatile__("twi 0, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_1_neg100 ( long n ) {
+ __asm__ __volatile__("twi 1, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_2_neg100 ( long n ) {
+ __asm__ __volatile__("twi 2, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_3_neg100 ( long n ) {
+ __asm__ __volatile__("twi 3, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_4_neg100 ( long n ) {
+ __asm__ __volatile__("twi 4, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_5_neg100 ( long n ) {
+ __asm__ __volatile__("twi 5, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_6_neg100 ( long n ) {
+ __asm__ __volatile__("twi 6, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_7_neg100 ( long n ) {
+ __asm__ __volatile__("twi 7, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_8_neg100 ( long n ) {
+ __asm__ __volatile__("twi 8, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_9_neg100 ( long n ) {
+ __asm__ __volatile__("twi 9, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_10_neg100 ( long n ) {
+ __asm__ __volatile__("twi 10, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_11_neg100 ( long n ) {
+ __asm__ __volatile__("twi 11, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_12_neg100 ( long n ) {
+ __asm__ __volatile__("twi 12, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_13_neg100 ( long n ) {
+ __asm__ __volatile__("twi 13, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_14_neg100 ( long n ) {
+ __asm__ __volatile__("twi 14, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_15_neg100 ( long n ) {
+ __asm__ __volatile__("twi 15, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_16_neg100 ( long n ) {
+ __asm__ __volatile__("twi 16, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_17_neg100 ( long n ) {
+ __asm__ __volatile__("twi 17, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_18_neg100 ( long n ) {
+ __asm__ __volatile__("twi 18, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_19_neg100 ( long n ) {
+ __asm__ __volatile__("twi 19, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_20_neg100 ( long n ) {
+ __asm__ __volatile__("twi 20, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_21_neg100 ( long n ) {
+ __asm__ __volatile__("twi 21, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_22_neg100 ( long n ) {
+ __asm__ __volatile__("twi 22, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_23_neg100 ( long n ) {
+ __asm__ __volatile__("twi 23, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_24_neg100 ( long n ) {
+ __asm__ __volatile__("twi 24, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_25_neg100 ( long n ) {
+ __asm__ __volatile__("twi 25, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_26_neg100 ( long n ) {
+ __asm__ __volatile__("twi 26, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_27_neg100 ( long n ) {
+ __asm__ __volatile__("twi 27, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_28_neg100 ( long n ) {
+ __asm__ __volatile__("twi 28, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_29_neg100 ( long n ) {
+ __asm__ __volatile__("twi 29, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_30_neg100 ( long n ) {
+ __asm__ __volatile__("twi 30, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void twi_31_neg100 ( long n ) {
+ __asm__ __volatile__("twi 31, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+
+#if defined(__powerpc64__)
+
+static void tdi_0_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 0, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_1_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 1, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_2_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 2, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_3_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 3, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_4_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 4, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_5_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 5, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_6_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 6, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_7_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 7, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_8_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 8, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_9_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 9, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_10_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 10, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_11_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 11, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_12_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 12, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_13_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 13, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_14_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 14, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_15_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 15, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_16_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 16, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_17_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 17, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_18_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 18, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_19_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 19, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_20_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 20, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_21_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 21, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_22_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 22, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_23_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 23, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_24_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 24, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_25_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 25, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_26_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 26, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_27_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 27, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_28_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 28, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_29_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 29, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_30_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 30, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+static void tdi_31_neg100 ( long n ) {
+ __asm__ __volatile__("tdi 31, %0,-100"
+ : /*out*/ : /*in*/ "r" (n) );
+}
+
+#endif
+
+
+int main ( void )
+{
+#define TWI_GROUP(cmp) \
+ try("twi_" #cmp "_neg100", twi_##cmp##_neg100, -150); \
+ try("twi_" #cmp "_neg100", twi_##cmp##_neg100, -100); \
+ try("twi_" #cmp "_neg100", twi_##cmp##_neg100, -50);
+
+ TWI_GROUP(0);
+ TWI_GROUP(1);
+ TWI_GROUP(2);
+ TWI_GROUP(3);
+ TWI_GROUP(4);
+ TWI_GROUP(5);
+ TWI_GROUP(6);
+ TWI_GROUP(7);
+ TWI_GROUP(8);
+ TWI_GROUP(9);
+ TWI_GROUP(10);
+ TWI_GROUP(11);
+ TWI_GROUP(12);
+ TWI_GROUP(13);
+ TWI_GROUP(14);
+ TWI_GROUP(15);
+ TWI_GROUP(16);
+ TWI_GROUP(17);
+ TWI_GROUP(18);
+ TWI_GROUP(19);
+ TWI_GROUP(20);
+ TWI_GROUP(21);
+ TWI_GROUP(22);
+ TWI_GROUP(23);
+ TWI_GROUP(24);
+ TWI_GROUP(25);
+ TWI_GROUP(26);
+ TWI_GROUP(27);
+ TWI_GROUP(28);
+ TWI_GROUP(29);
+ TWI_GROUP(30);
+ TWI_GROUP(31);
+#if defined(__powerpc64__)
+#define TDI_GROUP(cmp) \
+ try("tdi_" #cmp "_neg100", tdi_##cmp##_neg100, -150); \
+ try("tdi_" #cmp "_neg100", tdi_##cmp##_neg100, -100); \
+ try("tdi_" #cmp "_neg100", tdi_##cmp##_neg100, -50);
+
+ TDI_GROUP(0);
+ TDI_GROUP(1);
+ TDI_GROUP(2);
+ TDI_GROUP(3);
+ TDI_GROUP(4);
+ TDI_GROUP(5);
+ TDI_GROUP(6);
+ TDI_GROUP(7);
+ TDI_GROUP(8);
+ TDI_GROUP(9);
+ TDI_GROUP(10);
+ TDI_GROUP(11);
+ TDI_GROUP(12);
+ TDI_GROUP(13);
+ TDI_GROUP(14);
+ TDI_GROUP(15);
+ TDI_GROUP(16);
+ TDI_GROUP(17);
+ TDI_GROUP(18);
+ TDI_GROUP(19);
+ TDI_GROUP(20);
+ TDI_GROUP(21);
+ TDI_GROUP(22);
+ TDI_GROUP(23);
+ TDI_GROUP(24);
+ TDI_GROUP(25);
+ TDI_GROUP(26);
+ TDI_GROUP(27);
+ TDI_GROUP(28);
+ TDI_GROUP(29);
+ TDI_GROUP(30);
+ TDI_GROUP(31);
+#endif
+ return 0;
+}
Added: trunk/none/tests/ppc64/twi_tdi.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/ppc64/twi_tdi.stderr.exp (re=
v 0)
+++ trunk/none/tests/ppc64/twi_tdi.stderr.exp 2006-02-07 20:58:12 UTC (re=
v 5618)
@@ -0,0 +1,2 @@
+
+
Added: trunk/none/tests/ppc64/twi_tdi.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/ppc64/twi_tdi.stdout.exp (re=
v 0)
+++ trunk/none/tests/ppc64/twi_tdi.stdout.exp 2006-02-07 20:58:12 UTC (re=
v 5618)
@@ -0,0 +1,192 @@
+twi_0_neg100(-150) -> no trap
+twi_0_neg100(-100) -> no trap
+twi_0_neg100( -50) -> no trap
+twi_1_neg100(-150) -> no trap
+twi_1_neg100(-100) -> no trap
+twi_1_neg100( -50) -> TRAP
+twi_2_neg100(-150) -> TRAP
+twi_2_neg100(-100) -> no trap
+twi_2_neg100( -50) -> no trap
+twi_3_neg100(-150) -> TRAP
+twi_3_neg100(-100) -> no trap
+twi_3_neg100( -50) -> TRAP
+twi_4_neg100(-150) -> no trap
+twi_4_neg100(-100) -> TRAP
+twi_4_neg100( -50) -> no trap
+twi_5_neg100(-150) -> no trap
+twi_5_neg100(-100) -> TRAP
+twi_5_neg100( -50) -> TRAP
+twi_6_neg100(-150) -> TRAP
+twi_6_neg100(-100) -> TRAP
+twi_6_neg100( -50) -> no trap
+twi_7_neg100(-150) -> TRAP
+twi_7_neg100(-100) -> TRAP
+twi_7_neg100( -50) -> TRAP
+twi_8_neg100(-150) -> no trap
+twi_8_neg100(-100) -> no trap
+twi_8_neg100( -50) -> TRAP
+twi_9_neg100(-150) -> no trap
+twi_9_neg100(-100) -> no trap
+twi_9_neg100( -50) -> TRAP
+twi_10_neg100(-150) -> TRAP
+twi_10_neg100(-100) -> no trap
+twi_10_neg100( -50) -> TRAP
+twi_11_neg100(-150) -> TRAP
+twi_11_neg100(-100) -> no trap
+twi_11_neg100( -50) -> TRAP
+twi_12_neg100(-150) -> no trap
+twi_12_neg100(-100) -> TRAP
+twi_12_neg100( -50) -> TRAP
+twi_13_neg100(-150) -> no trap
+twi_13_neg100(-100) -> TRAP
+twi_13_neg100( -50) -> TRAP
+twi_14_neg100(-150) -> TRAP
+twi_14_neg100(-100) -> TRAP
+twi_14_neg100( -50) -> TRAP
+twi_15_neg100(-150) -> TRAP
+twi_15_neg100(-100) -> TRAP
+twi_15_neg100( -50) -> TRAP
+twi_16_neg100(-150) -> TRAP
+twi_16_neg100(-100) -> no trap
+twi_16_neg100( -50) -> no trap
+twi_17_neg100(-150) -> TRAP
+twi_17_neg100(-100) -> no trap
+twi_17_neg100( -50) -> TRAP
+twi_18_neg100(-150) -> TRAP
+twi_18_neg100(-100) -> no trap
+twi_18_neg100( -50) -> no trap
+twi_19_neg100(-150) -> TRAP
+twi_19_neg100(-100) -> no trap
+twi_19_neg100( -50) -> TRAP
+twi_20_neg100(-150) -> TRAP
+twi_20_neg100(-100) -> TRAP
+twi_20_neg100( -50) -> no trap
+twi_21_neg100(-150) -> TRAP
+twi_21_neg100(-100) -> TRAP
+twi_21_neg100( -50) -> TRAP
+twi_22_neg100(-150) -> TRAP
+twi_22_neg100(-100) -> TRAP
+twi_22_neg100( -50) -> no trap
+twi_23_neg100(-150) -> TRAP
+twi_23_neg100(-100) -> TRAP
+twi_23_neg100( -50) -> TRAP
+twi_24_neg100(-150) -> TRAP
+twi_24_neg100(-100) -> no trap
+twi_24_neg100( -50) -> TRAP
+twi_25_neg100(-150) -> TRAP
+twi_25_neg100(-100) -> no trap
+twi_25_neg100( -50) -> TRAP
+twi_26_neg100(-150) -> TRAP
+twi_26_neg100(-100) -> no trap
+twi_26_neg100( -50) -> TRAP
+twi_27_neg100(-150) -> TRAP
+twi_27_neg100(-100) -> no trap
+twi_27_neg100( -50) -> TRAP
+twi_28_neg100(-150) -> TRAP
+twi_28_neg100(-100) -> TRAP
+twi_28_neg100( -50) -> TRAP
+twi_29_neg100(-150) -> TRAP
+twi_29_neg100(-100) -> TRAP
+twi_29_neg100( -50) -> TRAP
+twi_30_neg100(-150) -> TRAP
+twi_30_neg100(-100) -> TRAP
+twi_30_neg100( -50) -> TRAP
+twi_31_neg100(-150) -> TRAP
+twi_31_neg100(-100) -> TRAP
+twi_31_neg100( -50) -> TRAP
+tdi_0_neg100(-150) -> no trap
+tdi_0_neg100(-100) -> no trap
+tdi_0_neg100( -50) -> no trap
+tdi_1_neg100(-150) -> no trap
+tdi_1_neg100(-100) -> no trap
+tdi_1_neg100( -50) -> TRAP
+tdi_2_neg100(-150) -> TRAP
+tdi_2_neg100(-100) -> no trap
+tdi_2_neg100( -50) -> no trap
+tdi_3_neg100(-150) -> TRAP
+tdi_3_neg100(-100) -> no trap
+tdi_3_neg100( -50) -> TRAP
+tdi_4_neg100(-150) -> no trap
+tdi_4_neg100(-100) -> TRAP
+tdi_4_neg100( -50) -> no trap
+tdi_5_neg100(-150) -> no trap
+tdi_5_neg100(-100) -> TRAP
+tdi_5_neg100( -50) -> TRAP
+tdi_6_neg100(-150) -> TRAP
+tdi_6_neg100(-100) -> TRAP
+tdi_6_neg100( -50) -> no trap
+tdi_7_neg100(-150) -> TRAP
+tdi_7_neg100(-100) -> TRAP
+tdi_7_neg100( -50) -> TRAP
+tdi_8_neg100(-150) -> no trap
+tdi_8_neg100(-100) -> no trap
+tdi_8_neg100( -50) -> TRAP
+tdi_9_neg100(-150) -> no trap
+tdi_9_neg100(-100) -> no trap
+tdi_9_neg100( -50) -> TRAP
+tdi_10_neg100(-150) -> TRAP
+tdi_10_neg100(-100) -> no trap
+tdi_10_neg100( -50) -> TRAP
+tdi_11_neg100(-150) -> TRAP
+tdi_11_neg100(-100) -> no trap
+tdi_11_neg100( -50) -> TRAP
+tdi_12_neg100(-150) -> no trap
+tdi_12_neg100(-100) -> TRAP
+tdi_12_neg100( -50) -> TRAP
+tdi_13_neg100(-150) -> no trap
+tdi_13_neg100(-100) -> TRAP
+tdi_13_neg100( -50) -> TRAP
+tdi_14_neg100(-150) -> TRAP
+tdi_14_neg100(-100) -> TRAP
+tdi_14_neg100( -50) -> TRAP
+tdi_15_neg100(-150) -> TRAP
+tdi_15_neg100(-100) -> TRAP
+tdi_15_neg100( -50) -> TRAP
+tdi_16_neg100(-150) -> TRAP
+tdi_16_neg100(-100) -> no trap
+tdi_16_neg100( -50) -> no trap
+tdi_17_neg100(-150) -> TRAP
+tdi_17_neg100(-100) -> no trap
+tdi_17_neg100( -50) -> TRAP
+tdi_18_neg100(-150) -> TRAP
+tdi_18_neg100(-100) -> no trap
+tdi_18_neg100( -50) -> no trap
+tdi_19_neg100(-150) -> TRAP
+tdi_19_neg100(-100) -> no trap
+tdi_19_neg100( -50) -> TRAP
+tdi_20_neg100(-150) -> TRAP
+tdi_20_neg100(-100) -> TRAP
+tdi_20_neg100( -50) -> no trap
+tdi_21_neg100(-150) -> TRAP
+tdi_21_neg100(-100) -> TRAP
+tdi_21_neg100( -50) -> TRAP
+tdi_22_neg100(-150) -> TRAP
+tdi_22_neg100(-100) -> TRAP
+tdi_22_neg100( -50) -> no trap
+tdi_23_neg100(-150) -> TRAP
+tdi_23_neg100(-100) -> TRAP
+tdi_23_neg100( -50) -> TRAP
+tdi_24_neg100(-150) -> TRAP
+tdi_24_neg100(-100) -> no trap
+tdi_24_neg100( -50) -> TRAP
+tdi_25_neg100(-150) -> TRAP
+tdi_25_neg100(-100) -> no trap
+tdi_25_neg100( -50) -> TRAP
+tdi_26_neg100(-150) -> TRAP
+tdi_26_neg100(-100) -> no trap
+tdi_26_neg100( -50) -> TRAP
+tdi_27_neg100(-150) -> TRAP
+tdi_27_neg100(-100) -> no trap
+tdi_27_neg100( -50) -> TRAP
+tdi_28_neg100(-150) -> TRAP
+tdi_28_neg100(-100) -> TRAP
+tdi_28_neg100( -50) -> TRAP
+tdi_29_neg100(-150) -> TRAP
+tdi_29_neg100(-100) -> TRAP
+tdi_29_neg100( -50) -> TRAP
+tdi_30_neg100(-150) -> TRAP
+tdi_30_neg100(-100) -> TRAP
+tdi_30_neg100( -50) -> TRAP
+tdi_31_neg100(-150) -> TRAP
+tdi_31_neg100(-100) -> TRAP
+tdi_31_neg100( -50) -> TRAP
Added: trunk/none/tests/ppc64/twi_tdi.vgtest
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/ppc64/twi_tdi.vgtest (rev 0)
+++ trunk/none/tests/ppc64/twi_tdi.vgtest 2006-02-07 20:58:12 UTC (rev 56=
18)
@@ -0,0 +1 @@
+prog: twi_tdi
|
|
From: Eric P. <eri...@wa...> - 2006-02-07 20:57:25
|
Adam Gundy wrote: > Julian Seward <js...@ac...> wrote: > >> Eric >> >>> I've just been trying to make Wine run under valgrind (3.1.0). Things >>> greately evolved since our last tries: we can now run lots of >>> applications, and a major part of our test suite under valgrind. >>> congrats folks!! >> >> >> That's great. In an ideal world we could make Wine run really well >> under V and then be able to use V to debug Windows apps. Adam Gundy >> did this a couple of years ago, but the required changes were never >> merged in. > > > hmm. I haven't looked at this in quite a while (as you say), but it > sounds like all that is needed now is the part which handles Windows PDB > files (debugging info) - that was basically taken from WINE (a long time > ago), and hacked into valgrind's symbol handling stuff. > > sounds like the patch should amount to very little now... except that we do have in wine support for more recent versions of PDB files, which shall prove to be a little bit more of code A+ -- Eric Pouech |
|
From: <sv...@va...> - 2006-02-07 20:56:44
|
Author: sewardj
Date: 2006-02-07 20:56:41 +0000 (Tue, 07 Feb 2006)
New Revision: 5617
Log:
Synthesise and deliver SIGTRAP to clients when requested to do so by vex.
Modified:
trunk/coregrind/m_scheduler/scheduler.c
trunk/coregrind/m_signals.c
trunk/coregrind/pub_core_signals.h
trunk/include/vki-linux.h
Modified: trunk/coregrind/m_scheduler/scheduler.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_scheduler/scheduler.c 2006-02-06 23:22:31 UTC (rev =
5616)
+++ trunk/coregrind/m_scheduler/scheduler.c 2006-02-07 20:56:41 UTC (rev =
5617)
@@ -950,6 +950,10 @@
break;
}
=20
+ case VEX_TRC_JMP_TRAP:
+ VG_(synth_sigtrap)(tid);
+ break;
+
case VEX_TRC_JMP_NODECODE:
#define M(a) VG_(message)(Vg_UserMsg, a);
M("Your program just tried to execute an instruction that Valgrind" )=
;
Modified: trunk/coregrind/m_signals.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_signals.c 2006-02-06 23:22:31 UTC (rev 5616)
+++ trunk/coregrind/m_signals.c 2006-02-07 20:56:41 UTC (rev 5617)
@@ -1352,6 +1352,20 @@
deliver_signal(tid, &info);
}
=20
+// Synthesise a SIGTRAP.
+void VG_(synth_sigtrap)(ThreadId tid)
+{
+ vki_siginfo_t info;
+
+ vg_assert(VG_(threads)[tid].status =3D=3D VgTs_Runnable);
+
+ info.si_signo =3D VKI_SIGTRAP;
+ info.si_code =3D VKI_TRAP_TRACE; /* jrs: no idea what this should be =
*/
+
+ resume_scheduler(tid);
+ deliver_signal(tid, &info);
+}
+
/* Make a signal pending for a thread, for later delivery.
VG_(poll_signals) will arrange for it to be delivered at the right
time.=20
Modified: trunk/coregrind/pub_core_signals.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/pub_core_signals.h 2006-02-06 23:22:31 UTC (rev 5616)
+++ trunk/coregrind/pub_core_signals.h 2006-02-07 20:56:41 UTC (rev 5617)
@@ -72,6 +72,7 @@
extern void VG_(synth_fault_mapping)(ThreadId tid, Addr addr);
extern void VG_(synth_fault_perms) (ThreadId tid, Addr addr);
extern void VG_(synth_sigill) (ThreadId tid, Addr addr);
+extern void VG_(synth_sigtrap) (ThreadId tid);
=20
/* Extend the stack to cover addr, if possible */
extern Bool VG_(extend_stack)(Addr addr, UInt maxsize);
Modified: trunk/include/vki-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/vki-linux.h 2006-02-06 23:22:31 UTC (rev 5616)
+++ trunk/include/vki-linux.h 2006-02-07 20:56:41 UTC (rev 5617)
@@ -430,6 +430,12 @@
#define VKI_BUS_OBJERR (__VKI_SI_FAULT|3) /* object specific hardware er=
ror */
=20
/*
+ * SIGTRAP si_codes
+ */
+#define VKI_TRAP_BRKPT (__VKI_SI_FAULT|1) /* process breakpoint */
+#define VKI_TRAP_TRACE (__VKI_SI_FAULT|2) /* process trace trap */
+
+/*
* This works because the alignment is ok on all current architectures
* but we leave open this being overridden in the future
*/
|
|
From: Eric P. <eri...@wa...> - 2006-02-07 20:56:36
|
Julian Seward wrote: > Eric > Uh ... where did you post these, exactly? Can you send a URL ? http://bugs.kde.org/show_bug.cgi?id=120728 http://bugs.kde.org/show_bug.cgi?id=120732 >>What doesn't currently work in valgrind is changing the EIP in the >>sigcontext. Current implementation of restore_sigcontext() in >>coregrind/m_sigframe/sigframe-x86-linux.c doesn't restore EIP into VEX: >>when we return from the signal handler, execution resumes at the opcode >>with first generated the signal. Back to square one :-/ > > > Sun's JVM also does nasty tricks like this, and I think Tom Hughes > got the same bad-opcode result when he tried restoring EIP into vex. > I would like to fix it for Java folks too. > > > >>I simply tried to set EIP back in the restore_sigcontext() function, but >>this leads to a crash in IR (about unsupported opcode). > > > Hmm. Doing that works OK at least for my simple test program > on SuSE 10 (x86): > yup, your 'simple' test program works I slightly changed your test program, to something that's closer to what we do in Wine... and it doesn't work under VG :-( I left in the test code for both forms for linux signal handlers (< 2.2 and >= 2.1.48), and both fail identically however the error I get is not the as the one with real Wine (but the test framework is not the same either) #include <string.h> #include <stdio.h> #include <stdlib.h> #include <signal.h> #include <assert.h> #include <setjmp.h> #include "valgrind/memcheck.h" #define __USE_GNU #include <sys/ucontext.h> jmp_buf my_je; void diversion( int i, char* ptr ) { printf("diversion %d %s!\n", i, ptr); longjmp(my_je, i); } typedef struct { unsigned short sc_gs, __gsh; unsigned short sc_fs, __fsh; unsigned short sc_es, __esh; unsigned short sc_ds, __dsh; unsigned long sc_edi; unsigned long sc_esi; unsigned long sc_ebp; unsigned long sc_esp; unsigned long sc_ebx; unsigned long sc_edx; unsigned long sc_ecx; unsigned long sc_eax; unsigned long sc_trapno; unsigned long sc_err; unsigned long sc_eip; unsigned short sc_cs, __csh; unsigned long sc_eflags; unsigned long esp_at_signal; unsigned short sc_ss, __ssh; unsigned long i387; unsigned long oldmask; unsigned long cr2; } volatile SIGCONTEXT; struct stack_layout { void *ret_addr; int i; char *str; char buf[16]; unsigned long ebp; unsigned long eip; } *stack; void handler_old ( int signo, SIGCONTEXT __context ) { printf("in handler2, setting EIP to %p\n", (void*)&diversion); stack = (struct stack_layout*)__context.sc_esp; stack--; /* push the stack_layout structure */ VALGRIND_MAKE_WRITABLE(stack, sizeof(*stack)); stack->ret_addr = (void *)0xdeadbabe; /* raise_func must not return */ /* setting this to a reasonable value doesn't help stack->ret_addr = (unsigned long)&diversion; */ stack->i = 12; stack->str = stack->buf; strcpy(stack->buf, "foo-bar"); __context.sc_eip = (unsigned long)&diversion; __context.sc_esp = (unsigned long)stack; } void handler_new( int signo, siginfo_t* xx, void* uc) { ucontext_t* ctx = (ucontext_t*)uc; printf("in handler2, setting EIP to %p\n", (void*)&diversion); stack = (struct stack_layout*)ctx->uc_mcontext.gregs[REG_ESP]; stack--; /* push the stack_layout structure */ VALGRIND_MAKE_WRITABLE(stack, sizeof(*stack)); stack->ret_addr = (void *)0xdeadbabe; /* raise_func must not return */ /* setting this to a reasonable value doesn't help stack->ret_addr = (unsigned long)&diversion; */ stack->i = 12; stack->str = stack->buf; strcpy(stack->buf, "foo-bar"); ctx->uc_mcontext.gregs[REG_EIP] = (unsigned long)&diversion; ctx->uc_mcontext.gregs[REG_ESP] = (unsigned long)stack; } int main ( void ) { int r; struct sigaction act; memset(&act, 0, sizeof(act)); #if 0 act.sa_handler = (void (*)())handler_old; act.sa_flags = SA_RESTART | SA_ONSTACK; #else act.sa_sigaction = (void (*)())handler_new; act.sa_flags = SA_RESTART | SA_ONSTACK | SA_SIGINFO; #endif sigemptyset(&act.sa_mask); r = sigaction(SIGSEGV, &act, NULL); assert(r == 0); if ((r = setjmp(my_je)) == 0) { printf("before\n"); *(int*)1 = 1; } printf("after %d\n", r); return 0; } -- Eric Pouech |
|
From: <sv...@va...> - 2006-02-07 20:55:14
|
Author: sewardj
Date: 2006-02-07 20:55:08 +0000 (Tue, 07 Feb 2006)
New Revision: 1572
Log:
Word size fixes for twi/tdi (is trickier than it looks :-). Also add
missing DIP macros.
Modified:
trunk/priv/guest-ppc/toIR.c
Modified: trunk/priv/guest-ppc/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-ppc/toIR.c 2006-02-07 16:42:39 UTC (rev 1571)
+++ trunk/priv/guest-ppc/toIR.c 2006-02-07 20:55:08 UTC (rev 1572)
@@ -4489,22 +4489,22 @@
=20
/* Do the code generation for a trap. Returned Bool is true iff
this is an unconditional trap. */
-static Bool do_trap ( IRType ty, UChar TO,=20
+static Bool do_trap ( Bool is_twi, UChar TO,=20
IRExpr* argL0, ULong argR0, Addr64 cia )
{
IRTemp argL, argR;
IRExpr *argLe, *argRe, *cond, *tmp;
=20
- IROp opAND =3D ty=3D=3DIty_I32 ? Iop_And32 : Iop_And64;
- IROp opOR =3D ty=3D=3DIty_I32 ? Iop_Or32 : Iop_Or64;
- IROp opCMPORDS =3D ty=3D=3DIty_I32 ? Iop_CmpORD32S : Iop_CmpORD64S=
;
- IROp opCMPORDU =3D ty=3D=3DIty_I32 ? Iop_CmpORD32U : Iop_CmpORD64U=
;
- IROp opCMPNE =3D ty=3D=3DIty_I32 ? Iop_CmpNE32 : Iop_CmpNE64;
- IROp opCMPEQ =3D ty=3D=3DIty_I32 ? Iop_CmpEQ32 : Iop_CmpEQ64;
- IRExpr* const0 =3D ty=3D=3DIty_I32 ? mkU32(0) : mkU64(0);
- IRExpr* const2 =3D ty=3D=3DIty_I32 ? mkU32(2) : mkU64(2);
- IRExpr* const4 =3D ty=3D=3DIty_I32 ? mkU32(4) : mkU64(4);
- IRExpr* const8 =3D ty=3D=3DIty_I32 ? mkU32(8) : mkU64(8);
+ IROp opAND =3D is_twi ? Iop_And32 : Iop_And64;
+ IROp opOR =3D is_twi ? Iop_Or32 : Iop_Or64;
+ IROp opCMPORDS =3D is_twi ? Iop_CmpORD32S : Iop_CmpORD64S;
+ IROp opCMPORDU =3D is_twi ? Iop_CmpORD32U : Iop_CmpORD64U;
+ IROp opCMPNE =3D is_twi ? Iop_CmpNE32 : Iop_CmpNE64;
+ IROp opCMPEQ =3D is_twi ? Iop_CmpEQ32 : Iop_CmpEQ64;
+ IRExpr* const0 =3D is_twi ? mkU32(0) : mkU64(0);
+ IRExpr* const2 =3D is_twi ? mkU32(2) : mkU64(2);
+ IRExpr* const4 =3D is_twi ? mkU32(4) : mkU64(4);
+ IRExpr* const8 =3D is_twi ? mkU32(8) : mkU64(8);
=20
const UChar b11100 =3D 0x1C;
const UChar b00111 =3D 0x07;
@@ -4520,16 +4520,16 @@
return True; /* unconditional trap */
}
=20
- /* ty is the type at which the comparisons are done. This is not
- the same as the 32/64-mode-ness. */
- vassert(ty =3D=3D Ity_I32 || ty =3D=3D Ity_I64);
- argL =3D newTemp(ty);
- argR =3D newTemp(ty);
- if (ty =3D=3D Ity_I32) {
- assign( argL, mkSzNarrow32(Ity_I32, argL0) );
+ if (is_twi) {
+ argL =3D newTemp(Ity_I32);
+ argR =3D newTemp(Ity_I32);
+ assign( argL, mode64 ? mkSzNarrow32(Ity_I64,argL0)
+ : argL0 );
assign( argR, mkU32( (UInt)argR0 ));
} else {
vassert(mode64);
+ argL =3D newTemp(Ity_I64);
+ argR =3D newTemp(Ity_I64);
assign( argL, argL0 );
assign( argR, mkU64( argR0 ));
}
@@ -4579,7 +4579,7 @@
=20
switch (opc1) {
case 0x03: // twi (Trap Word Immediate, PPC32 p548)
- uncond =3D do_trap( Ity_I32, TO, getIReg(rA_addr), simm16, cia );
+ uncond =3D do_trap( True/*is_twi*/, TO, getIReg(rA_addr), simm16, =
cia );
if (TO =3D=3D 4) {
DIP("tweqi r%u,%d\n", (UInt)rA_addr, (Int)simm16);
} else {
@@ -4589,7 +4589,12 @@
case 0x02: // tdi
if (!mode64)
return False;
- uncond =3D do_trap( Ity_I64, TO, getIReg(rA_addr), simm16, cia );
+ uncond =3D do_trap( False/*!is_twi*/, TO, getIReg(rA_addr), simm16=
, cia );
+ if (TO =3D=3D 4) {
+ DIP("tdeqi r%u,%d\n", (UInt)rA_addr, (Int)simm16);
+ } else {
+ DIP("td%di r%u,%d\n", (Int)TO, (UInt)rA_addr, (Int)simm16);
+ }
break;
default:
return False;
|
|
From: <sv...@va...> - 2006-02-07 16:43:47
|
Author: sewardj
Date: 2006-02-07 16:42:39 +0000 (Tue, 07 Feb 2006)
New Revision: 1571
Log:
ppc32/64: handle twi/tdi (conditional trap) instructions
Modified:
trunk/priv/guest-ppc/toIR.c
trunk/priv/host-ppc/hdefs.c
trunk/priv/ir/irdefs.c
trunk/pub/libvex_ir.h
trunk/pub/libvex_trc_values.h
Modified: trunk/priv/guest-ppc/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-ppc/toIR.c 2006-02-06 22:19:17 UTC (rev 1570)
+++ trunk/priv/guest-ppc/toIR.c 2006-02-07 16:42:39 UTC (rev 1571)
@@ -4483,6 +4483,130 @@
}
=20
=20
+/*=20
+ Trap instructions
+*/
+
+/* Do the code generation for a trap. Returned Bool is true iff
+ this is an unconditional trap. */
+static Bool do_trap ( IRType ty, UChar TO,=20
+ IRExpr* argL0, ULong argR0, Addr64 cia )
+{
+ IRTemp argL, argR;
+ IRExpr *argLe, *argRe, *cond, *tmp;
+
+ IROp opAND =3D ty=3D=3DIty_I32 ? Iop_And32 : Iop_And64;
+ IROp opOR =3D ty=3D=3DIty_I32 ? Iop_Or32 : Iop_Or64;
+ IROp opCMPORDS =3D ty=3D=3DIty_I32 ? Iop_CmpORD32S : Iop_CmpORD64S=
;
+ IROp opCMPORDU =3D ty=3D=3DIty_I32 ? Iop_CmpORD32U : Iop_CmpORD64U=
;
+ IROp opCMPNE =3D ty=3D=3DIty_I32 ? Iop_CmpNE32 : Iop_CmpNE64;
+ IROp opCMPEQ =3D ty=3D=3DIty_I32 ? Iop_CmpEQ32 : Iop_CmpEQ64;
+ IRExpr* const0 =3D ty=3D=3DIty_I32 ? mkU32(0) : mkU64(0);
+ IRExpr* const2 =3D ty=3D=3DIty_I32 ? mkU32(2) : mkU64(2);
+ IRExpr* const4 =3D ty=3D=3DIty_I32 ? mkU32(4) : mkU64(4);
+ IRExpr* const8 =3D ty=3D=3DIty_I32 ? mkU32(8) : mkU64(8);
+
+ const UChar b11100 =3D 0x1C;
+ const UChar b00111 =3D 0x07;
+
+ if ((TO & b11100) =3D=3D b11100 || (TO & b00111) =3D=3D b00111) {
+ /* Unconditional trap. Just do the exit without=20
+ testing the arguments. */
+ stmt( IRStmt_Exit(=20
+ binop(opCMPEQ, const0, const0),=20
+ Ijk_Trap,
+ mode64 ? IRConst_U64(cia) : IRConst_U32((UInt)cia)=20
+ ));
+ return True; /* unconditional trap */
+ }
+
+ /* ty is the type at which the comparisons are done. This is not
+ the same as the 32/64-mode-ness. */
+ vassert(ty =3D=3D Ity_I32 || ty =3D=3D Ity_I64);
+ argL =3D newTemp(ty);
+ argR =3D newTemp(ty);
+ if (ty =3D=3D Ity_I32) {
+ assign( argL, mkSzNarrow32(Ity_I32, argL0) );
+ assign( argR, mkU32( (UInt)argR0 ));
+ } else {
+ vassert(mode64);
+ assign( argL, argL0 );
+ assign( argR, mkU64( argR0 ));
+ }
+ argLe =3D mkexpr(argL);
+ argRe =3D mkexpr(argR);
+ cond =3D const0;
+ if (TO & 16) { // L <s R
+ tmp =3D binop(opAND, binop(opCMPORDS, argLe, argRe), const8);
+ cond =3D binop(opOR, tmp, cond);
+ }
+ if (TO & 8) { // L >s R
+ tmp =3D binop(opAND, binop(opCMPORDS, argLe, argRe), const4);
+ cond =3D binop(opOR, tmp, cond);
+ }
+ if (TO & 4) { // L =3D=3D R
+ tmp =3D binop(opAND, binop(opCMPORDS, argLe, argRe), const2);
+ cond =3D binop(opOR, tmp, cond);
+ }
+ if (TO & 2) { // L <u R
+ tmp =3D binop(opAND, binop(opCMPORDU, argLe, argRe), const8);
+ cond =3D binop(opOR, tmp, cond);
+ }
+ if (TO & 1) { // L >u R
+ tmp =3D binop(opAND, binop(opCMPORDU, argLe, argRe), const4);
+ cond =3D binop(opOR, tmp, cond);
+ }
+ stmt( IRStmt_Exit(=20
+ binop(opCMPNE, cond, const0),=20
+ Ijk_Trap,
+ mode64 ? IRConst_U64(cia) : IRConst_U32((UInt)cia)=20
+ ));
+ return False; /* not an unconditional trap */
+}
+
+static Bool dis_trapi ( UInt theInstr,
+ /*OUT*/DisResult* dres )
+{
+ /* D-Form */
+ UChar opc1 =3D ifieldOPC(theInstr);
+ UChar TO =3D ifieldRegDS(theInstr);
+ UChar rA_addr =3D ifieldRegA(theInstr);
+ UInt uimm16 =3D ifieldUIMM16(theInstr);
+ ULong simm16 =3D extend_s_16to64(uimm16);
+ Addr64 cia =3D guest_CIA_curr_instr;
+ IRType ty =3D mode64 ? Ity_I64 : Ity_I32;
+ Bool uncond =3D False;
+
+ switch (opc1) {
+ case 0x03: // twi (Trap Word Immediate, PPC32 p548)
+ uncond =3D do_trap( Ity_I32, TO, getIReg(rA_addr), simm16, cia );
+ if (TO =3D=3D 4) {
+ DIP("tweqi r%u,%d\n", (UInt)rA_addr, (Int)simm16);
+ } else {
+ DIP("tw%di r%u,%d\n", (Int)TO, (UInt)rA_addr, (Int)simm16);
+ }
+ break;
+ case 0x02: // tdi
+ if (!mode64)
+ return False;
+ uncond =3D do_trap( Ity_I64, TO, getIReg(rA_addr), simm16, cia );
+ break;
+ default:
+ return False;
+ }
+
+ if (uncond) {
+ /* If the trap shows signs of being unconditional, don't
+ continue decoding past it. */
+ irbb->next =3D mkSzImm( ty, nextInsnAddr() );
+ irbb->jumpkind =3D Ijk_Boring;
+ dres->whatNext =3D Dis_StopHere;
+ }
+
+ return True;
+}
+
+
/*
System Linkage Instructions
*/
@@ -8725,13 +8849,10 @@
if (dis_syslink(theInstr, &dres)) goto decode_success;
goto decode_failure;
=20
-//zz /* Trap Instructions */
-//zz case 0x02: // tdi
-//zz DIP("trap op (tdi) =3D> not implemented\n");
-//zz goto decode_failure;
-//zz case 0x03: // twi
-//zz DIP("trap op (twi) =3D> not implemented\n");
-//zz goto decode_failure;
+ /* Trap Instructions */
+ case 0x02: case 0x03: // tdi, twi
+ if (dis_trapi(theInstr, &dres)) goto decode_success;
+ goto decode_failure;
=20
/* Floating Point Load Instructions */
case 0x30: case 0x31: case 0x32: // lfs, lfsu, lfd
Modified: trunk/priv/host-ppc/hdefs.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/host-ppc/hdefs.c 2006-02-06 22:19:17 UTC (rev 1570)
+++ trunk/priv/host-ppc/hdefs.c 2006-02-07 16:42:39 UTC (rev 1571)
@@ -2941,6 +2941,7 @@
case Ijk_NoDecode: trc =3D VEX_TRC_JMP_NODECODE; break;
case Ijk_TInval: trc =3D VEX_TRC_JMP_TINVAL; break;
case Ijk_NoRedir: trc =3D VEX_TRC_JMP_NOREDIR; break;
+ case Ijk_Trap: trc =3D VEX_TRC_JMP_TRAP; break;
case Ijk_Ret:
case Ijk_Call:
case Ijk_Boring:
Modified: trunk/priv/ir/irdefs.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/ir/irdefs.c 2006-02-06 22:19:17 UTC (rev 1570)
+++ trunk/priv/ir/irdefs.c 2006-02-07 16:42:39 UTC (rev 1571)
@@ -703,6 +703,7 @@
case Ijk_MapFail: vex_printf("MapFail"); break;
case Ijk_TInval: vex_printf("Invalidate"); break;
case Ijk_NoRedir: vex_printf("NoRedir"); break;
+ case Ijk_Trap: vex_printf("Trap"); break;
case Ijk_Sys_syscall: vex_printf("Sys_syscall"); break;
case Ijk_Sys_int32: vex_printf("Sys_int32"); break;
case Ijk_Sys_int128: vex_printf("Sys_int128"); break;
Modified: trunk/pub/libvex_ir.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/pub/libvex_ir.h 2006-02-06 22:19:17 UTC (rev 1570)
+++ trunk/pub/libvex_ir.h 2006-02-07 16:42:39 UTC (rev 1571)
@@ -912,6 +912,7 @@
Ijk_MapFail, /* Vex-provided address translation failed */
Ijk_TInval, /* Invalidate translations before continuing. =
*/
Ijk_NoRedir, /* Jump to un-redirected guest addr */
+ Ijk_Trap, /* current instruction did a user trap */
/* Unfortunately, various guest-dependent syscall kinds. They
all mean: do a syscall before continuing. */
Ijk_Sys_syscall, /* amd64 'syscall', ppc 'sc' */
Modified: trunk/pub/libvex_trc_values.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/pub/libvex_trc_values.h 2006-02-06 22:19:17 UTC (rev 1570)
+++ trunk/pub/libvex_trc_values.h 2006-02-07 16:42:39 UTC (rev 1571)
@@ -62,6 +62,8 @@
#define VEX_TRC_JMP_TINVAL 61 /* invalidate translations before
continuing */
#define VEX_TRC_JMP_NOREDIR 81 /* jump to undirected guest addr */
+#define VEX_TRC_JMP_TRAP 85 /* deliver trap (SIGTRAP?) before
+ continuing */
#define VEX_TRC_JMP_EMWARN 63 /* deliver emulation warning before
continuing */
#define VEX_TRC_JMP_EMFAIL 83 /* emulation fatal error; abort syste=
m */
|
|
From: Adam G. <ar...@cy...> - 2006-02-07 15:26:55
|
Julian Seward <js...@ac...> wrote: > Eric > >> I've just been trying to make Wine run under valgrind (3.1.0). Things >> greately evolved since our last tries: we can now run lots of >> applications, and a major part of our test suite under valgrind. >> congrats folks!! > > That's great. In an ideal world we could make Wine run really well > under V and then be able to use V to debug Windows apps. Adam Gundy > did this a couple of years ago, but the required changes were never > merged in. hmm. I haven't looked at this in quite a while (as you say), but it sounds like all that is needed now is the part which handles Windows PDB files (debugging info) - that was basically taken from WINE (a long time ago), and hacked into valgrind's symbol handling stuff. sounds like the patch should amount to very little now... Seeya, Adam -- Real Programmers don't comment their code. If it was hard to write, it should be hard to read, and even harder to modify. These are all my own opinions. |
|
From: <js...@ac...> - 2006-02-07 11:25:20
|
Nightly build on minnie ( SuSE 10.0, ppc32 ) started at 2006-02-07 05:00:01 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 191 tests, 11 stderr failures, 5 stdout failures ================= memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/mempool (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/stack_changes (stdout) memcheck/tests/stack_changes (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-fp (stderr) none/tests/ppc32/test_fx (stdout) none/tests/ppc32/test_fx (stderr) none/tests/ppc32/test_gx (stdout) |
|
From: <js...@ac...> - 2006-02-07 04:25:57
|
Nightly build on phoenix ( SuSE 10.0 ) started at 2006-02-07 03:30:01 GMT Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 223 tests, 7 stderr failures, 0 stdout failures ================= memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: <js...@ac...> - 2006-02-07 03:56:58
|
Nightly build on g5 ( YDL 4.0, ppc970 ) started at 2006-02-07 04:40:00 CET Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 195 tests, 6 stderr failures, 1 stdout failure ================= memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/pointer-trace (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 194 tests, 6 stderr failures, 1 stdout failure ================= memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/pointer-trace (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Feb 7 04:48:24 2006 --- new.short Tue Feb 7 04:56:51 2006 *************** *** 8,10 **** ! == 194 tests, 6 stderr failures, 1 stdout failure ================= memcheck/tests/leak-cycle (stderr) --- 8,10 ---- ! == 195 tests, 6 stderr failures, 1 stdout failure ================= memcheck/tests/leak-cycle (stderr) |
|
From: Tom H. <to...@co...> - 2006-02-07 03:44:26
|
Nightly build on dunsmere ( athlon, Fedora Core 4 ) started at 2006-02-07 03:30:06 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 225 tests, 8 stderr failures, 1 stdout failure ================= memcheck/tests/leak-tree (stderr) memcheck/tests/mempool (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2006-02-07 03:30:53
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2006-02-07 03:15:03 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 224 tests, 21 stderr failures, 1 stdout failure ================= memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/mempool (stderr) memcheck/tests/partial_load_dflt (stderr) memcheck/tests/partial_load_ok (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) memcheck/tests/xml1 (stderr) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2006-02-07 03:24:56
|
Nightly build on dellow ( x86_64, Fedora Core 4 ) started at 2006-02-07 03:10:08 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 245 tests, 5 stderr failures, 2 stdout failures ================= memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/amd64/faultstatus (stderr) none/tests/pth_cvsimple (stdout) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 244 tests, 6 stderr failures, 1 stdout failure ================= memcheck/tests/pointer-trace (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/amd64/faultstatus (stderr) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Feb 7 03:18:21 2006 --- new.short Tue Feb 7 03:24:48 2006 *************** *** 8,11 **** ! == 244 tests, 6 stderr failures, 1 stdout failure ================= ! memcheck/tests/pointer-trace (stderr) memcheck/tests/x86/scalar (stderr) --- 8,10 ---- ! == 245 tests, 5 stderr failures, 2 stdout failures ================= memcheck/tests/x86/scalar (stderr) *************** *** 14,15 **** --- 13,15 ---- none/tests/amd64/faultstatus (stderr) + none/tests/pth_cvsimple (stdout) none/tests/x86/faultstatus (stderr) |
|
From: Tom H. <th...@cy...> - 2006-02-07 03:20:43
|
Nightly build on aston ( x86_64, Fedora Core 3 ) started at 2006-02-07 03:05:14 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 245 tests, 6 stderr failures, 1 stdout failure ================= memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/amd64/faultstatus (stderr) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 244 tests, 6 stderr failures, 1 stdout failure ================= memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/amd64/faultstatus (stderr) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Feb 7 03:13:28 2006 --- new.short Tue Feb 7 03:20:32 2006 *************** *** 8,10 **** ! == 244 tests, 6 stderr failures, 1 stdout failure ================= memcheck/tests/stack_switch (stderr) --- 8,10 ---- ! == 245 tests, 6 stderr failures, 1 stdout failure ================= memcheck/tests/stack_switch (stderr) |
|
From: Tom H. <th...@cy...> - 2006-02-07 03:14:09
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2006-02-07 03:00:04 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 245 tests, 7 stderr failures, 1 stdout failure ================= memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/amd64/faultstatus (stderr) none/tests/fdleak_fcntl (stderr) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 244 tests, 7 stderr failures, 1 stdout failure ================= memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/amd64/faultstatus (stderr) none/tests/fdleak_fcntl (stderr) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Feb 7 03:06:30 2006 --- new.short Tue Feb 7 03:14:01 2006 *************** *** 8,10 **** ! == 244 tests, 7 stderr failures, 1 stdout failure ================= memcheck/tests/stack_switch (stderr) --- 8,10 ---- ! == 245 tests, 7 stderr failures, 1 stdout failure ================= memcheck/tests/stack_switch (stderr) |
|
From: Julian S. <js...@ac...> - 2006-02-07 01:23:57
|
Eric
> I've just been trying to make Wine run under valgrind (3.1.0). Things
> greately evolved since our last tries: we can now run lots of
> applications, and a major part of our test suite under valgrind.
> congrats folks!!
That's great. In an ideal world we could make Wine run really well
under V and then be able to use V to debug Windows apps. Adam Gundy
did this a couple of years ago, but the required changes were never
merged in.
> I've posted two patches in bugzilla to improve some parts, which
> hopefully can make for 3.2.0.
Uh ... where did you post these, exactly? Can you send a URL ?
> What doesn't currently work in valgrind is changing the EIP in the
> sigcontext. Current implementation of restore_sigcontext() in
> coregrind/m_sigframe/sigframe-x86-linux.c doesn't restore EIP into VEX:
> when we return from the signal handler, execution resumes at the opcode
> with first generated the signal. Back to square one :-/
Sun's JVM also does nasty tricks like this, and I think Tom Hughes
got the same bad-opcode result when he tried restoring EIP into vex.
I would like to fix it for Java folks too.
> I simply tried to set EIP back in the restore_sigcontext() function, but
> this leads to a crash in IR (about unsupported opcode).
Hmm. Doing that works OK at least for my simple test program
on SuSE 10 (x86):
$ vTRUNK --trace-signals=yes --tool=none ./sig_change_pc
[...]
--1237-- Max kernel-supported signal is 64
++1237++ sys_sigaction: sigNo 40, new 0xBEB86D18, old 0x0, new flags 0x4000004
before
--1237-- kill: sent signal 40 to pid 1237
--1237-- poll_signals: got signal 40 for thread 1
--1237-- Polling found signal 40 for tid 1
--1237-- delivering signal 40 (SIGRT8):0 to thread 1
--1237-- push_signal_frame (thread 1): signal 40
in handler, setting EIP to 0x8048588
returned EIP is 0x8048588
--1237-- VG_(signal_return) (thread 1): isRT=1 valid magic; EIP=0x8048588
diversion!
==1237==
Test program is below. It also works correctly if I uncomment the
two commented-out bits, so as to get a segfault instead. The relevant
valgrind diff (against current svn head, versions 5616/1570) is:
Index: coregrind/m_sigframe/sigframe-x86-linux.c
===================================================================
--- coregrind/m_sigframe/sigframe-x86-linux.c (revision 5616)
+++ coregrind/m_sigframe/sigframe-x86-linux.c (working copy)
@@ -630,8 +630,8 @@
tst->arch.vex.guest_ESI = sc->esi;
tst->arch.vex.guest_EDI = sc->edi;
//:: tst->arch.vex.guest_eflags = sc->eflags;
-//:: tst->arch.vex.guest_EIP = sc->eip;
-
+ VG_(printf)("returned EIP is %p\n", sc->eip);
+ tst->arch.vex.guest_EIP = sc->eip;
tst->arch.vex.guest_CS = sc->cs;
tst->arch.vex.guest_SS = sc->ss;
tst->arch.vex.guest_DS = sc->ds;
> I suppose I'm
> missing something (like resetting some other elements for execution in
> some other places). Anything I could do about this ?
Does this work for you? I'd like to help but obviously I need to be
able to reproduce the problem first.
J
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <assert.h>
#define __USE_GNU
#include <sys/ucontext.h>
void diversion ( void )
{
printf("diversion!\n");
exit(0);
}
void handler ( int signo, siginfo_t* info, void* ctxV )
{
ucontext_t* ctx = (ucontext_t*)ctxV;
printf("in handler, setting EIP to %p\n", (void*)&diversion);
ctx->uc_mcontext.gregs[REG_EIP] = (unsigned long)&diversion;
}
int main ( void )
{
int r;
struct sigaction act;
memset(&act, 0, sizeof(act));
act.sa_sigaction = handler;
act.sa_flags = SA_SIGINFO;
sigemptyset(&act.sa_mask);
r = sigaction(/*SIGSEGV*/40, &act, NULL);
assert(r == 0);
printf("before\n");
kill( getpid(), 40 );
/* *(int*)1 = 1; */
printf("after -- SHOULD NOT SEE THIS\n");
return 0;
}
|