Fix gdb_xml_debug/gdb_xml_error ATTRIBUTE_PRINTF use
The declarations of gdb_xml_debug and gdb_xml_error are passing "0" as "first-to-check" argument to ATTRIBUTE_PRINTF, as if they were va_args functions. Consequently, the arguments to gdb_xml_debug / gdb_xml_error aren't being checked against the format strings. With that fixed, a couple obvious bugs are exposed, both fixed by this commit. gdb/ChangeLog: 2017-03-27 Pedro Alves <palves@redhat.com> * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument to ATTRIBUTE_PRINTF. * solib-target.c (library_list_start_list): Print "string" not "version". * xml-tdesc.c (tdesc_start_field): Pass "field_name" to gdb_xml_error call.
This commit is contained in:
parent
9b75393746
commit
210477268d
4 changed files with 14 additions and 5 deletions
|
@ -159,7 +159,7 @@ library_list_start_list (struct gdb_xml_parser *parser,
|
|||
if (strcmp (string, "1.0") != 0)
|
||||
gdb_xml_error (parser,
|
||||
_("Library list has unsupported version \"%s\""),
|
||||
version);
|
||||
string);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue