+2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * target-descriptions.c (print_c_tdesc::print_c_tdesc): Change
+ whitespace to underscore.
+ (maint_print_c_tdesc_cmd): Use fake filename for target
+ descriptions that came from the target.
+ (_initialize_target_descriptions): Add filename command completion
+ for 'maint print c-tdesc'.
+
2020-06-23 Simon Marchi <simon.marchi@efficios.com>
* dwarf2/loc.c (decode_debug_loclists_addresses): Add empty
break;
else if (*inp == '-')
*outp++ = '_';
+ else if (*inp == ' ')
+ *outp++ = '_';
else
*outp++ = *inp;
*outp = '\0';
error (_("There is no target description to print."));
if (filename == NULL)
- error (_("The current target description did not come from an XML file."));
+ filename = "fetched from target";
std::string filename_after_features (filename);
auto loc = filename_after_features.rfind ("/features/");
void
_initialize_target_descriptions ()
{
+ cmd_list_element *cmd;
+
tdesc_data = gdbarch_data_register_pre_init (tdesc_data_init);
add_basic_prefix_cmd ("tdesc", class_maintenance, _("\
When unset, GDB will read the description from the target."),
&tdesc_unset_cmdlist);
- add_cmd ("c-tdesc", class_maintenance, maint_print_c_tdesc_cmd, _("\
+ cmd = add_cmd ("c-tdesc", class_maintenance, maint_print_c_tdesc_cmd, _("\
Print the current target description as a C source file."),
&maintenanceprintlist);
-
- cmd_list_element *cmd;
+ set_cmd_completer (cmd, filename_completer);
cmd = add_cmd ("xml-descriptions", class_maintenance,
maintenance_check_xml_descriptions, _("\