/[gentoo-x86]/dev-util/valgrind/files/valgrind-3.6.1-fix-unhandled-opcode.patch
Gentoo

Contents of /dev-util/valgrind/files/valgrind-3.6.1-fix-unhandled-opcode.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Fri Feb 17 02:19:37 2012 UTC (2 years, 5 months ago) by blueness
Branch: MAIN
Backport upstream commits r11856 and r11904 to address bug #403179

(Portage version: 2.1.10.44/cvs/Linux x86_64)

1 diff -Naur valgrind-3.6.1.orig/coregrind/m_debuginfo/debuginfo.c valgrind-3.6.1/coregrind/m_debuginfo/debuginfo.c
2 --- valgrind-3.6.1.orig/coregrind/m_debuginfo/debuginfo.c 2010-10-20 16:19:43.000000000 -0400
3 +++ valgrind-3.6.1/coregrind/m_debuginfo/debuginfo.c 2012-02-16 21:10:53.000000000 -0500
4 @@ -1958,6 +1958,14 @@
5 case Cop_Sub: return wL - wR;
6 case Cop_And: return wL & wR;
7 case Cop_Mul: return wL * wR;
8 + case Cop_Shl: return wL << wR;
9 + case Cop_Shr: return wL >> wR;
10 + case Cop_Eq: return wL == wR ? 1 : 0;
11 + case Cop_Ge: return (Word) wL >= (Word) wR ? 1 : 0;
12 + case Cop_Gt: return (Word) wL > (Word) wR ? 1 : 0;
13 + case Cop_Le: return (Word) wL <= (Word) wR ? 1 : 0;
14 + case Cop_Lt: return (Word) wL < (Word) wR ? 1 : 0;
15 + case Cop_Ne: return wL != wR ? 1 : 0;
16 default: goto unhandled;
17 }
18 /*NOTREACHED*/
19 diff -Naur valgrind-3.6.1.orig/coregrind/m_debuginfo/priv_storage.h valgrind-3.6.1/coregrind/m_debuginfo/priv_storage.h
20 --- valgrind-3.6.1.orig/coregrind/m_debuginfo/priv_storage.h 2010-10-20 16:19:43.000000000 -0400
21 +++ valgrind-3.6.1/coregrind/m_debuginfo/priv_storage.h 2012-02-16 21:10:49.000000000 -0500
22 @@ -218,7 +218,15 @@
23 Cop_Add=0x321,
24 Cop_Sub,
25 Cop_And,
26 - Cop_Mul
27 + Cop_Mul,
28 + Cop_Shl,
29 + Cop_Shr,
30 + Cop_Eq,
31 + Cop_Ge,
32 + Cop_Gt,
33 + Cop_Le,
34 + Cop_Lt,
35 + Cop_Ne
36 }
37 CfiOp;
38
39 diff -Naur valgrind-3.6.1.orig/coregrind/m_debuginfo/readdwarf.c valgrind-3.6.1/coregrind/m_debuginfo/readdwarf.c
40 --- valgrind-3.6.1.orig/coregrind/m_debuginfo/readdwarf.c 2010-10-20 16:19:43.000000000 -0400
41 +++ valgrind-3.6.1/coregrind/m_debuginfo/readdwarf.c 2012-02-16 21:10:49.000000000 -0500
42 @@ -2831,6 +2831,22 @@
43 op = Cop_And; opname = "and"; goto binop;
44 case DW_OP_mul:
45 op = Cop_Mul; opname = "mul"; goto binop;
46 + case DW_OP_shl:
47 + op = Cop_Shl; opname = "shl"; goto binop;
48 + case DW_OP_shr:
49 + op = Cop_Shr; opname = "shr"; goto binop;
50 + case DW_OP_eq:
51 + op = Cop_Eq; opname = "eq"; goto binop;
52 + case DW_OP_ge:
53 + op = Cop_Ge; opname = "ge"; goto binop;
54 + case DW_OP_gt:
55 + op = Cop_Gt; opname = "gt"; goto binop;
56 + case DW_OP_le:
57 + op = Cop_Le; opname = "le"; goto binop;
58 + case DW_OP_lt:
59 + op = Cop_Lt; opname = "lt"; goto binop;
60 + case DW_OP_ne:
61 + op = Cop_Ne; opname = "ne"; goto binop;
62 binop:
63 POP( ix );
64 POP( ix2 );
65 diff -Naur valgrind-3.6.1.orig/coregrind/m_debuginfo/storage.c valgrind-3.6.1/coregrind/m_debuginfo/storage.c
66 --- valgrind-3.6.1.orig/coregrind/m_debuginfo/storage.c 2010-10-20 16:19:43.000000000 -0400
67 +++ valgrind-3.6.1/coregrind/m_debuginfo/storage.c 2012-02-16 21:10:49.000000000 -0500
68 @@ -595,6 +595,14 @@
69 case Cop_Sub: VG_(printf)("-"); break;
70 case Cop_And: VG_(printf)("&"); break;
71 case Cop_Mul: VG_(printf)("*"); break;
72 + case Cop_Shl: VG_(printf)("<<"); break;
73 + case Cop_Shr: VG_(printf)(">>"); break;
74 + case Cop_Eq: VG_(printf)("=="); break;
75 + case Cop_Ge: VG_(printf)(">="); break;
76 + case Cop_Gt: VG_(printf)(">"); break;
77 + case Cop_Le: VG_(printf)("<="); break;
78 + case Cop_Lt: VG_(printf)("<"); break;
79 + case Cop_Ne: VG_(printf)("!="); break;
80 default: vg_assert(0);
81 }
82 }

  ViewVC Help
Powered by ViewVC 1.1.20