From: Julian Seward Date: Fri, 16 Feb 2007 19:20:28 +0000 (+0000) Subject: Correctly handle DW_CFA_def_cfa_sf (existing code fails to scale X-Git-Tag: svn/VALGRIND_3_3_0~365 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c555fa5434efbcbc6eb54822167533043004e533;p=thirdparty%2Fvalgrind.git Correctly handle DW_CFA_def_cfa_sf (existing code fails to scale offset by data_a_f). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6599 --- diff --git a/coregrind/m_debuginfo/readdwarf.c b/coregrind/m_debuginfo/readdwarf.c index aa8dcc2743..72776b873e 100644 --- a/coregrind/m_debuginfo/readdwarf.c +++ b/coregrind/m_debuginfo/readdwarf.c @@ -2271,7 +2271,7 @@ static Int run_CF_instruction ( /*MOD*/UnwindContext* ctx, if (reg < 0 || reg >= N_CFI_REGS) return 0; /* fail */ ctx->cfa_reg = reg; - ctx->cfa_offset = off; + ctx->cfa_offset = off * ctx->data_a_f; if (si->ddump_frames) VG_(printf)(" rci:DW_CFA_def_cfa_sf\n"); break; @@ -2566,7 +2566,8 @@ static Int show_CF_instruction ( UChar* instr, i += nleb; off = read_leb128( &instr[i], &nleb, 1 ); i += nleb; - VG_(printf)(" DW_CFA_def_cfa_sf: r%d ofs %d\n", (Int)reg, (Int)off); + VG_(printf)(" DW_CFA_def_cfa_sf: r%d ofs %d\n", + (Int)reg, (Int)(off * data_a_f)); break; case DW_CFA_register: