コード例 #1
0
/* String output for SgFileContentList */
std::string
SgAsmExecutableFileFormat::hexdump(rose_addr_t base_addr, const std::string &prefix, const SgFileContentList &data,
                                   bool multiline)
{
    if (data.empty()) return "";
    HexdumpFormat fmt;
    fmt.multiline = multiline;
    fmt.prefix = prefix.c_str();
    return hexdump(base_addr, &(data[0]), data.size(), fmt);
}
コード例 #2
0
/* Stream output for SgFileContentList */
void
SgAsmExecutableFileFormat::hexdump(std::ostream &f, rose_addr_t base_addr, const std::string &prefix,
                                   const SgFileContentList &data, bool multiline)
{

    if (!data.empty()) {
        HexdumpFormat fmt;
        fmt.multiline = multiline;
        fmt.prefix = prefix.c_str();
        hexdump(f, base_addr, &(data[0]), data.size(), fmt);
    }
}