Index: objfiles.c =================================================================== RCS file: /cvs/src/src/gdb/objfiles.c,v retrieving revision 1.86 diff -u -p -u -r1.86 objfiles.c --- objfiles.c 21 Jul 2009 20:54:30 -0000 1.86 +++ objfiles.c 22 Jul 2009 17:55:41 -0000 @@ -235,6 +235,8 @@ allocate_objfile (bfd *abfd, int flags) /* Save passed in flag bits. */ objfile->flags |= flags; + objfiles_updated_p = 1; /* Rebuild section map next time we need it. */ + return (objfile); } @@ -501,6 +503,7 @@ free_objfile (struct objfile *objfile) obstack_free (&objfile->objfile_obstack, 0); xfree (objfile); objfile = NULL; + objfiles_updated_p = 1; /* Rebuild section map next time we need it. */ } static void @@ -682,6 +685,7 @@ objfile_relocate (struct objfile *objfil /* Relocate breakpoints as necessary, after things are relocated. */ breakpoint_re_set (); + objfiles_updated_p = 1; /* Rebuild section map next time we need it. */ } /* Many places in gdb want to test just to see if we have any partial @@ -998,19 +1002,8 @@ set_objfiles_updated_on_exe_change (void objfiles_updated_p = 1; /* Rebuild section map next time we need it. */ } -/* Set objfiles_updated_p so section map will be rebuilt next time it - is used. Called by solib_loaded/unloaded observer. */ - -static void -set_objfiles_updated_on_solib_activity (struct so_list *so_list) -{ - objfiles_updated_p = 1; /* Rebuild section map next time we need it. */ -} - void _initialize_objfiles (void) { observer_attach_executable_changed (set_objfiles_updated_on_exe_change); - observer_attach_solib_loaded (set_objfiles_updated_on_solib_activity); - observer_attach_solib_unloaded (set_objfiles_updated_on_solib_activity); }