2004-04-17 Randolph Chung <tausq@debian.org>
[deliverable/binutils-gdb.git] / gdb / solib-aix5.c
index a48d4ae937ea6fef65ddc4f81fe787072544287a..1a8c9dfeea94d8ae575f0e25eb25decb2803bd82 100644 (file)
@@ -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,7 +329,7 @@ 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);
 
 
@@ -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.  */
@@ -701,7 +701,7 @@ 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.  */
@@ -714,8 +714,8 @@ aix5_relocate_main_executable (void)
 
   /* 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);
@@ -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,7 +902,7 @@ 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.  */
This page took 0.035737 seconds and 4 git commands to generate.