Definition at line 163 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 233 of file pfm_gen_analysis.cpp.
240 bool matched =
false;
241 while(objdump.output())
252 if(!objdump.output())
break;
253 if(line.
empty())
continue;
254 const char *lineptr = line.
c_str();
256 if(!
skipString(
"LOAD", lineptr, &lineptr))
continue;
258 if(!
skipString(
"off", lineptr, &lineptr))
continue;
260 int initialBase =
strtol(lineptr, &endptr, 16);
261 if(lineptr == endptr)
continue;
264 if(!
skipString(
"vaddr", lineptr, &lineptr))
continue;
266 int finalBase =
strtol(lineptr, &endptr, 16);
267 if(lineptr == endptr)
continue;
268 vmbase=finalBase - initialBase;
284 if(!
nm.output())
break;
285 if(line.
empty())
continue;
289 int address =
strtol(begin, &endptr, 10);
290 if(endptr == begin)
continue;
291 if(*endptr++ !=
' ')
continue;
292 if(
isspace(*endptr++))
continue;
293 if(*endptr++ !=
' ')
continue;
294 char *symbolName = endptr;
295 while(*endptr && !
isspace(*endptr)) endptr++;
296 if(*endptr != 0)
continue;
298 if(symbolName[0] ==
'.')
continue;
303 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 177 of file pfm_gen_analysis.cpp.
185 if(i->OFFSET == offset)
187 return i->NAME.c_str();
197 return i->NAME.c_str();
SymbolCache m_symbolCache
The documentation for this class was generated from the following file: