|
@@ -35,7 +35,7 @@
|
|
|
isstabwritten := false;
|
|
|
{$endif GDB}
|
|
|
{$ifdef NEWINPUT}
|
|
|
- line_no:=aktfilepos.line;
|
|
|
+ fileinfo:=aktfilepos;
|
|
|
{$else}
|
|
|
if assigned(current_module) and assigned(current_module^.current_inputfile) then
|
|
|
line_no:=current_module^.current_inputfile^.line_no
|
|
@@ -62,7 +62,14 @@
|
|
|
right:=nil;
|
|
|
setname(readstring);
|
|
|
typ:=abstractsym;
|
|
|
+{$ifdef NEWINPUT}
|
|
|
+
|
|
|
+ fillchar(fileinfo,sizeof(fileinfo),0);
|
|
|
+{$else}
|
|
|
+
|
|
|
line_no:=0;
|
|
|
+{$endif}
|
|
|
+
|
|
|
if object_options then
|
|
|
properties:=symprop(readbyte)
|
|
|
else
|
|
@@ -330,7 +337,7 @@
|
|
|
function tsym.stabstring : pchar;
|
|
|
|
|
|
begin
|
|
|
- stabstring:=strpnew('"'+name+'",'+tostr(N_LSYM)+',0,'+tostr(line_no)+',0');
|
|
|
+ stabstring:=strpnew('"'+name+'",'+tostr(N_LSYM)+',0,'+tostr({$ifdef NEWINPUT}fileinfo.line{$else}line_no{$endif})+',0');
|
|
|
end;
|
|
|
|
|
|
procedure tsym.concatstabto(asmlist : paasmoutput);
|
|
@@ -1084,7 +1091,7 @@
|
|
|
if use_gsym then st := 'G' else st := 'S';
|
|
|
stabstring := strpnew('"'+owner^.name^+'__'+name+':'+
|
|
|
+definition^.numberstring+'",'+
|
|
|
- tostr(N_LCSYM)+',0,'+tostr(line_no)+','+mangledname);
|
|
|
+ tostr(N_LCSYM)+',0,'+tostr({$ifdef NEWINPUT}fileinfo.line{$else}line_no{$endif})+','+mangledname);
|
|
|
end
|
|
|
else if (owner^.symtabletype = globalsymtable) or
|
|
|
(owner^.symtabletype = unitsymtable) then
|
|
@@ -1096,13 +1103,13 @@
|
|
|
if use_gsym then st := 'G' else st := 'S';
|
|
|
stabstring := strpnew('"'+name+':'+st
|
|
|
+definition^.numberstring+'",'+
|
|
|
- tostr(N_LCSYM)+',0,'+tostr(line_no)+','+mangledname);
|
|
|
+ tostr(N_LCSYM)+',0,'+tostr({$ifdef NEWINPUT}fileinfo.line{$else}line_no{$endif})+','+mangledname);
|
|
|
end
|
|
|
else if owner^.symtabletype = staticsymtable then
|
|
|
begin
|
|
|
stabstring := strpnew('"'+name+':S'
|
|
|
+definition^.numberstring+'",'+
|
|
|
- tostr(N_LCSYM)+',0,'+tostr(line_no)+','+mangledname);
|
|
|
+ tostr(N_LCSYM)+',0,'+tostr({$ifdef NEWINPUT}fileinfo.line{$else}line_no{$endif})+','+mangledname);
|
|
|
end
|
|
|
else if (owner^.symtabletype=parasymtable) then
|
|
|
begin
|
|
@@ -1116,7 +1123,7 @@
|
|
|
end;
|
|
|
stabstring := strpnew('"'+name+':'+st
|
|
|
+definition^.numberstring+'",'+
|
|
|
- tostr(N_PSYM)+',0,'+tostr(line_no)+','+tostr(address+owner^.call_offset))
|
|
|
+ tostr(N_PSYM)+',0,'+tostr({$ifdef NEWINPUT}fileinfo.line{$else}line_no{$endif})+','+tostr(address+owner^.call_offset))
|
|
|
{offset to ebp => will not work if the framepointer is esp
|
|
|
so some optimizing will make things harder to debug }
|
|
|
end
|
|
@@ -1128,13 +1135,13 @@
|
|
|
{ this is the register order for GDB}
|
|
|
stabstring:=strpnew('"'+name+':r'
|
|
|
+definition^.numberstring+'",'+
|
|
|
- tostr(N_RSYM)+',0,'+tostr(line_no)+','+tostr(GDB_i386index[reg]));
|
|
|
+ tostr(N_RSYM)+',0,'+tostr({$ifdef NEWINPUT}fileinfo.line{$else}line_no{$endif})+','+tostr(GDB_i386index[reg]));
|
|
|
end
|
|
|
else
|
|
|
{$endif i386}
|
|
|
stabstring := strpnew('"'+name+':'
|
|
|
+definition^.numberstring+'",'+
|
|
|
- tostr(N_LSYM)+',0,'+tostr(line_no)+',-'+tostr(address))
|
|
|
+ tostr(N_LSYM)+',0,'+tostr({$ifdef NEWINPUT}fileinfo.line{$else}line_no{$endif})+',-'+tostr(address))
|
|
|
else
|
|
|
stabstring := inherited stabstring;
|
|
|
end;
|
|
@@ -1153,7 +1160,7 @@
|
|
|
{ this is the register order for GDB}
|
|
|
stab_str:=strpnew('"'+name+':r'
|
|
|
+definition^.numberstring+'",'+
|
|
|
- tostr(N_RSYM)+',0,'+tostr(line_no)+','+tostr(GDB_i386index[reg]));
|
|
|
+ tostr(N_RSYM)+',0,'+tostr({$ifdef NEWINPUT}fileinfo.line{$else}line_no{$endif})+','+tostr(GDB_i386index[reg]));
|
|
|
asmlist^.concat(new(pai_stabs,init(stab_str)));
|
|
|
end;
|
|
|
{$endif i386}
|
|
@@ -1271,7 +1278,7 @@
|
|
|
else
|
|
|
st := 'S';
|
|
|
stabstring := strpnew('"'+name+':'+st
|
|
|
- +definition^.numberstring+'",'+tostr(n_STSYM)+',0,'+tostr(line_no)+','+mangledname);
|
|
|
+ +definition^.numberstring+'",'+tostr(n_STSYM)+',0,'+tostr({$ifdef NEWINPUT}fileinfo.line{$else}line_no{$endif})+','+mangledname);
|
|
|
end;
|
|
|
{$endif GDB}
|
|
|
|
|
@@ -1395,7 +1402,7 @@
|
|
|
{ sets are not recognized by GDB}
|
|
|
{***}
|
|
|
end;
|
|
|
- stabstring := strpnew('"'+name+':c='+st+'",'+tostr(N_function)+',0,'+tostr(line_no)+',0');
|
|
|
+ stabstring := strpnew('"'+name+':c='+st+'",'+tostr(N_function)+',0,'+tostr({$ifdef NEWINPUT}fileinfo.line{$else}line_no{$endif})+',0');
|
|
|
end;
|
|
|
|
|
|
procedure tconstsym.concatstabto(asmlist : paasmoutput);
|
|
@@ -1567,7 +1574,7 @@
|
|
|
else
|
|
|
stabchar := 't';
|
|
|
short := '"'+name+':'+stabchar+definition^.numberstring
|
|
|
- +'",'+tostr(N_LSYM)+',0,'+tostr(line_no)+',0';
|
|
|
+ +'",'+tostr(N_LSYM)+',0,'+tostr({$ifdef NEWINPUT}fileinfo.line{$else}line_no{$endif})+',0';
|
|
|
stabstring := strpnew(short);
|
|
|
end;
|
|
|
|
|
@@ -1625,7 +1632,11 @@
|
|
|
|
|
|
{
|
|
|
$Log$
|
|
|
- Revision 1.19 1998-07-07 17:40:39 peter
|
|
|
+ Revision 1.20 1998-07-10 00:00:05 peter
|
|
|
+ * fixed ttypesym bug finally
|
|
|
+ * fileinfo in the symtable and better using for unused vars
|
|
|
+
|
|
|
+ Revision 1.19 1998/07/07 17:40:39 peter
|
|
|
* packrecords 4 works
|
|
|
* word aligning of parameters
|
|
|
|