Skip to content

Commit 83a429d

Browse files
committed
fix(debug): fix wrong output format for 'b' and 'h' type
1 parent 6563a1f commit 83a429d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/debugger/terminal.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,21 +90,21 @@ void DebugManager::print_info_dispatch(const DisplayInfo &info) {
9090
);
9191

9292
for (std::size_t i = 0; i < cnt; ++i) {
93-
target_ssize_t data{};
93+
target_ssize_t loaded {};
9494
target_ssize_t addr = pos + i * sizeof(data);
9595

9696
static_assert(std::integral<decltype(data)>);
9797
if constexpr (sizeof(data) == 4) {
98-
data = d.mem.load_i32(addr);
98+
loaded = d.mem.load_i32(addr);
9999
} else if constexpr (sizeof(data) == 2) {
100-
data = d.mem.load_i16(addr);
100+
loaded = d.mem.load_i16(addr);
101101
} else if constexpr (sizeof(data) == 1) {
102-
data = d.mem.load_i8(addr);
102+
loaded = d.mem.load_i8(addr);
103103
} else {
104104
unreachable("Unsupported data size");
105105
}
106106

107-
message << fmt::format("{}\t {}", d.pretty_address(addr), data) << std::endl;
107+
message << fmt::format("{}\t {}", d.pretty_address(addr), loaded) << std::endl;
108108
}
109109
};
110110

0 commit comments

Comments
 (0)