mirror of
https://github.com/byteworksinc/ORCA-Pascal.git
synced 2024-11-25 03:32:23 +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}
|
||||
inptr,outptr,erroroutputptr: ctp; {standard I/O}
|
||||
dummyString: stp; {index entry for string constants}
|
||||
dummyField: ctp;
|
||||
|
||||
{---------------------------------------------------------------}
|
||||
|
||||
@ -744,6 +745,21 @@ with dummyString^ do begin
|
||||
min := 1;
|
||||
max := 2;
|
||||
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}
|
||||
|
||||
|
||||
@ -951,6 +967,7 @@ var
|
||||
ip := tp^.fstfld
|
||||
else
|
||||
ip := tp^.objfld;
|
||||
if ip = nil then ip := dummyField;
|
||||
GenSymbol(ip, true);
|
||||
end; {ExpandRecordType}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user