[gdb/tdep] Eliminate ostringstream use from arc_check_tdesc_feature
We generally avoid C++ streams in GDB sources [1].
Remove an instance of std::ostringstream in arc_check_tdesc_feature.
While we're at it, fix an array index bug:
...
- reg_names << " or '" << reg.names[0] << "'";
+ string_appendf (reg_names, " or '%s'", reg.names[i]);
...
Tested on x86_64-linux, using a trigger patch:
...
- if (!found && reg.required_p)
+ if (true || (!found && reg.required_p))
...
and doing "maint selftest" and observing the output:
...
Running selftest unpack_field_as_long::ARC600.
Error: Cannot find required register(s) 'r0' in feature 'org.gnu.gdb.arc.core'.
Error: Cannot find required register(s) 'pc' in feature 'org.gnu.gdb.arc.aux'.
...
Approved-By: Simon Marchi <simon.marchi@efficios.com>
[1] https://sourceware.org/pipermail/gdb-patches/2026-March/226117.html
1 file changed