mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-12-22 07:30:54 +00:00
Previous embedded struct debugger fix didn't account for pointers to structs (ExpandPointerType).
This always pre-increments symLength then compensate by subtracting 12 in GetTypeDisp.
This commit is contained in:
parent
28fa8b1853
commit
ae55b80f2f
12
Symbol.pas
12
Symbol.pas
@ -836,7 +836,7 @@ var
|
||||
tp1^.next := tpList;
|
||||
tpList := tp1;
|
||||
tp1^.tp := tp;
|
||||
tp1^.disp := symLength;
|
||||
tp1^.disp := symLength-12;
|
||||
end; {else}
|
||||
end; {GetTypeDisp}
|
||||
|
||||
@ -849,8 +849,6 @@ var
|
||||
{ ip - identifier to generate }
|
||||
{ storage - storage type; none for struct/union fields }
|
||||
|
||||
label 1;
|
||||
|
||||
var
|
||||
disp: integer; {disp to symbol of same type}
|
||||
|
||||
@ -1094,6 +1092,7 @@ var
|
||||
if ip^.itype^.kind in
|
||||
[scalarType,arrayType,pointerType,enumType,structType,unionType]
|
||||
then begin
|
||||
symLength := symLength+12; {update length of symbol table}
|
||||
WriteName(ip); {write the name field}
|
||||
WriteAddress(ip); {write the address field}
|
||||
case ip^.itype^.kind of
|
||||
@ -1110,11 +1109,7 @@ var
|
||||
if disp = noDisp then begin
|
||||
CnOut(12);
|
||||
CnOut2(0);
|
||||
{update length of symbol table before }
|
||||
{handling any nested struct definitions}
|
||||
symLength := symLength+12;
|
||||
ExpandStructType(ip^.itype);
|
||||
goto 1;
|
||||
end {if}
|
||||
else begin
|
||||
CnOut(13);
|
||||
@ -1122,8 +1117,7 @@ var
|
||||
end; {else}
|
||||
end;
|
||||
end; {case}
|
||||
symLength := symLength+12; {update length of symbol table}
|
||||
1: end; {if}
|
||||
end; {if}
|
||||
end; {GenSymbol}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user