|
From: <sv...@va...> - 2007-08-31 23:08:40
|
Author: sewardj
Date: 2007-09-01 00:08:39 +0100 (Sat, 01 Sep 2007)
New Revision: 6793
Log:
Handle DW_OP_deref in DWARF3 expressions. Fixes #147285.
Modified:
trunk/coregrind/m_debuginfo/readdwarf.c
Modified: trunk/coregrind/m_debuginfo/readdwarf.c
===================================================================
--- trunk/coregrind/m_debuginfo/readdwarf.c 2007-08-31 10:21:40 UTC (rev 6792)
+++ trunk/coregrind/m_debuginfo/readdwarf.c 2007-08-31 23:08:39 UTC (rev 6793)
@@ -2111,7 +2111,7 @@
Int srcix )
{
CfiExpr* src;
- Int cpL, cpR, dwreg;
+ Int cpL, cpR, cpA, dwreg;
XArray* srcxa = srcuc->exprs;
vg_assert(srcxa);
vg_assert(dstxa);
@@ -2122,7 +2122,10 @@
case Cex_Undef:
return ML_(CfiExpr_Undef)( dstxa );
case Cex_Deref:
- return ML_(CfiExpr_Deref)( dstxa, src->Cex.Deref.ixAddr );
+ cpA = copy_convert_CfiExpr_tree( dstxa, srcuc, src->Cex.Deref.ixAddr );
+ if (cpA == -1)
+ return -1; /* propagate failure */
+ return ML_(CfiExpr_Deref)( dstxa, cpA );
case Cex_Const:
return ML_(CfiExpr_Const)( dstxa, src->Cex.Const.con );
case Cex_Binop:
@@ -2695,11 +2698,18 @@
binop:
POP( ix );
POP( ix2 );
- PUSH( ML_(CfiExpr_Binop)( dst, op, ix2, ix ) );
+ PUSH( ML_(CfiExpr_Binop)( dst, op, ix2, ix ) );
if (ddump_frames)
VG_(printf)("DW_OP_%s", opname);
break;
+ case DW_OP_deref:
+ POP( ix );
+ PUSH( ML_(CfiExpr_Deref)( dst, ix ) );
+ if (ddump_frames)
+ VG_(printf)("DW_OP_deref");
+ break;
+
default:
if (!VG_(clo_xml))
VG_(message)(Vg_DebugMsg,
|