increases verbosity incase elf loading goes wrong
This commit is contained in:
parent
ad60449073
commit
ac818f304d
12
src/main.cpp
12
src/main.cpp
|
@ -206,13 +206,21 @@ int main(int argc, char* argv[]) {
|
||||||
if(clim.count("elf"))
|
if(clim.count("elf"))
|
||||||
for(std::string input : clim["elf"].as<std::vector<std::string>>()) {
|
for(std::string input : clim["elf"].as<std::vector<std::string>>()) {
|
||||||
auto start_addr = vm->get_arch()->load_file(input);
|
auto start_addr = vm->get_arch()->load_file(input);
|
||||||
if(start_addr.second) // FIXME: this always evaluates to true as load file always returns <sth, true>
|
if(start_addr.second)
|
||||||
start_address = start_addr.first;
|
start_address = start_addr.first;
|
||||||
|
else {
|
||||||
|
LOG(ERR) << "Error occured while loading file " << input << std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for(std::string input : args) {
|
for(std::string input : args) {
|
||||||
auto start_addr = vm->get_arch()->load_file(input); // treat remaining arguments as elf files
|
auto start_addr = vm->get_arch()->load_file(input); // treat remaining arguments as elf files
|
||||||
if(start_addr.second) // FIXME: this always evaluates to true as load file always returns <sth, true>
|
if(start_addr.second)
|
||||||
start_address = start_addr.first;
|
start_address = start_addr.first;
|
||||||
|
else {
|
||||||
|
LOG(ERR) << "Error occured while loading file " << input << std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(clim.count("reset")) {
|
if(clim.count("reset")) {
|
||||||
auto str = clim["reset"].as<std::string>();
|
auto str = clim["reset"].as<std::string>();
|
||||||
|
|
Loading…
Reference in New Issue