diff options
Diffstat (limited to 'gdb/dwarf2/section.c')
-rw-r--r-- | gdb/dwarf2/section.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gdb/dwarf2/section.c b/gdb/dwarf2/section.c index 6aab0b9..e0b63fd 100644 --- a/gdb/dwarf2/section.c +++ b/gdb/dwarf2/section.c @@ -28,6 +28,7 @@ #include "gdb_bfd.h" #include "objfiles.h" #include "complaints.h" +#include "dwarf2/error.h" void dwarf2_section_info::overflow_complaint () const @@ -140,8 +141,9 @@ dwarf2_section_info::read (struct objfile *objfile) gdb_assert (sectp != NULL); if ((sectp->flags & SEC_RELOC) != 0) { - error (_("Dwarf Error: DWP format V2 with relocations is not" - " supported in section %s [in module %s]"), + error (_(DWARF_ERROR_PREFIX + "DWP format V2 with relocations is not supported" + " in section %s [in module %s]"), get_name (), get_file_name ()); } containing_section->read (objfile); @@ -183,8 +185,8 @@ dwarf2_section_info::read (struct objfile *objfile) if (bfd_seek (abfd, sectp->filepos, SEEK_SET) != 0 || bfd_read (buf, size, abfd) != size) { - error (_("Dwarf Error: Can't read DWARF data" - " in section %s [in module %s]"), + error (_(DWARF_ERROR_PREFIX + "Can't read DWARF data in section %s [in module %s]"), bfd_section_name (sectp), bfd_get_filename (abfd)); } } @@ -197,10 +199,12 @@ dwarf2_section_info::read_string (struct objfile *objfile, LONGEST str_offset, if (buffer == NULL) { if (get_bfd_section () == nullptr) - error (_("Dwarf Error: %s used without required section"), + error (_(DWARF_ERROR_PREFIX + "%s used without required section"), form_name); else - error (_("Dwarf Error: %s used without %s section [in module %s]"), + error (_(DWARF_ERROR_PREFIX + "%s used without %s section [in module %s]"), form_name, get_name (), get_file_name ()); } if (str_offset >= size) |