mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 04:49:19 +02:00
* better detection of source file change while writing debug info
* set module index before replaying tokens of a generic git-svn-id: trunk@9767 -
This commit is contained in:
parent
611e07202d
commit
cd4b05f3de
@ -2611,9 +2611,10 @@ implementation
|
|||||||
currfileinfo:=tailineinfo(hp).fileinfo;
|
currfileinfo:=tailineinfo(hp).fileinfo;
|
||||||
{ file changed ? (must be before line info) }
|
{ file changed ? (must be before line info) }
|
||||||
if (currfileinfo.fileindex<>0) and
|
if (currfileinfo.fileindex<>0) and
|
||||||
(lastfileinfo.fileindex<>currfileinfo.fileindex) then
|
((lastfileinfo.fileindex<>currfileinfo.fileindex) or
|
||||||
|
(lastfileinfo.moduleindex<>currfileinfo.moduleindex)) then
|
||||||
begin
|
begin
|
||||||
infile:=current_module.sourcefiles.get_file(currfileinfo.fileindex);
|
infile:=get_module(currfileinfo.moduleindex).sourcefiles.get_file(currfileinfo.fileindex);
|
||||||
if assigned(infile) then
|
if assigned(infile) then
|
||||||
begin
|
begin
|
||||||
currfileidx := get_file_index(infile);
|
currfileidx := get_file_index(infile);
|
||||||
|
@ -1574,9 +1574,10 @@ implementation
|
|||||||
currfileinfo:=tailineinfo(hp).fileinfo;
|
currfileinfo:=tailineinfo(hp).fileinfo;
|
||||||
{ file changed ? (must be before line info) }
|
{ file changed ? (must be before line info) }
|
||||||
if (currfileinfo.fileindex<>0) and
|
if (currfileinfo.fileindex<>0) and
|
||||||
(lastfileinfo.fileindex<>currfileinfo.fileindex) then
|
((lastfileinfo.fileindex<>currfileinfo.fileindex) or
|
||||||
|
(lastfileinfo.moduleindex<>currfileinfo.moduleindex)) then
|
||||||
begin
|
begin
|
||||||
infile:=current_module.sourcefiles.get_file(currfileinfo.fileindex);
|
infile:=get_module(currfileinfo.moduleindex).sourcefiles.get_file(currfileinfo.fileindex);
|
||||||
if assigned(infile) then
|
if assigned(infile) then
|
||||||
begin
|
begin
|
||||||
current_asmdata.getlabel(hlabel,alt_dbgfile);
|
current_asmdata.getlabel(hlabel,alt_dbgfile);
|
||||||
|
@ -1822,6 +1822,8 @@ implementation
|
|||||||
begin
|
begin
|
||||||
oldcurrent_filepos:=current_filepos;
|
oldcurrent_filepos:=current_filepos;
|
||||||
current_filepos:=tprocdef(tprocdef(hp).genericdef).fileinfo;
|
current_filepos:=tprocdef(tprocdef(hp).genericdef).fileinfo;
|
||||||
|
{ use the index the module got from the current compilation process }
|
||||||
|
current_filepos.moduleindex:=hmodule.unit_index;
|
||||||
current_tokenpos:=current_filepos;
|
current_tokenpos:=current_filepos;
|
||||||
current_scanner.startreplaytokens(tprocdef(tprocdef(hp).genericdef).generictokenbuf);
|
current_scanner.startreplaytokens(tprocdef(tprocdef(hp).genericdef).generictokenbuf);
|
||||||
read_proc_body(nil,tprocdef(hp));
|
read_proc_body(nil,tprocdef(hp));
|
||||||
|
Loading…
Reference in New Issue
Block a user