From 0cd61f44022489a19b75ee744e2bff83180d0cd5 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 28 Nov 2012 18:48:38 +0000 Subject: PR gdb/14290: * solib-darwin.c (gdb_bfd_mach_o_fat_extract): New function. (darwin_solib_get_all_image_info_addr_at_init, darwin_bfd_open): Use it. * gdb_bfd.h (gdb_bfd_mark_parent): Declare. * gdb_bfd.c (gdb_bfd_mark_parent): New function. (gdb_bfd_openr_next_archived_file): Use it. --- gdb/gdb_bfd.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gdb/gdb_bfd.h') diff --git a/gdb/gdb_bfd.h b/gdb/gdb_bfd.h index 5fd361c..bb70b27 100644 --- a/gdb/gdb_bfd.h +++ b/gdb/gdb_bfd.h @@ -50,6 +50,15 @@ void gdb_bfd_ref (struct bfd *abfd); void gdb_bfd_unref (struct bfd *abfd); +/* Mark the CHILD BFD as being a member of PARENT. Also, increment + the reference count of CHILD. Calling this function ensures that + as along as CHILD remains alive, PARENT will as well. Both CHILD + and PARENT must be non-NULL. This can be called more than once + with the same arguments; but it is not allowed to call it for a + single CHILD with different values for PARENT. */ + +void gdb_bfd_mark_parent (bfd *child, bfd *parent); + /* Try to read or map the contents of the section SECT. If successful, the section data is returned and *SIZE is set to the size of the section data; this may not be the same as the size -- cgit v1.1