Definition at line 143 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 186 of file pfm_gen_analysis.cpp.
192 bool matched =
false;
193 while ( objdump.output() ) {
203 if ( !objdump.output() )
break;
204 if ( line.
empty() )
continue;
205 const char* lineptr = line.
c_str();
207 if ( !
skipString(
"LOAD", lineptr, &lineptr ) )
continue;
209 if ( !
skipString(
"off", lineptr, &lineptr ) )
continue;
211 int initialBase =
strtol( lineptr, &endptr, 16 );
212 if ( lineptr == endptr )
continue;
215 if ( !
skipString(
"vaddr", lineptr, &lineptr ) )
continue;
217 int finalBase =
strtol( lineptr, &endptr, 16 );
218 if ( lineptr == endptr )
continue;
219 vmbase = finalBase - initialBase;
224 fprintf( stderr,
"Cannot determine VM base address for %s\n",
NAME.
c_str() );
230 while (
nm.output() ) {
233 if ( !
nm.output() )
break;
234 if ( line.
empty() )
continue;
238 int address =
strtol( begin, &endptr, 10 );
239 if ( endptr == begin )
continue;
240 if ( *endptr++ !=
' ' )
continue;
241 if (
isspace( *endptr++ ) )
continue;
242 if ( *endptr++ !=
' ' )
continue;
243 char* symbolName = endptr;
244 while ( *endptr && !
isspace( *endptr ) ) endptr++;
245 if ( *endptr != 0 )
continue;
247 if ( symbolName[0] ==
'.' )
continue;
252 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 152 of file pfm_gen_analysis.cpp.
156 if ( i->OFFSET == offset ) {
return i->NAME.c_str(); }
162 return i->NAME.c_str();
SymbolCache m_symbolCache
The documentation for this class was generated from the following file: