]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Implement some extra DWARF ops that gcc 4.6.1 seems to use. Fixes #275284.
authorTom Hughes <tom@compton.nu>
Tue, 5 Jul 2011 09:22:32 +0000 (09:22 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 5 Jul 2011 09:22:32 +0000 (09:22 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11856

coregrind/m_debuginfo/debuginfo.c
coregrind/m_debuginfo/priv_storage.h
coregrind/m_debuginfo/readdwarf.c
coregrind/m_debuginfo/storage.c

index e000468d736275fbd68df7b934b9651e47065e18..4177a3a4822ac45c65dfa74dac58ac7e3629bbc7 100644 (file)
@@ -1880,6 +1880,14 @@ UWord evalCfiExpr ( XArray* exprs, Int ix,
             case Cop_Sub: return wL - wR;
             case Cop_And: return wL & wR;
             case Cop_Mul: return wL * wR;
+            case Cop_Shl: return wL << wR;
+            case Cop_Shr: return wL >> wR;
+            case Cop_Eq: return wL == wR ? 1 : 0;
+            case Cop_Ge: return wL >= wR ? 1 : 0;
+            case Cop_Gt: return wL > wR ? 1 : 0;
+            case Cop_Le: return wL <= wR ? 1 : 0;
+            case Cop_Lt: return wL < wR ? 1 : 0;
+            case Cop_Ne: return wL != wR ? 1 : 0;
             default: goto unhandled;
          }
          /*NOTREACHED*/
index 949ae7459fca2ff27ce0318ba053b10d3bd4bb42..7921a3f9a0846ec0c9e25afa39f43966168b458b 100644 (file)
@@ -249,7 +249,15 @@ typedef
       Cop_Add=0x321,
       Cop_Sub,
       Cop_And,
-      Cop_Mul
+      Cop_Mul,
+      Cop_Shl,
+      Cop_Shr,
+      Cop_Eq,
+      Cop_Ge,
+      Cop_Gt,
+      Cop_Le,
+      Cop_Lt,
+      Cop_Ne
    }
    CfiOp;
 
index 807964a1b75c65849022c966c35cd750a7eec9a4..870d77ecbc488d6b8e31b435f7156507849d40e5 100644 (file)
@@ -2899,6 +2899,22 @@ static Int dwarfexpr_to_dag ( UnwindContext* ctx,
             op = Cop_And; opname = "and"; goto binop;
          case DW_OP_mul:
             op = Cop_Mul; opname = "mul"; goto binop;
+         case DW_OP_shl:
+            op = Cop_Shl; opname = "shl"; goto binop;
+         case DW_OP_shr:
+            op = Cop_Shr; opname = "shr"; goto binop;
+         case DW_OP_eq:
+            op = Cop_Eq; opname = "eq"; goto binop;
+         case DW_OP_ge:
+            op = Cop_Ge; opname = "ge"; goto binop;
+         case DW_OP_gt:
+            op = Cop_Gt; opname = "gt"; goto binop;
+         case DW_OP_le:
+            op = Cop_Le; opname = "le"; goto binop;
+         case DW_OP_lt:
+            op = Cop_Lt; opname = "lt"; goto binop;
+         case DW_OP_ne:
+            op = Cop_Ne; opname = "ne"; goto binop;
          binop:
             POP( ix );
             POP( ix2 );
index 6dcd9e050b8fe197561c5a46cfde5c23247e0eb3..8b4060a8d6e4687c86b922e2abda648e71ecda5b 100644 (file)
@@ -603,6 +603,14 @@ static void ppCfiOp ( CfiOp op )
       case Cop_Sub: VG_(printf)("-"); break;
       case Cop_And: VG_(printf)("&"); break;
       case Cop_Mul: VG_(printf)("*"); break;
+      case Cop_Shl: VG_(printf)("<<"); break;
+      case Cop_Shr: VG_(printf)(">>"); break;
+      case Cop_Eq: VG_(printf)("=="); break;
+      case Cop_Ge: VG_(printf)(">="); break;
+      case Cop_Gt: VG_(printf)(">"); break;
+      case Cop_Le: VG_(printf)("<="); break;
+      case Cop_Lt: VG_(printf)("<"); break;
+      case Cop_Ne: VG_(printf)("!="); break;
       default:      vg_assert(0);
    }
 }