]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Correctly handle DW_CFA_def_cfa_sf (existing code fails to scale
authorJulian Seward <jseward@acm.org>
Fri, 16 Feb 2007 19:20:28 +0000 (19:20 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 16 Feb 2007 19:20:28 +0000 (19:20 +0000)
offset by data_a_f).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6599

coregrind/m_debuginfo/readdwarf.c

index aa8dcc2743a36e44149bb45ee70f4b3f080e4945..72776b873e4a77ec1d1607cc5697735fc141fd9f 100644 (file)
@@ -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: