mirror of
https://github.com/byteworksinc/ORCA-Pascal.git
synced 2024-11-25 18:31:08 +00:00
records or objects without fields (including forward declared objects) generate bad debugger symbol tables since there is no terminating field.
This generates a fake FIELD field to compensate.
This commit is contained in:
parent
cf72a073f8
commit
6f88fe5cee
17
symbols.pas
17
symbols.pas
@ -47,6 +47,7 @@ var
|
|||||||
fwptr: ctp; {head of chain for forw decl type ids}
|
fwptr: ctp; {head of chain for forw decl type ids}
|
||||||
inptr,outptr,erroroutputptr: ctp; {standard I/O}
|
inptr,outptr,erroroutputptr: ctp; {standard I/O}
|
||||||
dummyString: stp; {index entry for string constants}
|
dummyString: stp; {index entry for string constants}
|
||||||
|
dummyField: ctp;
|
||||||
|
|
||||||
{---------------------------------------------------------------}
|
{---------------------------------------------------------------}
|
||||||
|
|
||||||
@ -744,6 +745,21 @@ with dummyString^ do begin
|
|||||||
min := 1;
|
min := 1;
|
||||||
max := 2;
|
max := 2;
|
||||||
end; {with}
|
end; {with}
|
||||||
|
|
||||||
|
|
||||||
|
dummyField := pointer(Malloc(sizeof(identifier)));
|
||||||
|
with dummyField^ do begin
|
||||||
|
name := @'FIELD';
|
||||||
|
idtype := intptr;
|
||||||
|
next := nil;
|
||||||
|
fldaddr := 0;
|
||||||
|
klass := field;
|
||||||
|
hasIFile := false;
|
||||||
|
llink := nil;
|
||||||
|
rlink := nil;
|
||||||
|
fldaddr := 0;
|
||||||
|
end; {with}
|
||||||
|
|
||||||
end; {EnterUndecl}
|
end; {EnterUndecl}
|
||||||
|
|
||||||
|
|
||||||
@ -951,6 +967,7 @@ var
|
|||||||
ip := tp^.fstfld
|
ip := tp^.fstfld
|
||||||
else
|
else
|
||||||
ip := tp^.objfld;
|
ip := tp^.objfld;
|
||||||
|
if ip = nil then ip := dummyField;
|
||||||
GenSymbol(ip, true);
|
GenSymbol(ip, true);
|
||||||
end; {ExpandRecordType}
|
end; {ExpandRecordType}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user