mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-11 04:01:37 +02:00
* Only write access-info for properties when the actual underlying method
belongs to an odt_class or odt_helper, because others do not have debug info included
This commit is contained in:
parent
a5cab5c0aa
commit
2950785bd7
@ -2955,9 +2955,20 @@ implementation
|
||||
if assigned(accesslist.procdef) then
|
||||
begin
|
||||
memberdef := accesslist.procdef;
|
||||
memberowner := memberdef.owner;
|
||||
dwarfoffset := (accesslist.procdef as tcpuprocdef).dwarfoffset;
|
||||
memberdef_or_sym := memberdef;
|
||||
// Debuginfo for procdefs is only written for members of an odt_helper
|
||||
// or odt_class. (So, among others, not for interfaces.)
|
||||
// It is not possible to reference something that is not there, so
|
||||
// omit te reference.
|
||||
if Assigned(memberdef.owner.defowner) and (memberdef.owner.defowner.typ=objectdef) and
|
||||
(tobjectdef(memberdef.owner.defowner).objecttype in [odt_helper, odt_class]) then
|
||||
begin
|
||||
if Assigned(tprocdef(memberdef).localst) then
|
||||
begin
|
||||
memberowner := memberdef.owner;
|
||||
dwarfoffset := (accesslist.procdef as tcpuprocdef).dwarfoffset;
|
||||
memberdef_or_sym := memberdef;
|
||||
end;
|
||||
end;
|
||||
end
|
||||
// Note that the returned 'dwarfoffset' is not used and not a dwarf-offset
|
||||
else if get_symlist_sym_offset(accesslist.firstsym, membersym, dwarfoffset) then
|
||||
|
33
tests/test/tdwarfproperties1.pp
Normal file
33
tests/test/tdwarfproperties1.pp
Normal file
@ -0,0 +1,33 @@
|
||||
{ %OPT=-gw -godwarfproperties }
|
||||
program tdwarfproperties1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
type
|
||||
ITestIntf = interface(IUnknown)
|
||||
function GetCurrent: TObject;
|
||||
end;
|
||||
|
||||
ITestIntf2 = interface(ITestIntf)
|
||||
property Current2: TObject read GetCurrent;
|
||||
end;
|
||||
|
||||
{ TGenEvaluationIdentifierList }
|
||||
|
||||
TGenEvaluationIdentifierList = class(TInterfacedObject, ITestIntf2)
|
||||
function GetCurrent: TObject;
|
||||
property Current2: TObject read GetCurrent;
|
||||
end;
|
||||
|
||||
function TGenEvaluationIdentifierList.GetCurrent: TObject;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
s: ITestIntf;
|
||||
|
||||
begin
|
||||
s := ITestIntf(nil);
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user