mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 20:09:18 +02:00
* don't write debug info for absolute varsyms referring to a field or array
element of a parameter that's passed by reference (indirections with offsets aren't supported yet) (mantis #15379) git-svn-id: trunk@14451 -
This commit is contained in:
parent
d4ab90dffc
commit
2515ad6c35
@ -1918,6 +1918,7 @@ implementation
|
|||||||
var
|
var
|
||||||
elesize : pint;
|
elesize : pint;
|
||||||
currdef : tdef;
|
currdef : tdef;
|
||||||
|
indirection: boolean;
|
||||||
begin
|
begin
|
||||||
result:=false;
|
result:=false;
|
||||||
if not assigned(symlist) then
|
if not assigned(symlist) then
|
||||||
@ -1925,6 +1926,7 @@ implementation
|
|||||||
sym:=nil;
|
sym:=nil;
|
||||||
offset:=0;
|
offset:=0;
|
||||||
currdef:=nil;
|
currdef:=nil;
|
||||||
|
indirection:=false;
|
||||||
repeat
|
repeat
|
||||||
case symlist^.sltype of
|
case symlist^.sltype of
|
||||||
sl_load:
|
sl_load:
|
||||||
@ -1936,6 +1938,9 @@ implementation
|
|||||||
exit;
|
exit;
|
||||||
sym:=tabstractvarsym(symlist^.sym);
|
sym:=tabstractvarsym(symlist^.sym);
|
||||||
currdef:=tabstractvarsym(sym).vardef;
|
currdef:=tabstractvarsym(sym).vardef;
|
||||||
|
if ((sym.typ=paravarsym) and
|
||||||
|
paramanager.push_addr_param(tparavarsym(sym).varspez,sym.vardef,tprocdef(sym.owner.defowner).proccalloption)) then
|
||||||
|
indirection:=true;
|
||||||
end;
|
end;
|
||||||
sl_subscript:
|
sl_subscript:
|
||||||
begin
|
begin
|
||||||
@ -1943,6 +1948,9 @@ implementation
|
|||||||
internalerror(2009031301);
|
internalerror(2009031301);
|
||||||
if (symlist^.sym.typ<>fieldvarsym) then
|
if (symlist^.sym.typ<>fieldvarsym) then
|
||||||
internalerror(2009031202);
|
internalerror(2009031202);
|
||||||
|
{ can't handle offsets with indirections yet }
|
||||||
|
if indirection then
|
||||||
|
exit;
|
||||||
if is_packed_record_or_object(currdef) then
|
if is_packed_record_or_object(currdef) then
|
||||||
begin
|
begin
|
||||||
{ can't calculate the address of a non-byte aligned field }
|
{ can't calculate the address of a non-byte aligned field }
|
||||||
@ -1965,6 +1973,9 @@ implementation
|
|||||||
if not assigned(currdef) or
|
if not assigned(currdef) or
|
||||||
(currdef.typ<>arraydef) then
|
(currdef.typ<>arraydef) then
|
||||||
internalerror(2009031201);
|
internalerror(2009031201);
|
||||||
|
{ can't handle offsets with indirections yet }
|
||||||
|
if indirection then
|
||||||
|
exit;
|
||||||
if not is_packed_array(currdef) then
|
if not is_packed_array(currdef) then
|
||||||
elesize:=tarraydef(currdef).elesize
|
elesize:=tarraydef(currdef).elesize
|
||||||
else
|
else
|
||||||
@ -2474,13 +2485,15 @@ implementation
|
|||||||
tovar:
|
tovar:
|
||||||
begin
|
begin
|
||||||
symlist:=tabsolutevarsym(sym).ref.firstsym;
|
symlist:=tabsolutevarsym(sym).ref.firstsym;
|
||||||
get_symlist_sym_offset(symlist,tosym,offset);
|
if get_symlist_sym_offset(symlist,tosym,offset) then
|
||||||
if (tosym.typ=fieldvarsym) then
|
begin
|
||||||
internalerror(2009031402);
|
if (tosym.typ=fieldvarsym) then
|
||||||
flags:=[];
|
internalerror(2009031402);
|
||||||
if (sym.owner.symtabletype=localsymtable) then
|
flags:=[];
|
||||||
include(flags,dvf_force_local_var);
|
if (sym.owner.symtabletype=localsymtable) then
|
||||||
appendsym_var_with_name_type_offset(list,tabstractnormalvarsym(tosym),symname(sym),tabstractvarsym(sym).vardef,offset,flags);
|
include(flags,dvf_force_local_var);
|
||||||
|
appendsym_var_with_name_type_offset(list,tabstractnormalvarsym(tosym),symname(sym),tabstractvarsym(sym).vardef,offset,flags);
|
||||||
|
end;
|
||||||
templist.free;
|
templist.free;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user