forward-declared structs have no field list and generate an invalid debugger symbol table. Generate a valid struct entry by re-using the default error struct ({ field: int })

This commit is contained in:
Kelvin Sherlock 2018-02-09 22:11:20 -05:00
parent 44714767e5
commit c11218359f
1 changed files with 3 additions and 0 deletions

View File

@ -982,6 +982,9 @@ var
begin {ExpandStructType}
ip := tp^.fieldList;
{ fieldList is nil if this is a forward declared struct. }
if ip = nil then ip := defaultStruct^.fieldList;
while ip <> nil do begin
GenSymbol(ip, none);
ip := ip^.next;