Definition at line 164 of file pfm_gen_analysis.cpp.
FileInfo::FileInfo |
( |
void |
| ) |
|
|
inline |
FileInfo::FileInfo |
( |
const std::string & |
name, |
|
|
bool |
useGdb |
|
) |
| |
|
inline |
void FileInfo::createOffsetMap |
( |
void |
| ) |
|
|
inlineprivate |
Definition at line 234 of file pfm_gen_analysis.cpp.
241 bool matched =
false;
242 while(objdump.output())
253 if(!objdump.output())
break;
254 if(line.
empty())
continue;
255 const char *lineptr = line.
c_str();
257 if(!
skipString(
"LOAD", lineptr, &lineptr))
continue;
259 if(!
skipString(
"off", lineptr, &lineptr))
continue;
261 int initialBase =
strtol(lineptr, &endptr, 16);
262 if(lineptr == endptr)
continue;
265 if(!
skipString(
"vaddr", lineptr, &lineptr))
continue;
267 int finalBase =
strtol(lineptr, &endptr, 16);
268 if(lineptr == endptr)
continue;
269 vmbase=finalBase - initialBase;
285 if(!
nm.output())
break;
286 if(line.
empty())
continue;
290 int address =
strtol(begin, &endptr, 10);
291 if(endptr == begin)
continue;
292 if(*endptr++ !=
' ')
continue;
293 if(
isspace(*endptr++))
continue;
294 if(*endptr++ !=
' ')
continue;
295 char *symbolName = endptr;
296 while(*endptr && !
isspace(*endptr)) endptr++;
297 if(*endptr != 0)
continue;
299 if(symbolName[0] ==
'.')
continue;
304 int offset = address-vmbase;
bool skipString(const char *strptr, const char *srcbuffer, const char **dstbuffer)
auto begin(reverse_wrapper< T > &w)
SymbolCache m_symbolCache
bool skipWhitespaces(const char *srcbuffer, const char **destbuffer)
const char* FileInfo::symbolByOffset |
( |
Offset |
offset | ) |
|
|
inline |
Definition at line 178 of file pfm_gen_analysis.cpp.
186 if(i->OFFSET == offset)
188 return i->NAME.c_str();
198 return i->NAME.c_str();
SymbolCache m_symbolCache
The documentation for this class was generated from the following file: