import gdb-1999-09-21
[deliverable/binutils-gdb.git] / gdb / objfiles.c
index 123c2308f7441e1e1d847f0ecb621fa241b666f8..253739c1e85009b5b9f1bc3fdda423c6457c5919 100644 (file)
@@ -521,9 +521,8 @@ objfile_relocate (objfile, new_offsets)
      struct objfile *objfile;
      struct section_offsets *new_offsets;
 {
-  struct section_offsets *delta = (struct section_offsets *)
-  alloca (sizeof (struct section_offsets)
-         + objfile->num_sections * sizeof (delta->offsets));
+  struct section_offsets *delta =
+    (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
 
   {
     int i;
@@ -961,13 +960,8 @@ find_pc_sect_section (pc, section)
   struct objfile *objfile;
 
   ALL_OBJSECTIONS (objfile, s)
-#if defined(HPUXHPPA)
-    if ((section == 0 || section == s->the_bfd_section) &&
-       s->addr <= pc && pc <= s->endaddr)
-#else
     if ((section == 0 || section == s->the_bfd_section) &&
        s->addr <= pc && pc < s->endaddr)
-#endif
       return (s);
 
   return (NULL);
@@ -1003,3 +997,23 @@ in_plt_section (pc, name)
            && STREQ (s->the_bfd_section->name, ".plt"));
   return (retval);
 }
+
+/* Return nonzero if NAME is in the import list of OBJFILE.  Else
+   return zero.  */
+
+int
+is_in_import_list (name, objfile)
+     char *name;
+     struct objfile *objfile;
+{
+  register int i;
+
+  if (!objfile || !name || !*name)
+    return 0;
+
+  for (i = 0; i < objfile->import_list_size; i++)
+    if (objfile->import_list[i] && STREQ (name, objfile->import_list[i]))
+      return 1;
+  return 0;
+}
+
This page took 0.024334 seconds and 4 git commands to generate.