HP tui support files for gdb.
[deliverable/binutils-gdb.git] / binutils / arsup.c
index ee7e4e9b2b5bd2daba417566967e84a534cbe5d2..59f64358a5f066a13e3c452ab4cf0453a0946b1a 100644 (file)
@@ -380,3 +380,41 @@ DEFUN_VOID(ar_list)
     }
   }
 }
+
+
+void
+DEFUN(ar_extract,(list),
+      struct list *list)
+{
+  if (!obfd) 
+  {
+
+    fprintf(stderr, "%s: no open  archive\n", program_name);
+    maybequit();
+  }
+  else 
+  {
+    while (list) {
+      /* Find this name in the archive */
+      bfd *member = obfd->archive_head;
+      int found = 0;
+      while (member && !found) 
+      {
+       if (strcmp(member->filename, list->name) == 0) 
+       {
+         extract_file(member);
+         found = 1;
+         }
+
+       member = member->next;
+      }
+      if (!found)  {
+       bfd *abfd = bfd_openr(list->name, 0);
+       fprintf(stderr,"%s: can't find module file %s\n", program_name,
+               list->name);
+
+      }
+      list = list->next;
+    }
+  }
+}
This page took 0.024795 seconds and 4 git commands to generate.