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; } }
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; } }