fixed files switching

This commit is contained in:
ALEXks
2024-03-18 14:49:04 +03:00
parent 093abbbd55
commit 0f39f6474d
3 changed files with 19 additions and 14 deletions

View File

@@ -25,6 +25,8 @@ extern "C" void exit(int status);
#include "extcxx_low.h"
extern "C" int number_of_ll_node;
extern "C" PTR_SYMB last_file_symbol;
extern "C" PTR_SYMB FileLastSymbol(...);
#undef USER
@@ -1641,9 +1643,11 @@ SgFile &SgProject::file(int i)
current_file_id = i;
current_file = pt;
#ifdef __SPF
SgStatement::setCurrProcessFile(pt->filename());
SgStatement::setCurrProcessLine(0);
last_file_symbol = FileLastSymbol(pt->filename());
#endif
return *pt;
}
@@ -1777,6 +1781,7 @@ int SgFile::switchToFile(const std::string &name)
}
}
last_file_symbol = FileLastSymbol(name.c_str());
return it->second.second;
}