diff options
Diffstat (limited to 'coveragedb.cxx')
-rw-r--r-- | coveragedb.cxx | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/coveragedb.cxx b/coveragedb.cxx index 63cc4c0f..aafcd545 100644 --- a/coveragedb.cxx +++ b/coveragedb.cxx @@ -62,11 +62,12 @@ void print_coverage_info(systemtap_session &s) } // print out used functions clog << "---- used functions----- " << endl; - for (unsigned i=0; i<s.functions.size(); i++) { - clog << "function: " << s.functions[i]->tok->location - << " " << s.functions[i]->name - << endl; - } + for (map<string,functiondecl*>::iterator it = s.functions.begin(); it != s.functions.end(); it++) + { + clog << "function: " << it->second->tok->location + << " " << it->second->name + << endl; + } // print out unused functions clog << "---- unused functions----- " << endl; for (unsigned i=0; i<s.unused_functions.size(); i++) { @@ -262,15 +263,16 @@ void sql_update_used_functions(sqlite3 *db, systemtap_session &s) { // update db used functions - for (unsigned i=0; i<s.functions.size(); i++) { - struct source_loc place = s.functions[i]->tok->location; - coverage_element x(place); - - x.type = db_type_function; - x.name = s.functions[i]->name; - x.compiled = 1; - increment_element(db, x); - } + for (map<string,functiondecl*>::iterator it = s.functions.begin(); it != s.functions.end(); it++) + { + struct source_loc place = it->second->tok->location; + coverage_element x(place); + + x.type = db_type_function; + x.name = it->second->name; + x.compiled = 1; + increment_element(db, x); + } } |