mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 13:29:24 +02:00
* better stabs line info for vars
This commit is contained in:
parent
8101571683
commit
6a0a1149c8
@ -316,10 +316,10 @@ unit pdecl;
|
|||||||
Message(parser_e_absolute_only_one_var);
|
Message(parser_e_absolute_only_one_var);
|
||||||
dispose(sc,done);
|
dispose(sc,done);
|
||||||
aktvarsym:=new(pvarsym,init_C(s,target_os.Cprefix+C_name,p));
|
aktvarsym:=new(pvarsym,init_C(s,target_os.Cprefix+C_name,p));
|
||||||
tokenpos:=storetokenpos;
|
|
||||||
aktvarsym^.var_options:=aktvarsym^.var_options or vo_is_external;
|
aktvarsym^.var_options:=aktvarsym^.var_options or vo_is_external;
|
||||||
concat_external(aktvarsym^.mangledname,EXT_NEAR);
|
concat_external(aktvarsym^.mangledname,EXT_NEAR);
|
||||||
symtablestack^.insert(aktvarsym);
|
symtablestack^.insert(aktvarsym);
|
||||||
|
tokenpos:=storetokenpos;
|
||||||
symdone:=true;
|
symdone:=true;
|
||||||
end;
|
end;
|
||||||
{ check for absolute }
|
{ check for absolute }
|
||||||
@ -345,8 +345,8 @@ unit pdecl;
|
|||||||
abssym:=new(pabsolutesym,init(s,p));
|
abssym:=new(pabsolutesym,init(s,p));
|
||||||
abssym^.abstyp:=tovar;
|
abssym^.abstyp:=tovar;
|
||||||
abssym^.ref:=srsym;
|
abssym^.ref:=srsym;
|
||||||
tokenpos:=storetokenpos;
|
|
||||||
symtablestack^.insert(abssym);
|
symtablestack^.insert(abssym);
|
||||||
|
tokenpos:=storetokenpos;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if (token=CSTRING) or (token=CCHAR) then
|
if (token=CSTRING) or (token=CCHAR) then
|
||||||
@ -358,8 +358,8 @@ unit pdecl;
|
|||||||
consume(token);
|
consume(token);
|
||||||
abssym^.abstyp:=toasm;
|
abssym^.abstyp:=toasm;
|
||||||
abssym^.asmname:=stringdup(s);
|
abssym^.asmname:=stringdup(s);
|
||||||
tokenpos:=storetokenpos;
|
|
||||||
symtablestack^.insert(abssym);
|
symtablestack^.insert(abssym);
|
||||||
|
tokenpos:=storetokenpos;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
{ absolute address ?!? }
|
{ absolute address ?!? }
|
||||||
@ -372,7 +372,6 @@ unit pdecl;
|
|||||||
abssym:=new(pabsolutesym,init(s,p));
|
abssym:=new(pabsolutesym,init(s,p));
|
||||||
abssym^.abstyp:=toaddr;
|
abssym^.abstyp:=toaddr;
|
||||||
abssym^.absseg:=false;
|
abssym^.absseg:=false;
|
||||||
tokenpos:=storetokenpos;
|
|
||||||
s:=pattern;
|
s:=pattern;
|
||||||
consume(INTCONST);
|
consume(INTCONST);
|
||||||
val(s,abssym^.address,code);
|
val(s,abssym^.address,code);
|
||||||
@ -386,6 +385,7 @@ unit pdecl;
|
|||||||
abssym^.absseg:=true;
|
abssym^.absseg:=true;
|
||||||
end;
|
end;
|
||||||
symtablestack^.insert(abssym);
|
symtablestack^.insert(abssym);
|
||||||
|
tokenpos:=storetokenpos;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Message(parser_e_absolute_only_to_var_or_const);
|
Message(parser_e_absolute_only_to_var_or_const);
|
||||||
@ -408,8 +408,8 @@ unit pdecl;
|
|||||||
if not sc^.empty then
|
if not sc^.empty then
|
||||||
Message(parser_e_initialized_only_one_var);
|
Message(parser_e_initialized_only_one_var);
|
||||||
pconstsym:=new(ptypedconstsym,init(s,p,false));
|
pconstsym:=new(ptypedconstsym,init(s,p,false));
|
||||||
tokenpos:=storetokenpos;
|
|
||||||
symtablestack^.insert(pconstsym);
|
symtablestack^.insert(pconstsym);
|
||||||
|
tokenpos:=storetokenpos;
|
||||||
consume(EQUAL);
|
consume(EQUAL);
|
||||||
readtypedconst(p,pconstsym,false);
|
readtypedconst(p,pconstsym,false);
|
||||||
symdone:=true;
|
symdone:=true;
|
||||||
@ -489,7 +489,6 @@ unit pdecl;
|
|||||||
aktvarsym:=new(pvarsym,init_dll(s,p))
|
aktvarsym:=new(pvarsym,init_dll(s,p))
|
||||||
else
|
else
|
||||||
aktvarsym:=new(pvarsym,init_C(s,C_name,p));
|
aktvarsym:=new(pvarsym,init_C(s,C_name,p));
|
||||||
tokenpos:=storetokenpos;
|
|
||||||
{ set some vars options }
|
{ set some vars options }
|
||||||
if export_aktvarsym then
|
if export_aktvarsym then
|
||||||
inc(aktvarsym^.refs);
|
inc(aktvarsym^.refs);
|
||||||
@ -497,6 +496,7 @@ unit pdecl;
|
|||||||
aktvarsym^.var_options:=aktvarsym^.var_options or vo_is_external;
|
aktvarsym^.var_options:=aktvarsym^.var_options or vo_is_external;
|
||||||
{ insert in the stack/datasegment }
|
{ insert in the stack/datasegment }
|
||||||
symtablestack^.insert(aktvarsym);
|
symtablestack^.insert(aktvarsym);
|
||||||
|
tokenpos:=storetokenpos;
|
||||||
{ now we can insert it in the import lib if its a dll, or
|
{ now we can insert it in the import lib if its a dll, or
|
||||||
add it to the externals }
|
add it to the externals }
|
||||||
if extern_aktvarsym then
|
if extern_aktvarsym then
|
||||||
@ -2229,7 +2229,10 @@ unit pdecl;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.119 1999-05-19 12:41:56 florian
|
Revision 1.120 1999-05-20 22:19:52 pierre
|
||||||
|
* better stabs line info for vars
|
||||||
|
|
||||||
|
Revision 1.119 1999/05/19 12:41:56 florian
|
||||||
* made source compilable with TP (too long line)
|
* made source compilable with TP (too long line)
|
||||||
* default values for set properties fixed
|
* default values for set properties fixed
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user