* win32-nat.c (psapi_module_handle): Remove static.
[deliverable/binutils-gdb.git] / gdb / solib-osf.c
index eb78a419a2d26acccec9bf5c70d366047c8ae8a7..9ac04a28bb81f95ecc96934a82cf01144bd25ff4 100644 (file)
@@ -1,13 +1,13 @@
 /* Handle OSF/1, Digital UNIX, and Tru64 shared libraries
    for GDB, the GNU Debugger.
-   Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+   Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2007
    Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -16,9 +16,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* When handling shared libraries, GDB has to find out the pathnames
    of all shared libraries that are currently loaded (to read in their
@@ -220,7 +218,7 @@ fetch_sec_names (struct lm_info *lmi)
       target_read_string (lms->nameaddr, &name, PATH_MAX, &errcode);
       if (errcode != 0)
        {
-         warning ("unable to read shared sec name at 0x%lx", lms->nameaddr);
+         warning (_("unable to read shared sec name at 0x%lx"), lms->nameaddr);
          name = xstrdup ("");
        }
       lms->name = name;
@@ -321,7 +319,7 @@ osf_solib_create_inferior_hook (void)
      out what we need to know about them. */
 
   clear_proceed_status ();
-  stop_soon_quietly = 1;
+  stop_soon = STOP_QUIETLY;
   stop_signal = TARGET_SIGNAL_0;
   do
     {
@@ -334,14 +332,10 @@ osf_solib_create_inferior_hook (void)
      But we are stopped in the runtime loader and we do not have symbols
      for the runtime loader. So heuristic_proc_start will be called
      and will put out an annoying warning.
-     Delaying the resetting of stop_soon_quietly until after symbol loading
+     Delaying the resetting of stop_soon until after symbol loading
      suppresses the warning.  */
-  if (auto_solib_add)
-    solib_add ((char *) 0, 0, (struct target_ops *) 0);
-  stop_soon_quietly = 0;
-
-  /* Enable breakpoints disabled (unnecessarily) by clear_solib().  */
-  re_enable_breakpoints_in_shlibs ();
+  solib_add ((char *) 0, 0, (struct target_ops *) 0, auto_solib_add);
+  stop_soon = NO_STOP_QUIETLY;
 }
 
 /* target_so_ops callback.  Do additional symbol handling, lookup, etc. after
@@ -360,7 +354,14 @@ static int
 open_map (struct read_map_ctxt *ctxt)
 {
 #ifdef USE_LDR_ROUTINES
-  ctxt->proc = ldr_my_process ();
+  /* Note: As originally written, ldr_my_process() was used to obtain
+     the value for ctxt->proc.  This is incorrect, however, since
+     ldr_my_process() retrieves the "unique identifier" associated
+     with the current process (i.e. GDB) and not the one being
+     debugged.  Presumably, the pid of the process being debugged is
+     compatible with the "unique identifier" used by the ldr_
+     routines, so we use that.  */
+  ctxt->proc = ptid_get_pid (inferior_ptid);
   if (ldr_xattach (ctxt->proc) != 0)
     return 0;
   ctxt->next = LDR_NULL_MODULE;
@@ -548,7 +549,6 @@ osf_current_sos (void)
       tail->next = NULL;
     }
 
- done:
   close_map (&ctxt);
   return head;
 }
This page took 0.02577 seconds and 4 git commands to generate.