Skip to content
Snippets Groups Projects
Commit 8c01f353 authored by an7s's avatar an7s
Browse files

Print function info

Former-commit-id: e7712f3b757ad37a39b1d885181af0bddc9b7c22
parent 4c91e053
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,7 @@
#include <libIRDB-core.hpp>
#include <iostream>
#include <algorithm>
#include <stdlib.h>
using namespace libIRDB;
......@@ -57,12 +58,22 @@ main(int argc, char* argv[])
File_t* this_file=*it;
assert(this_file);
cout<<"Analyzing file "<<this_file->GetURL()<<endl;
cout<<"... Analyzing file "<<this_file->GetURL()<<endl;
// read the db
FileIR_t* firp=new FileIR_t(*pidp, this_file);
assert(firp);
std::for_each(firp->GetFunctions().begin(), firp->GetFunctions().end(), [](const Function_t* fn) {
if (!fn) return;
cout<<"Function: " << fn->GetName();
cout<<" NumArgs: " << fn->GetNumArguments();
cout<<" FP: " << fn->GetUseFramePointer();
cout<<" StackFrameSize: " << fn->GetStackFrameSize();
cout<<" OutArgsRegionSize: " << fn->GetOutArgsRegionSize();
cout<<endl;
});
for(
set<Instruction_t*>::const_iterator it=firp->GetInstructions().begin();
it!=firp->GetInstructions().end();
......
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