mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 14:49:47 +02:00
+ don't abuse status.currentsourcepath to pass on PPU names if the source is unavailable, causes side effects with other frontends (like the IDE). Improved solution for Mantis #27588
git-svn-id: trunk@30373 -
This commit is contained in:
parent
ad995eb121
commit
72e1443081
@ -72,6 +72,8 @@ type
|
||||
TCompilerStatus = record
|
||||
{ Current status }
|
||||
currentmodule,
|
||||
currentsourceppufilename, { the name of the ppu where the source file
|
||||
comes from where the error location is given }
|
||||
currentsourcepath,
|
||||
currentsource : string; { filename }
|
||||
currentline,
|
||||
@ -104,6 +106,7 @@ type
|
||||
use_redir,
|
||||
use_bugreport,
|
||||
use_gccoutput,
|
||||
sources_avail,
|
||||
print_source_path : boolean;
|
||||
{ Redirection support }
|
||||
redirfile : text;
|
||||
@ -310,7 +313,10 @@ begin
|
||||
','+tostr(status.currentcolumn)+') '+hs+' '+s;
|
||||
end;
|
||||
if status.print_source_path then
|
||||
hs:=status.currentsourcepath+hs;
|
||||
if status.sources_avail then
|
||||
hs:=status.currentsourcepath+hs
|
||||
else
|
||||
hs:=status.currentsourceppufilename+':'+hs;
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
@ -451,15 +451,13 @@ implementation
|
||||
begin
|
||||
{ update status record }
|
||||
status.currentmodule:=module.modulename^;
|
||||
status.currentsourceppufilename:=module.ppufilename;
|
||||
status.currentmodulestate:=ModuleStateStr[module.state];
|
||||
status.currentsource:=module.sourcefiles.get_file_name(current_filepos.fileindex);
|
||||
status.currentsourcepath:=module.sourcefiles.get_file_path(current_filepos.fileindex);
|
||||
{ if sources are not available, construct a prefix from the
|
||||
ppu file name }
|
||||
if not(module.sources_avail) then
|
||||
status.currentsourcepath:=module.ppufilename+':'
|
||||
status.sources_avail:=module.sources_avail;
|
||||
{ if currentsourcepath is relative, make it absolute }
|
||||
else if not path_absolute(status.currentsourcepath) then
|
||||
if not path_absolute(status.currentsourcepath) then
|
||||
status.currentsourcepath:=GetCurrentDir+status.currentsourcepath;
|
||||
|
||||
{ update lastfileidx only if name known PM }
|
||||
@ -1002,6 +1000,7 @@ implementation
|
||||
lastfileidx:=-1;
|
||||
lastmoduleidx:=-1;
|
||||
status.currentmodule:='';
|
||||
status.currentsourceppufilename:='';
|
||||
status.currentsource:='';
|
||||
status.currentsourcepath:='';
|
||||
{ Register internalerrorproc for cutils/cclasses }
|
||||
|
Loading…
Reference in New Issue
Block a user