daily update
[deliverable/binutils-gdb.git] / gdb / solib-aix5.c
index a48d4ae937ea6fef65ddc4f81fe787072544287a..e58f6d385a0853d802895a35be2cd2920c1c4520 100644 (file)
@@ -1,5 +1,5 @@
 /* Handle AIX5 shared libraries for GDB, the GNU Debugger.
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
+   Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
    2001
    Free Software Foundation, Inc.
 
@@ -17,8 +17,8 @@
 
    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.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 #include "defs.h"
 
@@ -193,7 +193,7 @@ build_so_list_from_mapfile (int pid, long match_mask, long match_val)
 
     /* Open the map file */
 
-    xasprintf (&map_pathname, "/proc/%d/map", pid);
+    map_pathname = xstrprintf ("/proc/%d/map", pid);
     map_fd = open (map_pathname, O_RDONLY);
     xfree (map_pathname);
     if (map_fd < 0)
@@ -262,9 +262,9 @@ build_so_list_from_mapfile (int pid, long match_mask, long match_val)
 
       if (sop == NULL)
        {
-         sop = xcalloc (sizeof (struct so_list), 1);
+         sop = xcalloc (1, sizeof (struct so_list));
          make_cleanup (xfree, sop);
-         sop->lm_info = xcalloc (sizeof (struct lm_info), 1);
+         sop->lm_info = xcalloc (1, sizeof (struct lm_info));
          make_cleanup (xfree, sop->lm_info);
          sop->lm_info->mapname = xstrdup (mapname);
          make_cleanup (xfree, sop->lm_info->mapname);
@@ -329,13 +329,13 @@ open_symbol_file_object (void *from_ttyp)
   struct cleanup *old_chain = make_cleanup (null_cleanup, 0);
   struct so_list *sos;
 
-  sos = build_so_list_from_mapfile (PIDGET (inferior_pid),
+  sos = build_so_list_from_mapfile (PIDGET (inferior_ptid),
                                     MA_MAINEXEC, MA_MAINEXEC);
 
 
   if (sos == NULL)
     {
-      warning ("Could not find name of main executable in map file");
+      warning (_("Could not find name of main executable in map file"));
       return 0;
     }
 
@@ -374,7 +374,7 @@ aix5_current_sos (void)
   struct so_list *sos;
 
   /* Fetch the list of mappings, excluding the main executable. */
-  sos = build_so_list_from_mapfile (PIDGET (inferior_pid), MA_MAINEXEC, 0);
+  sos = build_so_list_from_mapfile (PIDGET (inferior_ptid), MA_MAINEXEC, 0);
 
   /* Reverse the list; it looks nicer when we print it if the mappings
      are in the same order as in the map file.  */
@@ -480,7 +480,7 @@ enable_break (void)
       /* Make sure the dynamic linker's really a useful object.  */
       if (!bfd_check_format (tmp_bfd, bfd_object))
        {
-         warning ("Unable to grok dynamic linker %s as an object file", buf);
+         warning (_("Unable to grok dynamic linker %s as an object file"), buf);
          bfd_close (tmp_bfd);
          goto bkpt_at_symbol;
        }
@@ -529,7 +529,7 @@ enable_break (void)
       /* For whatever reason we couldn't set a breakpoint in the dynamic
          linker.  Warn and drop into the old code.  */
     bkpt_at_symbol:
-      warning ("Unable to find dynamic linker breakpoint function.\nGDB will be unable to debug shared library initializers\nand track explicitly loaded dynamic code.");
+      warning (_("Unable to find dynamic linker breakpoint function.\nGDB will be unable to debug shared library initializers\nand track explicitly loaded dynamic code."));
     }
 
   /* Nothing good happened.  */
@@ -684,7 +684,7 @@ map_index_vs_section_name_okay (int idx, const char *name)
        return idx == okay[i].idx;
     }
 
-  warning ("solib-aix5.c: Ignoring section %s when relocating the executable\n",
+  warning (_("Ignoring section %s when relocating the executable."),
            name);
   return 0;
 }
@@ -701,21 +701,21 @@ aix5_relocate_main_executable (void)
   struct cleanup *old_chain = make_cleanup (null_cleanup, 0);
 
   /* Fetch the mappings for the main executable from the map file.  */
-  so = build_so_list_from_mapfile (PIDGET (inferior_pid),
+  so = build_so_list_from_mapfile (PIDGET (inferior_ptid),
                                    MA_MAINEXEC, MA_MAINEXEC);
 
   /* Make sure we actually have some mappings to work with.  */
   if (so == NULL)
     {
-      warning ("Could not find main executable in map file");
+      warning (_("Could not find main executable in map file"));
       do_cleanups (old_chain);
       return;
     }
 
   /* Allocate the data structure which'll contain the new offsets to
      relocate by.  Initialize it so it contains the current offsets.  */
-  new_offsets = xcalloc (sizeof (struct section_offsets),
-                         symfile_objfile->num_sections);
+  new_offsets = xcalloc (symfile_objfile->num_sections,
+                        sizeof (struct section_offsets));
   make_cleanup (xfree, new_offsets);
   for (i = 0; i < symfile_objfile->num_sections; i++)
     new_offsets->offsets[i] = ANOFFSET (symfile_objfile->section_offsets, i);
@@ -771,7 +771,7 @@ aix5_relocate_main_executable (void)
 
    SYNOPSIS
 
-   void aix5_solib_create_inferior_hook()
+   void aix5_solib_create_inferior_hook ()
 
    DESCRIPTION
 
@@ -798,7 +798,7 @@ aix5_solib_create_inferior_hook (void)
 
   if (!enable_break ())
     {
-      warning ("shared library handler failed to enable breakpoint");
+      warning (_("shared library handler failed to enable breakpoint"));
       return;
     }
 }
@@ -839,7 +839,7 @@ aix5_relocate_section_addresses (struct so_list *so,
 
       if (idx >= so->lm_info->nmappings)
        internal_error (__FILE__, __LINE__,
-         "aix_relocate_section_addresses: Can't find mapping for section %s",
+         _("aix_relocate_section_addresses: Can't find mapping for section %s"),
          bfd_get_section_name (sec->bfd, sec->the_bfd_section));
       
       addr = so->lm_info->mapping[idx].addr;
@@ -858,7 +858,7 @@ aix5_find_global_pointer (CORE_ADDR addr)
   CORE_ADDR global_pointer = 0;
   struct cleanup *old_chain = make_cleanup (null_cleanup, 0);
 
-  sos = build_so_list_from_mapfile (PIDGET (inferior_pid), 0, 0);
+  sos = build_so_list_from_mapfile (PIDGET (inferior_ptid), 0, 0);
 
   for (so = sos; so != NULL; so = so->next)
     {
@@ -902,13 +902,13 @@ aix5_find_gate_addresses (CORE_ADDR *start, CORE_ADDR *end)
   struct cleanup *old_chain = make_cleanup (null_cleanup, 0);
 
   /* Fetch the mappings for the main executable from the map file.  */
-  so = build_so_list_from_mapfile (PIDGET (inferior_pid),
+  so = build_so_list_from_mapfile (PIDGET (inferior_ptid),
                                    MA_KERNTEXT, MA_KERNTEXT);
 
   /* Make sure we actually have some mappings to work with.  */
   if (so == NULL)
     {
-      warning ("Could not find gate page in map file");
+      warning (_("Could not find gate page in map file"));
       *start = 0;
       *end = 0;
       do_cleanups (old_chain);
This page took 0.026715 seconds and 4 git commands to generate.