diff options
author | Tom Tromey <tom@tromey.com> | 2021-03-06 09:26:39 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-03-06 09:26:40 -0700 |
commit | 9938d15a01031e0aded4159adaa77d5b2b2319f6 (patch) | |
tree | 645f40859ccd77edd69dd75aaab6ad02b0d82729 /gdb/dwarf2/dwz.h | |
parent | 1803565556f36692a0d49e3c1aeae1595a64709d (diff) | |
download | gdb-9938d15a01031e0aded4159adaa77d5b2b2319f6.zip gdb-9938d15a01031e0aded4159adaa77d5b2b2319f6.tar.gz gdb-9938d15a01031e0aded4159adaa77d5b2b2319f6.tar.bz2 |
Move dwarf2_get_dwz_file to dwarf2/dwz.h
This moves dwarf2_get_dwz_file and some helper code to dwarf2/dwz.h.
The main benefit of this is just shrinking dwarf2/read.c a little bit.
gdb/ChangeLog
2021-03-06 Tom Tromey <tom@tromey.com>
* dwarf2/sect-names.h (dwarf2_elf_names): Declare.
* dwarf2/read.h (dwarf2_get_dwz_file): Move to dwz.h.
* dwarf2/read.c (dwarf2_elf_names): No longer static.
(locate_dwz_sections, dwz_search_other_debugdirs)
(dwarf2_get_dwz_file): Move to dwz.c.
* dwarf2/dwz.h (dwarf2_get_dwz_file): Move declaration from
read.h.
* dwarf2/dwz.c (locate_dwz_sections, dwz_search_other_debugdirs)
(dwarf2_get_dwz_file): Move from read.c.
Diffstat (limited to 'gdb/dwarf2/dwz.h')
-rw-r--r-- | gdb/dwarf2/dwz.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/dwarf2/dwz.h b/gdb/dwarf2/dwz.h index c50aab8..634afbb 100644 --- a/gdb/dwarf2/dwz.h +++ b/gdb/dwarf2/dwz.h @@ -24,6 +24,8 @@ #include "dwarf2/index-cache.h" #include "dwarf2/section.h" +struct dwarf2_per_bfd; + /* This represents a '.dwz' file. */ struct dwz_file @@ -62,4 +64,13 @@ struct dwz_file const char *read_string (struct objfile *objfile, LONGEST str_offset); }; +/* Open the separate '.dwz' debug file, if needed. If there is no + .gnu_debugaltlink section in the file, then the result depends on + REQUIRE: if REQUIRE is true, then error; if REQUIRE is false, + return NULL. Always error if there is such a section but the file + cannot be found. */ + +extern dwz_file *dwarf2_get_dwz_file (dwarf2_per_bfd *per_bfd, + bool require = false); + #endif /* GDB_DWARF2_DWZ_H */ |