mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-18 06:39:03 +00:00
Remove try/catch block that prevents proper stack trace unrolling
This commit is contained in:
parent
a3a9e79263
commit
3a16a369c5
|
@ -1109,34 +1109,28 @@ bool run_frontend(std::string filename, std::string command, RTLIL::Design *desi
|
|||
FILE *backup_script_file = Frontend::current_script_file;
|
||||
Frontend::current_script_file = f;
|
||||
|
||||
try {
|
||||
std::string command;
|
||||
while (fgetline(f, command)) {
|
||||
while (!command.empty() && command[command.size()-1] == '\\') {
|
||||
std::string next_line;
|
||||
if (!fgetline(f, next_line))
|
||||
break;
|
||||
command.resize(command.size()-1);
|
||||
command += next_line;
|
||||
}
|
||||
handle_label(command, from_to_active, run_from, run_to);
|
||||
if (from_to_active) {
|
||||
Pass::call(design, command);
|
||||
design->check();
|
||||
}
|
||||
std::string command;
|
||||
while (fgetline(f, command)) {
|
||||
while (!command.empty() && command[command.size() - 1] == '\\') {
|
||||
std::string next_line;
|
||||
if (!fgetline(f, next_line))
|
||||
break;
|
||||
command.resize(command.size() - 1);
|
||||
command += next_line;
|
||||
}
|
||||
|
||||
if (!command.empty()) {
|
||||
handle_label(command, from_to_active, run_from, run_to);
|
||||
if (from_to_active) {
|
||||
Pass::call(design, command);
|
||||
design->check();
|
||||
}
|
||||
handle_label(command, from_to_active, run_from, run_to);
|
||||
if (from_to_active) {
|
||||
Pass::call(design, command);
|
||||
design->check();
|
||||
}
|
||||
}
|
||||
catch (...) {
|
||||
Frontend::current_script_file = backup_script_file;
|
||||
throw;
|
||||
|
||||
if (!command.empty()) {
|
||||
handle_label(command, from_to_active, run_from, run_to);
|
||||
if (from_to_active) {
|
||||
Pass::call(design, command);
|
||||
design->check();
|
||||
}
|
||||
}
|
||||
|
||||
Frontend::current_script_file = backup_script_file;
|
||||
|
|
Loading…
Reference in a new issue