Readme changes, github actions ci, test (#1)

* Readme changes, github actions ci, test

* Std flag change for older GCC versions"

* Install gcc multilib

* test fix and formatting

* Don't segfault on nonexistant file and show error instead

* Update ci.yml

* PR comments

* remove silly bit
This commit is contained in:
Ethan Roseman
2022-06-30 15:23:00 -04:00
committed by GitHub
parent f11759cc71
commit d92f0d1d08
6 changed files with 48 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
#include "common.h"
#include <asm/ldt.h>
#include <filesystem>
#include <errno.h>
#include <memory>
#include <sys/mman.h>
@@ -176,7 +177,14 @@ int main(int argc, char **argv) {
wibo::Executable exec;
wibo::mainModule = &exec;
FILE *f = fopen(argv[1], "rb");
char* pe_path = argv[1];
FILE *f = fopen(pe_path, "rb");
if (!f) {
std::string mesg = std::string("Failed to open file ") + pe_path;
perror(mesg.c_str());
return 1;
}
exec.loadPE(f);
fclose(f);