mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-27 21:59:15 +02:00
+ -gh for heaptrc unit
This commit is contained in:
parent
376efda4cc
commit
6e7f776c4f
@ -516,7 +516,7 @@ type tmsgconst=(
|
||||
ol020,
|
||||
ol021,
|
||||
ol022,
|
||||
ol0239,
|
||||
ol023,
|
||||
ol024,
|
||||
ol025,
|
||||
ol026,
|
||||
@ -622,6 +622,7 @@ type tmsgconst=(
|
||||
ol126,
|
||||
ol127,
|
||||
ol128,
|
||||
ol129,
|
||||
ol_end,
|
||||
endmsgconst
|
||||
);
|
||||
|
@ -1,4 +1,4 @@
|
||||
const msgtxt : array[0..00095,1..240] of char=(
|
||||
const msgtxt : array[0..00095,1..240] of char=(+
|
||||
'T_Compiler: $1'#000+
|
||||
'D_Source OS: $1'#000+
|
||||
'I_Target OS: $1'#000+
|
||||
@ -546,80 +546,81 @@ const msgtxt : array[0..00095,1..240] of char=(
|
||||
'*g1g_generate debugger information'#000+
|
||||
'*g2gg_use gsym'#000+
|
||||
'*g2gd_use dbx'#000+
|
||||
'*g2gh_use heap trace unit'#000+
|
||||
'**1i_information'#000+
|
||||
'**1I<x>_adds <x> to include path'#000+
|
||||
'**1k<x>_Pass <x> to ','the linker'#000+
|
||||
'**1I<x>_adds <x> to include',' path'#000+
|
||||
'**1k<x>_Pass <x> to the linker'#000+
|
||||
'**1l_write logo'#000+
|
||||
'**1n_don'#039't read the default config file'#000+
|
||||
'**1o<x>_change the name of the executable produced to <x>'#000+
|
||||
'**1pg_generate profile code for gprof'#000+
|
||||
'*L1P_use pipes instead of creating temporary assembler files'#000+
|
||||
'**1S_syntax opti','ons'#000+
|
||||
'*L1P_use pipes instead of creating temporary assemb','ler files'#000+
|
||||
'**1S_syntax options'#000+
|
||||
'**2S2_switch some Delphi 2 extensions on'#000+
|
||||
'**2Sc_supports operators like C (*=,+=,/= and -=)'#000+
|
||||
'**2Sd_tries to be Delphi compatible'#000+
|
||||
'**2Se_compiler stops after the first error'#000+
|
||||
'**2Sg_allow LABEL and GOTO'#000+
|
||||
'**2Si_support C++ stlyed INLINE'#000+
|
||||
'**2Sm_s','upport macros like C (global)'#000+
|
||||
'**2Si_support',' C++ stlyed INLINE'#000+
|
||||
'**2Sm_support macros like C (global)'#000+
|
||||
'**2So_tries to be TP/BP 7.0 compatible'#000+
|
||||
'**2Sp_tries to be gpc compatible'#000+
|
||||
'**2Ss_constructor name must be init (destructor must be done)'#000+
|
||||
'**2St_allow static keyword in objects'#000+
|
||||
'**1s_don'#039't call assembler and linker (','only with -a)'#000+
|
||||
'**1s_don'#039't c','all assembler and linker (only with -a)'#000+
|
||||
'**1u<x>_undefines the symbol <x>'#000+
|
||||
'**1U_unit options'#000+
|
||||
'**2Un_don'#039't check the unit name'#000+
|
||||
'**2Up<x>_same as -Fu<x>'#000+
|
||||
'**2Us_compile a system unit'#000+
|
||||
'**1v<x>_Be verbose. <x> is a combination of the following letters :'#000+
|
||||
'**2*_e : Show errors (d','efault) d : Show debug info'#000+
|
||||
'**1v<x>_Be verbose. <x> is a combination of the following letters',' :'#000+
|
||||
'**2*_e : Show errors (default) d : Show debug info'#000+
|
||||
'**2*_w : Show warnings u : Show unit info'#000+
|
||||
'**2*_n : Show notes t : Show tried/used files'#000+
|
||||
'**2*_h : Show hints m : Show defined macros'#000+
|
||||
'**2*_i : Show general info',' p : Show compiled procedures'#000+
|
||||
'**2*_h : Show hints m : Show defined macros'#000,+
|
||||
'**2*_i : Show general info p : Show compiled procedures'#000+
|
||||
'**2*_l : Show linenumbers c : Show conditionals'#000+
|
||||
'**2*_a : Show everything 0 : Show nothing (except errors)'#000+
|
||||
'**2*_b : Show all procedure r : Rhide/GCC compatibility mode'#000+
|
||||
'*','*2*_ declarations if an error x : Executable info (Win32 only'+
|
||||
')'#000+
|
||||
'**2*_b : Show all procedure r : Rhid','e/GCC compatibility mod'+
|
||||
'e'#000+
|
||||
'**2*_ declarations if an error x : Executable info (Win32 only)'#000+
|
||||
'**2*_ occurs'#000+
|
||||
'**1X_executable options'#000+
|
||||
'*L2Xc_link with the c library'#000+
|
||||
'**2XD_link with dynamic libraries (defines FPC_LINK_DYNAMIC)'#000+
|
||||
'**2Xs_strip all symbols from executable'#000,+
|
||||
'**2Xs_strip al','l symbols from executable'#000+
|
||||
'**2XS_link with static libraries (defines FPC_LINK_STATIC)'#000+
|
||||
'**0*_Processor specific options:'#000+
|
||||
'3*1A<x>_output format'#000+
|
||||
'3*2Ao_coff file using GNU AS'#000+
|
||||
'3*2Anasmcoff_coff file using Nasm'#000+
|
||||
'3*2Anasmelf_elf32 (linux) file using Nasm'#000+
|
||||
'3*2Anasmobj_obj file ','using Nasm'#000+
|
||||
'3*2Anasmelf_elf32 (linux) file using ','Nasm'#000+
|
||||
'3*2Anasmobj_obj file using Nasm'#000+
|
||||
'3*2Amasm_obj using Masm (Mircosoft)'#000+
|
||||
'3*2Atasm_obj using Tasm (Borland)'#000+
|
||||
'3*1R<x>_assembler reading style'#000+
|
||||
'3*2Ratt_read AT&T style assembler'#000+
|
||||
'3*2Rintel_read Intel style assembler'#000+
|
||||
'3*2Rdirect_copy assembler text directly to assembler fil','e'#000+
|
||||
'3*2Rdirect_copy assembler text',' directly to assembler file'#000+
|
||||
'3*1O<x>_optimizations'#000+
|
||||
'3*2Og_generate smaller code'#000+
|
||||
'3*2OG_generate faster code (default)'#000+
|
||||
'3*2Or_keep certain variables in registers (still BUGGY!!!)'#000+
|
||||
'3*2Ou_enable uncertain optimizations (see docs)'#000+
|
||||
'3*2O1_level 1 optimizations (quick optimizat','ions)'#000+
|
||||
'3*2O1_level 1 opti','mizations (quick optimizations)'#000+
|
||||
'3*2O2_level 2 optimizations (-O1 + slower optimizations)'#000+
|
||||
'3*2O3_level 3 optimizations (same as -O2u)'#000+
|
||||
'3*2Op_target processor'#000+
|
||||
'3*3Op1_set target processor to 386/486'#000+
|
||||
'3*3Op2_set target processor to Pentium/PentiumMMX (tm)'#000+
|
||||
'3*3Op3_set target',' processor to PPro/PII/c6x86/K6 (tm)'#000+
|
||||
'3*3Op2_set target processor to Pentium/Pentium','MMX (tm)'#000+
|
||||
'3*3Op3_set target processor to PPro/PII/c6x86/K6 (tm)'#000+
|
||||
'3*1T<x>_Target operating system'#000+
|
||||
'3*2TGO32V1_version 1 of DJ Delorie DOS extender'#000+
|
||||
'3*2TGO32V2_version 2 of DJ Delorie DOS extender'#000+
|
||||
'3*2TLINUX_Linux'#000+
|
||||
'3*2TOS2_OS/2 2.x'#000+
|
||||
'3*2TWin32_Windows 32 Bit'#000+
|
||||
'6*1A<x>_output fo','rmat'#000+
|
||||
'3*2TWin32_Window','s 32 Bit'#000+
|
||||
'6*1A<x>_output format'#000+
|
||||
'6*2Ao_Unix o-file using GNU AS'#000+
|
||||
'6*2Agas_GNU Motorola assembler'#000+
|
||||
'6*2Amit_MIT Syntax (old GAS)'#000+
|
||||
@ -627,15 +628,15 @@ const msgtxt : array[0..00095,1..240] of char=(
|
||||
'6*1O_optimizations'#000+
|
||||
'6*2Oa_turn on the optimizer'#000+
|
||||
'6*2Og_generate smaller code'#000+
|
||||
'6*2OG_generate faster code (defau','lt)'#000+
|
||||
'6*2OG_g','enerate faster code (default)'#000+
|
||||
'6*2Ox_optimize maximum (still BUGGY!!!)'#000+
|
||||
'6*2O2_set target processor to a MC68020+'#000+
|
||||
'6*1R<x>_assembler reading style'#000+
|
||||
'6*2RMOT_read motorola style assembler'#000+
|
||||
'6*1T<x>_Target operating system'#000+
|
||||
'6*2TAMIGA_Commodore Amiga'#000+
|
||||
'6*2TATARI_Atari ST/STe/TT'#000+
|
||||
'6','*2TMACOS_Macintosh m68k'#000+
|
||||
'6','*2TATARI_Atari ST/STe/TT'#000+
|
||||
'6*2TMACOS_Macintosh m68k'#000+
|
||||
'6*2TLINUX_Linux-68k'#000+
|
||||
'**1*_'#000+
|
||||
'**1?_shows this help'#000+
|
||||
|
@ -525,6 +525,17 @@ unit pmodules;
|
||||
current_module^.used_units.concat(new(pused_unit,init(hp,true)));
|
||||
refsymtable^.insert(new(punitsym,init('PROFILE',hp^.globalsymtable)));
|
||||
end;
|
||||
{ Heaptrc unit? (not needed for units), this is here to be sure that it is really
|
||||
loaded as first unit }
|
||||
if (cs_gdb_heaptrc in aktglobalswitches) and not(current_module^.is_unit)then
|
||||
begin
|
||||
hp:=loadunit('HEAPTRC',false);
|
||||
psymtable(hp^.globalsymtable)^.next:=symtablestack;
|
||||
symtablestack:=hp^.globalsymtable;
|
||||
{ add to the used units }
|
||||
current_module^.used_units.concat(new(pused_unit,init(hp,true)));
|
||||
refsymtable^.insert(new(punitsym,init('HEAPTRC',hp^.globalsymtable)));
|
||||
end;
|
||||
{ save default symtablestack }
|
||||
defaultsymtablestack:=symtablestack;
|
||||
end;
|
||||
@ -657,7 +668,7 @@ unit pmodules;
|
||||
end;
|
||||
{$EndIf GDB}
|
||||
end;
|
||||
|
||||
|
||||
procedure parse_implementation_uses(symt:Psymtable);
|
||||
begin
|
||||
if token=_USES then
|
||||
@ -1217,7 +1228,10 @@ unit pmodules;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.87 1998-12-01 23:40:53 pierre
|
||||
Revision 1.88 1998-12-08 10:18:11 peter
|
||||
+ -gh for heaptrc unit
|
||||
|
||||
Revision 1.87 1998/12/01 23:40:53 pierre
|
||||
* new try for correct debug info generation
|
||||
|
||||
Revision 1.86 1998/11/30 09:43:22 pierre
|
||||
|
@ -223,7 +223,7 @@
|
||||
if assigned(debuglist) and not is_def_stab_written then
|
||||
concatstabto(debuglist);
|
||||
end;
|
||||
if not use_dbx then
|
||||
if not (cs_gdb_dbx in aktglobalswitches) then
|
||||
begin
|
||||
if globalnb = 0 then
|
||||
set_globalnb;
|
||||
@ -288,10 +288,10 @@
|
||||
procedure tdef.concatstabto(asmlist : paasmoutput);
|
||||
var stab_str : pchar;
|
||||
begin
|
||||
if ((sym = nil) or sym^.isusedinstab or use_dbx)
|
||||
if ((sym = nil) or sym^.isusedinstab or (cs_gdb_dbx in aktglobalswitches))
|
||||
and not is_def_stab_written then
|
||||
begin
|
||||
If use_dbx then
|
||||
If cs_gdb_dbx in aktglobalswitches then
|
||||
begin
|
||||
{ otherwise you get two of each def }
|
||||
If assigned(sym) then
|
||||
@ -1163,7 +1163,8 @@
|
||||
procedure tfiledef.concatstabto(asmlist : paasmoutput);
|
||||
begin
|
||||
{ most file defs are unnamed !!! }
|
||||
if ((sym = nil) or sym^.isusedinstab or use_dbx) and not is_def_stab_written then
|
||||
if ((sym = nil) or sym^.isusedinstab or (cs_gdb_dbx in aktglobalswitches)) and
|
||||
not is_def_stab_written then
|
||||
begin
|
||||
if assigned(typed_as) then forcestabto(asmlist,typed_as);
|
||||
inherited concatstabto(asmlist);
|
||||
@ -1220,7 +1221,8 @@
|
||||
var st,nb : string;
|
||||
sym_line_no : longint;
|
||||
begin
|
||||
if ( (sym=nil) or sym^.isusedinstab or use_dbx) and not is_def_stab_written then
|
||||
if ( (sym=nil) or sym^.isusedinstab or (cs_gdb_dbx in aktglobalswitches)) and
|
||||
not is_def_stab_written then
|
||||
begin
|
||||
if assigned(definition) then
|
||||
if definition^.deftype in [recorddef,objectdef] then
|
||||
@ -1379,7 +1381,7 @@
|
||||
|
||||
procedure tsetdef.concatstabto(asmlist : paasmoutput);
|
||||
begin
|
||||
if ( not assigned(sym) or sym^.isusedinstab or use_dbx) and
|
||||
if ( not assigned(sym) or sym^.isusedinstab or (cs_gdb_dbx in aktglobalswitches)) and
|
||||
not is_def_stab_written then
|
||||
begin
|
||||
if assigned(setof) then
|
||||
@ -1546,7 +1548,7 @@
|
||||
|
||||
procedure tarraydef.concatstabto(asmlist : paasmoutput);
|
||||
begin
|
||||
if (not assigned(sym) or sym^.isusedinstab or use_dbx)
|
||||
if (not assigned(sym) or sym^.isusedinstab or (cs_gdb_dbx in aktglobalswitches))
|
||||
and not is_def_stab_written then
|
||||
begin
|
||||
{when array are inserted they have no definition yet !!}
|
||||
@ -1779,7 +1781,7 @@
|
||||
|
||||
procedure trecdef.concatstabto(asmlist : paasmoutput);
|
||||
begin
|
||||
if (not assigned(sym) or sym^.isusedinstab or use_dbx) and
|
||||
if (not assigned(sym) or sym^.isusedinstab or (cs_gdb_dbx in aktglobalswitches)) and
|
||||
(not is_def_stab_written) then
|
||||
inherited concatstabto(asmlist);
|
||||
end;
|
||||
@ -2063,7 +2065,7 @@
|
||||
|
||||
procedure tabstractprocdef.concatstabto(asmlist : paasmoutput);
|
||||
begin
|
||||
if (not assigned(sym) or sym^.isusedinstab or use_dbx)
|
||||
if (not assigned(sym) or sym^.isusedinstab or (cs_gdb_dbx in aktglobalswitches))
|
||||
and not is_def_stab_written then
|
||||
begin
|
||||
if assigned(retdef) then forcestabto(asmlist,retdef);
|
||||
@ -2538,7 +2540,7 @@
|
||||
|
||||
procedure tprocvardef.concatstabto(asmlist : paasmoutput);
|
||||
begin
|
||||
if ( not assigned(sym) or sym^.isusedinstab or use_dbx)
|
||||
if ( not assigned(sym) or sym^.isusedinstab or (cs_gdb_dbx in aktglobalswitches))
|
||||
and not is_def_stab_written then
|
||||
inherited concatstabto(asmlist);
|
||||
is_def_stab_written:=true;
|
||||
@ -3230,7 +3232,10 @@
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.78 1998-12-08 09:06:30 pierre
|
||||
Revision 1.79 1998-12-08 10:18:12 peter
|
||||
+ -gh for heaptrc unit
|
||||
|
||||
Revision 1.78 1998/12/08 09:06:30 pierre
|
||||
+ constructor destructor info for gdbpas
|
||||
|
||||
Revision 1.77 1998/12/01 23:37:39 pierre
|
||||
|
@ -177,7 +177,7 @@
|
||||
with Current_Module^ do
|
||||
begin
|
||||
if (cs_create_staticlib in aktmoduleswitches) or
|
||||
(cs_smartlink in aktmoduleswitches) then
|
||||
(cs_smartlink in aktmoduleswitches) then
|
||||
begin
|
||||
flags:=flags or uf_static_linked;
|
||||
if SplitName(ppufilename^)<>SplitName(staticlibfilename^) then
|
||||
@ -192,7 +192,7 @@
|
||||
if cs_smartlink in aktmoduleswitches then
|
||||
flags:=flags or uf_smartlink;
|
||||
{$ifdef GDB}
|
||||
if use_dbx then
|
||||
if cs_gdb_dbx in aktglobalswitches then
|
||||
flags:=flags or uf_has_dbx;
|
||||
{$endif GDB}
|
||||
if target_os.endian=endian_big then
|
||||
@ -448,7 +448,10 @@
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.26 1998-11-26 14:36:02 peter
|
||||
Revision 1.27 1998-12-08 10:18:14 peter
|
||||
+ -gh for heaptrc unit
|
||||
|
||||
Revision 1.26 1998/11/26 14:36:02 peter
|
||||
* set also library flag if smartlinking and outputname is different
|
||||
|
||||
Revision 1.25 1998/10/26 09:35:47 peter
|
||||
|
@ -1207,7 +1207,7 @@
|
||||
if (owner^.symtabletype = objectsymtable) and
|
||||
((properties and sp_static)<>0) then
|
||||
begin
|
||||
if use_gsym then st := 'G' else st := 'S';
|
||||
if (cs_gdb_gsym in aktglobalswitches) then st := 'G' else st := 'S';
|
||||
stabstring := strpnew('"'+owner^.name^+'__'+name+':'+
|
||||
+definition^.numberstring+'",'+
|
||||
tostr(N_LCSYM)+',0,'+tostr(fileinfo.line)+','+mangledname);
|
||||
@ -1219,7 +1219,7 @@
|
||||
because with G GDB doesn't look at the address field
|
||||
but searches the same name or with a leading underscore
|
||||
but these names don't exist in pascal !}
|
||||
if use_gsym then st := 'G' else st := 'S';
|
||||
if (cs_gdb_gsym in aktglobalswitches) then st := 'G' else st := 'S';
|
||||
stabstring := strpnew('"'+name+':'+st
|
||||
+definition^.numberstring+'",'+
|
||||
tostr(N_LCSYM)+',0,'+tostr(fileinfo.line)+','+mangledname);
|
||||
@ -1406,7 +1406,7 @@
|
||||
var
|
||||
st : char;
|
||||
begin
|
||||
if use_gsym and (owner^.symtabletype in [unitsymtable,globalsymtable]) then
|
||||
if (cs_gdb_gsym in aktglobalswitches) and (owner^.symtabletype in [unitsymtable,globalsymtable]) then
|
||||
st := 'G'
|
||||
else
|
||||
st := 'S';
|
||||
@ -1803,7 +1803,10 @@
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.63 1998-11-28 16:20:56 peter
|
||||
Revision 1.64 1998-12-08 10:18:15 peter
|
||||
+ -gh for heaptrc unit
|
||||
|
||||
Revision 1.63 1998/11/28 16:20:56 peter
|
||||
+ support for dll variables
|
||||
|
||||
Revision 1.62 1998/11/27 14:50:48 peter
|
||||
|
Loading…
Reference in New Issue
Block a user