Skip to content
Snippets Groups Projects
Commit d6f04854 authored by jdh8d's avatar jdh8d
Browse files

Update dump_map to be slightly more useful by printing out instructin's...

Update dump_map to be slightly more useful by printing out instructin's function identifier and instruction disassembly.

Former-commit-id: 7b5fc48c126fc9bf46311298978cc02e7740fdd7
parent 98ca6fca
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,7 @@ int main(int argc, char **argv)
FileIR_t *firp = new FileIR_t(*pidp, this_file);
cout<<"file: "<<this_file->GetURL()<<endl;
cout<<"\t"<<"ID"<<"\t"<<"Address"<< endl;
cout<<"\t"<<"ID\tAddress\tBelongTo\tDisassembly"<< endl;
assert(firp && pidp);
......@@ -73,7 +73,14 @@ int main(int argc, char **argv)
{
Instruction_t* insn=*it;
assert(insn);
cout<<"\t"<<dec<<insn->GetBaseID()<<"\t"<<hex<<insn->GetAddress()->GetVirtualOffset()<<endl;
cout<<"\t0x"<<hex<<insn->GetBaseID()<<"\t"<<hex<<insn->GetAddress()->GetVirtualOffset()
<<"\t";
if(insn->GetFunction() && insn->GetFunction()->GetEntryPoint())
cout<<"0x"<<hex<<insn->GetFunction()->GetEntryPoint()->GetBaseID();
else
cout<<"NoFunc";
cout<<"\t"<<insn->getDisassembly()<<endl;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment