From 2805ff68779e97b229bf323f1c1b8a6b792573f4 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Thu, 15 Mar 2018 23:09:05 -0400 Subject: [PATCH] records within records can generate a bad displacement in the debugger symbol table. --- symbols.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/symbols.pas b/symbols.pas index 48c56da..97b68ea 100644 --- a/symbols.pas +++ b/symbols.pas @@ -799,7 +799,7 @@ var tp1^.next := tpList; tpList := tp1; tp1^.tp := tp; - tp1^.disp := symLength; + tp1^.disp := symLength - 12; end; {else} end; {GetTypeDisp} @@ -1059,6 +1059,7 @@ var if sym^.idtype <> nil then if sym^.idtype^.form in [scalar,subrange,pointerStruct,arrays,records,objects] then begin + symLength := symLength+12; {update length of symbol table} WriteName(sym); {write the name field} WriteAddress(sym); {write the address field} case sym^.idtype^.form of @@ -1086,7 +1087,6 @@ var end; {else} end; end; {case} - symLength := symLength+12; {update length of symbol table} end; {if} if sym^.rlink <> nil then