do_cleanups (my_cleanups);
}
-typedef struct objfile *objfilep;
-
-DEF_VEC_P (objfilep);
-
/* Re-read symbols if a symbol-file has changed. */
void
long new_modtime;
struct stat new_statbuf;
int res;
- VEC (objfilep) *new_objfiles = NULL;
- struct cleanup *all_cleanups;
-
- all_cleanups = make_cleanup (VEC_cleanup (objfilep), &new_objfiles);
+ std::vector<struct objfile *> new_objfiles;
/* With the addition of shared libraries, this should be modified,
the load time should be saved in the partial symbol tables, since
objfile->mtime = new_modtime;
init_entry_point_info (objfile);
- VEC_safe_push (objfilep, new_objfiles, objfile);
+ new_objfiles.push_back (objfile);
}
}
- if (new_objfiles)
+ if (!new_objfiles.empty ())
{
- int ix;
-
/* Notify objfiles that we've modified objfile sections. */
objfiles_changed ();
/* clear_objfile_data for each objfile was called before freeing it and
observer_notify_new_objfile (NULL) has been called by
clear_symtab_users above. Notify the new files now. */
- for (ix = 0; VEC_iterate (objfilep, new_objfiles, ix, objfile); ix++)
- observer_notify_new_objfile (objfile);
+ for (auto iter : new_objfiles)
+ observer_notify_new_objfile (iter);
/* At least one objfile has changed, so we can consider that
the executable we're debugging has changed too. */
observer_notify_executable_changed ();
}
-
- do_cleanups (all_cleanups);
}
\f