summaryrefslogtreecommitdiff
path: root/tb/top
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2024-02-13 12:14:31 -0600
committerAlejandro Soto <alejandro@34project.org>2024-02-20 11:11:18 -0600
commit827c40829903d5b870f47ab2f389792ed10211bd (patch)
tree2a696fcb41118e8115585a9e2d79ec60294a6584 /tb/top
parent9bf55b70a85e5c12e9cfd0b8c7e1eaf1c05a6c1c (diff)
rtl/core/control: don't shift branch history registers inside loops
Diffstat (limited to 'tb/top')
-rw-r--r--tb/top/conspiracion/conspiracion.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/tb/top/conspiracion/conspiracion.cpp b/tb/top/conspiracion/conspiracion.cpp
index e1f5f78..1db2213 100644
--- a/tb/top/conspiracion/conspiracion.cpp
+++ b/tb/top/conspiracion/conspiracion.cpp
@@ -559,7 +559,7 @@ int main(int argc, char **argv)
}
};
- auto do_mem_dump = [&](const mem_region *dumps, std::size_t count)
+ auto do_mem_dump = [&](const mem_region *dumps, std::size_t count, bool map_virtual = true)
{
std::fputs("=== dump-mem ===\n", ctrl);
for(std::size_t i = 0; i < count; ++i)
@@ -570,7 +570,7 @@ int main(int argc, char **argv)
for(std::size_t i = 0; i < dump.length; ++i)
{
std::uint32_t at = dump.start + i;
- if(!pagewalk(at))
+ if(map_virtual && !pagewalk(at))
{
break;
}
@@ -695,6 +695,11 @@ int main(int argc, char **argv)
else if(!std::strcmp(cmd, "step")) {
current_core->step__VforceEn = 1;
break;
+ } else if (!std::strcmp(cmd, "dump-phys")) {
+ mem_region dump = {};
+ std::sscanf(std::strtok(nullptr, " "), "%zu", &dump.start);
+ std::sscanf(std::strtok(nullptr, " "), "%zu", &dump.length);
+ do_mem_dump(&dump, 1, false);
} else if (!std::strcmp(cmd, "dump-mem")) {
mem_region dump = {};
std::sscanf(std::strtok(nullptr, " "), "%zu", &dump.start);