Skip to content

Commit

Permalink
[FEATURE] Report flags register as hex
Browse files Browse the repository at this point in the history
  • Loading branch information
hasherezade committed Dec 6, 2024
1 parent eaa48e2 commit 591f5ea
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions TinyTracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,15 @@ std::string dumpContext(const std::string& disasm, const CONTEXT* ctx)
if (values[i] == Address) {
continue;
}
// update saved:
prev = values[i];
values[i] = Address;

ss << reg_names[i] << " = 0x" << std::hex << Address;
if (reg == REG_GFLAGS) {
ss << reg_names[i] << " = b" << std::bitset<8>(Address) << " " << flagsToStr(prev, Address) << "; ";
continue;
ss << " " << flagsToStr(prev, Address);
}
ss << reg_names[i] << " = 0x" << std::hex << Address << "; ";
ss << "; ";
}
std::string out = ss.str();
if (!out.empty()) {
Expand Down

0 comments on commit 591f5ea

Please sign in to comment.