* Fix stabs generation problem reported by Jonas

This commit is contained in:
daniel 2004-01-31 22:48:31 +00:00
parent 2c01fc3afd
commit c22f863764
4 changed files with 50 additions and 28 deletions

View File

@ -345,12 +345,18 @@ implementation
begin begin
ttypesym(p).isusedinstab:=true; ttypesym(p).isusedinstab:=true;
{ ttypesym(p).concatstabto(debuglist);} { ttypesym(p).concatstabto(debuglist);}
{not stabs for forward defs }
if not Ttypesym(p).isstabwritten then if not Ttypesym(p).isstabwritten then
begin begin
stab_str:=Ttypesym(p).stabstring; if Ttypesym(p).restype.def.typesym=p then
if assigned(stab_str) then Tstoreddef(Ttypesym(p).restype.def).concatstabto(debuglist)
debuglist.concat(Tai_stabs.create(stab_str)); else
Ttypesym(p).isstabwritten:=true; begin
stab_str:=Ttypesym(p).stabstring;
if assigned(stab_str) then
debuglist.concat(Tai_stabs.create(stab_str));
Ttypesym(p).isstabwritten:=true;
end;
end; end;
end; end;
{$endif GDB} {$endif GDB}
@ -673,7 +679,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.76 2004-01-31 18:40:15 daniel Revision 1.77 2004-01-31 22:48:31 daniel
* Fix stabs generation problem reported by Jonas
Revision 1.76 2004/01/31 18:40:15 daniel
* Last steps before removal of aasmtai dependency in symsym can be * Last steps before removal of aasmtai dependency in symsym can be
accomplished. accomplished.

View File

@ -326,9 +326,6 @@ interface
var var
generrorsym : tsym; generrorsym : tsym;
const
current_object_option : tsymoptions = [sp_public];
{ rtti and init/final } { rtti and init/final }
procedure generate_rtti(p:tsym); procedure generate_rtti(p:tsym);
procedure generate_inittable(p:tsym); procedure generate_inittable(p:tsym);
@ -372,12 +369,6 @@ implementation
constructor tstoredsym.create(const n : string); constructor tstoredsym.create(const n : string);
begin begin
inherited create(n); inherited create(n);
symoptions:=current_object_option;
{$ifdef GDB}
isstabwritten := false;
{$endif GDB}
{ fileinfo:=akttokenpos;}
lastref:=defref;
_mangledname:=nil; _mangledname:=nil;
end; end;
@ -389,9 +380,6 @@ implementation
begin begin
inherited loadsym(ppufile); inherited loadsym(ppufile);
_mangledname:=nil; _mangledname:=nil;
{$ifdef GDB}
isstabwritten := false;
{$endif GDB}
end; end;
{ procedure tstoredsym.buildderef; { procedure tstoredsym.buildderef;
@ -2292,9 +2280,8 @@ implementation
var stabchar:string[2]; var stabchar:string[2];
begin begin
if restype.def=nil then stabstring:=nil;
stabstring:=nil if restype.def<>nil then
else
begin begin
if restype.def.deftype in tagtypes then if restype.def.deftype in tagtypes then
stabchar:='Tt' stabchar:='Tt'
@ -2466,7 +2453,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.150 2004-01-31 21:09:58 daniel Revision 1.151 2004-01-31 22:48:31 daniel
* Fix stabs generation problem reported by Jonas
Revision 1.150 2004/01/31 21:09:58 daniel
* Stabs lineinfo problem fixed * Stabs lineinfo problem fixed
Revision 1.149 2004/01/31 18:40:15 daniel Revision 1.149 2004/01/31 18:40:15 daniel

View File

@ -852,11 +852,16 @@ implementation
if Tsym(p).typ=typesym then if Tsym(p).typ=typesym then
begin begin
ao:=Taasmoutput(arg); ao:=Taasmoutput(arg);
Tsym(p).isstabwritten:=false; if Ttypesym(p).restype.def.typesym=p then
stabstr:=Tsym(p).stabstring; Tstoreddef(Ttypesym(p).restype.def).concatstabto(ao)
if stabstr<>nil then else
ao.concat(Tai_stabs.create(stabstr)); begin
Tsym(p).isstabwritten:=true; Tsym(p).isstabwritten:=false;
stabstr:=Tsym(p).stabstring;
if stabstr<>nil then
ao.concat(Tai_stabs.create(stabstr));
Tsym(p).isstabwritten:=true;
end;
end; end;
end; end;
@ -2359,7 +2364,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.132 2004-01-31 18:40:15 daniel Revision 1.133 2004-01-31 22:48:31 daniel
* Fix stabs generation problem reported by Jonas
Revision 1.132 2004/01/31 18:40:15 daniel
* Last steps before removal of aasmtai dependency in symsym can be * Last steps before removal of aasmtai dependency in symsym can be
accomplished. accomplished.

View File

@ -219,6 +219,9 @@ interface
memprocnodetree : tmemdebug; memprocnodetree : tmemdebug;
{$endif MEMDEBUG} {$endif MEMDEBUG}
const
current_object_option : tsymoptions = [sp_public];
implementation implementation
@ -228,6 +231,7 @@ implementation
symdef, symdef,
gdb; gdb;
{**************************************************************************** {****************************************************************************
Tdef Tdef
****************************************************************************} ****************************************************************************}
@ -304,6 +308,11 @@ implementation
defref:=tref.create(defref,@akttokenpos); defref:=tref.create(defref,@akttokenpos);
inc(refcount); inc(refcount);
end; end;
lastref:=defref;
{$ifdef GDB}
isstabwritten := false;
{$endif GDB}
symoptions:=current_object_option;
end; end;
constructor tsym.loadsym(ppufile:tcompilerppufile); constructor tsym.loadsym(ppufile:tcompilerppufile);
@ -328,6 +337,9 @@ implementation
refs:=0; refs:=0;
lastwritten:=nil; lastwritten:=nil;
refcount:=0; refcount:=0;
{$ifdef GDB}
isstabwritten := false;
{$endif GDB}
end; end;
destructor tsym.destroy; destructor tsym.destroy;
@ -1528,7 +1540,10 @@ finalization
end. end.
{ {
$Log$ $Log$
Revision 1.37 2004-01-31 21:09:58 daniel Revision 1.38 2004-01-31 22:48:31 daniel
* Fix stabs generation problem reported by Jonas
Revision 1.37 2004/01/31 21:09:58 daniel
* Stabs lineinfo problem fixed * Stabs lineinfo problem fixed
Revision 1.36 2004/01/31 18:40:15 daniel Revision 1.36 2004/01/31 18:40:15 daniel