aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2/dwz.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2023-02-08 15:36:23 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2023-02-08 15:46:02 -0500
commitc583a2520616c2736cffc389c89a48b159366e6c (patch)
treeb4925f26506fcee96c16119431c01760f05db95d /gdb/dwarf2/dwz.c
parentca7f92c2f15b86b09c4a8ad14806bef666308d31 (diff)
downloadbinutils-users/simark/clang-format.zip
binutils-users/simark/clang-format.tar.gz
binutils-users/simark/clang-format.tar.bz2
Run clang-format.shusers/simark/clang-format
Change-Id: Ia948cc26d534b0dd02702244d52434b1a2093968
Diffstat (limited to 'gdb/dwarf2/dwz.c')
-rw-r--r--gdb/dwarf2/dwz.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/gdb/dwarf2/dwz.c b/gdb/dwarf2/dwz.c
index 447c942..3a09856 100644
--- a/gdb/dwarf2/dwz.c
+++ b/gdb/dwarf2/dwz.c
@@ -36,12 +36,12 @@ dwz_file::read_string (struct objfile *objfile, LONGEST str_offset)
str.read (objfile);
if (str.buffer == NULL)
- error (_("DW_FORM_GNU_strp_alt used without .debug_str "
- "section [in module %s]"),
+ error (_ ("DW_FORM_GNU_strp_alt used without .debug_str "
+ "section [in module %s]"),
bfd_get_filename (dwz_bfd.get ()));
if (str_offset >= str.size)
- error (_("DW_FORM_GNU_strp_alt pointing outside of "
- ".debug_str section [in module %s]"),
+ error (_ ("DW_FORM_GNU_strp_alt pointing outside of "
+ ".debug_str section [in module %s]"),
bfd_get_filename (dwz_bfd.get ()));
gdb_assert (HOST_CHAR_BIT == 8);
if (str.buffer[str_offset] == '\0')
@@ -195,18 +195,17 @@ dwarf2_get_dwz_file (dwarf2_per_bfd *per_bfd, bool require)
return per_bfd->dwz_file.get ();
bfd_set_error (bfd_error_no_error);
- gdb::unique_xmalloc_ptr<char> data
- (bfd_get_alt_debug_link_info (per_bfd->obfd,
- &buildid_len_arg, &buildid));
+ gdb::unique_xmalloc_ptr<char> 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"));
}
- error (_("could not read '.gnu_debugaltlink' section: %s"),
+ error (_ ("could not read '.gnu_debugaltlink' section: %s"),
bfd_errmsg (bfd_get_error ()));
}
@@ -248,9 +247,7 @@ dwarf2_get_dwz_file (dwarf2_per_bfd *per_bfd, bool require)
gdb::unique_xmalloc_ptr<char> alt_filename;
const char *origname = bfd_get_filename (per_bfd->obfd);
- scoped_fd fd (debuginfod_debuginfo_query (buildid,
- buildid_len,
- origname,
+ scoped_fd fd (debuginfod_debuginfo_query (buildid, buildid_len, origname,
&alt_filename));
if (fd.get () >= 0)
@@ -259,7 +256,7 @@ dwarf2_get_dwz_file (dwarf2_per_bfd *per_bfd, bool require)
dwz_bfd = gdb_bfd_open (alt_filename.get (), gnutarget);
if (dwz_bfd == nullptr)
- warning (_("File \"%s\" from debuginfod cannot be opened as bfd"),
+ 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);
@@ -267,11 +264,11 @@ dwarf2_get_dwz_file (dwarf2_per_bfd *per_bfd, bool require)
}
if (dwz_bfd == NULL)
- error (_("could not find '.gnu_debugaltlink' file for %s"),
+ error (_ ("could not find '.gnu_debugaltlink' file for %s"),
bfd_get_filename (per_bfd->obfd));
- std::unique_ptr<struct dwz_file> result
- (new struct dwz_file (std::move (dwz_bfd)));
+ std::unique_ptr<struct dwz_file> 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 ());