mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 23:09:18 +02:00
* add DEBUGINFO symbol to reference the .o file that includes the
stabs info for types and global/static variables * debuginfo flag added to ppu to indicate whether debuginfo is generated or not
This commit is contained in:
parent
bbd4cc630c
commit
c553f6b320
@ -123,7 +123,7 @@ implementation
|
|||||||
{$endif}
|
{$endif}
|
||||||
cutils,cclasses,
|
cutils,cclasses,
|
||||||
globals,systems,verbose,
|
globals,systems,verbose,
|
||||||
defutil,
|
ppu,defutil,
|
||||||
procinfo,paramgr,fmodule,
|
procinfo,paramgr,fmodule,
|
||||||
regvars,
|
regvars,
|
||||||
{$ifdef GDB}
|
{$ifdef GDB}
|
||||||
@ -1261,6 +1261,7 @@ implementation
|
|||||||
href : treference;
|
href : treference;
|
||||||
paraloc1,
|
paraloc1,
|
||||||
paraloc2 : tparalocation;
|
paraloc2 : tparalocation;
|
||||||
|
hp : tused_unit;
|
||||||
begin
|
begin
|
||||||
{ the actual profile code can clobber some registers,
|
{ the actual profile code can clobber some registers,
|
||||||
therefore if the context must be saved, do it before
|
therefore if the context must be saved, do it before
|
||||||
@ -1304,6 +1305,22 @@ implementation
|
|||||||
cg.allocexplicitregisters(list,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
|
cg.allocexplicitregisters(list,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
|
||||||
cg.a_call_name(list,'FPC_INITIALIZEUNITS');
|
cg.a_call_name(list,'FPC_INITIALIZEUNITS');
|
||||||
cg.deallocexplicitregisters(list,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
|
cg.deallocexplicitregisters(list,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
|
||||||
|
|
||||||
|
{$ifdef GDB}
|
||||||
|
if (cs_debuginfo in aktmoduleswitches) then
|
||||||
|
begin
|
||||||
|
{ include reference to all debuginfo sections of used units }
|
||||||
|
hp:=tused_unit(usedunits.first);
|
||||||
|
while assigned(hp) do
|
||||||
|
begin
|
||||||
|
If (hp.u.flags and uf_has_debuginfo)=uf_has_debuginfo then
|
||||||
|
current_procinfo.aktlocaldata.concat(Tai_const_symbol.Createname(make_mangledname('DEBUGINFO',hp.u.globalsymtable,''),AT_DATA,0));
|
||||||
|
hp:=tused_unit(hp.next);
|
||||||
|
end;
|
||||||
|
{ include reference to debuginfo for this program }
|
||||||
|
current_procinfo.aktlocaldata.concat(Tai_const_symbol.Createname(make_mangledname('DEBUGINFO',current_module.localsymtable,''),AT_DATA,0));
|
||||||
|
end;
|
||||||
|
{$endif GDB}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ifdef GDB}
|
{$ifdef GDB}
|
||||||
@ -2122,7 +2139,13 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.198 2004-05-02 17:26:19 peter
|
Revision 1.199 2004-05-19 21:16:12 peter
|
||||||
|
* add DEBUGINFO symbol to reference the .o file that includes the
|
||||||
|
stabs info for types and global/static variables
|
||||||
|
* debuginfo flag added to ppu to indicate whether debuginfo is
|
||||||
|
generated or not
|
||||||
|
|
||||||
|
Revision 1.198 2004/05/02 17:26:19 peter
|
||||||
* fix stabs for globals
|
* fix stabs for globals
|
||||||
|
|
||||||
Revision 1.197 2004/03/29 14:43:47 peter
|
Revision 1.197 2004/03/29 14:43:47 peter
|
||||||
|
@ -647,6 +647,15 @@ implementation
|
|||||||
begin
|
begin
|
||||||
if not (cs_debuginfo in aktmoduleswitches) then
|
if not (cs_debuginfo in aktmoduleswitches) then
|
||||||
exit;
|
exit;
|
||||||
|
{ include symbol that will be referenced from the program to be sure to
|
||||||
|
include this debuginfo .o file }
|
||||||
|
if current_module.is_unit then
|
||||||
|
begin
|
||||||
|
current_module.flags:=current_module.flags or uf_has_debuginfo;
|
||||||
|
debugList.concat(tai_symbol.Createname_global(make_mangledname('DEBUGINFO',current_module.globalsymtable,''),AT_DATA,0));
|
||||||
|
end
|
||||||
|
else
|
||||||
|
debugList.concat(tai_symbol.Createname_global(make_mangledname('DEBUGINFO',current_module.localsymtable,''),AT_DATA,0));
|
||||||
{ first write all global/local symbols to a temp list. This will flag
|
{ first write all global/local symbols to a temp list. This will flag
|
||||||
all required tdefs. Afterwards this list will be added }
|
all required tdefs. Afterwards this list will be added }
|
||||||
vardebuglist:=taasmoutput.create;
|
vardebuglist:=taasmoutput.create;
|
||||||
@ -1480,7 +1489,13 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.152 2004-05-16 13:29:21 peter
|
Revision 1.153 2004-05-19 21:16:13 peter
|
||||||
|
* add DEBUGINFO symbol to reference the .o file that includes the
|
||||||
|
stabs info for types and global/static variables
|
||||||
|
* debuginfo flag added to ppu to indicate whether debuginfo is
|
||||||
|
generated or not
|
||||||
|
|
||||||
|
Revision 1.152 2004/05/16 13:29:21 peter
|
||||||
* fix checking for forwards in static symtable
|
* fix checking for forwards in static symtable
|
||||||
|
|
||||||
Revision 1.151 2004/05/11 18:22:16 olle
|
Revision 1.151 2004/05/11 18:22:16 olle
|
||||||
|
@ -146,6 +146,7 @@ const
|
|||||||
uf_release = $2000; { unit was compiled with -Ur option }
|
uf_release = $2000; { unit was compiled with -Ur option }
|
||||||
uf_threadvars = $4000; { unit has threadvars }
|
uf_threadvars = $4000; { unit has threadvars }
|
||||||
uf_fpu_emulation = $8000; { this unit was compiled with fpu emulation on }
|
uf_fpu_emulation = $8000; { this unit was compiled with fpu emulation on }
|
||||||
|
uf_has_debuginfo = $10000; { this unit has debuginfo generated }
|
||||||
|
|
||||||
type
|
type
|
||||||
ppureal=extended;
|
ppureal=extended;
|
||||||
@ -1052,7 +1053,13 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.48 2004-04-29 19:56:37 daniel
|
Revision 1.49 2004-05-19 21:16:13 peter
|
||||||
|
* add DEBUGINFO symbol to reference the .o file that includes the
|
||||||
|
stabs info for types and global/static variables
|
||||||
|
* debuginfo flag added to ppu to indicate whether debuginfo is
|
||||||
|
generated or not
|
||||||
|
|
||||||
|
Revision 1.48 2004/04/29 19:56:37 daniel
|
||||||
* Prepare compiler infrastructure for multiple ansistring types
|
* Prepare compiler infrastructure for multiple ansistring types
|
||||||
|
|
||||||
Revision 1.47 2004/03/23 22:34:49 peter
|
Revision 1.47 2004/03/23 22:34:49 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user