Skip to content
Snippets Groups Projects
Commit d9eb353e authored by Anh Nguyen-Tuong's avatar Anh Nguyen-Tuong
Browse files

Use hex for unknown function names

Former-commit-id: d7088072d69e90e3679e9efc8ce16aecd87c4829
parent a4eed294
No related branches found
No related tags found
No related merge requests found
#include <iostream>
#include <sstream>
#include <assert.h>
#include <set>
#include <algorithm>
......@@ -104,7 +105,10 @@ class CreateFunctions_t
assert(func.begin() != func.end());
const auto first_range=*(func.begin());
const auto startAddr=first_range.first;
const auto name=string()+"sub_"+to_string(startAddr);
std::stringstream ss;
ss << "sub_" << hex << startAddr;
const auto name = ss.str();
functions++;
if(funcNames[func]=="") // destructive test OK, next line sets if empty.
{
......@@ -399,7 +403,7 @@ class CreateFunctions_t
const auto max=*prev(scc.end());
const auto size=max.second-min.first;
cout<<"Function "<<dec<<i++<<" is "<<hex<<min.first<<" "<<dec<<max.second-min.first<<endl;
cout<<"Function "<<dec<<i++<<" (" <<funcNames[scc] << ") is "<<hex<<min.first<<" "<<dec<<max.second-min.first<<endl;
const auto usefp=getUseFp(scc);
outfile<<hex<<"\t"<<min.first<<"\t"<<dec<<size<<"\tFUNC GLOBAL\t"<<funcNames[scc]<<" "<< usefp << 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