From d7d9860051a9a9eb2c6f11684535ac65cce38eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 15 Jan 2018 15:22:44 +0100 Subject: Cleanup some todos in code --- qtmips_machine/programloader.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'qtmips_machine/programloader.cpp') diff --git a/qtmips_machine/programloader.cpp b/qtmips_machine/programloader.cpp index fd0679d..c83a30f 100644 --- a/qtmips_machine/programloader.cpp +++ b/qtmips_machine/programloader.cpp @@ -36,7 +36,7 @@ ProgramLoader::ProgramLoader(const char *file) { throw QTMIPS_EXCEPTION(Input, "Getting elf class failed", elf_errmsg(-1)); if (elf_class != ELFCLASS32) throw QTMIPS_EXCEPTION(Input, "Only supported architecture is 32bit", ""); - // TODO check endianity! + // TODO We should check in what endianity elf file is coded in // Get number of program sections in elf file if (elf_getphdrnum(this->elf, &this->n_secs)) @@ -46,7 +46,6 @@ ProgramLoader::ProgramLoader(const char *file) { throw QTMIPS_EXCEPTION(Input, "Elf program sections get failed", elf_errmsg(-1)); // We want only LOAD sections so we create map of those sections for (unsigned i = 1; i < this->n_secs; i++) { - // TODO handle endianity if (phdrs[i].p_type != PT_LOAD) continue; this->map.push_back(i); @@ -58,8 +57,7 @@ ProgramLoader::ProgramLoader(QString file) : ProgramLoader(file.toStdString().c_ ProgramLoader::~ProgramLoader() { // Close elf - // TODO fix (this results to segfault, there is probably somethig passed to it on stack or something) - //elf_end(this->elf); + elf_end(this->elf); // Close file close(this->fd); } -- cgit v1.2.3