From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway21.websitewelcome.com (gateway21.websitewelcome.com [192.185.45.176]) by sourceware.org (Postfix) with ESMTPS id 985AA3943550 for ; Sun, 21 Feb 2021 03:16:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 985AA3943550 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 2D698400D3A76 for ; Sat, 20 Feb 2021 21:16:51 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id DfEplqI3HDT64DfEplY4t8; Sat, 20 Feb 2021 21:16:51 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=JnrQtRQIIhpHeCQHkon/O2wX7dQWZW9W0sLQxInsWfw=; b=VxEkEw94UChP7d4M9aHuUoIE4D hkGbyk1Xecij0RVrBLqAMeKOMrj8F6rLaDskEO/ahU1I5nm0b/nlOSXl3CFbOrHB8HXwOjuADBFf2 I0vFCqtOf0mfESCjhNWutGFsV; Received: from 97-122-70-152.hlrn.qwest.net ([97.122.70.152]:56692 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lDfEo-001OUW-Sb; Sat, 20 Feb 2021 20:16:50 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 5/5] Move dwarf2_get_dwz_file to dwarf2/dwz.h Date: Sat, 20 Feb 2021 20:16:47 -0700 Message-Id: <20210221031647.949270-6-tom@tromey.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210221031647.949270-1-tom@tromey.com> References: <20210221031647.949270-1-tom@tromey.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.70.152 X-Source-L: No X-Exim-ID: 1lDfEo-001OUW-Sb X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-70-152.hlrn.qwest.net (localhost.localdomain) [97.122.70.152]:56692 X-Source-Auth: tom+tromey.com X-Email-Count: 6 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3034.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 03:16:54 -0000 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-02-20 Tom Tromey * 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. --- gdb/ChangeLog | 12 ++ gdb/dwarf2/dwz.c | 242 ++++++++++++++++++++++++++++++++++++++++ gdb/dwarf2/dwz.h | 11 ++ gdb/dwarf2/read.c | 234 +------------------------------------- gdb/dwarf2/read.h | 9 -- gdb/dwarf2/sect-names.h | 3 + 6 files changed, 269 insertions(+), 242 deletions(-) diff --git a/gdb/dwarf2/dwz.c b/gdb/dwarf2/dwz.c index 6be2fa92456..f9d5db6b48a 100644 --- a/gdb/dwarf2/dwz.c +++ b/gdb/dwarf2/dwz.c @@ -20,6 +20,16 @@ #include "defs.h" #include "dwarf2/dwz.h" +#include "build-id.h" +#include "debuginfod-support.h" +#include "dwarf2/read.h" +#include "dwarf2/sect-names.h" +#include "filenames.h" +#include "gdb_bfd.h" +#include "gdbcore.h" +#include "gdbsupport/pathstuff.h" +#include "gdbsupport/scoped_fd.h" + const char * dwz_file::read_string (struct objfile *objfile, LONGEST str_offset) { @@ -38,3 +48,235 @@ dwz_file::read_string (struct objfile *objfile, LONGEST str_offset) return NULL; return (const char *) (str.buffer + str_offset); } + +/* A helper function to find the sections for a .dwz file. */ + +static void +locate_dwz_sections (bfd *abfd, asection *sectp, dwz_file *dwz_file) +{ + /* Note that we only support the standard ELF names, because .dwz + is ELF-only (at the time of writing). */ + if (dwarf2_elf_names.abbrev.matches (sectp->name)) + { + dwz_file->abbrev.s.section = sectp; + dwz_file->abbrev.size = bfd_section_size (sectp); + } + else if (dwarf2_elf_names.info.matches (sectp->name)) + { + dwz_file->info.s.section = sectp; + dwz_file->info.size = bfd_section_size (sectp); + } + else if (dwarf2_elf_names.str.matches (sectp->name)) + { + dwz_file->str.s.section = sectp; + dwz_file->str.size = bfd_section_size (sectp); + } + else if (dwarf2_elf_names.line.matches (sectp->name)) + { + dwz_file->line.s.section = sectp; + dwz_file->line.size = bfd_section_size (sectp); + } + else if (dwarf2_elf_names.macro.matches (sectp->name)) + { + dwz_file->macro.s.section = sectp; + dwz_file->macro.size = bfd_section_size (sectp); + } + else if (dwarf2_elf_names.gdb_index.matches (sectp->name)) + { + dwz_file->gdb_index.s.section = sectp; + dwz_file->gdb_index.size = bfd_section_size (sectp); + } + else if (dwarf2_elf_names.debug_names.matches (sectp->name)) + { + dwz_file->debug_names.s.section = sectp; + dwz_file->debug_names.size = bfd_section_size (sectp); + } +} + +/* Attempt to find a .dwz file (whose full path is represented by + FILENAME) in all of the specified debug file directories provided. + + Return the equivalent gdb_bfd_ref_ptr of the .dwz file found, or + nullptr if it could not find anything. */ + +static gdb_bfd_ref_ptr +dwz_search_other_debugdirs (std::string &filename, bfd_byte *buildid, + size_t buildid_len) +{ + /* Let's assume that the path represented by FILENAME has the + "/.dwz/" subpath in it. This is what (most) GNU/Linux + distributions do, anyway. */ + size_t dwz_pos = filename.find ("/.dwz/"); + + if (dwz_pos == std::string::npos) + return nullptr; + + /* This is an obvious assertion, but it's here more to educate + future readers of this code that FILENAME at DWZ_POS *must* + contain a directory separator. */ + gdb_assert (IS_DIR_SEPARATOR (filename[dwz_pos])); + + gdb_bfd_ref_ptr dwz_bfd; + std::vector> debugdir_vec + = dirnames_to_char_ptr_vec (debug_file_directory); + + for (const gdb::unique_xmalloc_ptr &debugdir : debugdir_vec) + { + /* The idea is to iterate over the + debug file directories provided by the user and + replace the hard-coded path in the "filename" by each + debug-file-directory. + + For example, suppose that filename is: + + /usr/lib/debug/.dwz/foo.dwz + + And suppose that we have "$HOME/bar" as the + debug-file-directory. We would then adjust filename + to look like: + + $HOME/bar/.dwz/foo.dwz + + which would hopefully allow us to find the alt debug + file. */ + std::string ddir = debugdir.get (); + + if (ddir.empty ()) + continue; + + /* Make sure the current debug-file-directory ends with a + directory separator. This is needed because, if FILENAME + contains something like "/usr/lib/abcde/.dwz/foo.dwz" and + DDIR is "/usr/lib/abc", then could wrongfully skip it + below. */ + if (!IS_DIR_SEPARATOR (ddir.back ())) + ddir += SLASH_STRING; + + /* Check whether the beginning of FILENAME is DDIR. If it is, + then we are dealing with a file which we already attempted to + open before, so we just skip it and continue processing the + remaining debug file directories. */ + if (filename.size () > ddir.size () + && filename.compare (0, ddir.size (), ddir) == 0) + continue; + + /* Replace FILENAME's default debug-file-directory with + DDIR. */ + std::string new_filename = ddir + &filename[dwz_pos + 1]; + + dwz_bfd = gdb_bfd_open (new_filename.c_str (), gnutarget); + + if (dwz_bfd == nullptr) + continue; + + if (!build_id_verify (dwz_bfd.get (), buildid_len, buildid)) + { + dwz_bfd.reset (nullptr); + continue; + } + + /* Found it. */ + break; + } + + return dwz_bfd; +} + +/* See dwz.h. */ + +struct dwz_file * +dwarf2_get_dwz_file (dwarf2_per_bfd *per_bfd, bool require) +{ + bfd_size_type buildid_len_arg; + size_t buildid_len; + bfd_byte *buildid; + + if (per_bfd->dwz_file != NULL) + return per_bfd->dwz_file.get (); + + bfd_set_error (bfd_error_no_error); + gdb::unique_xmalloc_ptr data + (bfd_get_alt_debug_link_info (per_bfd->obfd, + &buildid_len_arg, &buildid)); + if (data == NULL) + { + if (bfd_get_error () == bfd_error_no_error) + { + if (!require) + return nullptr; + error (_("could not read '.gnu_debugaltlink' section")); + } + error (_("could not read '.gnu_debugaltlink' section: %s"), + bfd_errmsg (bfd_get_error ())); + } + + gdb::unique_xmalloc_ptr buildid_holder (buildid); + + buildid_len = (size_t) buildid_len_arg; + + std::string filename = data.get (); + + if (!IS_ABSOLUTE_PATH (filename.c_str ())) + { + gdb::unique_xmalloc_ptr abs + = gdb_realpath (bfd_get_filename (per_bfd->obfd)); + + filename = ldirname (abs.get ()) + SLASH_STRING + filename; + } + + /* First try the file name given in the section. If that doesn't + work, try to use the build-id instead. */ + gdb_bfd_ref_ptr dwz_bfd (gdb_bfd_open (filename.c_str (), gnutarget)); + if (dwz_bfd != NULL) + { + if (!build_id_verify (dwz_bfd.get (), buildid_len, buildid)) + dwz_bfd.reset (nullptr); + } + + if (dwz_bfd == NULL) + dwz_bfd = build_id_to_debug_bfd (buildid_len, buildid); + + if (dwz_bfd == nullptr) + { + /* If the user has provided us with different + debug file directories, we can try them in order. */ + dwz_bfd = dwz_search_other_debugdirs (filename, buildid, buildid_len); + } + + if (dwz_bfd == nullptr) + { + gdb::unique_xmalloc_ptr alt_filename; + const char *origname = bfd_get_filename (per_bfd->obfd); + + scoped_fd fd (debuginfod_debuginfo_query (buildid, + buildid_len, + origname, + &alt_filename)); + + if (fd.get () >= 0) + { + /* File successfully retrieved from server. */ + dwz_bfd = gdb_bfd_open (alt_filename.get (), gnutarget); + + if (dwz_bfd == nullptr) + warning (_("File \"%s\" from debuginfod cannot be opened as bfd"), + alt_filename.get ()); + else if (!build_id_verify (dwz_bfd.get (), buildid_len, buildid)) + dwz_bfd.reset (nullptr); + } + } + + if (dwz_bfd == NULL) + error (_("could not find '.gnu_debugaltlink' file for %s"), + bfd_get_filename (per_bfd->obfd)); + + std::unique_ptr result + (new struct dwz_file (std::move (dwz_bfd))); + + for (asection *sec : gdb_bfd_sections (result->dwz_bfd)) + locate_dwz_sections (result->dwz_bfd.get (), sec, result.get ()); + + gdb_bfd_record_inclusion (per_bfd->obfd, result->dwz_bfd.get ()); + per_bfd->dwz_file = std::move (result); + return per_bfd->dwz_file.get (); +} diff --git a/gdb/dwarf2/dwz.h b/gdb/dwarf2/dwz.h index c50aab8676c..634afbbfbcf 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 */ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 6a755f716d1..31f34dc6047 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -87,7 +87,6 @@ #include "rust-lang.h" #include "gdbsupport/pathstuff.h" #include "count-one-bits.h" -#include "debuginfod-support.h" /* When == 1, print basic high level tracing messages. When > 1, be more verbose. @@ -324,7 +323,7 @@ get_dwarf2_per_objfile (struct objfile *objfile) /* Note that if the debugging section has been compressed, it might have a name like .zdebug_info. */ -static const struct dwarf2_debug_sections dwarf2_elf_names = +const struct dwarf2_debug_sections dwarf2_elf_names = { { ".debug_info", ".zdebug_info" }, { ".debug_abbrev", ".zdebug_abbrev" }, @@ -2143,237 +2142,6 @@ dwarf2_get_section_info (struct objfile *objfile, *sizep = info->size; } -/* A helper function to find the sections for a .dwz file. */ - -static void -locate_dwz_sections (bfd *abfd, asection *sectp, dwz_file *dwz_file) -{ - /* Note that we only support the standard ELF names, because .dwz - is ELF-only (at the time of writing). */ - if (dwarf2_elf_names.abbrev.matches (sectp->name)) - { - dwz_file->abbrev.s.section = sectp; - dwz_file->abbrev.size = bfd_section_size (sectp); - } - else if (dwarf2_elf_names.info.matches (sectp->name)) - { - dwz_file->info.s.section = sectp; - dwz_file->info.size = bfd_section_size (sectp); - } - else if (dwarf2_elf_names.str.matches (sectp->name)) - { - dwz_file->str.s.section = sectp; - dwz_file->str.size = bfd_section_size (sectp); - } - else if (dwarf2_elf_names.line.matches (sectp->name)) - { - dwz_file->line.s.section = sectp; - dwz_file->line.size = bfd_section_size (sectp); - } - else if (dwarf2_elf_names.macro.matches (sectp->name)) - { - dwz_file->macro.s.section = sectp; - dwz_file->macro.size = bfd_section_size (sectp); - } - else if (dwarf2_elf_names.gdb_index.matches (sectp->name)) - { - dwz_file->gdb_index.s.section = sectp; - dwz_file->gdb_index.size = bfd_section_size (sectp); - } - else if (dwarf2_elf_names.debug_names.matches (sectp->name)) - { - dwz_file->debug_names.s.section = sectp; - dwz_file->debug_names.size = bfd_section_size (sectp); - } -} - -/* Attempt to find a .dwz file (whose full path is represented by - FILENAME) in all of the specified debug file directories provided. - - Return the equivalent gdb_bfd_ref_ptr of the .dwz file found, or - nullptr if it could not find anything. */ - -static gdb_bfd_ref_ptr -dwz_search_other_debugdirs (std::string &filename, bfd_byte *buildid, - size_t buildid_len) -{ - /* Let's assume that the path represented by FILENAME has the - "/.dwz/" subpath in it. This is what (most) GNU/Linux - distributions do, anyway. */ - size_t dwz_pos = filename.find ("/.dwz/"); - - if (dwz_pos == std::string::npos) - return nullptr; - - /* This is an obvious assertion, but it's here more to educate - future readers of this code that FILENAME at DWZ_POS *must* - contain a directory separator. */ - gdb_assert (IS_DIR_SEPARATOR (filename[dwz_pos])); - - gdb_bfd_ref_ptr dwz_bfd; - std::vector> debugdir_vec - = dirnames_to_char_ptr_vec (debug_file_directory); - - for (const gdb::unique_xmalloc_ptr &debugdir : debugdir_vec) - { - /* The idea is to iterate over the - debug file directories provided by the user and - replace the hard-coded path in the "filename" by each - debug-file-directory. - - For example, suppose that filename is: - - /usr/lib/debug/.dwz/foo.dwz - - And suppose that we have "$HOME/bar" as the - debug-file-directory. We would then adjust filename - to look like: - - $HOME/bar/.dwz/foo.dwz - - which would hopefully allow us to find the alt debug - file. */ - std::string ddir = debugdir.get (); - - if (ddir.empty ()) - continue; - - /* Make sure the current debug-file-directory ends with a - directory separator. This is needed because, if FILENAME - contains something like "/usr/lib/abcde/.dwz/foo.dwz" and - DDIR is "/usr/lib/abc", then could wrongfully skip it - below. */ - if (!IS_DIR_SEPARATOR (ddir.back ())) - ddir += SLASH_STRING; - - /* Check whether the beginning of FILENAME is DDIR. If it is, - then we are dealing with a file which we already attempted to - open before, so we just skip it and continue processing the - remaining debug file directories. */ - if (filename.size () > ddir.size () - && filename.compare (0, ddir.size (), ddir) == 0) - continue; - - /* Replace FILENAME's default debug-file-directory with - DDIR. */ - std::string new_filename = ddir + &filename[dwz_pos + 1]; - - dwz_bfd = gdb_bfd_open (new_filename.c_str (), gnutarget); - - if (dwz_bfd == nullptr) - continue; - - if (!build_id_verify (dwz_bfd.get (), buildid_len, buildid)) - { - dwz_bfd.reset (nullptr); - continue; - } - - /* Found it. */ - break; - } - - return dwz_bfd; -} - -/* See dwarf2read.h. */ - -struct dwz_file * -dwarf2_get_dwz_file (dwarf2_per_bfd *per_bfd, bool require) -{ - bfd_size_type buildid_len_arg; - size_t buildid_len; - bfd_byte *buildid; - - if (per_bfd->dwz_file != NULL) - return per_bfd->dwz_file.get (); - - bfd_set_error (bfd_error_no_error); - gdb::unique_xmalloc_ptr data - (bfd_get_alt_debug_link_info (per_bfd->obfd, - &buildid_len_arg, &buildid)); - if (data == NULL) - { - if (bfd_get_error () == bfd_error_no_error) - { - if (!require) - return nullptr; - error (_("could not read '.gnu_debugaltlink' section")); - } - error (_("could not read '.gnu_debugaltlink' section: %s"), - bfd_errmsg (bfd_get_error ())); - } - - gdb::unique_xmalloc_ptr buildid_holder (buildid); - - buildid_len = (size_t) buildid_len_arg; - - std::string filename = data.get (); - - if (!IS_ABSOLUTE_PATH (filename.c_str ())) - { - gdb::unique_xmalloc_ptr abs - = gdb_realpath (bfd_get_filename (per_bfd->obfd)); - - filename = ldirname (abs.get ()) + SLASH_STRING + filename; - } - - /* First try the file name given in the section. If that doesn't - work, try to use the build-id instead. */ - gdb_bfd_ref_ptr dwz_bfd (gdb_bfd_open (filename.c_str (), gnutarget)); - if (dwz_bfd != NULL) - { - if (!build_id_verify (dwz_bfd.get (), buildid_len, buildid)) - dwz_bfd.reset (nullptr); - } - - if (dwz_bfd == NULL) - dwz_bfd = build_id_to_debug_bfd (buildid_len, buildid); - - if (dwz_bfd == nullptr) - { - /* If the user has provided us with different - debug file directories, we can try them in order. */ - dwz_bfd = dwz_search_other_debugdirs (filename, buildid, buildid_len); - } - - if (dwz_bfd == nullptr) - { - gdb::unique_xmalloc_ptr alt_filename; - const char *origname = bfd_get_filename (per_bfd->obfd); - - scoped_fd fd (debuginfod_debuginfo_query (buildid, - buildid_len, - origname, - &alt_filename)); - - if (fd.get () >= 0) - { - /* File successfully retrieved from server. */ - dwz_bfd = gdb_bfd_open (alt_filename.get (), gnutarget); - - if (dwz_bfd == nullptr) - warning (_("File \"%s\" from debuginfod cannot be opened as bfd"), - alt_filename.get ()); - else if (!build_id_verify (dwz_bfd.get (), buildid_len, buildid)) - dwz_bfd.reset (nullptr); - } - } - - if (dwz_bfd == NULL) - error (_("could not find '.gnu_debugaltlink' file for %s"), - bfd_get_filename (per_bfd->obfd)); - - std::unique_ptr result - (new struct dwz_file (std::move (dwz_bfd))); - - for (asection *sec : gdb_bfd_sections (result->dwz_bfd)) - locate_dwz_sections (result->dwz_bfd.get (), sec, result.get ()); - - gdb_bfd_record_inclusion (per_bfd->obfd, result->dwz_bfd.get ()); - per_bfd->dwz_file = std::move (result); - return per_bfd->dwz_file.get (); -} /* DWARF quick_symbols_functions support. */ diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h index 86ac6b50cc0..1d0f0a4995b 100644 --- a/gdb/dwarf2/read.h +++ b/gdb/dwarf2/read.h @@ -633,15 +633,6 @@ struct signatured_type struct dwo_unit *dwo_unit; }; -/* 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); - /* Return the type of the DIE at DIE_OFFSET in the CU named by PER_CU. */ diff --git a/gdb/dwarf2/sect-names.h b/gdb/dwarf2/sect-names.h index b75328358c2..bf7ea2cd4b2 100644 --- a/gdb/dwarf2/sect-names.h +++ b/gdb/dwarf2/sect-names.h @@ -72,4 +72,7 @@ struct dwarf2_debug_sections { int sentinel; }; +/* Section names for ELF. */ +extern const struct dwarf2_debug_sections dwarf2_elf_names; + #endif /* GDB_DWARF2_SECT_NAMES_H */ -- 2.26.2