diff options
author | Tom de Vries <tdevries@suse.de> | 2024-08-27 09:08:41 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2024-08-27 09:08:41 +0200 |
commit | f6f07a0b923747af8d45c24223b66ea22f33fc97 (patch) | |
tree | 37d8e6b886d020ef1fed5c650a3c9b11cd975d88 | |
parent | ca2590d7804b4ea563eec6f1127ed17a00c30315 (diff) | |
download | binutils-f6f07a0b923747af8d45c24223b66ea22f33fc97.zip binutils-f6f07a0b923747af8d45c24223b66ea22f33fc97.tar.gz binutils-f6f07a0b923747af8d45c24223b66ea22f33fc97.tar.bz2 |
[gdb/symtab] Use [in module %s] notation more consistently in dwarf errors
In gdb/dwarf2/read.c, I found a few strings "in module %s":
...
$ grep "in module %s" gdb/dwarf2/read.c | fgrep -v '['
"DIE at %s in module %s"),
error (_("Dwarf Error: Dummy CU at %s referenced in module %s"),
error (_("Dwarf Error: Cannot find DIE at %s referenced in module %s"),
error (_("Dwarf Error: DIE at %s referenced in module %s "
error (_("Dwarf Error: Dummy CU at %s referenced in module %s"),
error (_("Dwarf Error: Cannot find DIE at %s referenced in module %s"),
...
that are not using the commonly used "[in module %s]" notation. Fix these.
In one case, the string was also used in the middle rather than at the end of
the message, so fix that as well.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom@tromey.com>
-rw-r--r-- | gdb/dwarf2/read.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index e75bfb7..1d4188b 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -17704,7 +17704,7 @@ dwarf2_string_attr (struct die_info *die, unsigned int name, struct dwarf2_cu *c str = attr->as_string (); if (str == nullptr) complaint (_("string type expected for attribute %s for " - "DIE at %s in module %s"), + "DIE at %s [in module %s]"), dwarf_attr_name (name), sect_offset_str (die->sect_off), objfile_name (cu->per_objfile->objfile)); } @@ -20400,13 +20400,13 @@ dwarf2_fetch_die_loc_sect_off (sect_offset sect_off, { /* We shouldn't get here for a dummy CU, but don't crash on the user. Instead just throw an error, not much else we can do. */ - error (_("Dwarf Error: Dummy CU at %s referenced in module %s"), + error (_("Dwarf Error: Dummy CU at %s referenced [in module %s]"), sect_offset_str (sect_off), objfile_name (objfile)); } die = follow_die_offset (sect_off, per_cu->is_dwz, &cu); if (!die) - error (_("Dwarf Error: Cannot find DIE at %s referenced in module %s"), + error (_("Dwarf Error: Cannot find DIE at %s referenced [in module %s]"), sect_offset_str (sect_off), objfile_name (objfile)); attr = dwarf2_attr (die, DW_AT_location, cu); @@ -20465,8 +20465,8 @@ dwarf2_fetch_die_loc_sect_off (sect_offset sect_off, else { if (!attr->form_is_block ()) - error (_("Dwarf Error: DIE at %s referenced in module %s " - "is neither DW_FORM_block* nor DW_FORM_exprloc"), + error (_("Dwarf Error: DIE at %s is neither DW_FORM_block* nor" + " DW_FORM_exprloc [in module %s]"), sect_offset_str (sect_off), objfile_name (objfile)); struct dwarf_block *block = attr->as_block (); @@ -20539,13 +20539,13 @@ dwarf2_fetch_constant_bytes (sect_offset sect_off, { /* We shouldn't get here for a dummy CU, but don't crash on the user. Instead just throw an error, not much else we can do. */ - error (_("Dwarf Error: Dummy CU at %s referenced in module %s"), + error (_("Dwarf Error: Dummy CU at %s referenced [in module %s]"), sect_offset_str (sect_off), objfile_name (objfile)); } die = follow_die_offset (sect_off, per_cu->is_dwz, &cu); if (!die) - error (_("Dwarf Error: Cannot find DIE at %s referenced in module %s"), + error (_("Dwarf Error: Cannot find DIE at %s referenced [in module %s]"), sect_offset_str (sect_off), objfile_name (objfile)); attr = dwarf2_attr (die, DW_AT_const_value, cu); |