From: John L. <mov...@us...> - 2003-09-18 12:26:41
|
Update of /cvsroot/oprofile/oprofile/libutil++ In directory sc8-pr-cvs1:/tmp/cvs-serv8203/libutil++ Modified Files: op_bfd.cpp Log Message: locate_images cleanup, fix op_bfd for fakeness Index: op_bfd.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libutil++/op_bfd.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -u -p -d -r1.34 -r1.35 --- op_bfd.cpp 18 Sep 2003 04:04:09 -0000 1.34 +++ op_bfd.cpp 18 Sep 2003 12:26:38 -0000 1.35 @@ -55,10 +55,10 @@ op_bfd_symbol::op_bfd_symbol(bfd_vma vma op_bfd::op_bfd(string const & fname, string_filter const & symbol_filter, - bool create_fake) + bool create_fake) : filename(fname), - file_size(0), + file_size(-1), ibfd(0), text_offset(0), debug_info(false) @@ -68,12 +68,13 @@ op_bfd::op_bfd(string const & fname, str // O(N²) behavior when we will filter vector element below symbols_found_t symbols; - op_get_fsize(filename.c_str(), &file_size); - if (create_fake) { + // file size will be maxed (-1) already add_symbols(symbols, symbol_filter); return; } + + op_get_fsize(filename.c_str(), &file_size); /* bfd keeps its own reference to the filename char *, * so it must have a lifetime longer than the ibfd */ |