Change regcache list to be an hash map
[deliverable/binutils-gdb.git] / gdb / valprint.c
index 5616db12ef044385e2c423a138a348683857ddd5..4f80ee0dfe3b0e7fbb9ae0042c8bf5b25f3bd5f4 100644 (file)
@@ -1720,7 +1720,7 @@ print_decimal_chars (struct ui_file *stream, const gdb_byte *valaddr,
    * decimal.
    *
    * Given a hex number (in nibbles) as XYZ, we start by taking X and
-   * decemalizing it as "x1 x2" in two decimal nibbles.  Then we multiply
+   * decimalizing it as "x1 x2" in two decimal nibbles.  Then we multiply
    * the nibbles by 16, add Y and re-decimalize.  Repeat with Z.
    *
    * The trick is that "digits" holds a base-10 number, but sometimes
@@ -2402,7 +2402,7 @@ generic_emit_char (int c, struct type *type, struct ui_file *stream,
                   int quoter, const char *encoding)
 {
   enum bfd_endian byte_order
-    = gdbarch_byte_order (get_type_arch (type));
+    = type_byte_order (type);
   gdb_byte *c_buf;
   int need_escape = 0;
 
@@ -2722,7 +2722,7 @@ generic_printstr (struct ui_file *stream, struct type *type,
                  int quote_char, int c_style_terminator,
                  const struct value_print_options *options)
 {
-  enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type));
+  enum bfd_endian byte_order = type_byte_order (type);
   unsigned int i;
   int width = TYPE_LENGTH (type);
   int finished = 0;
@@ -2834,7 +2834,7 @@ val_print_string (struct type *elttype, const char *encoding,
   int bytes_read;
   gdb::unique_xmalloc_ptr<gdb_byte> buffer;    /* Dynamically growable fetch buffer.  */
   struct gdbarch *gdbarch = get_type_arch (elttype);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+  enum bfd_endian byte_order = type_byte_order (elttype);
   int width = TYPE_LENGTH (elttype);
 
   /* First we need to figure out the limit on the number of characters we are
@@ -2897,9 +2897,9 @@ val_print_string (struct type *elttype, const char *encoding,
     {
       std::string str = memory_error_message (TARGET_XFER_E_IO, gdbarch, addr);
 
-      fprintf_filtered (stream, "<error: ");
-      fputs_filtered (str.c_str (), stream);
-      fprintf_filtered (stream, ">");
+      fprintf_filtered (stream, _("<error: %ps>"),
+                       styled_string (metadata_style.style (),
+                                      str.c_str ()));
     }
 
   return (bytes_read / width);
@@ -3198,6 +3198,16 @@ Use \"unlimited\" to print the complete structure.")
     NULL, /* help_doc */
   },
 
+  boolean_option_def {
+    "raw-values",
+    [] (value_print_options *opt) { return &opt->raw; },
+    NULL, /* show_cmd_cb */
+    N_("Set whether to print values in raw form."),
+    N_("Show whether to print values in raw form."),
+    N_("If set, values are printed in raw form, bypassing any\n\
+pretty-printers for that value.")
+  },
+
   uinteger_option_def {
     "repeats",
     [] (value_print_options *opt) { return &opt->repeat_count_threshold; },
This page took 0.030892 seconds and 4 git commands to generate.