mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 05:49:12 +02:00
* don't write line numbers in stabs for defs
This commit is contained in:
parent
56c727153a
commit
df18c0aa82
@ -1049,11 +1049,6 @@ implementation
|
|||||||
begin
|
begin
|
||||||
if s='numberstring' then
|
if s='numberstring' then
|
||||||
get_var_value:=numberstring
|
get_var_value:=numberstring
|
||||||
else if s='sym_line' then
|
|
||||||
if assigned(typesym) then
|
|
||||||
get_var_value:=tostr(Ttypesym(typesym).fileinfo.line)
|
|
||||||
else
|
|
||||||
get_var_value:='0'
|
|
||||||
else if s='sym_name' then
|
else if s='sym_name' then
|
||||||
if assigned(typesym) then
|
if assigned(typesym) then
|
||||||
get_var_value:=Ttypesym(typesym).name
|
get_var_value:=Ttypesym(typesym).name
|
||||||
@ -1119,7 +1114,9 @@ implementation
|
|||||||
{ Here we maybe generate a type, so we have to use numberstring }
|
{ Here we maybe generate a type, so we have to use numberstring }
|
||||||
st:=stabstr_evaluate('"${sym_name}:$1$2=',[stabchar,numberstring]);
|
st:=stabstr_evaluate('"${sym_name}:$1$2=',[stabchar,numberstring]);
|
||||||
reallocmem(st,strlen(ss)+512);
|
reallocmem(st,strlen(ss)+512);
|
||||||
su:=stabstr_evaluate('",${N_LSYM},0,${sym_line},0',[]);
|
{ line info is set to 0 for all defs, because the def can be in an other
|
||||||
|
unit and then the linenumber is invalid in the current sourcefile }
|
||||||
|
su:=stabstr_evaluate('",${N_LSYM},0,0,0',[]);
|
||||||
strcopy(strecopy(strend(st),ss),su);
|
strcopy(strecopy(strend(st),ss),su);
|
||||||
reallocmem(st,strlen(st)+1);
|
reallocmem(st,strlen(st)+1);
|
||||||
allstabstring:=st;
|
allstabstring:=st;
|
||||||
@ -2451,7 +2448,7 @@ implementation
|
|||||||
else
|
else
|
||||||
st := ' ';
|
st := ' ';
|
||||||
asmlist.concat(Tai_stabs.create(stabstr_evaluate(
|
asmlist.concat(Tai_stabs.create(stabstr_evaluate(
|
||||||
'"$1:t${numberstring}=*$2=xs$3:",${N_LSYM},0,${sym_line},0',
|
'"$1:t${numberstring}=*$2=xs$3:",${N_LSYM},0,0,0',
|
||||||
[st,nb,pointertype.def.typesym.name])));
|
[st,nb,pointertype.def.typesym.name])));
|
||||||
end;
|
end;
|
||||||
stab_state:=stab_state_written;
|
stab_state:=stab_state_written;
|
||||||
@ -5189,7 +5186,6 @@ implementation
|
|||||||
stabchar : string[2];
|
stabchar : string[2];
|
||||||
ss,st : pchar;
|
ss,st : pchar;
|
||||||
sname : string;
|
sname : string;
|
||||||
sym_line_no : longint;
|
|
||||||
begin
|
begin
|
||||||
ss := stabstring;
|
ss := stabstring;
|
||||||
getmem(st,strlen(ss)+512);
|
getmem(st,strlen(ss)+512);
|
||||||
@ -5197,20 +5193,14 @@ implementation
|
|||||||
if deftype in tagtypes then
|
if deftype in tagtypes then
|
||||||
stabchar := 'Tt';
|
stabchar := 'Tt';
|
||||||
if assigned(typesym) then
|
if assigned(typesym) then
|
||||||
begin
|
sname := typesym.name
|
||||||
sname := typesym.name;
|
|
||||||
sym_line_no:=typesym.fileinfo.line;
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
begin
|
sname := ' ';
|
||||||
sname := ' ';
|
|
||||||
sym_line_no:=0;
|
|
||||||
end;
|
|
||||||
if writing_class_record_stab then
|
if writing_class_record_stab then
|
||||||
strpcopy(st,'"'+sname+':'+stabchar+classnumberstring+'=')
|
strpcopy(st,'"'+sname+':'+stabchar+classnumberstring+'=')
|
||||||
else
|
else
|
||||||
strpcopy(st,'"'+sname+':'+stabchar+numberstring+'=');
|
strpcopy(st,'"'+sname+':'+stabchar+numberstring+'=');
|
||||||
strpcopy(strecopy(strend(st),ss),'",'+tostr(N_LSYM)+',0,'+tostr(sym_line_no)+',0');
|
strpcopy(strecopy(strend(st),ss),'",'+tostr(N_LSYM)+',0,0,0');
|
||||||
allstabstring := strnew(st);
|
allstabstring := strnew(st);
|
||||||
freemem(st,strlen(ss)+512);
|
freemem(st,strlen(ss)+512);
|
||||||
strdispose(ss);
|
strdispose(ss);
|
||||||
@ -6070,7 +6060,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.229 2004-03-10 22:52:57 peter
|
Revision 1.230 2004-03-14 20:06:40 peter
|
||||||
|
* don't write line numbers in stabs for defs
|
||||||
|
|
||||||
|
Revision 1.229 2004/03/10 22:52:57 peter
|
||||||
* more stabs fixes
|
* more stabs fixes
|
||||||
* special mode -gv for valgrind compatible stabs
|
* special mode -gv for valgrind compatible stabs
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user