コード例 #1
0
void DataSegment::Dump
    (
    )
{
    std::cout << "Found Variables:" << std::endl;
    DictionaryIter<std::string, Variable> it(mVars);
    while (it.HasNext()) {
        Tuple<std::string, Variable> entry = it.GetNext();
        std::cout << "Var: " << entry.GetKey() << " at " << entry.GetValue().GetAddress() << std::endl;
    }
}
コード例 #2
0
void TextSegment::Dump
    (
    )
{
    std::cout << "Found Labels:" << std::endl;
    DictionaryIter<std::string, Label> itLabels(mLabels);
    while (itLabels.HasNext()) {
        Tuple<std::string, Label> entry = itLabels.GetNext();
        std::cout << "Lab: " << entry.GetKey() << " at " << entry.GetValue().GetAddress() << std::endl;
    }
    std::cout << "Instructions:" << std::endl;
    VectorIter<Instr> itInstrs(mInstrs);
    while (itInstrs.HasNext()) {
        Instr instr = itInstrs.GetNext();
        std::cout << "Instr: " << instr.GetMnemonic() << ", Encoding = " << instr.GetEncoding() << std::endl;
    }
}