Definition at line 156 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 213 of file pfm_gen_analysis.cpp.
220 bool matched =
false;
221 while ( objdump.output() ) {
231 if ( !objdump.output() )
break;
232 if ( line.
empty() )
continue;
233 const char* lineptr = line.
c_str();
235 if ( !
skipString(
"LOAD", lineptr, &lineptr ) )
continue;
237 if ( !
skipString(
"off", lineptr, &lineptr ) )
continue;
239 int initialBase =
strtol( lineptr, &endptr, 16 );
240 if ( lineptr == endptr )
continue;
243 if ( !
skipString(
"vaddr", lineptr, &lineptr ) )
continue;
245 int finalBase =
strtol( lineptr, &endptr, 16 );
246 if ( lineptr == endptr )
continue;
247 vmbase = finalBase - initialBase;
252 fprintf( stderr,
"Cannot determine VM base address for %s\n",
NAME.
c_str() );
258 while (
nm.output() ) {
261 if ( !
nm.output() )
break;
262 if ( line.
empty() )
continue;
266 int address =
strtol( begin, &endptr, 10 );
267 if ( endptr == begin )
continue;
268 if ( *endptr++ !=
' ' )
continue;
269 if (
isspace( *endptr++ ) )
continue;
270 if ( *endptr++ !=
' ' )
continue;
271 char* symbolName = endptr;
272 while ( *endptr && !
isspace( *endptr ) ) endptr++;
273 if ( *endptr != 0 )
continue;
275 if ( symbolName[0] ==
'.' )
continue;
280 int offset = address - vmbase;
bool skipString(const char *strptr, const char *srcbuffer, const char **dstbuffer)
SymbolCache m_symbolCache
AttribStringParser::Iterator begin(const AttribStringParser &parser)
bool skipWhitespaces(const char *srcbuffer, const char **destbuffer)
const char* FileInfo::symbolByOffset |
( |
Offset |
offset | ) |
|
|
inline |
Definition at line 169 of file pfm_gen_analysis.cpp.
176 if ( i->OFFSET == offset ) {
177 return i->NAME.c_str();
186 return i->NAME.c_str();
SymbolCache m_symbolCache
The documentation for this class was generated from the following file: