Sfoglia il codice sorgente

* fix for dwarf debug info generation of localsym vars with offset (thx Pierre for spotting this)

git-svn-id: trunk@39104 -
nickysn 7 anni fa
parent
commit
76fb8c3afd
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      compiler/dbgdwarf.pas

+ 3 - 3
compiler/dbgdwarf.pas

@@ -2533,14 +2533,14 @@ implementation
                           begin
                           begin
                             templist.concat(tai_const.create_8bit(ord(DW_OP_breg0)+dreg));
                             templist.concat(tai_const.create_8bit(ord(DW_OP_breg0)+dreg));
                             templist.concat(tai_const.create_sleb128bit(sym.localloc.reference.offset+offset));
                             templist.concat(tai_const.create_sleb128bit(sym.localloc.reference.offset+offset));
-                            blocksize:=1+Lengthsleb128(sym.localloc.reference.offset);
+                            blocksize:=1+Lengthsleb128(sym.localloc.reference.offset+offset);
                           end
                           end
                         else
                         else
                           begin
                           begin
                             templist.concat(tai_const.create_8bit(ord(DW_OP_bregx)));
                             templist.concat(tai_const.create_8bit(ord(DW_OP_bregx)));
                             templist.concat(tai_const.create_uleb128bit(dreg));
                             templist.concat(tai_const.create_uleb128bit(dreg));
-                            templist.concat(tai_const.create_sleb128bit(sym.localloc.reference.offset));
-                            blocksize:=1+Lengthuleb128(dreg)+LengthSleb128(sym.localloc.reference.offset);
+                            templist.concat(tai_const.create_sleb128bit(sym.localloc.reference.offset+offset));
+                            blocksize:=1+Lengthuleb128(dreg)+LengthSleb128(sym.localloc.reference.offset+offset);
                           end;
                           end;
 {$ifndef gdb_supports_DW_AT_variable_parameter}
 {$ifndef gdb_supports_DW_AT_variable_parameter}
                         { Parameters which are passed by reference. (var and the like)
                         { Parameters which are passed by reference. (var and the like)