+2020-12-23 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * expprint.c (print_subexp_standard): Replace uses of
+ LA_PRINT_STRING.
+ * f-valprint.c (f_language::value_print_inner): Likewise.
+ * guile/scm-pretty-print.c (ppscm_print_string_repr): Likewise.
+ * p-valprint.c (pascal_language::value_print_inner): Likewise.
+ * python/py-prettyprint.c (print_string_repr): Likewise.
+
2020-12-23 Andrew Burgess <andrew.burgess@embecosm.com>
* rust-exp.y (rust_parse): Rename to...
If necessary, we can temporarily set it to zero, or pass it as an
additional parameter to LA_PRINT_STRING. -fnf */
get_user_print_options (&opts);
- LA_PRINT_STRING (stream, builtin_type (exp->gdbarch)->builtin_char,
- (gdb_byte *) &exp->elts[pc + 2].string, nargs,
- NULL, 0, &opts);
+ exp->language_defn
+ ->printstr (stream, builtin_type (exp->gdbarch)->builtin_char,
+ (gdb_byte *) &exp->elts[pc + 2].string, nargs,
+ NULL, 0, &opts);
}
return;
(*pos) += 3 + BYTES_TO_EXP_ELEM (nargs + 1);
fputs_filtered ("@\"", stream);
get_user_print_options (&opts);
- LA_PRINT_STRING (stream, builtin_type (exp->gdbarch)->builtin_char,
- (gdb_byte *) &exp->elts[pc + 2].string, nargs,
- NULL, 0, &opts);
+ exp->language_defn
+ ->printstr (stream, builtin_type (exp->gdbarch)->builtin_char,
+ (gdb_byte *) &exp->elts[pc + 2].string, nargs,
+ NULL, 0, &opts);
fputs_filtered ("\"", stream);
}
return;
struct value_print_options opts;
get_user_print_options (&opts);
- LA_PRINT_STRING (stream, builtin_type (exp->gdbarch)->builtin_char,
- (gdb_byte *) tempstr, nargs - 1, NULL, 0, &opts);
+ exp->language_defn
+ ->printstr (stream, builtin_type (exp->gdbarch)->builtin_char,
+ (gdb_byte *) tempstr, nargs - 1, NULL, 0, &opts);
(*pos) = pc;
}
else
{
case TYPE_CODE_STRING:
f77_get_dynamic_length_of_aggregate (type);
- LA_PRINT_STRING (stream, builtin_type (gdbarch)->builtin_char,
- valaddr, TYPE_LENGTH (type), NULL, 0, options);
+ printstr (stream, builtin_type (gdbarch)->builtin_char, valaddr,
+ TYPE_LENGTH (type), NULL, 0, options);
break;
case TYPE_CODE_ARRAY:
struct type *ch_type = TYPE_TARGET_TYPE (type);
f77_get_dynamic_length_of_aggregate (type);
- LA_PRINT_STRING (stream, ch_type, valaddr,
- TYPE_LENGTH (type) / TYPE_LENGTH (ch_type),
- NULL, 0, options);
+ printstr (stream, ch_type, valaddr,
+ TYPE_LENGTH (type) / TYPE_LENGTH (ch_type), NULL, 0,
+ options);
}
break;
{
struct type *type = builtin_type (gdbarch)->builtin_char;
- LA_PRINT_STRING (stream, type, (gdb_byte *) string.get (),
- length, NULL, 0, options);
+ language->printstr (stream, type, (gdb_byte *) string.get (),
+ length, NULL, 0, options);
}
else
{
len = temp_len;
}
- LA_PRINT_STRING (stream, TYPE_TARGET_TYPE (type),
- valaddr, len, NULL, 0, options);
+ printstr (stream, TYPE_TARGET_TYPE (type), valaddr, len,
+ NULL, 0, options);
i = len;
}
else
{
len = extract_unsigned_integer (valaddr + length_pos,
length_size, byte_order);
- LA_PRINT_STRING (stream, char_type, valaddr + string_pos,
- len, NULL, 0, options);
+ printstr (stream, char_type, valaddr + string_pos, len,
+ NULL, 0, options);
}
else
pascal_object_print_value_fields (val, stream, recurse,
type = builtin_type (gdbarch)->builtin_char;
if (hint && !strcmp (hint, "string"))
- LA_PRINT_STRING (stream, type, (gdb_byte *) output,
- length, NULL, 0, options);
+ language->printstr (stream, type, (gdb_byte *) output,
+ length, NULL, 0, options);
else
fputs_filtered (output, stream);
}