Skip to content

Commit

Permalink
#81 elf get_file_size
Browse files Browse the repository at this point in the history
  • Loading branch information
c71n93 committed Nov 19, 2023
1 parent 41edf46 commit 76c7f1b
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 3 deletions.
Binary file added 1debug/bubblesort-test
Binary file not shown.
Binary file added 1debug/mult-test
Binary file not shown.
Binary file added 1debug/nqueens-test
Binary file not shown.
Binary file added 1debug/primenumber-test
Binary file not shown.
Binary file added 1debug/privillege-change
Binary file not shown.
4 changes: 2 additions & 2 deletions src/sim/hart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ void Hart::exec_BB_END() {
}
currentBB_->setStartPC(pc);
dec_.assembleBB(*currentBB_);
entry.setTag(pc);
// entry.setPayload(*currentBB_, pc);
// entry.setTag(pc);
entry.setPayload(*currentBB_, pc);
cache_.incCounter(pc);
}
hookManager_->triggerBBFetchHook(*currentBB_);
Expand Down
2 changes: 1 addition & 1 deletion src/util/elf-parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ ElfParser::getLoadableSegments() & {
if (seg->get_type() == ELFIO::PT_LOAD) {
loadableSegments_.emplace_back(
seg->get_virtual_address(), seg->get_data(),
static_cast<RV64Size>(seg->get_memory_size()));
static_cast<RV64Size>(seg->get_file_size()));
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions standalone/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ target_link_libraries(besm666_standalone PRIVATE
CLI11::CLI11
capstone::capstone
)

target_compile_options(besm666_standalone PRIVATE -fsanitize=address -g -fsanitize=leak -fsanitize=undefined)
target_link_options(besm666_standalone PRIVATE -fsanitize=address -fsanitize=leak -fsanitize=undefined)

0 comments on commit 76c7f1b

Please sign in to comment.