Skip to content

Commit

Permalink
pofParser: displayHeader: improve messages
Browse files Browse the repository at this point in the history
  • Loading branch information
trabucayre committed Feb 1, 2025
1 parent 6f42d28 commit 8e104d7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/pofParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,16 @@ int POFParser::getLength(const std::string &section_name)
void POFParser::displayHeader()
{
ConfigBitstreamParser::displayHeader();
char mess[1024];
snprintf(mess, 1024, "Flag section offset len end");
printInfo(mess);
for (auto it = mem_section.begin(); it != mem_section.end(); it++) {
memory_section_t v = (*it).second;
char mess[1024];
snprintf(mess, 1024, "%02x %4s: ", v.flag, v.section.c_str());
snprintf(mess, 1024, "%02x %4s: ", v.flag, v.section.c_str());
printInfo(mess, false);
snprintf(mess, 1024, "%08x %08x", v.offset, v.len);
// start address + len (in bits) + end addr
snprintf(mess, 1024, " %08x %08x %08x", v.offset, v.len, v.offset + ((v.len/8)-1));
/* Note: for CFM0 end address is displayed with another value in () */
printSuccess(mess);
}
}
Expand Down

0 comments on commit 8e104d7

Please sign in to comment.