mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 22:14:25 +02:00
+ startup conditionnals stored in PPU file for debug info
This commit is contained in:
parent
6a5ee6b933
commit
5536344e9f
@ -80,6 +80,7 @@ const
|
|||||||
ibdefref = 13;
|
ibdefref = 13;
|
||||||
ibendsymtablebrowser = 14;
|
ibendsymtablebrowser = 14;
|
||||||
ibbeginsymtablebrowser = 15;
|
ibbeginsymtablebrowser = 15;
|
||||||
|
ibusedmacros = 16;
|
||||||
{syms}
|
{syms}
|
||||||
ibtypesym = 20;
|
ibtypesym = 20;
|
||||||
ibprocsym = 21;
|
ibprocsym = 21;
|
||||||
@ -985,7 +986,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.41 1999-08-30 16:21:40 pierre
|
Revision 1.42 1999-08-31 15:47:56 pierre
|
||||||
|
+ startup conditionnals stored in PPU file for debug info
|
||||||
|
|
||||||
|
Revision 1.41 1999/08/30 16:21:40 pierre
|
||||||
* tempclosing of ppufiles under dos was wrong
|
* tempclosing of ppufiles under dos was wrong
|
||||||
|
|
||||||
Revision 1.40 1999/08/27 10:48:40 pierre
|
Revision 1.40 1999/08/27 10:48:40 pierre
|
||||||
|
@ -192,6 +192,28 @@
|
|||||||
current_ppu^.do_crc:=true;
|
current_ppu^.do_crc:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure writeusedmacros;
|
||||||
|
var
|
||||||
|
hp : pmacrosym;
|
||||||
|
i : longint;
|
||||||
|
begin
|
||||||
|
{ second write the used source files }
|
||||||
|
current_ppu^.do_crc:=false;
|
||||||
|
for i:=1 to macros^.symindex^.count do
|
||||||
|
begin
|
||||||
|
hp:=pmacrosym(macros^.symindex^.search(i));
|
||||||
|
{ only used or init defined macros are stored }
|
||||||
|
if hp^.is_used or hp^.defined_at_startup then
|
||||||
|
begin
|
||||||
|
current_ppu^.putstring(hp^._name^);
|
||||||
|
current_ppu^.putbyte(byte(hp^.defined_at_startup));
|
||||||
|
current_ppu^.putbyte(byte(hp^.is_used));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
current_ppu^.writeentry(ibusedmacros);
|
||||||
|
current_ppu^.do_crc:=true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure writeusedunit;
|
procedure writeusedunit;
|
||||||
var
|
var
|
||||||
@ -470,6 +492,38 @@
|
|||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
|
|
||||||
|
procedure readusedmacros;
|
||||||
|
var
|
||||||
|
hs : string;
|
||||||
|
mac : pmacrosym;
|
||||||
|
was_defined_at_startup,
|
||||||
|
was_used : boolean;
|
||||||
|
begin
|
||||||
|
while not current_ppu^.endofentry do
|
||||||
|
begin
|
||||||
|
hs:=current_ppu^.getstring;
|
||||||
|
was_defined_at_startup:=boolean(current_ppu^.getbyte);
|
||||||
|
was_used:=boolean(current_ppu^.getbyte);
|
||||||
|
mac:=pmacrosym(macros^.search(hs));
|
||||||
|
if assigned(mac)
|
||||||
|
{$ifndef EXTDEBUG}
|
||||||
|
{ if we don't have the sources why tell }
|
||||||
|
and current_module^.sources_avail
|
||||||
|
{$endif ndef EXTDEBUG}
|
||||||
|
then
|
||||||
|
begin
|
||||||
|
if not was_defined_at_startup and was_used and
|
||||||
|
mac^.defined_at_startup then
|
||||||
|
Comment(V_Note,'Conditionnal '+hs+' was not set at startup '+
|
||||||
|
'in last compilation of '+current_module^.mainsource^);
|
||||||
|
end
|
||||||
|
else { not assigned }
|
||||||
|
if was_defined_at_startup and was_used then
|
||||||
|
Comment(V_Note,'Conditionnal '+hs+' was set at startup '+
|
||||||
|
'in last compilation of '+current_module^.mainsource^);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure readsourcefiles;
|
procedure readsourcefiles;
|
||||||
var
|
var
|
||||||
temp,hs : string;
|
temp,hs : string;
|
||||||
@ -609,6 +663,8 @@
|
|||||||
end;
|
end;
|
||||||
ibsourcefiles :
|
ibsourcefiles :
|
||||||
readsourcefiles;
|
readsourcefiles;
|
||||||
|
ibusedmacros :
|
||||||
|
readusedmacros;
|
||||||
ibloadunit :
|
ibloadunit :
|
||||||
readloadunit;
|
readloadunit;
|
||||||
iblinkunitofiles :
|
iblinkunitofiles :
|
||||||
@ -633,7 +689,10 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.47 1999-08-27 10:54:45 pierre
|
Revision 1.48 1999-08-31 15:47:56 pierre
|
||||||
|
+ startup conditionnals stored in PPU file for debug info
|
||||||
|
|
||||||
|
Revision 1.47 1999/08/27 10:54:45 pierre
|
||||||
* some code adapted to CRC_only computation
|
* some code adapted to CRC_only computation
|
||||||
+ main file is search in unitspathlist
|
+ main file is search in unitspathlist
|
||||||
and triggers do_compile flag
|
and triggers do_compile flag
|
||||||
@ -836,4 +895,3 @@
|
|||||||
* symtable adapted for $ifdef NEWPPU
|
* symtable adapted for $ifdef NEWPPU
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user