doc: Add table of MI versions
[deliverable/binutils-gdb.git] / gdb / solib.c
index b28ebc628cb1a190b0450af246bb50b78e715485..24f40d112491f08630d83ca9841b2dfd8ff4b1ad 100644 (file)
@@ -1,6 +1,6 @@
 /* Handle shared libraries for GDB, the GNU Debugger.
 
-   Copyright (C) 1990-2018 Free Software Foundation, Inc.
+   Copyright (C) 1990-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -677,11 +677,15 @@ solib_read_symbols (struct so_list *so, symfile_add_flags flags)
       TRY
        {
          /* Have we already loaded this shared object?  */
-         ALL_OBJFILES (so->objfile)
+         so->objfile = nullptr;
+         for (objfile *objfile : all_objfiles (current_program_space))
            {
-             if (filename_cmp (objfile_name (so->objfile), so->so_name) == 0
-                 && so->objfile->addr_low == so->addr_low)
-               break;
+             if (filename_cmp (objfile_name (objfile), so->so_name) == 0
+                 && objfile->addr_low == so->addr_low)
+               {
+                 so->objfile = objfile;
+                 break;
+               }
            }
          if (so->objfile == NULL)
            {
@@ -735,7 +739,7 @@ update_solib_list (int from_tty)
 
   /* We can reach here due to changing solib-search-path or the
      sysroot, before having any inferior.  */
-  if (target_has_execution && !ptid_equal (inferior_ptid, null_ptid))
+  if (target_has_execution && inferior_ptid != null_ptid)
     {
       struct inferior *inf = current_inferior ();
 
@@ -862,7 +866,7 @@ update_solib_list (int from_tty)
        {
 
          i->pspace = current_program_space;
-         VEC_safe_push (so_list_ptr, current_program_space->added_solibs, i);
+         current_program_space->added_solibs.push_back (i);
 
          TRY
            {
This page took 0.037321 seconds and 4 git commands to generate.