mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 16:09:17 +02:00
* fix stabs for globals
This commit is contained in:
parent
0768cc1cd6
commit
2b1fee21f1
@ -1785,18 +1785,6 @@ implementation
|
||||
if (cs_create_smart in aktmoduleswitches) then
|
||||
curconstSegment.concat(Tai_cut.Create);
|
||||
curconstSegment.concat(Tai_align.create(const_align(l)));
|
||||
{$ifdef GDB}
|
||||
if cs_debuginfo in aktmoduleswitches then
|
||||
begin
|
||||
if not sym.isstabwritten then
|
||||
begin
|
||||
stabstr:=sym.stabstring;
|
||||
if stabstr<>nil then
|
||||
curconstsegment.concat(Tai_stabs.create(stabstr));
|
||||
sym.isstabwritten:=true;
|
||||
end;
|
||||
end;
|
||||
{$endif GDB}
|
||||
if (sym.owner.symtabletype=globalsymtable) or
|
||||
(cs_create_smart in aktmoduleswitches) or
|
||||
(assigned(current_procinfo) and
|
||||
@ -1829,18 +1817,6 @@ implementation
|
||||
if (cs_create_smart in aktmoduleswitches) then
|
||||
bssSegment.concat(Tai_cut.Create);
|
||||
bssSegment.concat(Tai_align.create(varalign));
|
||||
{$ifdef GDB}
|
||||
if cs_debuginfo in aktmoduleswitches then
|
||||
begin
|
||||
if not sym.isstabwritten then
|
||||
begin
|
||||
stabstr:=sym.stabstring;
|
||||
if stabstr<>nil then
|
||||
bsssegment.concat(Tai_stabs.create(stabstr));
|
||||
sym.isstabwritten:=true;
|
||||
end;
|
||||
end;
|
||||
{$endif GDB}
|
||||
if (sym.owner.symtabletype=globalsymtable) or
|
||||
(cs_create_smart in aktmoduleswitches) or
|
||||
DLLSource or
|
||||
@ -2146,7 +2122,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.197 2004-03-29 14:43:47 peter
|
||||
Revision 1.198 2004-05-02 17:26:19 peter
|
||||
* fix stabs for globals
|
||||
|
||||
Revision 1.197 2004/03/29 14:43:47 peter
|
||||
* cleaner temp get/unget for exceptions
|
||||
|
||||
Revision 1.196 2004/03/03 22:02:52 peter
|
||||
|
@ -642,28 +642,32 @@ implementation
|
||||
end;
|
||||
end;
|
||||
|
||||
var
|
||||
vardebuglist : taasmoutput;
|
||||
begin
|
||||
if not (cs_debuginfo in aktmoduleswitches) then
|
||||
exit;
|
||||
{ first write all global/local symbols to a temp list. This will flag
|
||||
all required tdefs. Afterwards this list will be added }
|
||||
vardebuglist:=taasmoutput.create;
|
||||
if assigned(current_module.globalsymtable) then
|
||||
tglobalsymtable(current_module.globalsymtable).concatstabto(vardebuglist);
|
||||
if assigned(current_module.localsymtable) then
|
||||
tstaticsymtable(current_module.localsymtable).concatstabto(vardebuglist);
|
||||
{ reset unit type info flag }
|
||||
reset_unit_type_info;
|
||||
{ write used types from the used units }
|
||||
write_used_unit_type_info(current_module);
|
||||
{ first write the types from this unit }
|
||||
{ last write the types from this unit }
|
||||
if assigned(current_module.globalsymtable) then
|
||||
begin
|
||||
{ all types }
|
||||
tglobalsymtable(current_module.globalsymtable).concattypestabto(debuglist);
|
||||
{ and all local symbols}
|
||||
tglobalsymtable(current_module.globalsymtable).concatstabto(debuglist);
|
||||
end;
|
||||
if assigned(current_module.localsymtable) then
|
||||
begin
|
||||
{ all types }
|
||||
tstaticsymtable(current_module.localsymtable).concattypestabto(debuglist);
|
||||
{ and all local symbols}
|
||||
tstaticsymtable(current_module.localsymtable).concatstabto(debuglist);
|
||||
end;
|
||||
{ now all defs have a type in the debuglist, we now can add the vardebuglist since
|
||||
all references to defs can be solved }
|
||||
debuglist.concatlist(vardebuglist);
|
||||
vardebuglist.free;
|
||||
{ include files }
|
||||
if (cs_gdb_dbx in aktglobalswitches) then
|
||||
begin
|
||||
debugList.concat(tai_comment.Create(strpnew('EINCL of global '+
|
||||
@ -1454,7 +1458,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.148 2004-03-24 20:24:25 hajny
|
||||
Revision 1.149 2004-05-02 17:26:19 peter
|
||||
* fix stabs for globals
|
||||
|
||||
Revision 1.148 2004/03/24 20:24:25 hajny
|
||||
* OS/2 heap management modified to be able to grow heap as needed
|
||||
|
||||
Revision 1.147 2004/03/18 11:43:57 olle
|
||||
|
Loading…
Reference in New Issue
Block a user