print_string_repr (PyObject *printer, const char *hint,
struct ui_file *stream, int recurse,
const struct value_print_options *options,
- const struct language_defn *language)
+ const struct language_defn *language,
+ struct gdbarch *gdbarch)
{
char *output;
struct value *replacement = NULL;
if (output)
{
if (hint && !strcmp (hint, "string"))
- LA_PRINT_STRING (stream, builtin_type (current_gdbarch)->builtin_char,
+ LA_PRINT_STRING (stream, builtin_type (gdbarch)->builtin_char,
(gdb_byte *) output, strlen (output),
0, options);
else
const struct value_print_options *options,
const struct language_defn *language)
{
+ struct gdbarch *gdbarch = get_type_arch (type);
PyObject *printer = NULL;
PyObject *val_obj = NULL;
struct value *value;
make_cleanup (free_current_contents, &hint);
/* Print the section */
- print_string_repr (printer, hint, stream, recurse, options, language);
+ print_string_repr (printer, hint, stream, recurse, options, language,
+ gdbarch);
print_children (printer, hint, stream, recurse, options, language);
result = 1;