Fix debugging programs statically linked against the thread library.
[deliverable/binutils-gdb.git] / gdb / irix5-nat.c
index b8ca2a523d9296df2ee51bed06e5480dc98f5381..5fe41fa004be61e1573c0fb10728cbd0b20301d7 100644 (file)
@@ -180,12 +180,22 @@ get_longjmp_target (CORE_ADDR *pc)
   return 1;
 }
 
+/* Provide registers to GDB from a core file.
+
+   CORE_REG_SECT points to an array of bytes, which were obtained from
+   a core file which BFD thinks might contain register contents. 
+   CORE_REG_SIZE is its size.
+
+   Normally, WHICH says which register set corelow suspects this is:
+     0 --- the general-purpose register set
+     2 --- the floating-point register set
+   However, for Irix 5, WHICH isn't used.
+
+   REG_ADDR is also unused.  */
+
 static void
-fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
-     char *core_reg_sect;
-     unsigned core_reg_size;
-     int which;                        /* Unused */
-     CORE_ADDR reg_addr;       /* Unused */
+fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
+                     int which, CORE_ADDR reg_addr)
 {
   if (core_reg_size == REGISTER_BYTES)
     {
@@ -399,7 +409,7 @@ solib_map_sections (void *arg)
   bfd *abfd;
 
   filename = tilde_expand (so->so_name);
-  old_chain = make_cleanup (free, filename);
+  old_chain = make_cleanup (xfree, filename);
 
   scratch_chan = openp (getenv ("PATH"), 1, filename, O_RDONLY, 0,
                        &scratch_pathname);
@@ -764,8 +774,7 @@ xfer_link_map_member (struct so_list *so_list_ptr, struct link_map *lm)
  */
 
 static struct so_list *
-find_solib (so_list_ptr)
-     struct so_list *so_list_ptr;      /* Last lm or NULL for first one */
+find_solib (struct so_list *so_list_ptr)
 {
   struct so_list *so_list_next = NULL;
   struct link_map *lm = NULL;
@@ -1047,7 +1056,7 @@ clear_solib (void)
     {
       if (so_list_head->sections)
        {
-         free ((PTR) so_list_head->sections);
+         xfree (so_list_head->sections);
        }
       if (so_list_head->abfd)
        {
@@ -1062,9 +1071,9 @@ clear_solib (void)
 
       next = so_list_head->next;
       if (bfd_filename)
-       free ((PTR) bfd_filename);
-      free (so_list_head->so_name);
-      free ((PTR) so_list_head);
+       xfree (bfd_filename);
+      xfree (so_list_head->so_name);
+      xfree (so_list_head);
       so_list_head = next;
     }
   debug_base = 0;
This page took 0.023805 seconds and 4 git commands to generate.