* gdbtypes.c (make_pointer_type, make_reference_type,
[deliverable/binutils-gdb.git] / gdb / python / python-prettyprint.c
index 117a5e4ca1ffb65e29e9b2df8a5ab8aa7e8738da..09ef261bb0a74351a692d2a46abe68e42b2c16bc 100644 (file)
@@ -181,7 +181,8 @@ static void
 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;
@@ -190,7 +191,7 @@ print_string_repr (PyObject *printer, const char *hint,
   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
@@ -466,6 +467,7 @@ apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr,
                          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;
@@ -498,7 +500,8 @@ apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr,
   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;
 
This page took 0.041185 seconds and 4 git commands to generate.