diff options
author | Doug Evans <dje@google.com> | 2014-01-13 17:15:42 -0800 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2014-01-13 17:15:42 -0800 |
commit | 13aaf454542c1028a033ac836d7a0d47c63a7029 (patch) | |
tree | ef8e7526a16ef704d182a4bb80a30dae3f07e3dc /gdb/gdb_bfd.h | |
parent | 067c5c1de23cff42597ec35d4c2a0730d8c16fbe (diff) | |
download | gdb-13aaf454542c1028a033ac836d7a0d47c63a7029.zip gdb-13aaf454542c1028a033ac836d7a0d47c63a7029.tar.gz gdb-13aaf454542c1028a033ac836d7a0d47c63a7029.tar.bz2 |
PR symtab/16426
* dwarf2read.c (dwarf2_get_dwz_file): Call gdb_bfd_record_inclusion.
(try_open_dwop_file): Ditto.
* gdb_bfd.c: #include "vec.h".
(bfdp): New typedef.
(struct gdb_bfd_data): New member included_bfds.
(gdb_bfd_unref): Unref all included bfds.
(gdb_bfd_record_inclusion): New function.
* gdb_bfd.h (gdb_bfd_record_inclusion): Declare.
Diffstat (limited to 'gdb/gdb_bfd.h')
-rw-r--r-- | gdb/gdb_bfd.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/gdb_bfd.h b/gdb/gdb_bfd.h index d415005..61ad348 100644 --- a/gdb/gdb_bfd.h +++ b/gdb/gdb_bfd.h @@ -52,6 +52,20 @@ void gdb_bfd_unref (struct bfd *abfd); void gdb_bfd_mark_parent (bfd *child, bfd *parent); +/* Mark INCLUDEE as being included by INCLUDER. + This is used to associate the life time of INCLUDEE with INCLUDER. + For example, with Fission, one file can refer to debug info in another + file, and internal tables we build for the main file (INCLUDER) may refer + to data contained in INCLUDEE. Therefore we want to keep INCLUDEE around + at least as long as INCLUDER exists. + + Note that this is different than gdb_bfd_mark_parent because in our case + lifetime tracking is based on the "parent" whereas in gdb_bfd_mark_parent + lifetime tracking is based on the "child". Plus in our case INCLUDEE could + have multiple different "parents". */ + +void gdb_bfd_record_inclusion (bfd *includer, bfd *includee); + /* 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 |