diff options
author | Andrew Waterman <andrew@sifive.com> | 2023-01-16 16:21:18 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-16 16:21:18 -0800 |
commit | a7ac8d85a0f3dcabf181c1858e0e7d02a6cd71e1 (patch) | |
tree | 387f21e6e37e33205b7145e4388c07c94fc13cc5 | |
parent | e4d2458e7eac7b7f098f225be69c9af224c930ed (diff) | |
parent | b41209eb366a8f362028874d3478a97c3a689e3b (diff) | |
download | spike-a7ac8d85a0f3dcabf181c1858e0e7d02a6cd71e1.zip spike-a7ac8d85a0f3dcabf181c1858e0e7d02a6cd71e1.tar.gz spike-a7ac8d85a0f3dcabf181c1858e0e7d02a6cd71e1.tar.bz2 |
Merge pull request #1230 from gr816ox/patch-2
Add more hint when searched path is wrong
-rw-r--r-- | fesvr/htif.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fesvr/htif.cc b/fesvr/htif.cc index 80ab69b..c70599d 100644 --- a/fesvr/htif.cc +++ b/fesvr/htif.cc @@ -112,6 +112,12 @@ std::map<std::string, uint64_t> htif_t::load_payload(const std::string& payload, std::string test_path = PREFIX TARGET_DIR + payload; if (access(test_path.c_str(), F_OK) == 0) path = test_path; + else + throw std::runtime_error( + "could not open " + payload + "; searched paths:\n" + + "\t. (current directory)\n" + + "\t" + PREFIX TARGET_DIR + " (based on configured --prefix and --with-target)" + ); } if (path.empty()) |