gdb: use bfd_get_section_contents to read section contents in is_linked_with_cygwin_dll
[deliverable/binutils-gdb.git] / gdb / gdb_bfd.c
index 5a6dee2d51a8eb861768bc4aaf0b3b1a36bbc69a..26262bfedf648f4ca4eecef0e8754d57a416a731 100644 (file)
@@ -926,7 +926,19 @@ gdb_bfd_requires_relocations (bfd *abfd)
   return gdata->needs_relocations;
 }
 
-\f
+/* See gdb_bfd.h.  */
+
+bool
+gdb_bfd_get_full_section_contents (bfd *abfd, asection *section,
+                                  gdb::byte_vector *contents)
+{
+  bfd_size_type section_size = bfd_section_size (section);
+
+  contents->resize (section_size);
+
+  return bfd_get_section_contents (abfd, section, contents->data (), 0,
+                                  section_size);
+}
 
 /* A callback for htab_traverse that prints a single BFD.  */
 
This page took 0.031415 seconds and 4 git commands to generate.