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;
|
tp1^.next := tpList;
|
||||||
tpList := tp1;
|
tpList := tp1;
|
||||||
tp1^.tp := tp;
|
tp1^.tp := tp;
|
||||||
tp1^.disp := symLength;
|
tp1^.disp := symLength-12;
|
||||||
end; {else}
|
end; {else}
|
||||||
end; {GetTypeDisp}
|
end; {GetTypeDisp}
|
||||||
|
|
||||||
@ -849,8 +849,6 @@ var
|
|||||||
{ ip - identifier to generate }
|
{ ip - identifier to generate }
|
||||||
{ storage - storage type; none for struct/union fields }
|
{ storage - storage type; none for struct/union fields }
|
||||||
|
|
||||||
label 1;
|
|
||||||
|
|
||||||
var
|
var
|
||||||
disp: integer; {disp to symbol of same type}
|
disp: integer; {disp to symbol of same type}
|
||||||
|
|
||||||
@ -1094,6 +1092,7 @@ var
|
|||||||
if ip^.itype^.kind in
|
if ip^.itype^.kind in
|
||||||
[scalarType,arrayType,pointerType,enumType,structType,unionType]
|
[scalarType,arrayType,pointerType,enumType,structType,unionType]
|
||||||
then begin
|
then begin
|
||||||
|
symLength := symLength+12; {update length of symbol table}
|
||||||
WriteName(ip); {write the name field}
|
WriteName(ip); {write the name field}
|
||||||
WriteAddress(ip); {write the address field}
|
WriteAddress(ip); {write the address field}
|
||||||
case ip^.itype^.kind of
|
case ip^.itype^.kind of
|
||||||
@ -1110,11 +1109,7 @@ var
|
|||||||
if disp = noDisp then begin
|
if disp = noDisp then begin
|
||||||
CnOut(12);
|
CnOut(12);
|
||||||
CnOut2(0);
|
CnOut2(0);
|
||||||
{update length of symbol table before }
|
|
||||||
{handling any nested struct definitions}
|
|
||||||
symLength := symLength+12;
|
|
||||||
ExpandStructType(ip^.itype);
|
ExpandStructType(ip^.itype);
|
||||||
goto 1;
|
|
||||||
end {if}
|
end {if}
|
||||||
else begin
|
else begin
|
||||||
CnOut(13);
|
CnOut(13);
|
||||||
@ -1122,8 +1117,7 @@ var
|
|||||||
end; {else}
|
end; {else}
|
||||||
end;
|
end;
|
||||||
end; {case}
|
end; {case}
|
||||||
symLength := symLength+12; {update length of symbol table}
|
end; {if}
|
||||||
1: end; {if}
|
|
||||||
end; {GenSymbol}
|
end; {GenSymbol}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user