|
From: <sv...@va...> - 2009-01-25 23:48:38
|
Author: sewardj
Date: 2009-01-25 23:48:31 +0000 (Sun, 25 Jan 2009)
New Revision: 9057
Log:
Handle a couple of artefacts generated by gcc-4.4: DW_OP_reg{0..31}
and DW_OP_const1s.
--> 3_4_BRANCH
Modified:
trunk/coregrind/m_debuginfo/readdwarf.c
Modified: trunk/coregrind/m_debuginfo/readdwarf.c
===================================================================
--- trunk/coregrind/m_debuginfo/readdwarf.c 2009-01-24 10:52:32 UTC (rev 9056)
+++ trunk/coregrind/m_debuginfo/readdwarf.c 2009-01-25 23:48:31 UTC (rev 9057)
@@ -2555,6 +2555,16 @@
VG_(printf)("DW_OP_breg%d: %ld", reg, sw);
break;
+ case DW_OP_reg0 ... DW_OP_reg31:
+ /* push: reg */
+ reg = (Int)opcode - (Int)DW_OP_reg0;
+ vg_assert(reg >= 0 && reg <= 31);
+ ix = ML_(CfiExpr_DwReg)( dst, reg );
+ PUSH(ix);
+ if (ddump_frames)
+ VG_(printf)("DW_OP_reg%d", reg);
+ break;
+
case DW_OP_plus_uconst:
uw = read_leb128U( &expr );
PUSH( ML_(CfiExpr_Const)( dst, uw ) );
@@ -2574,6 +2584,15 @@
VG_(printf)("DW_OP_const4s: %ld", sw);
break;
+ case DW_OP_const1s:
+ /* push: 8-bit signed immediate */
+ sw = read_le_s_encoded_literal( expr, 1 );
+ expr += 1;
+ PUSH( ML_(CfiExpr_Const)( dst, (UWord)sw ) );
+ if (ddump_frames)
+ VG_(printf)("DW_OP_const1s: %ld", sw);
+ break;
+
case DW_OP_minus:
op = Cop_Sub; opname = "minus"; goto binop;
case DW_OP_plus:
|